Documentation ¶
Overview ¶
Package v1alpha1 is the v1alpha1 version of the API.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ( // SchemeBuilder initializes a scheme builder SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes) // AddToScheme is a global function that registers this API group & version to scheme AddToScheme = SchemeBuilder.AddToScheme )
create a SchemeBuilder which uses functions to add types to the scheme
var SchemeGroupVersion = schema.GroupVersion{ Group: samplecrd.GroupName, Version: samplecrd.Version, }
SchemeGroupVersion is group version used to registry 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 { // TypeMeta is the metadata for the resource, like kind and apiversion metav1.TypeMeta `json:",inline"` // ObjectMeta contains the metadata for the particular object, including // things like... // - name // - namespace // - self link // - labels // - ... etc ... metav1.ObjectMeta `json:"metadata,omitempty"` Spec FooSpec `json:"spec"` // 如果不设置status,可以在类型上边增加 +genclient:noStatus Status FooStatus `json:"status"` }
Foo is a specification for a Foo resource
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"` Items []Foo `json:"items"` }
FooList is a list of Foo resource
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 is the spec for a Foo resource
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 is the status for a Foo resource
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.
type Network ¶
type Network struct { // TypeMeta is the metadata for the resource, like kind and apiversion metav1.TypeMeta `json:",inline"` // ObjectMeta contains the metadata for the particular object, including // things like... // - name // - namespace // - self link // - labels // - ... etc ... metav1.ObjectMeta `json:"metadata,omitempty"` // Spec is the custom resource spec Spec NetworkSpec `json:"spec"` }
Network describes a Network resource
func (*Network) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Network.
func (*Network) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*Network) DeepCopyObject ¶
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type NetworkList ¶
type NetworkList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata"` Items []Network `json:"items"` }
NetworkList is a list of Network resources
func (*NetworkList) DeepCopy ¶
func (in *NetworkList) DeepCopy() *NetworkList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NetworkList.
func (*NetworkList) DeepCopyInto ¶
func (in *NetworkList) DeepCopyInto(out *NetworkList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*NetworkList) DeepCopyObject ¶
func (in *NetworkList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type NetworkSpec ¶
type NetworkSpec struct { // Cidr and Gateway are example custom spec fields // // this is where you would put your custom resource data Cidr string `json:"cidr"` Gateway string `json:"gateway"` }
NetworkSpec is the spec for a Network resource
func (*NetworkSpec) DeepCopy ¶
func (in *NetworkSpec) DeepCopy() *NetworkSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NetworkSpec.
func (*NetworkSpec) DeepCopyInto ¶
func (in *NetworkSpec) DeepCopyInto(out *NetworkSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.