v1

package
v0.0.0-...-903f81b Latest Latest
Warning

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

Go to latest
Published: Oct 13, 2023 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Overview

Package v1 contains API Schema definitions for the database v1 API group +kubebuilder:object:generate=true +groupName=database.erda.cloud

Index

Constants

View Source
const (
	Red    = "red"
	Yellow = "yellow"
	Green  = "green"
)
View Source
const HeadlessSuffix = "x"

Variables

View Source
var (
	// GroupVersion is group version used to register these objects
	GroupVersion = schema.GroupVersion{Group: "database.erda.cloud", 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

func Between

func Between(i, min, max int) bool

func EncodePassword

func EncodePassword(s string) string

Types

type Canal

type Canal struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`

	Spec   CanalSpec   `json:"spec,omitempty"`
	Status CanalStatus `json:"status,omitempty"`
}

Canal is the Schema for the canals API

func (*Canal) BuildName

func (r *Canal) BuildName(suffix string) string

func (*Canal) DeepCopy

func (in *Canal) DeepCopy() *Canal

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

func (*Canal) DeepCopyInto

func (in *Canal) DeepCopyInto(out *Canal)

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

func (*Canal) DeepCopyObject

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

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

func (*Canal) Default

func (r *Canal) Default()

func (*Canal) NewLabels

func (r *Canal) NewLabels() map[string]string

func (*Canal) Validate

func (r *Canal) Validate() (err error)

type CanalList

type CanalList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`
	Items           []Canal `json:"items"`
}

CanalList contains a list of Canal

func (*CanalList) DeepCopy

func (in *CanalList) DeepCopy() *CanalList

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

func (*CanalList) DeepCopyInto

func (in *CanalList) DeepCopyInto(out *CanalList)

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

func (*CanalList) DeepCopyObject

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

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

type CanalSpec

type CanalSpec struct {

	//+kubebuilder:default=v1.1.5
	//+optional
	Version string `json:"version,omitempty"`

	//+kubebuilder:validation:Minimum=1
	//+kubebuilder:validation:Maximum=9
	//+kubebuilder:default=1
	//+optional
	Replicas int `json:"replicas,omitempty"`

	//+optional
	CanalOptions map[string]string `json:"canalOptions,omitempty"`

	//+optional
	AdminOptions map[string]string `json:"adminOptions,omitempty"`

	//+optional
	JavaOptions string `json:"javaOptions,omitempty"`

	//+optional
	Image string `json:"image,omitempty"`
	//+kubebuilder:default=IfNotPresent
	//+optional
	ImagePullPolicy corev1.PullPolicy `json:"imagePullPolicy,omitempty"`

	// Map of string keys and values that can be used to organize and categorize
	// (scope and select) objects. May match selectors of replication controllers
	// and services.
	// More info: http://kubernetes.io/docs/user-guide/labels
	// +optional
	Labels map[string]string `json:"labels,omitempty" protobuf:"bytes,11,rep,name=labels"`

	// Annotations is an unstructured key value map stored with a resource that may be
	// set by external tools to store and retrieve arbitrary metadata. They are not
	// queryable and should be preserved when modifying objects.
	// More info: http://kubernetes.io/docs/user-guide/annotations
	// +optional
	Annotations map[string]string `json:"annotations,omitempty" protobuf:"bytes,12,rep,name=annotations"`

	// If specified, the pod's scheduling constraints
	// +optional
	Affinity *corev1.Affinity `json:"affinity,omitempty" protobuf:"bytes,18,opt,name=affinity"`

	// Resources are not allowed for ephemeral containers. Ephemeral containers use spare resources
	// already allocated to the pod.
	// +optional
	Resources corev1.ResourceRequirements `json:"resources,omitempty" protobuf:"bytes,8,opt,name=resources"`
	// +optional
	AdminResources corev1.ResourceRequirements `json:"adminResources,omitempty" protobuf:"bytes,8,opt,name=adminResources"`

	// List of sources to populate environment variables in the container.
	// The keys defined within a source must be a C_IDENTIFIER. All invalid keys
	// will be reported as an event when the container is starting. When a key exists in multiple
	// sources, the value associated with the last source will take precedence.
	// Values defined by an Env with a duplicate key will take precedence.
	// Cannot be updated.
	// +optional
	EnvFrom []corev1.EnvFromSource `json:"envFrom,omitempty" protobuf:"bytes,19,rep,name=envFrom"`
	// List of environment variables to set in the container.
	// Cannot be updated.
	// +optional
	// +patchMergeKey=name
	// +patchStrategy=merge
	Env []corev1.EnvVar `json:"env,omitempty" patchStrategy:"merge" patchMergeKey:"name" protobuf:"bytes,7,rep,name=env"`
}

CanalSpec defines the desired state of Canal

func (*CanalSpec) DeepCopy

func (in *CanalSpec) DeepCopy() *CanalSpec

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

func (*CanalSpec) DeepCopyInto

func (in *CanalSpec) DeepCopyInto(out *CanalSpec)

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

type CanalStatus

type CanalStatus struct {

	//+optional
	Color string `json:"color,omitempty"`

	//+optional
	AdminInitialized bool `json:"adminInitialized,omitempty"`
}

CanalStatus defines the observed state of Canal

func (*CanalStatus) DeepCopy

func (in *CanalStatus) DeepCopy() *CanalStatus

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

func (*CanalStatus) DeepCopyInto

func (in *CanalStatus) DeepCopyInto(out *CanalStatus)

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