v1alpha1

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Oct 29, 2019 License: Apache-2.0 Imports: 9 Imported by: 0

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()
	KubernetesApplicationKindAPIVersion   = KubernetesApplicationKind + "." + SchemeGroupVersion.String()
	KubernetesApplicationGroupVersionKind = SchemeGroupVersion.WithKind(KubernetesApplicationKind)
)

KubernetesApplication type metadata.

View Source
var (
	KubernetesApplicationResourceKind             = reflect.TypeOf(KubernetesApplicationResource{}).Name()
	KubernetesApplicationResourceKindAPIVersion   = KubernetesApplicationResourceKind + "." + SchemeGroupVersion.String()
	KubernetesApplicationResourceGroupVersionKind = SchemeGroupVersion.WithKind(KubernetesApplicationResourceKind)
)

KubernetesApplicationResource 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.clusterRef.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.clusterRef.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"`

	// Cluster to which this application has been scheduled.
	Cluster *corev1.ObjectReference `json:"clusterRef,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"`

	// ClusterSelector selects the clusters to which this application may be
	// scheduled. Leave both match labels and expressions empty to match any
	// cluster.
	ClusterSelector *metav1.LabelSelector `json:"clusterSelector"`

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

	// Cluster to which this application has been scheduled.
	Cluster *corev1.ObjectReference `json:"clusterRef,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 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.

Jump to

Keyboard shortcuts

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