v1alpha1

package
v0.0.13 Latest Latest
Warning

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

Go to latest
Published: Sep 21, 2020 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Overview

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

Index

Constants

View Source
const (
	// ReconciliationSucceededReason represents the fact that the
	// reconciliation of the Kustomization has succeeded.
	ReconciliationSucceededReason string = "ReconciliationSucceeded"

	// ReconciliationFailedReason represents the fact that the
	// reconciliation of the Kustomization has failed.
	ReconciliationFailedReason string = "ReconciliationFailed"

	// ProgressingReason represents the fact that the
	// reconciliation of the Kustomization is underway.
	ProgressingReason string = "Progressing"

	// SuspendedReason represents the fact that the
	// reconciliation of the Kustomization has been suspended.
	SuspendedReason string = "Suspended"

	// DependencyNotReady represents the fact that
	// one of the dependencies of the Kustomization is not ready.
	DependencyNotReadyReason string = "DependencyNotReady"

	// 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"
)
View Source
const (
	KustomizationKind         = "Kustomization"
	KustomizationFinalizer    = "finalizers.fluxcd.io"
	MaxConditionMessageLength = 4000
)
View Source
const (
	// SourceIndexKey is the key used for indexing kustomizations
	// based on their Git sources.
	SourceIndexKey string = ".metadata.source"
	// BucketIndexKey is the key used for indexing kustomizations
	// based on their S3 sources.
	BucketIndexKey string = ".metadata.bucket"
)
View Source
const (
	// ReadyCondition is the name of the condition that
	// records the readiness status of a Kustomization.
	ReadyCondition string = "Ready"
)

Variables

View Source
var (
	// GroupVersion is group version used to register these objects
	GroupVersion = schema.GroupVersion{Group: "kustomize.toolkit.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

func SetKustomizationCondition

func SetKustomizationCondition(k *Kustomization, condition string, status corev1.ConditionStatus, reason, message string)

SetKustomizationCondition sets the given condition with the given status, reason and message on the Kustomization.

func SetKustomizationReadiness

func SetKustomizationReadiness(k *Kustomization, status corev1.ConditionStatus, reason, message string, revision string)

SetKustomizeReadiness sets the ReadyCondition, ObservedGeneration, and LastAttemptedRevision, on the Kustomization.

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

func (in *Condition) DeepCopy() *Condition

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

func (*Condition) DeepCopyInto

func (in *Condition) DeepCopyInto(out *Condition)

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

type CrossNamespaceObjectReference

type CrossNamespaceObjectReference struct {
	// API version of the referent, defaults to 'apps/v1'
	// +optional
	APIVersion string `json:"apiVersion,omitempty"`

	// Kind of the referent
	// +required
	Kind string `json:"kind"`

	// Name of the referent
	// +required
	Name string `json:"name"`

	// Namespace of the referent
	// +optional
	Namespace string `json:"namespace,omitempty"`
}

CrossNamespaceObjectReference contains enough information to let you locate the typed referenced object at cluster level

func (*CrossNamespaceObjectReference) DeepCopy

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

func (*CrossNamespaceObjectReference) DeepCopyInto

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

type CrossNamespaceSourceReference added in v0.0.12

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 added in v0.0.12

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

func (*CrossNamespaceSourceReference) DeepCopyInto added in v0.0.12

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

type Decryption added in v0.0.9

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 *corev1.LocalObjectReference `json:"secretRef,omitempty"`
}

Decryption defines how decryption is handled for Kubernetes manifests.

func (*Decryption) DeepCopy added in v0.0.9

func (in *Decryption) DeepCopy() *Decryption

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

func (*Decryption) DeepCopyInto added in v0.0.9

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"`
	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 added in v0.0.13

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 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 resources to be included in the health assessment.
	// +optional
	HealthChecks []CrossNamespaceObjectReference `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 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"`

	// 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 {
	// ObservedGeneration is the last reconciled generation.
	// +optional
	ObservedGeneration int64 `json:"observedGeneration,omitempty"`

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

	// LastAttemptedRevision is the revision of the last reconciliation attempt.
	// +optional
	LastAttemptedRevision string `json:"lastAttemptedRevision,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 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 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 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

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.

Jump to

Keyboard shortcuts

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