Documentation

Overview

Package v1alpha1 contains resources relating to Crossplane Workloads. +kubebuilder:object:generate=true +groupName=workload.crossplane.io +versionName=v1alpha1

Index

Constants

View Source
const (
	Group   = "workload.crossplane.io"
	Version = "v1alpha1"
)

Package type metadata.

Variables

View Source
var (
	// SchemeGroupVersion is group version used to register these objects
	SchemeGroupVersion = schema.GroupVersion{Group: Group, Version: Version}

	// SchemeBuilder is used to add go types to the GroupVersionKind scheme
	SchemeBuilder = &scheme.Builder{GroupVersion: SchemeGroupVersion}
)
View Source
var (
	KubernetesApplicationKind             = reflect.TypeOf(KubernetesApplication{}).Name()
	KubernetesApplicationGroupKind        = schema.GroupKind{Group: Group, Kind: KubernetesApplicationKind}.String()
	KubernetesApplicationKindAPIVersion   = KubernetesApplicationKind + "." + SchemeGroupVersion.String()
	KubernetesApplicationGroupVersionKind = SchemeGroupVersion.WithKind(KubernetesApplicationKind)
)

KubernetesApplication type metadata.

View Source
var (
	KubernetesApplicationResourceKind             = reflect.TypeOf(KubernetesApplicationResource{}).Name()
	KubernetesApplicationResourceGroupKind        = schema.GroupKind{Group: Group, Kind: KubernetesApplicationResourceKind}.String()
	KubernetesApplicationResourceKindAPIVersion   = KubernetesApplicationResourceKind + "." + SchemeGroupVersion.String()
	KubernetesApplicationResourceGroupVersionKind = SchemeGroupVersion.WithKind(KubernetesApplicationResourceKind)
)

KubernetesApplicationResource type metadata.

View Source
var (
	KubernetesTargetKind             = reflect.TypeOf(KubernetesTarget{}).Name()
	KubernetesTargetGroupKind        = schema.GroupKind{Group: Group, Kind: KubernetesTargetKind}.String()
	KubernetesTargetKindAPIVersion   = KubernetesTargetKind + "." + SchemeGroupVersion.String()
	KubernetesTargetGroupVersionKind = SchemeGroupVersion.WithKind(KubernetesTargetKind)
)

KubernetesTarget type metadata.

Functions

This section is empty.

Types

type KubernetesApplication

type KubernetesApplication struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`

	Spec   KubernetesApplicationSpec   `json:"spec,omitempty"`
	Status KubernetesApplicationStatus `json:"status,omitempty"`
}

A KubernetesApplication defines an application deployed by Crossplane to a Kubernetes cluster, i.e. a portable KubernetesCluster resource claim. +kubebuilder:printcolumn:name="CLUSTER",type="string",JSONPath=".status.targetRef.name" +kubebuilder:printcolumn:name="STATUS",type="string",JSONPath=".status.state" +kubebuilder:printcolumn:name="DESIRED",type="integer",JSONPath=".status.desiredResources" +kubebuilder:printcolumn:name="SUBMITTED",type="integer",JSONPath=".status.submittedResources"

func (*KubernetesApplication) DeepCopy

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

func (*KubernetesApplication) DeepCopyInto

func (in *KubernetesApplication) DeepCopyInto(out *KubernetesApplication)

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

func (*KubernetesApplication) DeepCopyObject

func (in *KubernetesApplication) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type KubernetesApplicationList

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

KubernetesApplicationList contains a list of KubernetesApplication.

func (*KubernetesApplicationList) DeepCopy

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

func (*KubernetesApplicationList) DeepCopyInto

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

func (*KubernetesApplicationList) DeepCopyObject

func (in *KubernetesApplicationList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type KubernetesApplicationResource

type KubernetesApplicationResource struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`

	Spec   KubernetesApplicationResourceSpec   `json:"spec,omitempty"`
	Status KubernetesApplicationResourceStatus `json:"status,omitempty"`
}

A KubernetesApplicationResource is a resource of a Kubernetes application. Each resource templates a single Kubernetes resource to be deployed to its scheduled KubernetesCluster. +kubebuilder:printcolumn:name="TEMPLATE-KIND",type="string",JSONPath=".spec.template.kind" +kubebuilder:printcolumn:name="TEMPLATE-NAME",type="string",JSONPath=".spec.template.metadata.name" +kubebuilder:printcolumn:name="CLUSTER",type="string",JSONPath=".status.targetRef.name" +kubebuilder:printcolumn:name="STATUS",type="string",JSONPath=".status.state"

func (*KubernetesApplicationResource) DeepCopy

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

func (*KubernetesApplicationResource) DeepCopyInto

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

func (*KubernetesApplicationResource) DeepCopyObject

