Documentation ¶
Overview ¶
Package v1 is the v1 version of the API. +groupName=jhzhu.io
Index ¶
Constants ¶
const ( ItemResourcePlural string = "examples" // GroupName is the group name used in this package. GroupName string = "welcome.group" ExampleCRDName string = ItemResourcePlural + "." + GroupName StateCreated string = "Created" StateUpdated string = "Updated" StateProcessed string = "Processed" DefaultNamespace string = "default" )
Variables ¶
var ( // SchemeGroupVersion is the group version used to register these objects. SchemeGroupVersion = schema.GroupVersion{ Group: GroupName, Version: version, } SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes) AddToScheme = SchemeBuilder.AddToScheme )
Functions ¶
func CreateCustomResourceDefinition ¶
func CreateCustomResourceDefinition(clientSet apiextensionsclient.Interface) (*apiextensionsv1beta1.CustomResourceDefinition, error)
Types ¶
type Item ¶
type Item struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata"` Attribute ItemAttribute `json:"attribute"` Status ItemStatus `json:"status,omitempty"` }
Item is the CRD. Use this command to generate deepcopy for it: ./k8s.io/code-generator/generate-groups.sh deepcopy github.com/jinghzhu/k8scrd/client github.com/jinghzhu/k8scrd/apis "example:v1" For more details of code-generator, please visit https://github.com/kubernetes/code-generator +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
func (*Item) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Item.
func (*Item) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*Item) DeepCopyObject ¶
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type ItemAttribute ¶
type ItemAttribute struct { WelcomeMsg string `json:"welcomeMsg"` SleepTime int `json:"sleepTime"` }
func (*ItemAttribute) DeepCopy ¶
func (in *ItemAttribute) DeepCopy() *ItemAttribute
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Attribute.
func (*ItemAttribute) DeepCopyInto ¶
func (in *ItemAttribute) DeepCopyInto(out *ItemAttribute)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ItemList ¶
type ItemList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata"` Items []Item `json:"items"` }
+k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
func (*ItemList) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ItemList.
func (*ItemList) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*ItemList) DeepCopyObject ¶
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type ItemStatus ¶
type ItemStatus struct { State string `json:"state,omitempty"` Message string `json:"message,omitempty"` }
func (*ItemStatus) DeepCopy ¶
func (in *ItemStatus) DeepCopy() *ItemStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Status.
func (*ItemStatus) DeepCopyInto ¶
func (in *ItemStatus) DeepCopyInto(out *ItemStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.