Documentation ¶
Index ¶
Constants ¶
const ( NetworkKind = "Network" NetworkListKind = "NetworkList" NetworkSingular = "network" NetworkPlural = "networks" NetworkShortName = "nw" NetworkAnnotation = "knap.github.com/networks" )
const Version = "v1alpha1"
+k8s:deepcopy-gen=package +groupName=knap.github.com
Variables ¶
var AddToScheme = schemeBuilder.AddToScheme
Registers this API group and version to a scheme Note: Generator *requires* it to be called "AddToScheme"
var NetworkCustomResourceDefinition = apiextensions.CustomResourceDefinition{ ObjectMeta: meta.ObjectMeta{ Name: NetworkResourcesName, }, Spec: apiextensions.CustomResourceDefinitionSpec{ Group: group.GroupName, Names: apiextensions.CustomResourceDefinitionNames{ Singular: NetworkSingular, Plural: NetworkPlural, Kind: NetworkKind, ListKind: NetworkListKind, ShortNames: []string{ NetworkShortName, }, Categories: []string{ "all", }, }, Scope: apiextensions.NamespaceScoped, Versions: []apiextensions.CustomResourceDefinitionVersion{ { Name: Version, Served: true, Storage: true, Subresources: &apiextensions.CustomResourceSubresources{ Status: &apiextensions.CustomResourceSubresourceStatus{}, }, Schema: &apiextensions.CustomResourceValidation{ OpenAPIV3Schema: &apiextensions.JSONSchemaProps{ Type: "object", Required: []string{"spec"}, Properties: map[string]apiextensions.JSONSchemaProps{ "spec": { Type: "object", Required: []string{"provider"}, Properties: map[string]apiextensions.JSONSchemaProps{ "provider": { Type: "string", }, "hints": { Type: "object", Nullable: true, AdditionalProperties: &apiextensions.JSONSchemaPropsOrBool{ Schema: &apiextensions.JSONSchemaProps{ Type: "string", }, }, }, }, }, "status": { Type: "object", Properties: map[string]apiextensions.JSONSchemaProps{ "networkAttachmentDefinitions": { Type: "array", Nullable: true, Items: &apiextensions.JSONSchemaPropsOrArray{ Schema: &apiextensions.JSONSchemaProps{ Type: "string", }, }, }, "deployments": { Type: "array", Nullable: true, Items: &apiextensions.JSONSchemaPropsOrArray{ Schema: &apiextensions.JSONSchemaProps{ Type: "string", }, }, }, }, }, }, }, }, }, }, }, }
var NetworkGVK = SchemeGroupVersion.WithKind(NetworkKind)
var NetworkResourcesName = fmt.Sprintf("%s.%s", NetworkPlural, group.GroupName)
var SchemeGroupVersion = schema.GroupVersion{Group: group.GroupName, Version: Version}
Group version used to register these objects Note: Generator *requires* it to be called "SchemeGroupVersion"
Functions ¶
func Kind ¶
Takes an unqualified kind and returns a group-qualified GroupKind Note: Generator *requires* it to be called "Kind"
func Resource ¶
func Resource(resource string) schema.GroupResource
Takes an unqualified resource and returns a group-qualified GroupResource Note: Generator *requires* it to be called "Resource"
Types ¶
type Network ¶
type Network struct { meta.TypeMeta `json:",inline"` meta.ObjectMeta `json:"metadata,omitempty"` Spec NetworkSpec `json:"spec"` Status NetworkStatus `json:"status"` }
+genclient +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
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 { meta.TypeMeta `json:",inline"` meta.ListMeta `json:"metadata"` Items []Network `json:"items"` }
+k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
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 { Provider string `json:"provider"` Hints map[string]string `json:"hints"` }
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.
type NetworkStatus ¶
type NetworkStatus struct { NetworkAttachmentDefinitions []string `json:"networkAttachmentDefinitions"` Deployments []string `json:"deployments"` }
func (*NetworkStatus) DeepCopy ¶
func (in *NetworkStatus) DeepCopy() *NetworkStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NetworkStatus.
func (*NetworkStatus) DeepCopyInto ¶
func (in *NetworkStatus) DeepCopyInto(out *NetworkStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.