Last active
July 12, 2023 10:58
-
-
Save moondev/10645b121a1adfe2d5af5d8b85514b88 to your computer and use it in GitHub Desktop.
kustomize values template
This file contains hidden or 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
| charts |
This file contains hidden or 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
| go run github.com/rliebz/[email protected] cli $1 -c "$@" |
This file contains hidden or 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
| #!/usr/bin/env bash | |
| go run helm.sh/helm/v3/cmd/[email protected] $@ |
This file contains hidden or 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
| --- | |
| apiVersion: kustomize.config.k8s.io/v1beta1 | |
| kind: Kustomization | |
| metadata: | |
| name: values-template-test | |
| helmCharts: | |
| - name: echo | |
| repo: https://raw.githubusercontent.com/moondev/echo-chart/main/ | |
| valuesInline: | |
| vars: | |
| name: jenkins | |
| image: docker.io/jenkins/jenkins:latest | |
| items: | |
| - apiVersion: apps/v1 | |
| kind: Deployment | |
| metadata: | |
| labels: | |
| app: "{{ .Values.vars.name }}" | |
| name: "{{ .Values.vars.name }}" | |
| spec: | |
| selector: | |
| matchLabels: | |
| app: "{{ .Values.vars.name }}" | |
| template: | |
| metadata: | |
| labels: | |
| app: "{{ .Values.vars.name }}" | |
| spec: | |
| containers: | |
| - image: "{{ .Values.vars.image }}" | |
| name: "{{ .Values.vars.name }}" | |
| patchesStrategicMerge: | |
| - | | |
| apiVersion: apps/v1 | |
| kind: Deployment | |
| metadata: | |
| name: jenkins | |
| spec: | |
| replicas: 2 |
This file contains hidden or 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
| #!/usr/bin/env bash | |
| # set -e | |
| # set -x | |
| cmd=$1 | |
| shift | |
| all=$@ | |
| go run github.com/rliebz/[email protected] cli $cmd -c "$all" |
This file contains hidden or 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
| #!/usr/bin/env -S go run github.com/rliebz/[email protected] -f | |
| --- | |
| interpreter: go run mvdan.cc/sh/v3/cmd/[email protected] -c | |
| tasks: | |
| cli: | |
| args: | |
| cli: | |
| values: | |
| - helm | |
| - kubectl | |
| - kustomize | |
| quiet: true | |
| options: | |
| cmd: | |
| short: c | |
| bin: | |
| default: | |
| run: | |
| default: | |
| command: curl -L http://pkgs.run/cli/${cli} | |
| run: | |
| - ${run} ${cmd} | |
| create: | |
| run: | |
| - ${kubectl} kustomize --enable-helm --helm-command=./helm.cli |
Author
go run github.com/hashicorp/go-getter/cmd/go-getter@latest 'https://gist.github.com/moondev/10645b121a1adfe2d5af5d8b85514b88/archive/main.tar.gz//10645b121a1adfe2d5af5d8b85514b88-main' /tmp/gist
[email protected]:10645b121a1adfe2d5af5d8b85514b88.git
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.