...

Package v1beta1

import "github.com/fluxcd/kustomize-controller/api/v1beta1"
Overview
Index

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
type CrossNamespaceSourceReference
    func (in *CrossNamespaceSourceReference) DeepCopy() *CrossNamespaceSourceReference
    func (in *CrossNamespaceSourceReference) DeepCopyInto(out *CrossNamespaceSourceReference)
    func (s *CrossNamespaceSourceReference) String() string
type Decryption
    func (in *Decryption) DeepCopy() *Decryption
    func (in *Decryption) DeepCopyInto(out *Decryption)
type KubeConfig
    func (in *KubeConfig) DeepCopy() *KubeConfig
    func (in *KubeConfig) DeepCopyInto(out *KubeConfig)
type Kustomization
    func (in *Kustomization) DeepCopy() *Kustomization
    func (in *Kustomization) DeepCopyInto(out *Kustomization)
    func (in *Kustomization) DeepCopyObject() runtime.Object
    func (in Kustomization) GetDependsOn() (types.NamespacedName, []meta.NamespacedObjectReference)
    func (in Kustomization) GetRetryInterval() time.Duration
    func (in *Kustomization) GetStatusConditions() *[]metav1.Condition
    func (in Kustomization) GetTimeout() time.Duration
type KustomizationList
    func (in *KustomizationList) DeepCopy() *KustomizationList
    func (in *KustomizationList) DeepCopyInto(out *KustomizationList)
    func (in *KustomizationList) DeepCopyObject() runtime.Object
type KustomizationSpec
    func (in *KustomizationSpec) DeepCopy() *KustomizationSpec
    func (in *KustomizationSpec) DeepCopyInto(out *KustomizationSpec)
type KustomizationStatus
    func (in *KustomizationStatus) DeepCopy() *KustomizationStatus
    func (in *KustomizationStatus) DeepCopyInto(out *KustomizationStatus)
type PostBuild
    func (in *PostBuild) DeepCopy() *PostBuild
    func (in *PostBuild) DeepCopyInto(out *PostBuild)
type Snapshot
    func NewSnapshot(manifests []byte, checksum string) (*Snapshot, error)
    func (in *Snapshot) DeepCopy() *Snapshot
    func (in *Snapshot) DeepCopyInto(out *Snapshot)
    func (s *Snapshot) NamespacedKinds() map[string][]schema.GroupVersionKind
    func (s *Snapshot) NonNamespacedKinds() []schema.GroupVersionKind
type SnapshotEntry
    func (in *SnapshotEntry) DeepCopy() *SnapshotEntry
    func (in *SnapshotEntry) DeepCopyInto(out *SnapshotEntry)
type SubstituteReference
    func (in *SubstituteReference) DeepCopy() *SubstituteReference
    func (in *SubstituteReference) DeepCopyInto(out *SubstituteReference)

Package files

condition_types.go doc.go groupversion_info.go kustomization_types.go reference_types.go snapshot_types.go zz_generated.deepcopy.go

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
)

type CrossNamespaceSourceReference

CrossNamespaceSourceReference contains enough information to let you locate the typed referenced 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=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"`
}

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

func (s *CrossNamespaceSourceReference) String() string

type Decryption

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 (*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

KubeConfig references a Kubernetes secret that contains a kubeconfig file.

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

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

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 (*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, []meta.NamespacedObjectReference)

func (Kustomization) GetRetryInterval

func (in Kustomization) GetRetryInterval() time.Duration

GetRetryInterval returns the retry interval

func (*Kustomization) GetStatusConditions

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

KustomizationList contains a list of kustomizations.

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

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

KustomizationSpec defines the desired state of a kustomization.

type KustomizationSpec struct {
    // 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.
    // +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 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"`

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

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

KustomizationStatus defines the observed state of a kustomization.

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

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

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 (*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 Snapshot

Snapshot holds the metadata of the Kubernetes objects generated for a source revision

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

func NewSnapshot

func NewSnapshot(manifests []byte, checksum string) (*Snapshot, error)

func (*Snapshot) DeepCopy

func (in *Snapshot) DeepCopy() *Snapshot

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

func (*Snapshot) DeepCopyInto

func (in *Snapshot) DeepCopyInto(out *Snapshot)

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

Snapshot holds the metadata of namespaced Kubernetes objects

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

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

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

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.