kustomize.v1.kustomization
"Kustomization is the Schema for the kustomizations API."
Index
fn new(name)
obj metadata
fn withAnnotations(annotations)
fn withAnnotationsMixin(annotations)
fn withClusterName(clusterName)
fn withCreationTimestamp(creationTimestamp)
fn withDeletionGracePeriodSeconds(deletionGracePeriodSeconds)
fn withDeletionTimestamp(deletionTimestamp)
fn withFinalizers(finalizers)
fn withFinalizersMixin(finalizers)
fn withGenerateName(generateName)
fn withGeneration(generation)
fn withLabels(labels)
fn withLabelsMixin(labels)
fn withName(name)
fn withNamespace(namespace)
fn withOwnerReferences(ownerReferences)
fn withOwnerReferencesMixin(ownerReferences)
fn withResourceVersion(resourceVersion)
fn withSelfLink(selfLink)
fn withUid(uid)
obj spec
fn withComponents(components)
fn withComponentsMixin(components)
fn withDependsOn(dependsOn)
fn withDependsOnMixin(dependsOn)
fn withForce(force)
fn withHealthChecks(healthChecks)
fn withHealthChecksMixin(healthChecks)
fn withImages(images)
fn withImagesMixin(images)
fn withInterval(interval)
fn withNamePrefix(namePrefix)
fn withNameSuffix(nameSuffix)
fn withPatches(patches)
fn withPatchesMixin(patches)
fn withPath(path)
fn withPrune(prune)
fn withRetryInterval(retryInterval)
fn withServiceAccountName(serviceAccountName)
fn withSuspend(suspend)
fn withTargetNamespace(targetNamespace)
fn withTimeout(timeout)
fn withWait(wait)
obj spec.commonMetadata
obj spec.decryption
obj spec.dependsOn
obj spec.healthChecks
obj spec.images
obj spec.kubeConfig
obj spec.patches
obj spec.postBuild
obj spec.sourceRef
Fields
fn new
new(name)
new returns an instance of Kustomization
obj metadata
"ObjectMeta is metadata that all persisted resources must have, which includes all objects users must create."
fn metadata.withAnnotations
withAnnotations(annotations)
"Annotations is an unstructured key value map stored with a resource that may be set by external tools to store and retrieve arbitrary metadata. They are not queryable and should be preserved when modifying objects. More info: http://kubernetes.io/docs/user-guide/annotations"
fn metadata.withAnnotationsMixin
withAnnotationsMixin(annotations)
"Annotations is an unstructured key value map stored with a resource that may be set by external tools to store and retrieve arbitrary metadata. They are not queryable and should be preserved when modifying objects. More info: http://kubernetes.io/docs/user-guide/annotations"
Note: This function appends passed data to existing values
fn metadata.withClusterName
withClusterName(clusterName)
"The name of the cluster which the object belongs to. This is used to distinguish resources with same name and namespace in different clusters. This field is not set anywhere right now and apiserver is going to ignore it if set in create or update request."
fn metadata.withCreationTimestamp
withCreationTimestamp(creationTimestamp)
"Time is a wrapper around time.Time which supports correct marshaling to YAML and JSON. Wrappers are provided for many of the factory methods that the time package offers."
fn metadata.withDeletionGracePeriodSeconds
withDeletionGracePeriodSeconds(deletionGracePeriodSeconds)
"Number of seconds allowed for this object to gracefully terminate before it will be removed from the system. Only set when deletionTimestamp is also set. May only be shortened. Read-only."
fn metadata.withDeletionTimestamp
withDeletionTimestamp(deletionTimestamp)
"Time is a wrapper around time.Time which supports correct marshaling to YAML and JSON. Wrappers are provided for many of the factory methods that the time package offers."
fn metadata.withFinalizers
withFinalizers(finalizers)
"Must be empty before the object is deleted from the registry. Each entry is an identifier for the responsible component that will remove the entry from the list. If the deletionTimestamp of the object is non-nil, entries in this list can only be removed. Finalizers may be processed and removed in any order. Order is NOT enforced because it introduces significant risk of stuck finalizers. finalizers is a shared field, any actor with permission can reorder it. If the finalizer list is processed in order, then this can lead to a situation in which the component responsible for the first finalizer in the list is waiting for a signal (field value, external system, or other) produced by a component responsible for a finalizer later in the list, resulting in a deadlock. Without enforced ordering finalizers are free to order amongst themselves and are not vulnerable to ordering changes in the list."
fn metadata.withFinalizersMixin
withFinalizersMixin(finalizers)
"Must be empty before the object is deleted from the registry. Each entry is an identifier for the responsible component that will remove the entry from the list. If the deletionTimestamp of the object is non-nil, entries in this list can only be removed. Finalizers may be processed and removed in any order. Order is NOT enforced because it introduces significant risk of stuck finalizers. finalizers is a shared field, any actor with permission can reorder it. If the finalizer list is processed in order, then this can lead to a situation in which the component responsible for the first finalizer in the list is waiting for a signal (field value, external system, or other) produced by a component responsible for a finalizer later in the list, resulting in a deadlock. Without enforced ordering finalizers are free to order amongst themselves and are not vulnerable to ordering changes in the list."
Note: This function appends passed data to existing values
fn metadata.withGenerateName
withGenerateName(generateName)
"GenerateName is an optional prefix, used by the server, to generate a unique name ONLY IF the Name field has not been provided. If this field is used, the name returned to the client will be different than the name passed. This value will also be combined with a unique suffix. The provided value has the same validation rules as the Name field, and may be truncated by the length of the suffix required to make the value unique on the server.\n\nIf this field is specified and the generated name exists, the server will NOT return a 409 - instead, it will either return 201 Created or 500 with Reason ServerTimeout indicating a unique name could not be found in the time allotted, and the client should retry (optionally after the time indicated in the Retry-After header).\n\nApplied only if Name is not specified. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#idempotency"
fn metadata.withGeneration
withGeneration(generation)
"A sequence number representing a specific generation of the desired state. Populated by the system. Read-only."
fn metadata.withLabels
withLabels(labels)
"Map of string keys and values that can be used to organize and categorize (scope and select) objects. May match selectors of replication controllers and services. More info: http://kubernetes.io/docs/user-guide/labels"
fn metadata.withLabelsMixin
withLabelsMixin(labels)
"Map of string keys and values that can be used to organize and categorize (scope and select) objects. May match selectors of replication controllers and services. More info: http://kubernetes.io/docs/user-guide/labels"
Note: This function appends passed data to existing values
fn metadata.withName
withName(name)
"Name must be unique within a namespace. Is required when creating resources, although some resources may allow a client to request the generation of an appropriate name automatically. Name is primarily intended for creation idempotence and configuration definition. Cannot be updated. More info: http://kubernetes.io/docs/user-guide/identifiers#names"
fn metadata.withNamespace
withNamespace(namespace)
"Namespace defines the space within which each name must be unique. An empty namespace is equivalent to the \"default\" namespace, but \"default\" is the canonical representation. Not all objects are required to be scoped to a namespace - the value of this field for those objects will be empty.\n\nMust be a DNS_LABEL. Cannot be updated. More info: http://kubernetes.io/docs/user-guide/namespaces"
fn metadata.withOwnerReferences
withOwnerReferences(ownerReferences)
"List of objects depended by this object. If ALL objects in the list have been deleted, this object will be garbage collected. If this object is managed by a controller, then an entry in this list will point to this controller, with the controller field set to true. There cannot be more than one managing controller."
fn metadata.withOwnerReferencesMixin
withOwnerReferencesMixin(ownerReferences)
"List of objects depended by this object. If ALL objects in the list have been deleted, this object will be garbage collected. If this object is managed by a controller, then an entry in this list will point to this controller, with the controller field set to true. There cannot be more than one managing controller."
Note: This function appends passed data to existing values
fn metadata.withResourceVersion
withResourceVersion(resourceVersion)
"An opaque value that represents the internal version of this object that can be used by clients to determine when objects have changed. May be used for optimistic concurrency, change detection, and the watch operation on a resource or set of resources. Clients must treat these values as opaque and passed unmodified back to the server. They may only be valid for a particular resource or set of resources.\n\nPopulated by the system. Read-only. Value must be treated as opaque by clients and . More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency"
fn metadata.withSelfLink
withSelfLink(selfLink)
"SelfLink is a URL representing this object. Populated by the system. Read-only.\n\nDEPRECATED Kubernetes will stop propagating this field in 1.20 release and the field is planned to be removed in 1.21 release."
fn metadata.withUid
withUid(uid)
"UID is the unique in time and space value for this object. It is typically generated by the server on successful creation of a resource and is not allowed to change on PUT operations.\n\nPopulated by the system. Read-only. More info: http://kubernetes.io/docs/user-guide/identifiers#uids"
obj spec
"KustomizationSpec defines the configuration to calculate the desired state\nfrom a Source using Kustomize."
fn spec.withComponents
withComponents(components)
"Components specifies relative paths to specifications of other Components."
fn spec.withComponentsMixin
withComponentsMixin(components)
"Components specifies relative paths to specifications of other Components."
Note: This function appends passed data to existing values
fn spec.withDependsOn
withDependsOn(dependsOn)
"DependsOn may contain a meta.NamespacedObjectReference slice\nwith references to Kustomization resources that must be ready before this\nKustomization can be reconciled."
fn spec.withDependsOnMixin
withDependsOnMixin(dependsOn)
"DependsOn may contain a meta.NamespacedObjectReference slice\nwith references to Kustomization resources that must be ready before this\nKustomization can be reconciled."
Note: This function appends passed data to existing values
fn spec.withForce
withForce(force)
"Force instructs the controller to recreate resources\nwhen patching fails due to an immutable field change."
fn spec.withHealthChecks
withHealthChecks(healthChecks)
"A list of resources to be included in the health assessment."
fn spec.withHealthChecksMixin
withHealthChecksMixin(healthChecks)
"A list of resources to be included in the health assessment."
Note: This function appends passed data to existing values
fn spec.withImages
withImages(images)
"Images is a list of (image name, new name, new tag or digest)\nfor changing image names, tags or digests. This can also be achieved with a\npatch, but this operator is simpler to specify."
fn spec.withImagesMixin
withImagesMixin(images)
"Images is a list of (image name, new name, new tag or digest)\nfor changing image names, tags or digests. This can also be achieved with a\npatch, but this operator is simpler to specify."
Note: This function appends passed data to existing values
fn spec.withInterval
withInterval(interval)
"The interval at which to reconcile the Kustomization.\nThis interval is approximate and may be subject to jitter to ensure\nefficient use of resources."
fn spec.withNamePrefix
withNamePrefix(namePrefix)
"NamePrefix will prefix the names of all managed resources."
fn spec.withNameSuffix
withNameSuffix(nameSuffix)
"NameSuffix will suffix the names of all managed resources."
fn spec.withPatches
withPatches(patches)
"Strategic merge and JSON patches, defined as inline YAML objects,\ncapable of targeting objects based on kind, label and annotation selectors."
fn spec.withPatchesMixin
withPatchesMixin(patches)
"Strategic merge and JSON patches, defined as inline YAML objects,\ncapable of targeting objects based on kind, label and annotation selectors."
Note: This function appends passed data to existing values
fn spec.withPath
withPath(path)
"Path to the directory containing the kustomization.yaml file, or the\nset of plain YAMLs a kustomization.yaml should be generated for.\nDefaults to 'None', which translates to the root path of the SourceRef."
fn spec.withPrune
withPrune(prune)
"Prune enables garbage collection."
fn spec.withRetryInterval
withRetryInterval(retryInterval)
"The interval at which to retry a previously failed reconciliation.\nWhen not specified, the controller uses the KustomizationSpec.Interval\nvalue to retry failures."
fn spec.withServiceAccountName
withServiceAccountName(serviceAccountName)
"The name of the Kubernetes service account to impersonate\nwhen reconciling this Kustomization."
fn spec.withSuspend
withSuspend(suspend)
"This flag tells the controller to suspend subsequent kustomize executions,\nit does not apply to already started executions. Defaults to false."
fn spec.withTargetNamespace
withTargetNamespace(targetNamespace)
"TargetNamespace sets or overrides the namespace in the\nkustomization.yaml file."
fn spec.withTimeout
withTimeout(timeout)
"Timeout for validation, apply and health checking operations.\nDefaults to 'Interval' duration."
fn spec.withWait
withWait(wait)
"Wait instructs the controller to check the health of all the reconciled\nresources. When enabled, the HealthChecks are ignored. Defaults to false."
obj spec.commonMetadata
"CommonMetadata specifies the common labels and annotations that are\napplied to all resources. Any existing label or annotation will be\noverridden if its key matches a common one."
fn spec.commonMetadata.withAnnotations
withAnnotations(annotations)
"Annotations to be added to the object's metadata."
fn spec.commonMetadata.withAnnotationsMixin
withAnnotationsMixin(annotations)
"Annotations to be added to the object's metadata."
Note: This function appends passed data to existing values
fn spec.commonMetadata.withLabels
withLabels(labels)
"Labels to be added to the object's metadata."
fn spec.commonMetadata.withLabelsMixin
withLabelsMixin(labels)
"Labels to be added to the object's metadata."
Note: This function appends passed data to existing values
obj spec.decryption
"Decrypt Kubernetes secrets before applying them on the cluster."
fn spec.decryption.withProvider
withProvider(provider)
"Provider is the name of the decryption engine."
obj spec.decryption.secretRef
"The secret name containing the private OpenPGP keys used for decryption."
fn spec.decryption.secretRef.withName
withName(name)
"Name of the referent."
obj spec.dependsOn
"DependsOn may contain a meta.NamespacedObjectReference slice\nwith references to Kustomization resources that must be ready before this\nKustomization can be reconciled."
fn spec.dependsOn.withName
withName(name)
"Name of the referent."
fn spec.dependsOn.withNamespace
withNamespace(namespace)
"Namespace of the referent, when not specified it acts as LocalObjectReference."
obj spec.healthChecks
"A list of resources to be included in the health assessment."
fn spec.healthChecks.withApiVersion
withApiVersion(apiVersion)
"API version of the referent, if not specified the Kubernetes preferred version will be used."
fn spec.healthChecks.withKind
withKind(kind)
"Kind of the referent."
fn spec.healthChecks.withName
withName(name)
"Name of the referent."
fn spec.healthChecks.withNamespace
withNamespace(namespace)
"Namespace of the referent, when not specified it acts as LocalObjectReference."
obj spec.images
"Images is a list of (image name, new name, new tag or digest)\nfor changing image names, tags or digests. This can also be achieved with a\npatch, but this operator is simpler to specify."
fn spec.images.withDigest
withDigest(digest)
"Digest is the value used to replace the original image tag.\nIf digest is present NewTag value is ignored."
fn spec.images.withName
withName(name)
"Name is a tag-less image name."
fn spec.images.withNewName
withNewName(newName)
"NewName is the value used to replace the original name."
fn spec.images.withNewTag
withNewTag(newTag)
"NewTag is the value used to replace the original tag."
obj spec.kubeConfig
"The KubeConfig for reconciling the Kustomization on a remote cluster.\nWhen used in combination with KustomizationSpec.ServiceAccountName,\nforces the controller to act on behalf of that Service Account at the\ntarget cluster.\nIf the --default-service-account flag is set, its value will be used as\na controller level fallback for when KustomizationSpec.ServiceAccountName\nis empty."
obj spec.kubeConfig.secretRef
"SecretRef holds the name of a secret that contains a key with\nthe kubeconfig file as the value. If no key is set, the key will default\nto 'value'.\nIt is recommended that the kubeconfig is self-contained, and the secret\nis regularly updated if credentials such as a cloud-access-token expire.\nCloud specific cmd-path
auth helpers will not function without adding\nbinaries and credentials to the Pod that is responsible for reconciling\nKubernetes resources."
fn spec.kubeConfig.secretRef.withKey
withKey(key)
"Key in the Secret, when not specified an implementation-specific default key is used."
fn spec.kubeConfig.secretRef.withName
withName(name)
"Name of the Secret."
obj spec.patches
"Strategic merge and JSON patches, defined as inline YAML objects,\ncapable of targeting objects based on kind, label and annotation selectors."
fn spec.patches.withPatch
withPatch(patch)
"Patch contains an inline StrategicMerge patch or an inline JSON6902 patch with\nan array of operation objects."
obj spec.patches.target
"Target points to the resources that the patch document should be applied to."
fn spec.patches.target.withAnnotationSelector
withAnnotationSelector(annotationSelector)
"AnnotationSelector is a string that follows the label selection expression\nhttps://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#api\nIt matches with the resource annotations."
fn spec.patches.target.withGroup
withGroup(group)
"Group is the API group to select resources from.\nTogether with Version and Kind it is capable of unambiguously identifying and/or selecting resources.\nhttps://github.com/kubernetes/community/blob/master/contributors/design-proposals/api-machinery/api-group.md"
fn spec.patches.target.withKind
withKind(kind)
"Kind of the API Group to select resources from.\nTogether with Group and Version it is capable of unambiguously\nidentifying and/or selecting resources.\nhttps://github.com/kubernetes/community/blob/master/contributors/design-proposals/api-machinery/api-group.md"
fn spec.patches.target.withLabelSelector
withLabelSelector(labelSelector)
"LabelSelector is a string that follows the label selection expression\nhttps://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#api\nIt matches with the resource labels."
fn spec.patches.target.withName
withName(name)
"Name to match resources with."
fn spec.patches.target.withNamespace
withNamespace(namespace)
"Namespace to select resources from."
fn spec.patches.target.withVersion
withVersion(version)
"Version of the API Group to select resources from.\nTogether with Group and Kind it is capable of unambiguously identifying and/or selecting resources.\nhttps://github.com/kubernetes/community/blob/master/contributors/design-proposals/api-machinery/api-group.md"
obj spec.postBuild
"PostBuild describes which actions to perform on the YAML manifest\ngenerated by building the kustomize overlay."
fn spec.postBuild.withSubstitute
withSubstitute(substitute)
"Substitute holds a map of key/value pairs.\nThe variables defined in your YAML manifests that match any of the keys\ndefined in the map will be substituted with the set value.\nIncludes support for bash string replacement functions\ne.g. ${var:=default}, ${var:position} and ${var/substring/replacement}."
fn spec.postBuild.withSubstituteFrom
withSubstituteFrom(substituteFrom)
"SubstituteFrom holds references to ConfigMaps and Secrets containing\nthe variables and their values to be substituted in the YAML manifests.\nThe ConfigMap and the Secret data keys represent the var names, and they\nmust match the vars declared in the manifests for the substitution to\nhappen."
fn spec.postBuild.withSubstituteFromMixin
withSubstituteFromMixin(substituteFrom)
"SubstituteFrom holds references to ConfigMaps and Secrets containing\nthe variables and their values to be substituted in the YAML manifests.\nThe ConfigMap and the Secret data keys represent the var names, and they\nmust match the vars declared in the manifests for the substitution to\nhappen."
Note: This function appends passed data to existing values
fn spec.postBuild.withSubstituteMixin
withSubstituteMixin(substitute)
"Substitute holds a map of key/value pairs.\nThe variables defined in your YAML manifests that match any of the keys\ndefined in the map will be substituted with the set value.\nIncludes support for bash string replacement functions\ne.g. ${var:=default}, ${var:position} and ${var/substring/replacement}."
Note: This function appends passed data to existing values
obj spec.postBuild.substituteFrom
"SubstituteFrom holds references to ConfigMaps and Secrets containing\nthe variables and their values to be substituted in the YAML manifests.\nThe ConfigMap and the Secret data keys represent the var names, and they\nmust match the vars declared in the manifests for the substitution to\nhappen."
fn spec.postBuild.substituteFrom.withKind
withKind(kind)
"Kind of the values referent, valid values are ('Secret', 'ConfigMap')."
fn spec.postBuild.substituteFrom.withName
withName(name)
"Name of the values referent. Should reside in the same namespace as the\nreferring resource."
fn spec.postBuild.substituteFrom.withOptional
withOptional(optional)
"Optional indicates whether the referenced resource must exist, or whether to\ntolerate its absence. If true and the referenced resource is absent, proceed\nas if the resource was present but empty, without any variables defined."
obj spec.sourceRef
"Reference of the source where the kustomization file is."
fn spec.sourceRef.withApiVersion
withApiVersion(apiVersion)
"API version of the referent."
fn spec.sourceRef.withKind
withKind(kind)
"Kind of the referent."
fn spec.sourceRef.withName
withName(name)
"Name of the referent."
fn spec.sourceRef.withNamespace
withNamespace(namespace)
"Namespace of the referent, defaults to the namespace of the Kubernetes\nresource object that contains the reference."