Skip to content

Commit

Permalink
chore(docs/guides): fix syntax on flux helmrelease
Browse files Browse the repository at this point in the history
Signed-off-by: Massimiliano Giovagnoli <[email protected]>
  • Loading branch information
maxgio92 authored and prometherion committed Jan 2, 2023
1 parent e08792a commit c905e16
Showing 1 changed file with 28 additions and 3 deletions.
31 changes: 28 additions & 3 deletions docs/content/guides/kamaji-gitops-flux.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,18 +38,32 @@ Given that Flux it's installed in the *admin cluster* - guide [here](https://flu
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:

```yaml
---
apiVersion: source.toolkit.fluxcd.io/v1beta2
kind: HelmRepository
metadata:
name: jetstack
namespace: flux-system
spec:
interval: 1m
url: https://charts.jetstack.io
---
apiVersion: helm.toolkit.fluxcd.io/v2beta1
kind: HelmRelease
metadata:
name: tenant1-cert-manager
namespace: tenants
spec:
interval: 5m
kubeConfig:
secretRef:
name: tenant1-admin-kubeconfig
key: admin.conf
targetNamespace: default
chart:
spec:
kubeConfig: tenant1-admin-kubeconfig
chart: jetstack/cert-manager
version: '4.0.x'
chart: cert-manager
version: v1.10.1
sourceRef:
kind: HelmRepository
name: jetstack
Expand All @@ -61,6 +75,17 @@ spec:
and applying it in the *admin cluster*, alongside the related *jetstack* `HelmRepository`, in the *tenants* `Namespace`.

The result would be having Cert Manager installed in the *default* `Namespace` of the tenant *tenant1*'s cluster:

```shell
$ kubectl get secret -n tenants tenant1-admin-kubeconfig -o=jsonpath='{.data.admin\.conf}' | base64 -d > /tmp/tenant-1.kubeconfig
$ kubectl --kubeconfig /tmp/tenant-1.kubeconfig get deploy -n default
NAME READY UP-TO-DATE AVAILABLE AGE
tenant1-cert-manager 2/2 2 2 4m3s
tenant1-cert-manager-cainjector 1/1 1 1 4m3s
tenant1-cert-manager-webhook 1/1 1 1 4m3s
```

## Conclusion

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

0 comments on commit c905e16

Please sign in to comment.