Documentation
¶
Overview ¶
Package v1beta1 contains API Schema definitions for the kustomize v1beta1 API group +kubebuilder:object:generate=true +groupName=kustomize.toolkit.fluxcd.io
Index ¶
- Constants
- Variables
- func SetKustomizationHealthiness(k *Kustomization, status metav1.ConditionStatus, reason, message string)
- func SetKustomizationReadiness(k *Kustomization, status metav1.ConditionStatus, reason, message string, ...)
- type CrossNamespaceSourceReference
- type Decryption
- type KubeConfig
- type Kustomization
- func KustomizationNotReady(k Kustomization, revision, reason, message string) Kustomization
- func KustomizationNotReadySnapshot(k Kustomization, snapshot *Snapshot, revision, reason, message string) Kustomization
- func KustomizationProgressing(k Kustomization) Kustomization
- func KustomizationReady(k Kustomization, snapshot *Snapshot, revision, reason, message string) Kustomization
- func (in *Kustomization) DeepCopy() *Kustomization
- func (in *Kustomization) DeepCopyInto(out *Kustomization)
- func (in *Kustomization) DeepCopyObject() runtime.Object
- func (in Kustomization) GetDependsOn() (types.NamespacedName, []dependency.CrossNamespaceDependencyReference)
- func (in Kustomization) GetRetryInterval() time.Duration
- func (in *Kustomization) GetStatusConditions() *[]metav1.Condition
- func (in Kustomization) GetTimeout() time.Duration
- type KustomizationList
- type KustomizationSpec
- type KustomizationStatus
- type PostBuild
- type Snapshot
- type SnapshotEntry
- type SubstituteReference
Constants ¶
const ( // HealthyCondition is the condition type used // to record the last health assessment result. HealthyCondition string = "Healthy" // PruneFailedReason represents the fact that the // pruning of the Kustomization failed. PruneFailedReason string = "PruneFailed" // ArtifactFailedReason represents the fact that the // artifact download of the kustomization failed. ArtifactFailedReason string = "ArtifactFailed" // BuildFailedReason represents the fact that the // kustomize build of the Kustomization failed. BuildFailedReason string = "BuildFailed" // HealthCheckFailedReason represents the fact that // one of the health checks of the Kustomization failed. HealthCheckFailedReason string = "HealthCheckFailed" // ValidationFailedReason represents the fact that the // validation of the Kustomization manifests has failed. ValidationFailedReason string = "ValidationFailed" )
const ( KustomizationKind = "Kustomization" KustomizationFinalizer = "finalizers.fluxcd.io" MaxConditionMessageLength = 20000 DisabledValue = "disabled" )
const ( // GitRepositoryIndexKey is the key used for indexing kustomizations // based on their Git sources. GitRepositoryIndexKey string = ".metadata.gitRepository" // BucketIndexKey is the key used for indexing kustomizations // based on their S3 sources. BucketIndexKey string = ".metadata.bucket" )
Variables ¶
var ( // GroupVersion is group version used to register these objects GroupVersion = schema.GroupVersion{Group: "kustomize.toolkit.fluxcd.io", Version: "v1beta1"} // 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 ¶
func SetKustomizationHealthiness ¶ added in v0.7.4
func SetKustomizationHealthiness(k *Kustomization, status metav1.ConditionStatus, reason, message string)
SetKustomizationHealthiness sets the HealthyCondition status for a Kustomization.
func SetKustomizationReadiness ¶
func SetKustomizationReadiness(k *Kustomization, status metav1.ConditionStatus, reason, message string, revision string)
SetKustomizeReadiness sets the ReadyCondition, ObservedGeneration, and LastAttemptedRevision, on the Kustomization.
Types ¶
type CrossNamespaceSourceReference ¶
type CrossNamespaceSourceReference struct {
// API version of the referent
// +optional
APIVersion string `json:"apiVersion,omitempty"`
// Kind of the referent
// +kubebuilder:validation:Enum=GitRepository;Bucket
// +required
Kind string `json:"kind"`
// Name of the referent
// +required
Name string `json:"name"`
// Namespace of the referent, defaults to the Kustomization namespace
// +optional
Namespace string `json:"namespace,omitempty"`
}
CrossNamespaceSourceReference contains enough information to let you locate the typed referenced object at cluster level
func (*CrossNamespaceSourceReference) DeepCopy ¶
func (in *CrossNamespaceSourceReference) DeepCopy() *CrossNamespaceSourceReference
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CrossNamespaceSourceReference.
func (*CrossNamespaceSourceReference) DeepCopyInto ¶
func (in *CrossNamespaceSourceReference) DeepCopyInto(out *CrossNamespaceSourceReference)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*CrossNamespaceSourceReference) String ¶ added in v0.8.0
func (s *CrossNamespaceSourceReference) String() 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 KubeConfig ¶
type KubeConfig struct {
// SecretRef holds the name to a secret that contains a 'value' key with
// the kubeconfig file as the value. It must be in the same namespace as
// the Kustomization.
// It is recommended that the kubeconfig is self-contained, and the secret
// is regularly updated if credentials such as a cloud-access-token expire.
// Cloud specific `cmd-path` auth helpers will not function without adding
// binaries and credentials to the Pod that is responsible for reconciling
// the Kustomization.
// +required
SecretRef meta.LocalObjectReference `json:"secretRef,omitempty"`
}
KubeConfig references a Kubernetes secret that contains a kubeconfig file.
func (*KubeConfig) DeepCopy ¶
func (in *KubeConfig) DeepCopy() *KubeConfig
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KubeConfig.
func (*KubeConfig) DeepCopyInto ¶
func (in *KubeConfig) DeepCopyInto(out *KubeConfig)
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(k Kustomization, revision, reason, message string) Kustomization
KustomizationNotReady registers a failed apply attempt of the given Kustomization.
func KustomizationNotReadySnapshot ¶
func KustomizationNotReadySnapshot(k Kustomization, snapshot *Snapshot, revision, reason, message string) Kustomization
KustomizationNotReady registers a failed apply attempt of the given Kustomization, including a Snapshot.
func KustomizationProgressing ¶
func KustomizationProgressing(k Kustomization) Kustomization
KustomizationProgressing resets the conditions of the given Kustomization to a single ReadyCondition with status ConditionUnknown.
func KustomizationReady ¶
func KustomizationReady(k Kustomization, snapshot *Snapshot, revision, reason, message string) Kustomization
KustomizationReady registers a successful apply attempt of the given 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) GetDependsOn ¶
func (in Kustomization) GetDependsOn() (types.NamespacedName, []dependency.CrossNamespaceDependencyReference)
func (Kustomization) GetRetryInterval ¶ added in v0.7.0
func (in Kustomization) GetRetryInterval() time.Duration
GetRetryInterval returns the retry interval
func (*Kustomization) GetStatusConditions ¶ added in v0.3.0
func (in *Kustomization) GetStatusConditions() *[]metav1.Condition
GetStatusConditions returns a pointer to the Status.Conditions slice
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 {
// DependsOn may contain a dependency.CrossNamespaceDependencyReference slice
// with references to Kustomization resources that must be ready before this
// Kustomization can be reconciled.
// +optional
DependsOn []dependency.CrossNamespaceDependencyReference `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.
// +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.
// +optional
RetryInterval *metav1.Duration `json:"retryInterval,omitempty"`
// The KubeConfig for reconciling the Kustomization on a remote cluster.
// When specified, KubeConfig takes precedence over ServiceAccountName.
// +optional
KubeConfig *KubeConfig `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 patches, defined as inline YAML objects.
// +optional
PatchesStrategicMerge []apiextensionsv1.JSON `json:"patchesStrategicMerge,omitempty"`
// JSON 6902 patches, defined as inline YAML objects.
// +optional
PatchesJSON6902 []kustomize.JSON6902Patch `json:"patchesJson6902,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.
// +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), 'server'
// (APIServer dry-run) or 'none'.
// When 'Force' is 'true', validation will fallback to 'client' if set to
// 'server' because server-side validation is not supported in this scenario.
// +kubebuilder:validation:Enum=none;client;server
// +optional
Validation string `json:"validation,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"`
}
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 {
// ObservedGeneration is the last reconciled generation.
// +optional
ObservedGeneration int64 `json:"observedGeneration,omitempty"`
// +optional
Conditions []metav1.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"`
// LastAttemptedRevision is the revision of the last reconciliation attempt.
// +optional
LastAttemptedRevision string `json:"lastAttemptedRevision,omitempty"`
meta.ReconcileRequestStatus `json:",inline"`
// 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 PostBuild ¶ added in v0.8.0
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 ¶ added in v0.8.0
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PostBuild.
func (*PostBuild) DeepCopyInto ¶ added in v0.8.0
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Snapshot ¶
type Snapshot struct {
// The manifests sha1 checksum.
// +required
Checksum string `json:"checksum"`
// 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 (s *Snapshot) NamespacedKinds() map[string][]schema.GroupVersionKind
func (*Snapshot) NonNamespacedKinds ¶
func (s *Snapshot) NonNamespacedKinds() []schema.GroupVersionKind
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 SubstituteReference ¶ added in v0.8.1
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"`
}
SubstituteReference contains a reference to a resource containing the variables name and value.
func (*SubstituteReference) DeepCopy ¶ added in v0.8.1
func (in *SubstituteReference) DeepCopy() *SubstituteReference
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SubstituteReference.
func (*SubstituteReference) DeepCopyInto ¶ added in v0.8.1
func (in *SubstituteReference) DeepCopyInto(out *SubstituteReference)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.