Skip to content
Snippets Groups Projects
Unverified Commit 8a7c9418 authored by Stefan Prodan's avatar Stefan Prodan
Browse files

Add client certificate authentication

parent 183b9a7e
No related branches found
No related tags found
No related merge requests found
...@@ -110,7 +110,25 @@ spec: ...@@ -110,7 +110,25 @@ spec:
The `secretRef` points to a Kubernetes secret in the same namespace as the `OCIRepository`, The `secretRef` points to a Kubernetes secret in the same namespace as the `OCIRepository`,
the secret type must be `kubernetes.io/dockerconfigjson`. the secret type must be `kubernetes.io/dockerconfigjson`.
When Flux runs on EKS or GKE, an IAM role (that grants read-only access to ACR, ECR or GCR) For private repositories which require a certificate to authenticate,
the client certificate, private key and the CA certificate (if self-signed), can be provided with:
```yaml
spec:
certSecretRef:
name: regcert
```
The `certSecretRef` points to a Kubernetes secret in the same namespace as the `OCIRepository`:
```shell
kubectl create secret generic regcert \
--from-file=certFile=client.crt \
--from-file=keyFile=client.key \
--from-file=caFile=ca.crt
```
When Flux runs on AKS, EKS or GKE, an IAM role (that grants read-only access to ACR, ECR or GCR)
can be used to bind the `source-controller` to the IAM role. can be used to bind the `source-controller` to the IAM role.
Similar to image-reflector-controller Similar to image-reflector-controller
...@@ -126,6 +144,19 @@ source-controller will expose dedicated flags for each cloud provider: ...@@ -126,6 +144,19 @@ source-controller will expose dedicated flags for each cloud provider:
We should extract the flags and the AWS, Azure and GCP auth implementations from image-reflector-controller into We should extract the flags and the AWS, Azure and GCP auth implementations from image-reflector-controller into
`fluxcd/pkg/oci/auth` to reuses the code in source-controller. `fluxcd/pkg/oci/auth` to reuses the code in source-controller.
### Pull artifacts from self-hosted repositories
For self-hosted Docker registries where the API is exposed with a self-signed TLS certificate,
the CA certificate and private key can be provided with:
```yaml
spec:
secretRef:
name: regcred
```
### Reconcile artifacts ### Reconcile artifacts
The `OCIRepository` can be used as a drop-in replacement for `GitRepository` and `Bucket` sources. The `OCIRepository` can be used as a drop-in replacement for `GitRepository` and `Bucket` sources.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment