Skip to content

jashandeep-sohi/krm-fn-kustomize

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

krm-fn-kustomize

KRM function to run Kustomize.

Usage

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