v1alpha1

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Apr 11, 2019 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Overview

Package v1alpha1 contains API Schema definitions for the crossplane core v1alpha1 API group +k8s:openapi-gen=true +k8s:deepcopy-gen=package,register +k8s:conversion-gen=github.com/crossplaneio/crossplane/pkg/apis/compute +k8s:defaulter-gen=TypeMeta +groupName=compute.crossplane.io

Package v1alpha1 contains API Schema definitions for the crossplane core v1alpha1 API group +k8s:openapi-gen=true +k8s:deepcopy-gen=package,register +k8s:conversion-gen=github.com/crossplaneio/crossplane/pkg/apis/compute +k8s:defaulter-gen=TypeMeta +groupName=compute.crossplane.io

Index

Constants

View Source
const (
	Group                            = "compute.crossplane.io"
	Version                          = "v1alpha1"
	APIVersion                       = Group + "/" + Version
	KubernetesInstanceKind           = "kubernetescluster"
	KubernetesInstanceKindAPIVersion = KubernetesInstanceKind + "." + APIVersion
	WorkloadKind                     = "workload"
	WorkloadKindAPIVersion           = WorkloadKind + "." + APIVersion
)

Kubernetes Group, Version, and Kind 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}
)

Functions

This section is empty.

Types

type KubernetesCluster

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

	Spec   KubernetesClusterSpec            `json:"spec,omitempty"`
	Status corev1alpha1.ResourceClaimStatus `json:"status,omitempty"`
}

KubernetesCluster is the Schema for the instances API +k8s:openapi-gen=true +kubebuilder:printcolumn:name="STATUS",type="string",JSONPath=".status.bindingPhase" +kubebuilder:printcolumn:name="CLUSTER-CLASS",type="string",JSONPath=".spec.classReference.name" +kubebuilder:printcolumn:name="CLUSTER-REF",type="string",JSONPath=".spec.resourceName.name" +kubebuilder:printcolumn:name="AGE",type="date",JSONPath=".metadata.creationTimestamp"

func (*KubernetesCluster) ClaimStatus added in v0.2.0

ClaimStatus returns the claim status of this Kubernetes cluster.

func (*KubernetesCluster) ClassRef added in v0.2.0

func (kc *KubernetesCluster) ClassRef() *corev1.ObjectReference

ClassRef returns the resource class used by this Kubernetes cluster.

func (*KubernetesCluster) DeepCopy

func (in *KubernetesCluster) DeepCopy() *KubernetesCluster

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

func (*KubernetesCluster) DeepCopyInto

func (in *KubernetesCluster) DeepCopyInto(out *KubernetesCluster)

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

func (*KubernetesCluster) DeepCopyObject

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

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

func (*KubernetesCluster) ObjectReference

func (kc *KubernetesCluster) ObjectReference() *corev1.ObjectReference

ObjectReference to using this object as a reference

func (*KubernetesCluster) OwnerReference

func (kc *KubernetesCluster) OwnerReference() metav1.OwnerReference

OwnerReference to use this object as an owner

func (*KubernetesCluster) ResourceRef added in v0.2.0

func (kc *KubernetesCluster) ResourceRef() *corev1.ObjectReference

ResourceRef returns the resource claimed by this Kubernetes cluster.

func (*KubernetesCluster) SetResourceRef added in v0.2.0

func (kc *KubernetesCluster) SetResourceRef(ref *corev1.ObjectReference)

SetResourceRef sets the resource claimed by this Kubernetes cluster.

type KubernetesClusterList

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

KubernetesClusterList contains a list of KubernetesClusters.

func (*KubernetesClusterList) DeepCopy

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

func (*KubernetesClusterList) DeepCopyInto

func (in *KubernetesClusterList) DeepCopyInto(out *KubernetesClusterList)

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

func (*KubernetesClusterList) DeepCopyObject

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

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

type KubernetesClusterSpec

type KubernetesClusterSpec struct {
	ClassRef    *corev1.ObjectReference `json:"classReference,omitempty"`
	ResourceRef *corev1.ObjectReference `json:"resourceName,omitempty"`
	Selector    metav1.LabelSelector    `json:"selector,omitempty"`

	// cluster properties
	ClusterVersion string `json:"clusterVersion,omitempty"`
}

KubernetesClusterSpec specifies the configuration of a Kubernetes cluster.

func (*KubernetesClusterSpec) DeepCopy

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

