Skip to content

Instantly share code, notes, and snippets.

@halvards
Created February 21, 2022 12:14
Show Gist options
  • Save halvards/df66abce42fb69f1b277936126951014 to your computer and use it in GitHub Desktop.
Save halvards/df66abce42fb69f1b277936126951014 to your computer and use it in GitHub Desktop.
Example of using Kustomize with Helm and Digester
apiVersion: example.com/v1
kind: DigesterFunction
metadata:
name: digester
annotations:
config.kubernetes.io/function: |
exec:
path: ./digester
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
helmCharts:
- name: cert-manager
repo: https://charts.jetstack.io
version: v1.7.1
transformers:
- krm-fns.yaml
#!/bin/bash
if ! command -v ./digester &> /dev/null ; then
version=$(curl -sL https://api.github.com/repos/google/k8s-digester/releases/latest | jq -r .tag_name)
curl -Lo digester "https://github.com/google/k8s-digester/releases/download/${version}/digester_$(uname -s)_$(uname -m)"
chmod +x digester
fi
kustomize build --enable-alpha-plugins --enable-exec --enable-helm | grep image:
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment