Kustomization

io.fluxcd.toolkit.kustomize.v1beta2.Kustomization

Kustomization is the Schema for the kustomizations API.

apiVersionstring = "kustomize.toolkit.fluxcd.io/v1beta2"APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values.More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
kindstring = "Kustomization"Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to.Cannot be updated. In CamelCase.More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
metadataobject
specobjectKustomizationSpec defines the configuration to calculate the desired state from a Source using Kustomize.
commonMetadataobjectCommonMetadata 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.
annotationsmap[string]stringAnnotations to be added to the object's metadata.
labelsmap[string]stringLabels to be added to the object's metadata.
components[]stringComponents specifies relative paths to specifications of other Components.
decryptionobjectDecrypt Kubernetes secrets before applying them on the cluster.
providerstring requiredProvider is the name of the decryption engine.
secretRefobjectThe secret name containing the private OpenPGP keys used for decryption.
namestring requiredName of the referent.
dependsOn[]objectDependsOn may contain a meta.NamespacedObjectReference slice with references to Kustomization resources that must be ready before this Kustomization can be reconciled.
namestring requiredName of the referent.
namespacestringNamespace of the referent, when not specified it acts as LocalObjectReference.
forcebooleanForce instructs the controller to recreate resources when patching fails due to an immutable field change.
healthChecks[]objectA list of resources to be included in the health assessment.
apiVersionstringAPI version of the referent, if not specified the Kubernetes preferred version will be used.
kindstring requiredKind of the referent.
namestring requiredName of the referent.
namespacestringNamespace of the referent, when not specified it acts as LocalObjectReference.
images[]objectImages 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.
digeststringDigest is the value used to replace the original image tag. If digest is present NewTag value is ignored.
namestring requiredName is a tag-less image name.
newNamestringNewName is the value used to replace the original name.
newTagstringNewTag is the value used to replace the original tag.
intervalstring requiredThe interval at which to reconcile the Kustomization.
kubeConfigobjectThe 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.
configMapRefobjectConfigMapRef holds an optional name of a ConfigMap that contains the following keys:
  • `provider`: the provider to use. One of `aws`, `azure`, `gcp`, or
`generic`. Required.
  • `cluster`: the fully qualified resource name of the Kubernetes
cluster in the cloud provider API. Not used by the `generic` provider. Required when one of `address` or `ca.crt` is not set.
  • `address`: the address of the Kubernetes API server. Required
for `generic`. For the other providers, if not specified, the first address in the cluster resource will be used, and if specified, it must match one of the addresses in the cluster resource. If audiences is not set, will be used as the audience for the `generic` provider.
  • `ca.crt`: the optional PEM-encoded CA certificate for the
Kubernetes API server. If not set, the controller will use the CA certificate from the cluster resource.
  • `audiences`: the optional audiences as a list of
line-break-separated strings for the Kubernetes ServiceAccount token. Defaults to the `address` for the `generic` provider, or to specific values for the other providers depending on the provider.
  • `serviceAccountName`: the optional name of the Kubernetes