func (*KubernetesClusterSpec) DeepCopyInto

func (in *KubernetesClusterSpec) DeepCopyInto(out *KubernetesClusterSpec)

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

type ResourceReference

type ResourceReference struct {
	// reference to a resource object in the same namespace
	corev1.ObjectReference `json:",inline"`
	// name of the generated resource secret
	SecretName string `json:"secretName"`
}

ResourceReference is generic resource represented by the resource name and the secret name that will be generated for the consumption inside the Workload. TODO: Note, currently resource reference is a general type, however, this will be change in the future and replaced with concrete resource types

func (*ResourceReference) DeepCopy

func (in *ResourceReference) DeepCopy() *ResourceReference

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

func (*ResourceReference) DeepCopyInto

func (in *ResourceReference) DeepCopyInto(out *ResourceReference)

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

type Workload

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

	Spec   WorkloadSpec   `json:"spec,omitempty"`
	Status WorkloadStatus `json:"status,omitempty"`
}

Workload is the Schema for the instances API +k8s:openapi-gen=true +kubebuilder:subresource:status +kubebuilder:printcolumn:name="STATUS",type="string",JSONPath=".status.state" +kubebuilder:printcolumn:name="CLUSTER",type="string",JSONPath=".status.clusterRef.name" +kubebuilder:printcolumn:name="NAMESPACE",type="string",JSONPath=".spec.targetNamespace" +kubebuilder:printcolumn:name="DEPLOYMENT",type="string",JSONPath=".spec.targetDeployment.metadata.name" +kubebuilder:printcolumn:name="SERVICE-EXTERNAL-IP",type="string",JSONPath=".status.service.loadBalancer.ingress[0].ip"

func (*Workload) DeepCopy

func (in *Workload) DeepCopy() *Workload

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

func (*Workload) DeepCopyInto

func (in *Workload) DeepCopyInto(out *Workload)

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

func (*Workload) DeepCopyObject

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

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

func (*Workload) ObjectReference

func (kc *Workload) ObjectReference() *corev1.ObjectReference

ObjectReference to using this object as a reference

func (*Workload) OwnerReference

func (kc *Workload) OwnerReference() metav1.OwnerReference

OwnerReference to use this object as an owner

type WorkloadList

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

WorkloadList contains a list of Workloads.

func (*WorkloadList) DeepCopy

func (in *WorkloadList) DeepCopy() *WorkloadList

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

func (*WorkloadList) DeepCopyInto

func (in *WorkloadList) DeepCopyInto(out *WorkloadList)

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

func (*WorkloadList) DeepCopyObject

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

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

type WorkloadSpec

type WorkloadSpec struct {
	ClusterSelector map[string]string `json:"clusterSelector,omitempty"`

	TargetNamespace  string             `json:"targetNamespace"`
	TargetDeployment *appsv1.Deployment `json:"targetDeployment"`
	TargetService    *corev1.Service    `json:"targetService"`

	// Resources
	Resources []ResourceReference `json:"resources,omitempty"`
}

WorkloadSpec specifies the configuration of a workload.

func (*WorkloadSpec) DeepCopy

func (in *WorkloadSpec) DeepCopy() *WorkloadSpec

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

func (*WorkloadSpec) DeepCopyInto

func (in *WorkloadSpec) DeepCopyInto(out *WorkloadSpec)

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

type WorkloadState

type WorkloadState string

WorkloadState represents the state of a workload.

const (
	WorkloadStateCreating WorkloadState = "CREATING"
	WorkloadStateRunning  WorkloadState = "RUNNING"
)

Workload states.

type WorkloadStatus

type WorkloadStatus struct {
	corev1alpha1.ConditionedStatus

	Cluster                 *corev1.ObjectReference `json:"clusterRef,omitempty"`
	appsv1.DeploymentStatus `json:"deployment,omitempty"`
	corev1.ServiceStatus    `json:"service,omitempty"`
	State                   WorkloadState           `json:"state,omitempty"`
	Deployment              *corev1.ObjectReference `json:"deploymentRef,omitempty"`
	Service                 *corev1.ObjectReference `json:"serviceRef,omitempty"`
}

WorkloadStatus represents the status of a workload.

func (*WorkloadStatus) DeepCopy

func (in *WorkloadStatus) DeepCopy() *WorkloadStatus

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

func (*WorkloadStatus) DeepCopyInto

func (in *WorkloadStatus) DeepCopyInto(out *WorkloadStatus)

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