v1alpha1

package
v0.0.0-...-31344b6 Latest Latest
Warning

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

Go to latest
Published: Apr 3, 2022 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Overview

Package v1alpha1 is the v1alpha1 version of the API.

Index

Constants

This section is empty.

Variables

View Source
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

View Source
var SchemeGroupVersion = schema.GroupVersion{
	Group:   samplecrd.GroupName,
	Version: samplecrd.Version,
}

SchemeGroupVersion is group version used to registry these objects

Functions

func Kind

func Kind(kind string) schema.GroupKind

Kind takes an unqualified kind and returns back a Group qualified GroupKind

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

func (in *Foo) DeepCopy() *Foo

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

func (*Foo) DeepCopyInto

func (in *Foo) DeepCopyInto(out *Foo)

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

func (*Foo) DeepCopyObject

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

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

func (in *FooList) DeepCopy() *FooList

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

func (*FooList) DeepCopyInto

func (in *FooList) DeepCopyInto(out *FooList)

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

func (*FooList) DeepCopyObject

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

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

func (in *FooSpec) DeepCopy() *FooSpec

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

func (*FooSpec) DeepCopyInto

func (in *FooSpec) DeepCopyInto(out *FooSpec)

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

func (in *FooStatus) DeepCopy() *FooStatus

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

func (*FooStatus) DeepCopyInto

func (in *FooStatus) DeepCopyInto(out *FooStatus)

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

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 {
	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.

Jump to

Keyboard shortcuts

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