ServiceAccount in the same namespace that should be used for authentication. If not specified, the controller ServiceAccount will be used.Mutually exclusive with SecretRef.
namestring requiredName of the referent.
secretRefobjectSecretRef holds an optional name of a secret that contains a key with the kubeconfig file as the value. If no key is set, the key will default to 'value'. Mutually exclusive with ConfigMapRef. It is recommended that the kubeconfig is self-contained, and the secret is regularly updated if credentials such as a cloud-access-token expire. Cloud specific `cmd-path` auth helpers will not function without adding binaries and credentials to the Pod that is responsible for reconciling Kubernetes resources. Supported only for the generic provider.
keystringKey in the Secret, when not specified an implementation-specific default key is used.
namestring requiredName of the Secret.
patches[]objectStrategic merge and JSON patches, defined as inline YAML objects, capable of targeting objects based on kind, label and annotation selectors.
patchstring requiredPatch contains an inline StrategicMerge patch or an inline JSON6902 patch with an array of operation objects.
targetobjectTarget points to the resources that the patch document should be applied to.
annotationSelectorstringAnnotationSelector is a string that follows the label selection expression https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#api It matches with the resource annotations.
groupstringGroup is the API group to select resources from. Together with Version and Kind it is capable of unambiguously identifying and/or selecting resources. https://github.com/kubernetes/community/blob/master/contributors/design-proposals/api-machinery/api-group.md
kindstringKind of the API Group to select resources from. Together with Group and Version it is capable of unambiguously identifying and/or selecting resources. https://github.com/kubernetes/community/blob/master/contributors/design-proposals/api-machinery/api-group.md
labelSelectorstringLabelSelector is a string that follows the label selection expression https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#api It matches with the resource labels.
namestringName to match resources with.
namespacestringNamespace to select resources from.
versionstringVersion of the API Group to select resources from. Together with Group and Kind it is capable of unambiguously identifying and/or selecting resources. https://github.com/kubernetes/community/blob/master/contributors/design-proposals/api-machinery/api-group.md
patchesJson6902[]objectJSON 6902 patches, defined as inline YAML objects. Deprecated: Use Patches instead.
patch[]object requiredPatch contains the JSON6902 patch document with an array of operation objects.
fromstringFrom contains a JSON-pointer value that references a location within the target document where the operation is performed. The meaning of the value depends on the value of Op, and is NOT taken into account by all operations.
opstring requiredOp indicates the operation to perform. Its value MUST be one of "add", "remove", "replace", "move", "copy", or "test". https://datatracker.ietf.org/doc/html/rfc6902#section-4
pathstring requiredPath contains the JSON-pointer value that references a location within the target document where the operation is performed. The meaning of the value depends on the value of Op.
valueobjectValue contains a valid JSON structure. The meaning of the value depends on the value of Op, and is NOT taken into account by all operations.
targetobject requiredTarget points to the resources that the patch document should be applied to.
annotationSelectorstringAnnotationSelector is a string that follows the label selection expression https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#api It matches with the resource annotations.
groupstringGroup is the API group to select resources from. Together with Version and Kind it is capable of unambiguously identifying and/or selecting resources. https://github.com/kubernetes/community/blob/master/contributors/design-proposals/api-machinery/api-group.md
kindstringKind of the API Group to select resources from. Together with Group and Version it is capable of unambiguously identifying and/or selecting resources. https://github.com/kubernetes/community/blob/master/contributors/design-proposals/api-machinery/api-group.md
labelSelectorstringLabelSelector is a string that follows the label selection expression https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#api It matches with the resource labels.
namestringName to match resources with.
namespacestringNamespace to select resources from.
versionstringVersion of the API Group to select resources from. Together with Group and Kind it is capable of unambiguously identifying and/or selecting resources. https://github.com/kubernetes/community/blob/master/contributors/design-proposals/api-machinery/api-group.md
patchesStrategicMerge[]objectStrategic merge patches, defined as inline YAML objects. Deprecated: Use Patches instead.
pathstringPath 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.
postBuildobjectPostBuild describes which actions to perform on the YAML manifest generated by building the kustomize overlay.
substitutemap[string]stringSubstitute holds a map of key/value pairs. The variables defined in your YAML manifests that match any of the keys defined in the map will be substituted with the set value. Includes support for bash string replacement functions e.g. ${var:=default}, ${var:position} and ${var/substring/replacement}.
substituteFrom[]objectSubstituteFrom holds references to ConfigMaps and Secrets containing the variables and their values to be substituted in the YAML manifests. The ConfigMap and the Secret data keys represent the var names and they must match the vars declared in the manifests for the substitution to happen.
kindstring requiredKind of the values referent, valid values are ('Secret', 'ConfigMap').
namestring requiredName of the values referent. Should reside in the same namespace as the referring resource.
optionalbooleanOptional indicates whether the referenced resource must exist, or whether to tolerate its absence. If true and the referenced resource is absent, proceed as if the resource was present but empty, without any variables defined.
pruneboolean requiredPrune enables garbage collection.
retryIntervalstringThe interval at which to retry a previously failed reconciliation. When not specified, the controller uses the KustomizationSpec.Interval value to retry failures.
serviceAccountNamestringThe name of the Kubernetes service account to impersonate when reconciling this Kustomization.
sourceRefobject requiredReference of the source where the kustomization file is.
apiVersionstringAPI version of the referent.
kindstring requiredKind of the referent.
namestring requiredName of the referent.
namespacestringNamespace of the referent, defaults to the namespace of the Kubernetes resource object that contains the reference.
suspendbooleanThis flag tells the controller to suspend subsequent kustomize executions, it does not apply to already started executions. Defaults to false.
targetNamespacestringTargetNamespace sets or overrides the namespace in the kustomization.yaml file.
timeoutstringTimeout for validation, apply and health checking operations. Defaults to 'Interval' duration.
validationstringDeprecated: Not used in v1beta2.
waitbooleanWait instructs the controller to check the health of all the reconciled resources. When enabled, the HealthChecks are ignored. Defaults to false.
statusobject read-onlyKustomizationStatus defines the observed state of a kustomization.
conditions[]object read-only
lastTransitionTimestring (date-time) required read-onlylastTransitionTime is the last time the condition transitioned from one status to another. This should be when the underlying condition changed. If that is not known, then using the time when the API field changed is acceptable.
messagestring required read-onlymessage is a human readable message indicating details about the transition. This may be an empty string.
observedGenerationinteger (int64) read-onlyobservedGeneration represents the .metadata.generation that the condition was set based upon. For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date with respect to the current state of the instance.
reasonstring required read-onlyreason contains a programmatic identifier indicating the reason for the condition's last transition. Producers of specific condition types may define expected values and meanings for this field, and whether the values are considered a guaranteed API. The value should be a CamelCase string. This field may not be empty.
statusstring required read-onlystatus of the condition, one of True, False, Unknown.
typestring required read-onlytype of condition in CamelCase or in foo.example.com/CamelCase.
inventoryobject read-onlyInventory contains the list of Kubernetes resource object references that have been successfully applied.
entries[]object required read-onlyEntries of Kubernetes resource object references.
idstring required read-onlyID is the string representation of the Kubernetes resource object's metadata, in the format '<namespace>_<name>_<group>_<kind>'.
vstring required read-onlyVersion is the API version of the Kubernetes resource object's kind.
lastAppliedRevisionstring read-onlyThe last successfully applied revision. Equals the Revision of the applied Artifact from the referenced Source.
lastAttemptedRevisionstring read-onlyLastAttemptedRevision is the revision of the last reconciliation attempt.
lastHandledReconcileAtstring read-onlyLastHandledReconcileAt holds the value of the most recent reconcile request value, so a change of the annotation value can be detected.
observedGenerationinteger (int64) read-onlyObservedGeneration is the last reconciled generation.