flux v2.9.5

Kustomization.spec

KustomizationSpec defines the configuration to calculate the desired state from a Source using Kustomize.

27 fields
Kustomization.spec fields and descriptions
Field / TypeDescription
string[]

BuildMetadata specifies which kustomize build metadata should be added to the built resources. The allowed values are 'originAnnotations' to annotate resources with their source origin, and 'transformerAnnotations' to annotate resources with the transformers that produced them.

object

CommonMetadata specifies the common labels and annotations that are applied to all resources. Any existing label or annotation will be overridden if its key matches a common one.

string[]

Components specifies relative paths to kustomize Components.

object

Decrypt Kubernetes secrets before applying them on the cluster.

deletionPolicy
string

DeletionPolicy can be used to control garbage collection when this Kustomization is deleted. Valid values are ('MirrorPrune', 'Delete', 'WaitForTermination', 'Orphan'). 'MirrorPrune' mirrors the Prune field (orphan if false, delete if true). Defaults to 'MirrorPrune'.

  • enum: ["MirrorPrune","Delete","WaitForTermination","Orphan"]
object[]

DependsOn may contain a DependencyReference slice with references to Kustomization resources that must be ready before this Kustomization can be reconciled.

force
boolean

Force instructs the controller to recreate resources when patching fails due to an immutable field change.

  • default: false
object[]

HealthCheckExprs is a list of healthcheck expressions for evaluating the health of custom resources using Common Expression Language (CEL). The expressions are evaluated only when Wait or HealthChecks are specified.

object[]

A list of resources to be included in the health assessment.

object[]

Ignore is a list of rules for specifying which changes to ignore during drift detection. These rules are applied to the resources managed by the Kustomization and are used to exclude specific JSON pointer paths from the drift detection and apply process.

ignoreMissingComponents
boolean

IgnoreMissingComponents instructs the controller to ignore Components paths not found in source by removing them from the generated kustomization.yaml before running kustomize build.

object[]

Images is a list of (image name, new name, new tag or digest) for changing image names, tags or digests. This can also be achieved with a patch, but this operator is simpler to specify.

interval
string required

The interval at which to reconcile the Kustomization. This interval is approximate and may be subject to jitter to ensure efficient use of resources.

  • pattern: ^([0-9]+(\.[0-9]+)?(ms|s|m|h))+$
object

The KubeConfig for reconciling the Kustomization on a remote cluster. When used in combination with KustomizationSpec.ServiceAccountName, forces the controller to act on behalf of that Service Account at the target cluster. If the --default-service-account flag is set, its value will be used as a controller level fallback for when KustomizationSpec.ServiceAccountName is empty.

  • x-kubernetes-validations: [{"message":"exactly one of spec.kubeConfig.configMapRef or spec.kubeConfig.secretRef must be specified","rule":"has(self.configMapRef) || has(self.secretRef)"},{"message":"exactly one of spec.kubeConfig.configMapRef or spec.kubeConfig.secretRef must be specified","rule":"!has(self.configMapRef) || !has(self.secretRef)"}]
namePrefix
string

NamePrefix will prefix the names of all managed resources.

  • minLength: 1
  • maxLength: 200
nameSuffix
string

NameSuffix will suffix the names of all managed resources.

  • minLength: 1
  • maxLength: 200
object[]

Strategic merge and JSON patches, defined as inline YAML objects, capable of targeting objects based on kind, label and annotation selectors.

path
string

Path to the directory containing the kustomization.yaml file, or the set of plain YAMLs a kustomization.yaml should be generated for. Defaults to 'None', which translates to the root path of the SourceRef.

object

PostBuild describes which actions to perform on the YAML manifest generated by building the kustomize overlay.

prune
boolean required

Prune enables garbage collection.

retryInterval
string

The interval at which to retry a previously failed reconciliation. When not specified, the controller uses the KustomizationSpec.Interval value to retry failures.

  • pattern: ^([0-9]+(\.[0-9]+)?(ms|s|m|h))+$
serviceAccountName
string

The name of the Kubernetes service account to impersonate when reconciling this Kustomization.

object required

Reference of the source where the kustomization file is.

suspend
boolean

This flag tells the controller to suspend subsequent kustomize executions, it does not apply to already started executions. Defaults to false.

targetNamespace
string

TargetNamespace sets or overrides the namespace in the kustomization.yaml file.

  • minLength: 1
  • maxLength: 63
timeout
string

Timeout for validation, apply and health checking operations. Defaults to 'Interval' duration.

  • pattern: ^([0-9]+(\.[0-9]+)?(ms|s|m|h))+$
wait
boolean

Wait instructs the controller to check the health of all the reconciled resources. When enabled, the HealthChecks are ignored. Defaults to false.