v1alpha1

package
v0.0.0-...-4a2caa5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 4, 2023 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	NetworkKind     = "Network"
	NetworkListKind = "NetworkList"

	NetworkSingular  = "network"
	NetworkPlural    = "networks"
	NetworkShortName = "nw"

	NetworkAnnotation = "knap.github.com/networks"
)
View Source
const Version = "v1alpha1"

+k8s:deepcopy-gen=package +groupName=knap.github.com

Variables

View Source
var AddToScheme = schemeBuilder.AddToScheme

Registers this API group and version to a scheme Note: Generator *requires* it to be called "AddToScheme"

View Source
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",
											},
										},
									},
								},
							},
						},
					},
				},
			},
		},
	},
}
View Source
var NetworkGVK = SchemeGroupVersion.WithKind(NetworkKind)
View Source
var NetworkResourcesName = fmt.Sprintf("%s.%s", NetworkPlural, group.GroupName)
View Source
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

func Kind(kind string) schema.GroupKind

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

func (in *Network) DeepCopy() *Network

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Network.

func (*Network) DeepCopyInto

func (in *Network) DeepCopyInto(out *Network)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*Network) DeepCopyObject

func (in *Network) DeepCopyObject() runtime.Object

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL