v1

package
v0.0.0-...-9fbd376 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 21, 2023 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Overview

Package v1 contains API Schema definitions for the kustomize v1 API group +kubebuilder:object:generate=true +groupName=kustomize.toolkit.fluxcd.io

Index

Constants

View Source
const (
	KustomizationKind         = "Kustomization"
	KustomizationFinalizer    = "finalizers.fluxcd.io"
	MaxConditionMessageLength = 20000
	EnabledValue              = "enabled"
	DisabledValue             = "disabled"
	MergeValue                = "merge"
)

Variables

View Source
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
)

Functions

This section is empty.

Types

type CommonMetadata

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"`
}

CommonMetadata defines the common labels and annotations.

func (*CommonMetadata) DeepCopy

func (in *CommonMetadata) DeepCopy() *CommonMetadata

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CommonMetadata.

func (*CommonMetadata) DeepCopyInto

func (in *CommonMetadata) DeepCopyInto(out *CommonMetadata)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type CrossNamespaceSourceReference

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"`
}

CrossNamespaceSourceReference contains enough information to let you locate the typed Kubernetes resource object at cluster level.

func (*CrossNamespaceSourceReference) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CrossNamespaceSourceReference.

func (*CrossNamespaceSourceReference) DeepCopyInto

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*CrossNamespaceSourceReference) String

type Decryption

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"`
}

Decryption defines how decryption is handled for Kubernetes manifests.

func (*Decryption) DeepCopy

func (in *Decryption) DeepCopy() *Decryption

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Decryption.

func (*Decryption) DeepCopyInto

func (in *Decryption) DeepCopyInto(out *Decryption)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type Kustomization

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"`
}

Kustomization is the Schema for the kustomizations API.

func (*Kustomization) DeepCopy

func (in *Kustomization) DeepCopy() *Kustomization

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Kustomization.

func (*Kustomization) DeepCopyInto

func (in *Kustomization) DeepCopyInto(out *Kustomization)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*Kustomization) DeepCopyObject

func (in *Kustomization) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

func (Kustomization) GetConditions

func (in Kustomization) GetConditions() []metav1.Condition

GetConditions returns the status conditions of the object.

func (Kustomization) GetDependsOn

func (in Kustomization) GetDependsOn() []meta.NamespacedObjectReference

GetDependsOn returns the list of dependencies across-namespaces.

func (Kustomization) GetRequeueAfter

func (in Kustomization) GetRequeueAfter() time.Duration

GetRequeueAfter returns the duration after which the Kustomization must be reconciled again.

func (Kustomization) GetRetryInterval

func (in Kustomization) GetRetryInterval() time.Duration

GetRetryInterval returns the retry interval

func (Kustomization) GetTimeout

func (in Kustomization) GetTimeout() time.Duration

GetTimeout returns the timeout with default.

func (*Kustomization) Hub

func (*Kustomization) Hub()

func (*Kustomization) SetConditions

func (in *Kustomization) SetConditions(conditions []metav1.Condition)

SetConditions sets the status conditions on the object.

func (*Kustomization) SetupWebhookWithManager

func (r *Kustomization) SetupWebhookWithManager(mgr ctrl.Manager) error

type KustomizationList

type KustomizationList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`
	Items           []Kustomization `json:"items"`
}

KustomizationList contains a list of kustomizations.

func (*KustomizationList) DeepCopy

func (in *KustomizationList) DeepCopy() *KustomizationList

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KustomizationList.

func (*KustomizationList) DeepCopyInto

func (in *KustomizationList) DeepCopyInto(out *KustomizationList)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*KustomizationList) DeepCopyObject

func (in *KustomizationList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type KustomizationSpec

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.
	// +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"`

	// 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"`
}

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

func (*KustomizationSpec) DeepCopy

func (in *KustomizationSpec) DeepCopy() *KustomizationSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KustomizationSpec.

func (*KustomizationSpec) DeepCopyInto

func (in *KustomizationSpec) DeepCopyInto(out *KustomizationSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type KustomizationStatus

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"`
}

KustomizationStatus defines the observed state of a kustomization.

func (*KustomizationStatus) DeepCopy

func (in *KustomizationStatus) DeepCopy() *KustomizationStatus

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KustomizationStatus.

func (*KustomizationStatus) DeepCopyInto

func (in *KustomizationStatus) DeepCopyInto(out *KustomizationStatus)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type PostBuild

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"`
}

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

func (*PostBuild) DeepCopy

func (in *PostBuild) DeepCopy() *PostBuild

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PostBuild.

func (*PostBuild) DeepCopyInto

func (in *PostBuild) DeepCopyInto(out *PostBuild)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type ResourceInventory

type ResourceInventory struct {
	// Entries of Kubernetes resource object references.
	Entries []ResourceRef `json:"entries"`
}

ResourceInventory contains a list of Kubernetes resource object references that have been applied by a Kustomization.

func (*ResourceInventory) DeepCopy

func (in *ResourceInventory) DeepCopy() *ResourceInventory

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResourceInventory.

func (*ResourceInventory) DeepCopyInto

func (in *ResourceInventory) DeepCopyInto(out *ResourceInventory)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type ResourceRef

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"`
}

ResourceRef contains the information necessary to locate a resource within a cluster.

func (*ResourceRef) DeepCopy

func (in *ResourceRef) DeepCopy() *ResourceRef

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResourceRef.

func (*ResourceRef) DeepCopyInto

func (in *ResourceRef) DeepCopyInto(out *ResourceRef)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type SubstituteReference

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"`
}

SubstituteReference contains a reference to a resource containing the variables name and value.

func (*SubstituteReference) DeepCopy

func (in *SubstituteReference) DeepCopy() *SubstituteReference

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SubstituteReference.

func (*SubstituteReference) DeepCopyInto

func (in *SubstituteReference) DeepCopyInto(out *SubstituteReference)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL