Documentation
¶
Overview ¶
Package v1 contains API Schema definitions for the db v1 API group +kubebuilder:object:generate=true +groupName=db.gogo.io
Index ¶
- Constants
- Variables
- func GetEnv(env []corev1.EnvVar, key string) string
- func LookupEnv(env []corev1.EnvVar, key string) (string, bool)
- func MergeEnv(src, dst []corev1.EnvVar) []corev1.EnvVar
- func SetEnv(env []corev1.EnvVar, key, val string) []corev1.EnvVar
- func SetEnvIfUnset(env []corev1.EnvVar, key, def string) []corev1.EnvVar
- type Etcd
- func (in *Etcd) DeepCopy() *Etcd
- func (in *Etcd) DeepCopyInto(out *Etcd)
- func (in *Etcd) DeepCopyObject() runtime.Object
- func (in *Etcd) Default()
- func (in *Etcd) SetupWebhookWithManager(mgr ctrl.Manager) error
- func (in *Etcd) ValidateCreate() error
- func (in *Etcd) ValidateDelete() error
- func (in *Etcd) ValidateUpdate(old runtime.Object) error
- type EtcdList
- type EtcdSpec
- type EtcdStatus
- type NodeStatus
- type PodSpec
Constants ¶
const ( DEBUG = "DEBUG" Empty = "EMPTY" // crd有bug,空的env会被填上值,使用empty占位符 )
Variables ¶
var ( // GroupVersion is group version used to register these objects GroupVersion = schema.GroupVersion{Group: "db.gogo.io", Version: "v1"} // SchemeBuilder is used to add go types to the GroupVersionKind scheme SchemeBuilder = &scheme.Builder{GroupVersion: GroupVersion} // AddToScheme adds the types in this group-version to the given scheme. AddToScheme = SchemeBuilder.AddToScheme )
Functions ¶
Types ¶
type Etcd ¶
type Etcd struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` Spec EtcdSpec `json:"spec,omitempty"` Status EtcdStatus `json:"status,omitempty"` }
Etcd is the Schema for the etcds API
func (*Etcd) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Etcd.
func (*Etcd) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*Etcd) DeepCopyObject ¶
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (*Etcd) Default ¶
func (in *Etcd) Default()
Default implements webhook.Defaulter so a webhook will be registered for the type
func (*Etcd) SetupWebhookWithManager ¶
func (*Etcd) ValidateCreate ¶
ValidateCreate implements webhook.Validator so a webhook will be registered for the type
func (*Etcd) ValidateDelete ¶
ValidateDelete implements webhook.Validator so a webhook will be registered for the type
type EtcdList ¶
type EtcdList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` Items []Etcd `json:"items"` }
EtcdList contains a list of Etcd
func (*EtcdList) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EtcdList.
func (*EtcdList) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*EtcdList) DeepCopyObject ¶
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type EtcdSpec ¶
type EtcdSpec struct { Members int `json:"members,omitempty"` ExternalHost string `json:"externalHost,omitempty"` // quota 配额 Cpu string `json:"cpu,omitempty"` Memory string `json:"memory,omitempty"` Storage string `json:"storage,omitempty"` StorageClassName string `json:"storageClassName,omitempty"` Image string `json:"image,omitempty"` ImagePullPolicy corev1.PullPolicy `json:"imagePullPolicy,omitempty" protobuf:"bytes,14,opt,name=imagePullPolicy,casttype=PullPolicy"` ImagePullSecrets []corev1.LocalObjectReference `json:"imagePullSecrets,omitempty" patchStrategy:"merge" patchMergeKey:"name" protobuf:"bytes,15,rep,name=imagePullSecrets"` ServiceAccountName string `json:"serviceAccountName,omitempty" protobuf:"bytes,8,opt,name=serviceAccountName"` Env []corev1.EnvVar `json:"env,omitempty"` PodSpec PodSpec `json:"podSpec,omitempty"` }
EtcdSpec defines the desired state of Etcd
func (*EtcdSpec) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EtcdSpec.
func (*EtcdSpec) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type EtcdStatus ¶
type EtcdStatus struct { Status NodeStatus `json:"status"` ConnectAddr string `json:"connectAddr,omitempty"` Conditions []metav1.Condition `json:"conditions,omitempty"` }
EtcdStatus defines the observed state of Etcd
func (*EtcdStatus) DeepCopy ¶
func (in *EtcdStatus) DeepCopy() *EtcdStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EtcdStatus.
func (*EtcdStatus) DeepCopyInto ¶
func (in *EtcdStatus) DeepCopyInto(out *EtcdStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type NodeStatus ¶
type NodeStatus string
const ( StatusReady NodeStatus = "Ready" StatusPartialReady NodeStatus = "PartialReady" StatusFailed NodeStatus = "Failed" StatusUnknown NodeStatus = "Unknown" )
type PodSpec ¶
type PodSpec struct { HostAliases []corev1.HostAlias `json:"hostAliases,omitempty" patchStrategy:"merge" patchMergeKey:"ip" protobuf:"bytes,23,rep,name=hostAliases"` RestartPolicy corev1.RestartPolicy `json:"restartPolicy,omitempty" protobuf:"bytes,3,opt,name=restartPolicy,casttype=RestartPolicy"` NodeSelector map[string]string `json:"nodeSelector,omitempty" protobuf:"bytes,7,rep,name=nodeSelector"` SecurityContext *corev1.PodSecurityContext `json:"securityContext,omitempty" protobuf:"bytes,14,opt,name=securityContext"` Affinity *corev1.Affinity `json:"affinity,omitempty" protobuf:"bytes,18,opt,name=affinity"` Tolerations []corev1.Toleration `json:"tolerations,omitempty" protobuf:"bytes,22,opt,name=tolerations"` }
copy from corev1.PodSpec
func (*PodSpec) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PodSpec.
func (*PodSpec) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.