Documentation
¶
Overview ¶
Package v1alpha1 contains API Schema definitions for the kustomize v1alpha1 API group +kubebuilder:object:generate=true +groupName=kustomize.fluxcd.io
Index ¶
Constants ¶
const ( // ApplySucceedReason represents the fact that the kustomization apply succeed. ApplySucceedReason string = "ApplySucceed" // ApplyFailedReason represents the fact that the kustomization apply failed. ApplyFailedReason string = "ApplyFailed" // ArtifactFailedReason represents the fact that the artifact download failed. ArtifactFailedReason string = "ArtifactFailed" // BuildFailedReason represents the fact that the kustomize build command failed. BuildFailedReason string = "BuildFailed" // DependencyNotReady represents the fact that the one of the dependencies is not ready. DependencyNotReadyReason string = "DependencyNotReady" // HealthCheckFailedReason represents the fact that the one of the health check failed. HealthCheckFailedReason string = "HealthCheckFailed" // SuspendedReason represents the fact that the kustomization execution is suspended. SuspendedReason string = "Suspended" // ValidationFailedReason represents the fact that the dry-run apply failed. ValidationFailedReason string = "ValidationFailed" )
const ( // SyncAtAnnotation is the annotation used for triggering a // sync outside of the specified schedule. SyncAtAnnotation string = "kustomize.fluxcd.io/syncAt" // SourceIndexKey is the key used for indexing kustomizations // based on their sources. SourceIndexKey string = ".metadata.source" // DependencyIndexKey is the key used for indexing kustomizations // based on their dependencies. DependencyIndexKey string = ".metadata.dependency" )
const ( // ReadyCondition represents the fact that a given kustomization has passed // validation and was successfully applied on the cluster. ReadyCondition string = "Ready" )
Variables ¶
var ( // GroupVersion is group version used to register these objects GroupVersion = schema.GroupVersion{Group: "kustomize.fluxcd.io", Version: "v1alpha1"} // 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 Condition ¶
type Condition struct {
// Type of the condition, currently ('Ready').
// +required
Type string `json:"type"`
// Status of the condition, one of ('True', 'False', 'Unknown').
// +required
Status corev1.ConditionStatus `json:"status"`
// LastTransitionTime is the timestamp corresponding to the last status
// change of this condition.
// +required
LastTransitionTime metav1.Time `json:"lastTransitionTime,omitempty"`
// Reason is a brief machine readable explanation for the condition's last
// transition.
// +required
Reason string `json:"reason,omitempty"`
// Message is a human readable description of the details of the last
// transition, complementing reason.
// +optional
Message string `json:"message,omitempty"`
}
Condition contains condition information for a kustomization.
func (*Condition) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Condition.
func (*Condition) DeepCopyInto ¶
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"`
Status KustomizationStatus `json:"status,omitempty"`
}
Kustomization is the Schema for the kustomizations API.
func KustomizationNotReady ¶
func KustomizationNotReady(kustomization Kustomization, reason, message string) Kustomization
func KustomizationReady ¶
func KustomizationReady(kustomization Kustomization, reason, message string) Kustomization
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) GetTimeout ¶
func (in *Kustomization) GetTimeout() time.Duration
GetTimeout returns the timeout with default
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 {
// A list of kustomization that must be ready before this
// kustomization can be applied.
// +optional
DependsOn []string `json:"dependsOn,omitempty"`
// The interval at which to apply the kustomization.
// +required
Interval metav1.Duration `json:"interval"`
// Path to the directory containing the kustomization file.
// +kubebuilder:validation:Pattern="^\\./"
// +required
Path string `json:"path"`
// Label selector used for garbage collection.
// +kubebuilder:validation:Pattern="^.*=.*$"
// +optional
Prune string `json:"prune,omitempty"`
// A list of workloads (Deployments, DaemonSets and StatefulSets)
// to be included in the health assessment.
// +optional
HealthChecks []WorkloadReference `json:"healthChecks,omitempty"`
// Reference of the source where the kustomization file is.
// +required
SourceRef corev1.TypedLocalObjectReference `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"`
// Timeout for validation, apply and health checking operations.
// Defaults to 'Interval' duration.
// +optional
Timeout *metav1.Duration `json:"timeout,omitempty"`
// Validate the Kubernetes objects before applying them on the cluster.
// The validation strategy can be 'client' (local dry-run) or 'server' (APIServer dry-run).
// +kubebuilder:validation:Enum=client;server
// +optional
Validation string `json:"validation,omitempty"`
}
KustomizationSpec defines the desired state of a kustomization.
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 {
// +optional
Conditions []Condition `json:"conditions,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 WorkloadReference ¶
type WorkloadReference struct {
// Kind is the type of resource being referenced.
// +kubebuilder:validation:Enum=Deployment;DaemonSet;StatefulSet
// +required
Kind string `json:"kind"`
// Name is the name of resource being referenced.
// +required
Name string `json:"name"`
// Namespace is the namespace of resource being referenced.
// +required
Namespace string `json:"namespace,omitempty"`
}
WorkloadReference defines a reference to a Deployment, DaemonSet or StatefulSet.
func (*WorkloadReference) DeepCopy ¶
func (in *WorkloadReference) DeepCopy() *WorkloadReference
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WorkloadReference.
func (*WorkloadReference) DeepCopyInto ¶
func (in *WorkloadReference) DeepCopyInto(out *WorkloadReference)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.