Documentation ¶
Overview ¶
+k8s:openapi-gen=true +k8s:deepcopy-gen=package,register +k8s:conversion-gen=samplecontroller/pkg/apis/samplecontroller +k8s:defaulter-gen=TypeMeta +groupName=samplecontroller.k8s.io
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ( SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes) AddToScheme = SchemeBuilder.AddToScheme )
var ( // Define CRDs for resources FooCRD = v1beta1.CustomResourceDefinition{ ObjectMeta: metav1.ObjectMeta{ Name: "foos.samplecontroller.k8s.io", }, Spec: v1beta1.CustomResourceDefinitionSpec{ Group: "samplecontroller.k8s.io", Version: "v1alpha1", Names: v1beta1.CustomResourceDefinitionNames{ Kind: "Foo", Plural: "foos", }, 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{ "deploymentName": v1beta1.JSONSchemaProps{ Type: "string", }, "replicas": v1beta1.JSONSchemaProps{ Type: "integer", Format: "int32", }, }, }, "status": v1beta1.JSONSchemaProps{ Type: "object", Properties: map[string]v1beta1.JSONSchemaProps{ "availableReplicas": v1beta1.JSONSchemaProps{ Type: "integer", Format: "int32", }, }, }, }, }, }, }, } )
var SchemeGroupVersion = schema.GroupVersion{Group: "samplecontroller.k8s.io", 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 Foo ¶
type Foo struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` Spec FooSpec `json:"spec,omitempty"` Status FooStatus `json:"status,omitempty"` }
Foo is a specification for a Foo resource +k8s:openapi-gen=true +resource:path=foos
func (*Foo) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Foo.
func (*Foo) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*Foo) DeepCopyObject ¶
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type FooList ¶
type FooList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` Items []Foo `json:"items"` }
func (*FooList) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new FooList.
func (*FooList) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*FooList) DeepCopyObject ¶
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type FooSpec ¶
type FooSpec struct { DeploymentName string `json:"deploymentName"` Replicas *int32 `json:"replicas"` }
FooSpec defines the desired state of Foo
func (*FooSpec) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new FooSpec.
func (*FooSpec) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type FooStatus ¶
type FooStatus struct {
AvailableReplicas int32 `json:"availableReplicas"`
}
FooStatus defines the observed state of Foo
func (*FooStatus) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new FooStatus.
func (*FooStatus) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.