func (in *KubernetesApplicationResource) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type KubernetesApplicationResourceList

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

KubernetesApplicationResourceList contains a list of KubernetesApplicationResource.

func (*KubernetesApplicationResourceList) DeepCopy

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

func (*KubernetesApplicationResourceList) DeepCopyInto

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

func (*KubernetesApplicationResourceList) DeepCopyObject

func (in *KubernetesApplicationResourceList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type KubernetesApplicationResourceSpec

type KubernetesApplicationResourceSpec struct {

	// A Template for a Kubernetes resource to be submitted to the
	// KubernetesCluster to which this application resource is scheduled. The
	// resource must be understood by the KubernetesCluster. Crossplane requires
	// only that the resource contains standard Kubernetes type and object
	// metadata.
	Template *unstructured.Unstructured `json:"template"`

	// Secrets upon which this application resource depends. These secrets will
	// be propagated to the Kubernetes cluster to which this application is
	// scheduled.
	Secrets []corev1.LocalObjectReference `json:"secrets,omitempty"`
}

KubernetesApplicationResourceSpec specifies the desired state of a KubernetesApplicationResource.

func (*KubernetesApplicationResourceSpec) DeepCopy

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

func (*KubernetesApplicationResourceSpec) DeepCopyInto

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

type KubernetesApplicationResourceState

type KubernetesApplicationResourceState string

KubernetesApplicationResourceState represents the state of a KubernetesApplicationResource.

const (
	KubernetesApplicationResourceStateUnknown   KubernetesApplicationResourceState = ""
	KubernetesApplicationResourceStatePending   KubernetesApplicationResourceState = "Pending"
	KubernetesApplicationResourceStateScheduled KubernetesApplicationResourceState = "Scheduled"
	KubernetesApplicationResourceStateSubmitted KubernetesApplicationResourceState = "Submitted"
	KubernetesApplicationResourceStateFailed    KubernetesApplicationResourceState = "Failed"
)

KubernetesApplicationResource states.

type KubernetesApplicationResourceStatus

type KubernetesApplicationResourceStatus struct {
	runtimev1alpha1.ConditionedStatus `json:"conditionedStatus,omitempty"`

	// State of the application.
	State KubernetesApplicationResourceState `json:"state,omitempty"`

	// Target to which this application has been scheduled.
	Target *KubernetesTargetReference `json:"targetRef,omitempty"`

	// Remote status of the resource templated by this application resource.
	Remote *RemoteStatus `json:"remote,omitempty"`
}

KubernetesApplicationResourceStatus represents the observed state of a KubernetesApplicationResource.

func (*KubernetesApplicationResourceStatus) DeepCopy

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

func (*KubernetesApplicationResourceStatus) DeepCopyInto

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

type KubernetesApplicationResourceTemplate

type KubernetesApplicationResourceTemplate struct {
	metav1.ObjectMeta `json:"metadata,omitempty"`

	Spec KubernetesApplicationResourceSpec `json:"spec,omitempty"`
}

A KubernetesApplicationResourceTemplate is used to instantiate new KubernetesApplicationResources.

func (*KubernetesApplicationResourceTemplate) DeepCopy

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

func (*KubernetesApplicationResourceTemplate) DeepCopyInto

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

type KubernetesApplicationSpec

type KubernetesApplicationSpec struct {

	// ResourceSelector selects the KubernetesApplicationResources that are
	// managed by this KubernetesApplication. Note that a KubernetesApplication
	// will never adopt orphaned KubernetesApplicationResources, and thus this
	// selector serves only to help match a KubernetesApplication to its
	// KubernetesApplicationResources.
	ResourceSelector *metav1.LabelSelector `json:"resourceSelector"`

	// TargetSelector selects the targets to which this application may be
	// scheduled. Leave both match labels and expressions empty to match any
	// target.
	TargetSelector *metav1.LabelSelector `json:"targetSelector"`

	// ResourceTemplates specifies a set of Kubernetes application resources
	// managed by this application.
	ResourceTemplates []KubernetesApplicationResourceTemplate `json:"resourceTemplates"`
}

A KubernetesApplicationSpec specifies the resources of a Kubernetes application.

func (*KubernetesApplicationSpec) DeepCopy

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

func (*KubernetesApplicationSpec) DeepCopyInto

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

type KubernetesApplicationState

type KubernetesApplicationState string

KubernetesApplicationState represents the state of a Kubernetes application.

const (
	KubernetesApplicationStateUnknown   KubernetesApplicationState = ""
	KubernetesApplicationStatePending   KubernetesApplicationState = "Pending"
	KubernetesApplicationStateScheduled KubernetesApplicationState = "Scheduled"
	KubernetesApplicationStatePartial   KubernetesApplicationState = "PartiallySubmitted"
	KubernetesApplicationStateSubmitted KubernetesApplicationState = "Submitted"
	KubernetesApplicationStateFailed    KubernetesApplicationState = "Failed"
)

KubernetesApplication states.

type KubernetesApplicationStatus

type KubernetesApplicationStatus struct {
	runtimev1alpha1.ConditionedStatus `json:"conditionedStatus,omitempty"`

	// State of the application.
	State KubernetesApplicationState `json:"state,omitempty"`

	// Target to which this application has been scheduled.
	Target *KubernetesTargetReference `json:"targetRef,omitempty"`

	// Desired resources of this application, i.e. the number of resources
	// that match this application's resource selector.
	DesiredResources int `json:"desiredResources,omitempty"`

	// Submitted resources of this workload, i.e. the subset of desired
	// resources that have been successfully submitted to their scheduled
	// Kubernetes cluster.
	SubmittedResources int `json:"submittedResources,omitempty"`
}

KubernetesApplicationStatus represents the observed state of a KubernetesApplication.

func (*KubernetesApplicationStatus) DeepCopy

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

func (*KubernetesApplicationStatus) DeepCopyInto

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

type KubernetesTarget

type KubernetesTarget struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`

	Spec   runtimev1alpha1.TargetSpec   `json:"spec"`
	Status runtimev1alpha1.TargetStatus `json:"status,omitempty"`
}

A KubernetesTarget is a scheduling target for a Kubernetes Application. +kubebuilder:printcolumn:name="CLUSTER",type="string",JSONPath=".spec.clusterRef.name"

func (*KubernetesTarget) DeepCopy

func (in *KubernetesTarget) DeepCopy() *KubernetesTarget

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

func (*KubernetesTarget) DeepCopyInto

func (in *KubernetesTarget) DeepCopyInto(out *KubernetesTarget)

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

func (*KubernetesTarget) DeepCopyObject

func (in *KubernetesTarget) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

func (*KubernetesTarget) GetCondition

GetCondition of this KubernetesTarget.

func (*KubernetesTarget) GetResourceReference

func (tr *KubernetesTarget) GetResourceReference() *corev1.ObjectReference

GetResourceReference of this KubernetesTarget.

func (*KubernetesTarget) GetWriteConnectionSecretToReference

func (tr *KubernetesTarget) GetWriteConnectionSecretToReference() *runtimev1alpha1.LocalSecretReference

GetWriteConnectionSecretToReference of this KubernetesTarget.

func (*KubernetesTarget) SetConditions

func (tr *KubernetesTarget) SetConditions(c ...runtimev1alpha1.Condition)

SetConditions of this KubernetesTarget.

func (*KubernetesTarget) SetResourceReference

func (tr *KubernetesTarget) SetResourceReference(r *corev1.ObjectReference)

SetResourceReference of this KubernetesTarget.

func (*KubernetesTarget) SetWriteConnectionSecretToReference

func (tr *KubernetesTarget) SetWriteConnectionSecretToReference(r *runtimev1alpha1.LocalSecretReference)

SetWriteConnectionSecretToReference of this KubernetesTarget.

type KubernetesTargetList

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

KubernetesTargetList contains a list of KubernetesTarget.

func (*KubernetesTargetList) DeepCopy

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

func (*KubernetesTargetList) DeepCopyInto

func (in *KubernetesTargetList) DeepCopyInto(out *KubernetesTargetList)

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

func (*KubernetesTargetList) DeepCopyObject

func (in *KubernetesTargetList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type KubernetesTargetReference

type KubernetesTargetReference struct {
	// Name of the referent. More info:
	// https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
	Name string `json:"name"`
}

A KubernetesTargetReference is a reference to a KubernetesTarget resource claim in the same namespace as the referrer.

func (*KubernetesTargetReference) DeepCopy

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

func (*KubernetesTargetReference) DeepCopyInto

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

type RemoteStatus

type RemoteStatus struct {
	// Raw JSON representation of the remote status as a byte array.
	Raw json.RawMessage `json:"raw,omitempty"`
}

RemoteStatus represents the observed state of a remote cluster.

func (*RemoteStatus) DeepCopy

func (in *RemoteStatus) DeepCopy() *RemoteStatus

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

func (*RemoteStatus) DeepCopyInto

func (in *RemoteStatus) DeepCopyInto(out *RemoteStatus)

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

func (RemoteStatus) MarshalJSON

func (s RemoteStatus) MarshalJSON() ([]byte, error)

MarshalJSON returns the JSON encoding of the RemoteStatus.

func (*RemoteStatus) UnmarshalJSON

func (s *RemoteStatus) UnmarshalJSON(data []byte) error

UnmarshalJSON sets the RemoteStatus to a copy of data.