Skip to content

Commit 1cf26b2

Browse files
committed
helmrepo: add docs for .spec.certSecretRef
Signed-off-by: Sanskar Jaiswal <jaiswalsanskar078@gmail.com>
1 parent 30f5d31 commit 1cf26b2

File tree

1 file changed

+23
-6
lines changed

1 file changed

+23
-6
lines changed

docs/spec/v1beta2/helmrepositories.md

+23-6
Original file line numberDiff line numberDiff line change
@@ -452,15 +452,32 @@ flux create secret oci ghcr-auth \
452452
--password=${GITHUB_PAT}
453453
```
454454

455-
#### TLS authentication
455+
### Cert secret reference
456456

457457
**Note:** TLS authentication is not yet supported by OCI Helm repositories.
458458

459-
To provide TLS credentials to use while connecting with the Helm repository,
460-
the referenced Secret is expected to contain `.data.certFile` and
461-
`.data.keyFile`, and/or `.data.caFile` values.
459+
`.spec.certSecretRef.name` is an optional field to sepcify a secret containing TLS
460+
certificate data. The secret can contain the following keys:
462461

463-
For example:
462+
* `certFile` and `keyFile`: The client certificate and private key used for TLS client
463+
authentication. These must be used in conjunction, i.e. specifying one without the other
464+
will lead to an error.
465+
* `caFile`: The CA certificate used to verify the server, which is required if
466+
the server is using a self-signed certificate.
467+
468+
If the server is using a self-signed certificate AND has TLS client authentication enabled
469+
all three values are required.
470+
471+
All the files in the secret are expected to be [PEM-encoded][pem-encoding]. Assuming you have
472+
three files; `client.key`, `client.crt` and `ca.crt` for the client private key, client
473+
certificate and the CA certificate respectively, you can generate the required secret using
474+
the `flux creat secret helm` command:
475+
476+
```bash
477+
flux create secret helm tls --key-file=client.key --cert-file=client.crt --ca-file=ca.crt
478+
```
479+
480+
Example usage:
464481

465482
```yaml
466483
---
@@ -472,7 +489,7 @@ metadata:
472489
spec:
473490
interval: 5m0s
474491
url: https://example.com
475-
secretRef:
492+
certSecretRef:
476493
name: example-tls
477494
---
478495
apiVersion: v1

0 commit comments

Comments
 (0)