Skip to content

Commit c905e16

Browse files
Massimiliano Giovagnoliprometherion
authored andcommitted
chore(docs/guides): fix syntax on flux helmrelease
Signed-off-by: Massimiliano Giovagnoli <[email protected]>
1 parent e08792a commit c905e16

File tree

1 file changed

+28
-3
lines changed

1 file changed

+28
-3
lines changed

docs/content/guides/kamaji-gitops-flux.md

Lines changed: 28 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,18 +38,32 @@ Given that Flux it's installed in the *admin cluster* - guide [here](https://flu
3838
For example, it might be needed to ensure [cert-manager](https://cert-manager.io/) is installed into a *tenant1* cluster with Helm. It can be done by declaring an `HelmRelease` as follows:
3939

4040
```yaml
41+
---
42+
apiVersion: source.toolkit.fluxcd.io/v1beta2
43+
kind: HelmRepository
44+
metadata:
45+
name: jetstack
46+
namespace: flux-system
47+
spec:
48+
interval: 1m
49+
url: https://charts.jetstack.io
50+
---
4151
apiVersion: helm.toolkit.fluxcd.io/v2beta1
4252
kind: HelmRelease
4353
metadata:
4454
name: tenant1-cert-manager
4555
namespace: tenants
4656
spec:
4757
interval: 5m
58+
kubeConfig:
59+
secretRef:
60+
name: tenant1-admin-kubeconfig
61+
key: admin.conf
62+
targetNamespace: default
4863
chart:
4964
spec:
50-
kubeConfig: tenant1-admin-kubeconfig
51-
chart: jetstack/cert-manager
52-
version: '4.0.x'
65+
chart: cert-manager
66+
version: v1.10.1
5367
sourceRef:
5468
kind: HelmRepository
5569
name: jetstack
@@ -61,6 +75,17 @@ spec:
6175
6276
and applying it in the *admin cluster*, alongside the related *jetstack* `HelmRepository`, in the *tenants* `Namespace`.
6377

78+
The result would be having Cert Manager installed in the *default* `Namespace` of the tenant *tenant1*'s cluster:
79+
80+
```shell
81+
$ kubectl get secret -n tenants tenant1-admin-kubeconfig -o=jsonpath='{.data.admin\.conf}' | base64 -d > /tmp/tenant-1.kubeconfig
82+
$ kubectl --kubeconfig /tmp/tenant-1.kubeconfig get deploy -n default
83+
NAME READY UP-TO-DATE AVAILABLE AGE
84+
tenant1-cert-manager 2/2 2 2 4m3s
85+
tenant1-cert-manager-cainjector 1/1 1 1 4m3s
86+
tenant1-cert-manager-webhook 1/1 1 1 4m3s
87+
```
88+
6489
## Conclusion
6590

6691
This way tenant resources can be ensured from a single pane of glass, from the *admin cluster*.

0 commit comments

Comments
 (0)