apply-replacements

Use the [kustomize replacements] feature as a KRM function.

apply-replacements #

Overview #

Use the kustomize replacements feature as a KRM function.

FunctionConfig #

We use a ApplyReplacements object to configure the apply-replacements function.

apiVersion: fn.kpt.dev/v1alpha1
kind: ApplyReplacements
metadata:
  name: replacements-fn-config
replacements:
  # your replacements here

The syntax for replacements is described in the kustomize replacements docs. For example, you can have a functionConfig such as:

apiVersion: fn.kpt.dev/v1alpha1
kind: ApplyReplacements
metadata:
  name: replacements-fn-config
replacements:
- source:
    kind: Deployment
    fieldPath: metadata.name
  targets:
  - select: 
      name: my-resource