Documentation
¶
Overview ¶
Package v1alpha1 contains API Schema definitions for the kustomize v1alpha1 API group +kubebuilder:object:generate=true +groupName=kustomize.fluxcd.io
Index ¶
- Constants
- Variables
- type AlertProvider
- type Condition
- type Kustomization
- func DependencySort(ks []Kustomization) ([]Kustomization, error)
- func KustomizationNotReady(kustomization Kustomization, reason, message string) Kustomization
- func KustomizationNotReadySnapshot(kustomization Kustomization, snapshot *Snapshot, reason, message string) Kustomization
- func KustomizationProgressing(kustomization Kustomization) Kustomization
- func KustomizationReady(kustomization Kustomization, snapshot *Snapshot, ...) Kustomization
- type KustomizationList
- type KustomizationSpec
- type KustomizationStatus
- type Profile
- type ProfileList
- type ProfileSpec
- type ProfileStatus
- type ServiceAccount
- type Snapshot
- type SnapshotEntry
- type Unsortable
- type WorkloadReference
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" // PruneFailedReason represents the fact that the kustomization pruning failed. PruneFailedReason string = "PruneFailed" // 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" // InitializedReason represents the fact that a given resource has been initialized. InitializedReason string = "Initialized" // ProgressingReason represents the fact that a kustomization reconciliation // is underway. ProgressingReason string = "Progressing" // 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 AlertProvider ¶
type AlertProvider struct {
// HTTP(S) webhook address of this provider
// +required
Address string `json:"address"`
// Alert channel for this provider
// +required
Channel string `json:"channel"`
// Bot username for this provider
// +required
Username string `json:"username"`
// Filter alerts based on verbosity level, defaults to ('error').
// +kubebuilder:validation:Enum=info;error
// +optional
Verbosity string `json:"verbosity,omitempty"`
// Type of provider
// +kubebuilder:validation:Enum=slack;discord
// +required
Type string `json:"type"`
}
Alert is the configuration of alerting for a specific provider
func (*AlertProvider) DeepCopy ¶
func (in *AlertProvider) DeepCopy() *AlertProvider
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AlertProvider.
func (*AlertProvider) DeepCopyInto ¶
func (in *AlertProvider) DeepCopyInto(out *AlertProvider)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
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 DependencySort ¶
func DependencySort(ks []Kustomization) ([]Kustomization, error)
func KustomizationNotReady ¶
func KustomizationNotReady(kustomization Kustomization, reason, message string) Kustomization
func KustomizationNotReadySnapshot ¶
func KustomizationNotReadySnapshot(kustomization Kustomization, snapshot *Snapshot, reason, message string) Kustomization
func KustomizationProgressing ¶
func KustomizationProgressing(kustomization Kustomization) Kustomization
func KustomizationReady ¶
func KustomizationReady(kustomization Kustomization, snapshot *Snapshot, revision, 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 kustomizations 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"`
// Enables garbage collection.
// +required
Prune bool `json:"prune"`
// A list of workloads (Deployments, DaemonSets and StatefulSets)
// to be included in the health assessment.
// +optional
HealthChecks []WorkloadReference `json:"healthChecks,omitempty"`
// The Kubernetes service account used for applying the kustomization.
// +optional
ServiceAccount *ServiceAccount `json:"serviceAccount,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"`
// The last successfully applied revision.
// The revision format for Git sources is <branch|tag>/<commit-sha>.
// +optional
LastAppliedRevision string `json:"lastAppliedRevision,omitempty"`
// The last successfully applied revision metadata.
// +optional
Snapshot *Snapshot `json:"snapshot,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 Profile ¶
type Profile struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`
Spec ProfileSpec `json:"spec,omitempty"`
Status ProfileStatus `json:"status,omitempty"`
}
Profile is the Schema for the profiles API
func (*Profile) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Profile.
func (*Profile) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*Profile) DeepCopyObject ¶
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type ProfileList ¶
type ProfileList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata,omitempty"`
Items []Profile `json:"items"`
}
ProfileList contains a list of Profile
func (*ProfileList) DeepCopy ¶
func (in *ProfileList) DeepCopy() *ProfileList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ProfileList.
func (*ProfileList) DeepCopyInto ¶
func (in *ProfileList) DeepCopyInto(out *ProfileList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*ProfileList) DeepCopyObject ¶
func (in *ProfileList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type ProfileSpec ¶
type ProfileSpec struct {
// Alerting configuration of the kustomizations targeted by this profile.
// +optional
Alert *AlertProvider `json:"alert"`
// The list of kustomizations that this profile applies to.
// +required
Kustomizations []string `json:"kustomizations"`
}
ProfileSpec defines the desired state of Profile
func (*ProfileSpec) DeepCopy ¶
func (in *ProfileSpec) DeepCopy() *ProfileSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ProfileSpec.
func (*ProfileSpec) DeepCopyInto ¶
func (in *ProfileSpec) DeepCopyInto(out *ProfileSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ProfileStatus ¶
type ProfileStatus struct {
// +optional
Conditions []Condition `json:"conditions,omitempty"`
}
ProfileStatus defines the observed state of Profile
func (*ProfileStatus) DeepCopy ¶
func (in *ProfileStatus) DeepCopy() *ProfileStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ProfileStatus.
func (*ProfileStatus) DeepCopyInto ¶
func (in *ProfileStatus) DeepCopyInto(out *ProfileStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ServiceAccount ¶
type ServiceAccount struct {
// Name is the name of the service account being referenced.
// +required
Name string `json:"name"`
// Namespace is the namespace of the service account being referenced.
// +required
Namespace string `json:"namespace"`
}
ServiceAccount defines a reference to a Kubernetes service account.
func (*ServiceAccount) DeepCopy ¶
func (in *ServiceAccount) DeepCopy() *ServiceAccount
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ServiceAccount.
func (*ServiceAccount) DeepCopyInto ¶
func (in *ServiceAccount) DeepCopyInto(out *ServiceAccount)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Snapshot ¶
type Snapshot struct {
// The source revision.
// +required
Revision string `json:"revision"`
// A list of Kubernetes kinds grouped by namespace.
// +required
Entries []SnapshotEntry `json:"entries"`
}
Snapshot holds the metadata of the Kubernetes objects generated for a source revision
func (*Snapshot) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Snapshot.
func (*Snapshot) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*Snapshot) NamespacedKinds ¶
func (*Snapshot) NonNamespacedKinds ¶
type SnapshotEntry ¶
type SnapshotEntry struct {
// The namespace of this entry.
// +optional
Namespace string `json:"namespace"`
// The list of Kubernetes kinds.
// +required
Kinds map[string]string `json:"kinds"`
}
Snapshot holds the metadata of namespaced Kubernetes objects
func (*SnapshotEntry) DeepCopy ¶
func (in *SnapshotEntry) DeepCopy() *SnapshotEntry
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SnapshotEntry.
func (*SnapshotEntry) DeepCopyInto ¶
func (in *SnapshotEntry) DeepCopyInto(out *SnapshotEntry)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Unsortable ¶
type Unsortable [][]string
+kubebuilder:object:generate=false
func (Unsortable) Error ¶
func (e Unsortable) Error() string
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"`
}
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.