KRM function to run Kustomize.
By default this function will build the Kustomization and output it to build.yaml
.
kpt fn eval --image ghcr.io/jashandeep-sohi/krm-fn-kustomize
You can override the kustomize command using the cmd
option:
kpt fn eval --image ghcr.io/jashandeep-sohi/krm-fn-kustomize -- cmd='kustomize build --output test.yaml'
Or declaratively:
apiVersion: kpt.dev/v1
kind: Kptfile
metadata:
name: example
annotations:
config.kubernetes.io/local-config: "true"
pipeline:
mutators:
# This will build the Kustomization and output it to build.yaml
- image: ghcr.io/jashandeep-sohi/krm-fn-kustomize
# Override the command
- image: ghcr.io/jashandeep-sohi/krm-fn-kustomize
configMap:
cmd: kustomize build --output test.yaml