v1alpha1

package
v1.0.4 Latest Latest
Warning

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

Go to latest
Published: Sep 11, 2018 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Overview

+k8s:openapi-gen=true +k8s:deepcopy-gen=package,register +k8s:conversion-gen=github.com/kubernetes-sigs/kubebuilder/test/projects/memcached-api-server/pkg/apis/myapps +k8s:defaulter-gen=TypeMeta +groupName=myapps.memcached.example.com

Index

Constants

This section is empty.

Variables

View Source
var (
	SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes)
	AddToScheme   = SchemeBuilder.AddToScheme
)
View Source
var (
	// Define CRDs for resources
	MemcachedCRD = v1beta1.CustomResourceDefinition{
		ObjectMeta: metav1.ObjectMeta{
			Name: "memcacheds.myapps.memcached.example.com",
		},
		Spec: v1beta1.CustomResourceDefinitionSpec{
			Group:   "myapps.memcached.example.com",
			Version: "v1alpha1",
			Names: v1beta1.CustomResourceDefinitionNames{
				Kind:   "Memcached",
				Plural: "memcacheds",
			},
			Scope: "Namespaced",
			Validation: &v1beta1.CustomResourceValidation{
				OpenAPIV3Schema: &v1beta1.JSONSchemaProps{
					Type: "object",
					Properties: map[string]v1beta1.JSONSchemaProps{
						"apiVersion": v1beta1.JSONSchemaProps{
							Type: "string",
						},
						"kind": v1beta1.JSONSchemaProps{
							Type: "string",
						},
						"metadata": v1beta1.JSONSchemaProps{
							Type: "object",
						},
						"spec": v1beta1.JSONSchemaProps{
							Type: "object",
							Properties: map[string]v1beta1.JSONSchemaProps{
								"size": v1beta1.JSONSchemaProps{
									Maximum: getFloat(100),
									Minimum: getFloat(5),
									Type:    "integer",
									Format:  "int32",
								},
							},
						},
						"status": v1beta1.JSONSchemaProps{
							Type: "object",
							Properties: map[string]v1beta1.JSONSchemaProps{
								"nodes": v1beta1.JSONSchemaProps{
									Type: "array",
									Items: &v1beta1.JSONSchemaPropsOrArray{
										Schema: &v1beta1.JSONSchemaProps{
											Type: "string",
										},
									},
								},
							},
						},
					},
				},
			},
		},
	}
)
View Source
var SchemeGroupVersion = schema.GroupVersion{Group: "myapps.memcached.example.com", Version: "v1alpha1"}

SchemeGroupVersion is group version used to register these objects

Functions

func Kind

func Kind(kind string) schema.GroupKind

Kind takes an unqualified kind and returns back a Group qualified GroupKind

func Resource

func Resource(resource string) schema.GroupResource

Resource takes an unqualified resource and returns a Group qualified GroupResource

Types

type Memcached

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

	Spec   MemcachedSpec   `json:"spec,omitempty"`
	Status MemcachedStatus `json:"status,omitempty"`
}

Memcached +k8s:openapi-gen=true +kubebuilder:resource:path=memcacheds

func (*Memcached) DeepCopy

func (in *Memcached) DeepCopy() *Memcached

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

func (*Memcached) DeepCopyInto

func (in *Memcached) DeepCopyInto(out *Memcached)

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

func (*Memcached) DeepCopyObject

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

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

type MemcachedList

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

func (*MemcachedList) DeepCopy

func (in *MemcachedList) DeepCopy() *MemcachedList

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

func (*MemcachedList) DeepCopyInto

func (in *MemcachedList) DeepCopyInto(out *MemcachedList)

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

func (*MemcachedList) DeepCopyObject

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

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

type MemcachedSpec

type MemcachedSpec struct {
	// INSERT ADDITIONAL SPEC FIELDS - desired state of cluster
	// +kubebuilder:validation:Maximum=100
	// +kubebuilder:validation:Minimum=5
	Size int32 `json:"size"`
}

MemcachedSpec defines the desired state of Memcached

func (*MemcachedSpec) DeepCopy

func (in *MemcachedSpec) DeepCopy() *MemcachedSpec

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

func (*MemcachedSpec) DeepCopyInto

func (in *MemcachedSpec) DeepCopyInto(out *MemcachedSpec)

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

type MemcachedStatus

type MemcachedStatus struct {
	// INSERT ADDITIONAL STATUS FIELD - define observed state of cluster
	Nodes []string `json:"nodes,omitempty"`
}

MemcachedStatus defines the observed state of Memcached

func (*MemcachedStatus) DeepCopy

func (in *MemcachedStatus) DeepCopy() *MemcachedStatus

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

func (*MemcachedStatus) DeepCopyInto

func (in *MemcachedStatus) DeepCopyInto(out *MemcachedStatus)

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