v1

package
v1.9.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: 11 Imported by: 0

Documentation

Overview

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

Index

Constants

View Source
const (
	// GroupName is the group name used in this package.
	GroupName string = "jinghzhu.com"
	Kind      string = "Jinghzhu"
	// GroupVersion is the version.
	GroupVersion string = "v1"
	// Plural is the Plural for Jinghzhu.
	Plural string = "jinghzhus"
	// Singular is the singular for Jinghzhu.
	Singular string = "jinghzhu"
	// CRDName is the CRD name for Jinghzhu.
	CRDName string = Plural + "." + GroupName
)
View Source
const (
	// StatePending means CRD instance is created; Pod info has been updated into CRD instance;
	// Pod has been accepted by the system, but one or more of the containers has not been started.
	StatePending string = "Pending"
	// StateRunning means Pod has been bound to a node and all of the containers have been started.
	StateRunning string = "Running"
	// StateSucceeded means that all containers in the Pod have voluntarily terminated with a container
	// exit code of 0, and the system is not going to restart any of these containers.
	StateSucceeded string = "Succeeded"
	// StateFailed means that all containers in the Pod have terminated, and at least one container has
	// terminated in a failure (exited with a non-zero exit code or was stopped by the system).
	StateFailed string = "Failed"
)

Variables

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

Functions

func CreateCustomResourceDefinition

func CreateCustomResourceDefinition(namespace string, 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 +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object

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.

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.

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 {
	Foo string `json:"foo"`
	Bar bool   `json:"bar"`
}

JinghzhuSpec is a desired state description of Jinghzhu.

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