Kustomize
Variable
Common variables:
- namePrefix: Adds a prefix to the names of all resources in the Kustomization.
- nameSuffix: Adds a suffix to the names of all resources in the Kustomization.
- namespace: Sets the namespace for all resources in the Kustomization.
- commonLabels: Sets common labels to be applied to all resources in the Kustomization.
ConfigMap and Secret generators:
- configMapGenerator: Generates ConfigMaps based on key-value pairs.
- secretGenerator: Generates Secrets based on key-value pairs.
Resource-specific variables:
- resources: Specifies a list of resource files or URLs to include in the Kustomization.
- patchesStrategicMerge: Specifies a list of patch files or URLs to apply to the resources.
- patchesJson6902: Specifies a list of JSON patch files or URLs to apply to the resources.
- patches: A combination of patchesStrategicMerge and patchesJson6902 that allows specifying both types of patches in one list.
External variables:
- configurations: Includes external Kustomization files as overlays, allowing reuse and composition of Kustomizations.
- vars: Defines external variables that can be consumed within the Kustomization.
- configMapSources: Specifies ConfigMaps from other Kustomizations to be included in the current Kustomization.
- secretSources: Specifies Secrets from other Kustomizations to be included in the current Kustomization.
Custom variables:
You can define your own custom variables using the vars field. These variables can be referenced within the Kustomization file or in resource templates using the Go template syntax.