-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #102 from stakater/mto-helm
Add example for private helm charts
- Loading branch information
Showing
4 changed files
with
108 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
105 changes: 105 additions & 0 deletions
105
content/reference-guides/deploying-private-helm-charts.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,105 @@ | ||
# Deploying Private Helm Chart to Multiple Namespaces | ||
|
||
Multi Tenant Operator uses its `helm` functionality from `Template` and `TemplateGroupInstance` to deploy private and public charts to multiple namespaces. | ||
|
||
## Deploying Helm Chart to Namespaces via TemplateGroupInstances from OCI Registry | ||
|
||
Bill, the cluster admin, wants to deploy a helm chart from `OCI` registry in namespaces where certain labels exists. | ||
|
||
First, Bill creates a template: | ||
|
||
```yaml | ||
apiVersion: tenantoperator.stakater.com/v1alpha1 | ||
kind: Template | ||
metadata: | ||
name: chart-deploy | ||
resources: | ||
helm: | ||
releaseName: random-release | ||
chart: | ||
repository: | ||
name: random-chart | ||
repoUrl: 'oci://ghcr.io/stakater/charts/random-chart' | ||
version: 0.0.15 | ||
password: | ||
key: password | ||
name: repo-user | ||
namespace: shared-ns | ||
username: | ||
key: username | ||
name: repo-user | ||
namespace: shared-ns | ||
``` | ||
Once the template has been created, Bill makes a `TemplateGroupInstance` referring to the `Template` he wants to deploy with `MatchLabels`: | ||
|
||
```yaml | ||
apiVersion: tenantoperator.stakater.com/v1alpha1 | ||
kind: TemplateGroupInstance | ||
metadata: | ||
name: chart-deploy | ||
spec: | ||
selector: | ||
matchExpressions: | ||
- key: stakater.com/kind | ||
operator: In | ||
values: | ||
- system | ||
sync: true | ||
template: chart-deploy | ||
``` | ||
|
||
Multi Tenant Operator will pick up the credentials from the mentioned namespace to pull the chart and apply it. | ||
|
||
Afterward, Bill can see that manifests in the chart have been successfully created in all label matching namespaces. | ||
|
||
## Deploying Helm Chart to Namespaces via TemplateGroupInstances from HTTPS Registry | ||
|
||
Bill, the cluster admin, wants to deploy a helm chart from `HTTPS` registry in namespaces where certain labels exists. | ||
|
||
First, Bill creates a template: | ||
|
||
```yaml | ||
apiVersion: tenantoperator.stakater.com/v1alpha1 | ||
kind: Template | ||
metadata: | ||
name: chart-deploy | ||
resources: | ||
helm: | ||
releaseName: random-release | ||
chart: | ||
repository: | ||
name: random-chart | ||
repoUrl: 'nexus-helm-url/registry' | ||
version: 0.0.15 | ||
password: | ||
key: password | ||
name: repo-user | ||
namespace: shared-ns | ||
username: | ||
key: username | ||
name: repo-user | ||
namespace: shared-ns | ||
``` | ||
|
||
Once the template has been created, Bill makes a `TemplateGroupInstance` referring to the `Template` he wants to deploy with `MatchLabels`: | ||
|
||
```yaml | ||
apiVersion: tenantoperator.stakater.com/v1alpha1 | ||
kind: TemplateGroupInstance | ||
metadata: | ||
name: chart-deploy | ||
spec: | ||
selector: | ||
matchExpressions: | ||
- key: stakater.com/kind | ||
operator: In | ||
values: | ||
- system | ||
sync: true | ||
template: chart-deploy | ||
``` | ||
|
||
Multi Tenant Operator will pick up the credentials from the mentioned namespace to pull the chart and apply it. | ||
|
||
Afterward, Bill can see that manifests in the chart have been successfully created in all label matching namespaces. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters