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 ¶
var ( SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes) AddToScheme = SchemeBuilder.AddToScheme )
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", }, }, }, }, }, }, }, }, }, } )
var SchemeGroupVersion = schema.GroupVersion{Group: "myapps.memcached.example.com", Version: "v1alpha1"}
SchemeGroupVersion is group version used to register these objects
Functions ¶
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 ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Memcached.
func (*Memcached) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*Memcached) DeepCopyObject ¶
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.