Skip to content

Commit 4a15925

Browse files
authored
feat: improve Helm documentation (#22859)
Signed-off-by: Andrew Block <[email protected]>
1 parent 234c73a commit 4a15925

File tree

4 files changed

+109
-16
lines changed

4 files changed

+109
-16
lines changed

docs/assets/repo-type-helm.png

98.1 KB
Loading

docs/operator-manual/declarative-setup.md

Lines changed: 63 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -362,6 +362,10 @@ The following keys are valid to refer to credential secrets:
362362
* `githubAppEnterpriseBaseUrl` refers to the base api URL for GitHub Enterprise (e.g. `https://ghe.example.com/api/v3`)
363363
* `tlsClientCertData` and `tlsClientCertKey` refer to secrets where a TLS client certificate (`tlsClientCertData`) and the corresponding private key `tlsClientCertKey` are stored for accessing GitHub Enterprise if custom certificates are used.
364364

365+
#### Helm Chart repositories
366+
367+
See the [Helm](#helm) section for the properties that apply to Helm repositories and charts sourced from OCI registries.
368+
365369
### Repositories using self-signed TLS certificates (or are signed by custom CA)
366370

367371
You can manage the TLS certificates used to verify the authenticity of your repository servers in a ConfigMap object named `argocd-tls-certs-cm`. The data section should contain a map, with the repository server's hostname part (not the complete URL) as key, and the certificate(s) in PEM format as data. So, if you connect to a repository with the URL `https://server.example.com/repos/my-repo`, you should use `server.example.com` as key. The certificate data should be either the server's certificate (in case of self-signed certificate) or the certificate of the CA that was used to sign the server's certificate. You can configure multiple certificates for each server, e.g. if you are having a certificate roll-over planned.
@@ -1100,27 +1104,54 @@ stringData:
11001104
}
11011105
```
11021106

1103-
## Helm Chart Repositories
1107+
## Helm
11041108

1105-
Non standard Helm Chart repositories have to be registered explicitly.
1106-
Each repository must have `url`, `type` and `name` fields. For private Helm repos you may need to configure access credentials and HTTPS settings using `username`, `password`,
1107-
`tlsClientCertData` and `tlsClientCertKey` fields.
1109+
Helm charts can be sourced from a Helm repository or OCI registry.
11081110

1109-
Example:
1111+
This is an example of a Helm chart being sourced from a Helm repository. The `releaseName` property is used to customize the name of the Helm _release_.
11101112

11111113
```yaml
1112-
apiVersion: v1
1113-
kind: Secret
1114+
apiVersion: argoproj.io/v1alpha1
1115+
kind: Application
11141116
metadata:
1115-
name: istio
1117+
name: sealed-secrets
11161118
namespace: argocd
1117-
labels:
1118-
argocd.argoproj.io/secret-type: repository
1119-
stringData:
1120-
name: istio.io
1121-
url: https://storage.googleapis.com/istio-prerelease/daily-build/master-latest-daily/charts
1122-
type: helm
1123-
---
1119+
spec:
1120+
project: default
1121+
source:
1122+
chart: sealed-secrets
1123+
repoURL: https://bitnami-labs.github.io/sealed-secrets
1124+
targetRevision: 1.16.1
1125+
helm:
1126+
releaseName: sealed-secrets
1127+
destination:
1128+
server: "https://kubernetes.default.svc"
1129+
namespace: kubeseal
1130+
```
1131+
1132+
Another example using a public OCI helm chart:
1133+
1134+
```yaml
1135+
apiVersion: argoproj.io/v1alpha1
1136+
kind: Application
1137+
metadata:
1138+
name: nginx
1139+
spec:
1140+
project: default
1141+
source:
1142+
chart: nginx
1143+
repoURL: registry-1.docker.io/bitnamicharts # note: the oci:// syntax is not included.
1144+
targetRevision: 15.9.0
1145+
destination:
1146+
name: "in-cluster"
1147+
namespace: nginx
1148+
```
1149+
1150+
Helm charts located in sources that require additional configuration, such as authentication or TLS connection details, are defined within a _repository_ Secret. Each Secret must specify the `url`, `type` and `name` fields. Additional fields including `username`, `password`, `tlsClientCertData` and `tlsClientCertKey` can be specified as desired.
1151+
1152+
Helm Chart Repository:
1153+
1154+
```yaml
11241155
apiVersion: v1
11251156
kind: Secret
11261157
metadata:
@@ -1138,6 +1169,23 @@ stringData:
11381169
tlsClientCertKey: ...
11391170
```
11401171

1172+
Helm charts sourced from OCI registries should utilize the fields described previously as well as set the `enableOCI` field as `true`.
1173+
1174+
```yaml
1175+
apiVersion: v1
1176+
kind: Secret
1177+
metadata:
1178+
name: oci-helm-chart
1179+
namespace: oci-helm-chart
1180+
labels:
1181+
argocd.argoproj.io/secret-type: repository
1182+
stringData:
1183+
name: oci-helm-chart
1184+
url: myregistry.example.com
1185+
type: helm
1186+
enableOCI: "true"
1187+
```
1188+
11411189
## Resource Exclusion/Inclusion
11421190

11431191
Resources can be excluded from discovery and sync so that Argo CD is unaware of them. For example, the apiGroup/kind `events.k8s.io/*`, `metrics.k8s.io/*` and `coordination.k8s.io/Lease` are always excluded. Use cases:

docs/user-guide/helm.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ spec:
4545
!!! note "When using Helm there are multiple ways to provide values"
4646
Order of precedence is `parameters > valuesObject > values > valueFiles > helm repository values.yaml` (see [Here](./helm.md#helm-value-precedence) for a more detailed example)
4747

48-
See [here](../operator-manual/declarative-setup.md#helm-chart-repositories) for more info about how to configure private Helm repositories.
48+
See [here](../operator-manual/declarative-setup.md#helm) for more info about how to configure private Helm repositories and private OCI registries.
4949

5050
## Values Files
5151

docs/user-guide/private-repositories.md

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -435,6 +435,51 @@ It is possible to add and remove SSH known hosts entries using the ArgoCD web UI
435435

436436
You can also manage SSH known hosts entries in a declarative, self-managed ArgoCD setup. All SSH public host keys are stored in the ConfigMap object `argocd-ssh-known-hosts-cm`. For more details, please refer to the [Operator Manual](../operator-manual/declarative-setup.md#ssh-known-host-public-keys).
437437

438+
## Helm
439+
440+
Helm charts can be sourced from protected Helm repositories or OCI registries. You can configure access to protected Helm charts by using either the CLI or the UI by speciying `helm` as the _type_ of HTTPS based repository.
441+
442+
Using the CLI:
443+
444+
Specify the `--type` flag of the `argocd repo add` command:
445+
446+
```bash
447+
argocd repo add https://argoproj.github.io/argo-helm --type=helm <additional-flags>
448+
```
449+
450+
Using the UI:
451+
452+
1. Navigate to `Settings/Repositories`
453+
454+
![connect repo overview](../assets/repo-add-overview.png)
455+
456+
2. Click the `Connect Repo` button
457+
458+
3. Select `VIA HTTPS` as the Connection Method
459+
460+
4. Select `helm` as the Type.
461+
462+
![helm repository type](../assets/repo-type-helm.png)
463+
464+
5. Click `Connect` to test the connection and have the repository added
465+
466+
Helm charts stored in protected OCI registries should use the steps described previously as well as explicitly specifying that the source is an Helm chart stored in an OCI registry.
467+
468+
Using CLI:
469+
470+
Specify the `--enable-oci` flag of the `argocd repo add` command:
471+
472+
```bash
473+
argocd repo add registry-1.docker.io/bitnamicharts --type=helm --enable-oci=true <additional-flags>
474+
```
475+
476+
!!! note
477+
The protocol, such as `oci://` should be omitted when referencing an OCI registry
478+
479+
Using the UI:
480+
481+
Select the _Enable OCI_ checkbox when adding a HTTPS based _helm_ repository.
482+
438483
## Git Submodules
439484

440485
Submodules are supported and will be picked up automatically. If the submodule repository requires authentication then the credentials will need to match the credentials of the parent repository. Set ARGOCD_GIT_MODULES_ENABLED=false to disable submodule support

0 commit comments

Comments
 (0)