const ( KustomizationKind = "Kustomization" KustomizationFinalizer = "finalizers.fluxcd.io" MaxConditionMessageLength = 20000 EnabledValue = "enabled" DisabledValue = "disabled" MergeValue = "Merge" IfNotPresentValue = "IfNotPresent" IgnoreValue = "Ignore" )
var ( // GroupVersion is group version used to register these objects. GroupVersion = schema.GroupVersion{Group: "kustomize.toolkit.fluxcd.io", Version: "v1"} // SchemeBuilder is used to add go types to the GroupVersionKind scheme. SchemeBuilder = &scheme.Builder{GroupVersion: GroupVersion} // AddToScheme adds the types in this group-version to the given scheme. AddToScheme = SchemeBuilder.AddToScheme )
CommonMetadata defines the common labels and annotations.
type CommonMetadata struct { // Annotations to be added to the object's metadata. // +optional Annotations map[string]string `json:"annotations,omitempty"` // Labels to be added to the object's metadata. // +optional Labels map[string]string `json:"labels,omitempty"` }
func (in *CommonMetadata) DeepCopy() *CommonMetadata
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CommonMetadata.
func (in *CommonMetadata) DeepCopyInto(out *CommonMetadata)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
CrossNamespaceSourceReference contains enough information to let you locate the typed Kubernetes resource object at cluster level.
type CrossNamespaceSourceReference struct { // API version of the referent. // +optional APIVersion string `json:"apiVersion,omitempty"` // Kind of the referent. // +kubebuilder:validation:Enum=OCIRepository;GitRepository;Bucket // +required Kind string `json:"kind"` // Name of the referent. // +required Name string `json:"name"` // Namespace of the referent, defaults to the namespace of the Kubernetes // resource object that contains the reference. // +optional Namespace string `json:"namespace,omitempty"` }
func (in *CrossNamespaceSourceReference) DeepCopy() *CrossNamespaceSourceReference
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CrossNamespaceSourceReference.
func (in *CrossNamespaceSourceReference) DeepCopyInto(out *CrossNamespaceSourceReference)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (s *CrossNamespaceSourceReference) String() string
Decryption defines how decryption is handled for Kubernetes manifests.
type Decryption struct { // Provider is the name of the decryption engine. // +kubebuilder:validation:Enum=sops // +required Provider string `json:"provider"` // The secret name containing the private OpenPGP keys used for decryption. // +optional SecretRef *meta.LocalObjectReference `json:"secretRef,omitempty"` }
func (in *Decryption) DeepCopy() *Decryption
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Decryption.
func (in *Decryption) DeepCopyInto(out *Decryption)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
Kustomization is the Schema for the kustomizations API.
type Kustomization struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` Spec KustomizationSpec `json:"spec,omitempty"` // +kubebuilder:default:={"observedGeneration":-1} Status KustomizationStatus `json:"status,omitempty"` }
func (in *Kustomization) DeepCopy() *Kustomization
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Kustomization.
func (in *Kustomization) DeepCopyInto(out *Kustomization)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *Kustomization) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (in Kustomization) GetConditions() []metav1.Condition
GetConditions returns the status conditions of the object.
func (in Kustomization) GetDependsOn() []meta.NamespacedObjectReference
GetDependsOn returns the list of dependencies across-namespaces.
func (in Kustomization) GetRequeueAfter() time.Duration
GetRequeueAfter returns the duration after which the Kustomization must be reconciled again.
func (in Kustomization) GetRetryInterval() time.Duration
GetRetryInterval returns the retry interval
func (in Kustomization) GetTimeout() time.Duration
GetTimeout returns the timeout with default.
func (in *Kustomization) SetConditions(conditions []metav1.Condition)
SetConditions sets the status conditions on the object.
KustomizationList contains a list of kustomizations.
type KustomizationList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` Items []Kustomization `json:"items"` }
func (in *KustomizationList) DeepCopy() *KustomizationList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KustomizationList.
func (in *KustomizationList) DeepCopyInto(out *KustomizationList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *KustomizationList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
KustomizationSpec defines the configuration to calculate the desired state from a Source using Kustomize.
type KustomizationSpec struct { // 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. // +optional CommonMetadata *CommonMetadata `json:"commonMetadata,omitempty"` // DependsOn may contain a meta.NamespacedObjectReference slice // with references to Kustomization resources that must be ready before this // Kustomization can be reconciled. // +optional DependsOn []meta.NamespacedObjectReference `json:"dependsOn,omitempty"` // Decrypt Kubernetes secrets before applying them on the cluster. // +optional Decryption *Decryption `json:"decryption,omitempty"` // The interval at which to reconcile the Kustomization. // This interval is approximate and may be subject to jitter to ensure // efficient use of resources. // +kubebuilder:validation:Type=string // +kubebuilder:validation:Pattern="^([0-9]+(\\.[0-9]+)?(ms|s|m|h))+$" // +required Interval metav1.Duration `json:"interval"` // The interval at which to retry a previously failed reconciliation. // When not specified, the controller uses the KustomizationSpec.Interval // value to retry failures. // +kubebuilder:validation:Type=string // +kubebuilder:validation:Pattern="^([0-9]+(\\.[0-9]+)?(ms|s|m|h))+$" // +optional RetryInterval *metav1.Duration `json:"retryInterval,omitempty"` // 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. // +optional KubeConfig *meta.KubeConfigReference `json:"kubeConfig,omitempty"` // 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. // +optional Path string `json:"path,omitempty"` // PostBuild describes which actions to perform on the YAML manifest // generated by building the kustomize overlay. // +optional PostBuild *PostBuild `json:"postBuild,omitempty"` // Prune enables garbage collection. // +required Prune bool `json:"prune"` // A list of resources to be included in the health assessment. // +optional HealthChecks []meta.NamespacedObjectKindReference `json:"healthChecks,omitempty"` // NamePrefix will prefix the names of all managed resources. // +kubebuilder:validation:MinLength=1 // +kubebuilder:validation:MaxLength=200 // +kubebuilder:validation:Optional // +optional NamePrefix string `json:"namePrefix,omitempty" yaml:"namePrefix,omitempty"` // NameSuffix will suffix the names of all managed resources. // +kubebuilder:validation:MinLength=1 // +kubebuilder:validation:MaxLength=200 // +kubebuilder:validation:Optional // +optional NameSuffix string `json:"nameSuffix,omitempty" yaml:"nameSuffix,omitempty"` // Strategic merge and JSON patches, defined as inline YAML objects, // capable of targeting objects based on kind, label and annotation selectors. // +optional Patches []kustomize.Patch `json:"patches,omitempty"` // 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. // +optional Images []kustomize.Image `json:"images,omitempty"` // The name of the Kubernetes service account to impersonate // when reconciling this Kustomization. // +optional ServiceAccountName string `json:"serviceAccountName,omitempty"` // Reference of the source where the kustomization file is. // +required SourceRef CrossNamespaceSourceReference `json:"sourceRef"` // This flag tells the controller to suspend subsequent kustomize executions, // it does not apply to already started executions. Defaults to false. // +optional Suspend bool `json:"suspend,omitempty"` // TargetNamespace sets or overrides the namespace in the // kustomization.yaml file. // +kubebuilder:validation:MinLength=1 // +kubebuilder:validation:MaxLength=63 // +kubebuilder:validation:Optional // +optional TargetNamespace string `json:"targetNamespace,omitempty"` // Timeout for validation, apply and health checking operations. // Defaults to 'Interval' duration. // +kubebuilder:validation:Type=string // +kubebuilder:validation:Pattern="^([0-9]+(\\.[0-9]+)?(ms|s|m|h))+$" // +optional Timeout *metav1.Duration `json:"timeout,omitempty"` // Force instructs the controller to recreate resources // when patching fails due to an immutable field change. // +kubebuilder:default:=false // +optional Force bool `json:"force,omitempty"` // Wait instructs the controller to check the health of all the reconciled // resources. When enabled, the HealthChecks are ignored. Defaults to false. // +optional Wait bool `json:"wait,omitempty"` // Components specifies relative paths to specifications of other Components. // +optional Components []string `json:"components,omitempty"` }
func (in *KustomizationSpec) DeepCopy() *KustomizationSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KustomizationSpec.
func (in *KustomizationSpec) DeepCopyInto(out *KustomizationSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
KustomizationStatus defines the observed state of a kustomization.
type KustomizationStatus struct { meta.ReconcileRequestStatus `json:",inline"` // ObservedGeneration is the last reconciled generation. // +optional ObservedGeneration int64 `json:"observedGeneration,omitempty"` // +optional Conditions []metav1.Condition `json:"conditions,omitempty"` // The last successfully applied revision. // Equals the Revision of the applied Artifact from the referenced Source. // +optional LastAppliedRevision string `json:"lastAppliedRevision,omitempty"` // LastAttemptedRevision is the revision of the last reconciliation attempt. // +optional LastAttemptedRevision string `json:"lastAttemptedRevision,omitempty"` // Inventory contains the list of Kubernetes resource object references that // have been successfully applied. // +optional Inventory *ResourceInventory `json:"inventory,omitempty"` }
func (in *KustomizationStatus) DeepCopy() *KustomizationStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KustomizationStatus.
func (in *KustomizationStatus) DeepCopyInto(out *KustomizationStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
PostBuild describes which actions to perform on the YAML manifest generated by building the kustomize overlay.
type PostBuild struct { // Substitute 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}. // +optional Substitute map[string]string `json:"substitute,omitempty"` // SubstituteFrom 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. // +optional SubstituteFrom []SubstituteReference `json:"substituteFrom,omitempty"` }
func (in *PostBuild) DeepCopy() *PostBuild
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PostBuild.
func (in *PostBuild) DeepCopyInto(out *PostBuild)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
ResourceInventory contains a list of Kubernetes resource object references that have been applied by a Kustomization.
type ResourceInventory struct { // Entries of Kubernetes resource object references. Entries []ResourceRef `json:"entries"` }
func (in *ResourceInventory) DeepCopy() *ResourceInventory
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResourceInventory.
func (in *ResourceInventory) DeepCopyInto(out *ResourceInventory)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
ResourceRef contains the information necessary to locate a resource within a cluster.
type ResourceRef struct { // ID is the string representation of the Kubernetes resource object's metadata, // in the format '<namespace>_<name>_<group>_<kind>'. ID string `json:"id"` // Version is the API version of the Kubernetes resource object's kind. Version string `json:"v"` }
func (in *ResourceRef) DeepCopy() *ResourceRef
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResourceRef.
func (in *ResourceRef) DeepCopyInto(out *ResourceRef)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
SubstituteReference contains a reference to a resource containing the variables name and value.
type SubstituteReference struct { // Kind of the values referent, valid values are ('Secret', 'ConfigMap'). // +kubebuilder:validation:Enum=Secret;ConfigMap // +required Kind string `json:"kind"` // Name of the values referent. Should reside in the same namespace as the // referring resource. // +kubebuilder:validation:MinLength=1 // +kubebuilder:validation:MaxLength=253 // +required Name string `json:"name"` // Optional 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. // +kubebuilder:default:=false // +optional Optional bool `json:"optional,omitempty"` }
func (in *SubstituteReference) DeepCopy() *SubstituteReference
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SubstituteReference.
func (in *SubstituteReference) DeepCopyInto(out *SubstituteReference)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.