v1

package
v1.18.0 Latest Latest
Warning

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

Go to latest
Published: Dec 11, 2020 License: MIT Imports: 14 Imported by: 2

Documentation

Overview

Package v1 is the v1 version of the API. +groupName=jinghzhu.io

Index

Constants

View Source
const (
	// Kind is normally the CamelCased singular type. The resource manifest uses this.
	Kind string = "Jinghzhu"
	// GroupVersion is the version.
	GroupVersion string = "v1"
	// Plural is the plural name used in /apis/<group>/<version>/<plural>
	Plural string = "jinghzhus"
	// Singular is used as an alias on kubectl for display.
	Singular string = "jinghzhu"
	// CRDName is the CRD name for Jinghzhu.
	CRDName string = Plural + "." + crdjinghzhu.GroupName
	// ShortName is the short alias for the CRD.
	ShortName string = "jh"
)

Variables

View Source
var (
	// SchemeGroupVersion is the group version used to register these objects.
	SchemeGroupVersion = schema.GroupVersion{
		Group:   crdjinghzhu.GroupName,
		Version: GroupVersion,
	}
	SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes)
	AddToScheme   = SchemeBuilder.AddToScheme
)

Functions

func CreateCustomResourceDefinition

func CreateCustomResourceDefinition(clientSet apiextensionsclientset.Interface) (*apiextensionsv1beta1.CustomResourceDefinition, error)

CreateCustomResourceDefinition creates the CRD and add it into Kubernetes. If there is error, it will do some clean up.

func Resource

func Resource(resource string) schema.GroupResource

Resource takes an unqualified resource and returns a Group qualified GroupResource

Types

type Jinghzhu

type Jinghzhu struct {
	metav1.TypeMeta `json:",inline"`
	// Standard object's metadata.
	metav1.ObjectMeta `json:"metadata"`
	// Specification of the desired behavior of Jinghzhu.
	Spec JinghzhuSpec `json:"spec"`
	// Observed status of Jinghzhu.
	Status JinghzhuStatus `json:"status"`
}

Jinghzhu is the CRD. Use this command to generate deepcopy for it: ./k8s.io/code-generator/generate-groups.sh all github.com/jinghzhu/KubernetesCRD/pkg/crd/jinghzhu/v1/apis github.com/jinghzhu/KubernetesCRD/pkg/crd "jinghzhu:v1" For more details of code-generator, please visit https://github.com/kubernetes/code-generator +genclient +genclient:noStatus +k8s:deepcopy-gen=true +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +resource:path=jinghzhu

func (*Jinghzhu) DeepCopy

func (in *Jinghzhu) DeepCopy() *Jinghzhu

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

func (*Jinghzhu) DeepCopyInto

func (in *Jinghzhu) DeepCopyInto(out *Jinghzhu)

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

func (*Jinghzhu) DeepCopyObject

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

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

func (*Jinghzhu) String added in v1.18.0

func (j *Jinghzhu) String() string

type JinghzhuList

type JinghzhuList struct {
	metav1.TypeMeta `json:",inline"`
	// Standard list metadata.
	metav1.ListMeta `json:"metadata"`
	// List of Jinghzhus.
	Items []Jinghzhu `json:"items"`
}

JinghzhuList is the list of Jinghzhus. +k8s:deepcopy-gen=true +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +resource:path=jinghzhu

func (*JinghzhuList) DeepCopy

func (in *JinghzhuList) DeepCopy() *JinghzhuList

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

func (*JinghzhuList) DeepCopyInto

func (in *JinghzhuList) DeepCopyInto(out *JinghzhuList)

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

func (*JinghzhuList) DeepCopyObject

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

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type JinghzhuSpec

type JinghzhuSpec struct {
	// Desired is the desired Pod number.
	Desired int `json:"desired"`
	// Current is the number of Pod currently running.
	Current int `json:"current"`
	// PodList is the name list of current Pods.
	PodList []string `json:"podList"`
}

JinghzhuSpec is a desired state description of Jinghzhu. +k8s:deepcopy-gen=true

func (*JinghzhuSpec) DeepCopy

func (in *JinghzhuSpec) DeepCopy() *JinghzhuSpec

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

func (*JinghzhuSpec) DeepCopyInto

func (in *JinghzhuSpec) DeepCopyInto(out *JinghzhuSpec)

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

type JinghzhuStatus

type JinghzhuStatus struct {
	State   string `json:"state"`
	Message string `json:"message"`
}

JinghzhuStatus describes the lifecycle status of Jinghzhu.

func (*JinghzhuStatus) DeepCopy

func (in *JinghzhuStatus) DeepCopy() *JinghzhuStatus

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

func (*JinghzhuStatus) DeepCopyInto

func (in *JinghzhuStatus) DeepCopyInto(out *JinghzhuStatus)

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

Directories

Path Synopsis
apis
clientset/versioned
This package has the automatically generated clientset.
This package has the automatically generated clientset.
clientset/versioned/fake
This package has the automatically generated fake clientset.
This package has the automatically generated fake clientset.
clientset/versioned/scheme
This package contains the scheme of the automatically generated clientset.
This package contains the scheme of the automatically generated clientset.
clientset/versioned/typed/jinghzhu/v1
This package has the automatically generated typed clients.
This package has the automatically generated typed clients.
clientset/versioned/typed/jinghzhu/v1/fake
Package fake has the automatically generated clients.
Package fake has the automatically generated clients.

Jump to

Keyboard shortcuts

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