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 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 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/tusk@v0.6.4 cli $1 -c "$@" |
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
#!/usr/bin/env bash | |
go run helm.sh/helm/v3/cmd/helm@v3.12.1 $@ |
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
--- | |
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 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/tusk@v0.6.4 cli $cmd -c "$all" |
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
#!/usr/bin/env -S go run github.com/rliebz/tusk@v0.6.4 -f | |
--- | |
interpreter: go run mvdan.cc/sh/v3/cmd/gosh@v3.7.0 -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
moondev
commented
Feb 27, 2023
•
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
git@gist.github.com:10645b121a1adfe2d5af5d8b85514b88.git
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment