v1alpha1

package
v0.1.0-alpha.2 Latest Latest
Warning

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

Go to latest
Published: Jan 13, 2022 License: Apache-2.0 Imports: 5 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 a scheme
	AddToScheme = SchemeBuilder.AddToScheme
)
View Source
var SchemeGroupVersion = schema.GroupVersion{Group: platform.GroupName, Version: "v1alpha1"}

SchemeGroupVersion is group version used to register these objects

Functions

func Kind

func Kind(kind string) schema.GroupKind

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

func RegisterDefaults

func RegisterDefaults(scheme *runtime.Scheme) error

RegisterDefaults adds defaulters functions to the given scheme. Public to allow building arbitrary schemes. All generated defaulters are covering - they call all nested defaulters.

func Resource

func Resource(resource string) schema.GroupResource

Resource takes an unqualified resource and returns a Group qualified GroupResource

Types

type AuthConfig

type AuthConfig struct {
	EnableTLS bool     `json:"enableTLS,omitempty" protobuf:"varint,1,opt,name=enableTLS"`
	SAN       []string `json:"san,omitempty" protobuf:"bytes,2,rep,name=san"`
	TLSSecret string   `json:"tlsSecret,omitempty" protobuf:"bytes,3,opt,name=tlsSecret"`
}

AuthConfig defines tls

func (*AuthConfig) DeepCopy

func (in *AuthConfig) DeepCopy() *AuthConfig

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

func (*AuthConfig) DeepCopyInto

func (in *AuthConfig) DeepCopyInto(out *AuthConfig)

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

type EtcdCluster

type EtcdCluster struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`

	Spec   EtcdClusterSpec   `json:"spec,omitempty" protobuf:"bytes,2,opt,name=spec"`
	Status EtcdClusterStatus `json:"status,omitempty" protobuf:"bytes,3,opt,name=status"`
}

EtcdCluster is the Schema for the etcdclusters API

func (*EtcdCluster) DeepCopy

func (in *EtcdCluster) DeepCopy() *EtcdCluster

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

func (*EtcdCluster) DeepCopyInto

func (in *EtcdCluster) DeepCopyInto(out *EtcdCluster)

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

func (*EtcdCluster) DeepCopyObject

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

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

type EtcdClusterCondition

type EtcdClusterCondition struct {
	// Type of EtcdCluster condition.
	Type EtcdClusterConditionType `json:"type" protobuf:"bytes,1,opt,name=type,casttype=EtcdClusterPhase"`
	// Status of the condition, one of True, False, Unknown.
	Status corev1.ConditionStatus `json:"status" protobuf:"bytes,2,opt,name=status,casttype=k8s.io/api/core/v1.ConditionStatus"`
	// Last time we got an update on a given condition.
	// +optional
	StartTime metav1.Time `json:"startTime,omitempty" protobuf:"bytes,3,opt,name=startTime"`
	// Last time the condition transit from one status to another.
	// +optional
	EndTime metav1.Time `json:"endTime,omitempty" protobuf:"bytes,4,opt,name=endTime"`
	// (brief) reason for the condition's last transition.
	// +optional
	Reason string `json:"reason,omitempty" protobuf:"bytes,5,opt,name=reason"`
	// Human readable message indicating details about last transition.
	// +optional
	Message string `json:"message,omitempty" protobuf:"bytes,6,opt,name=message"`
}

EtcdClusterCondition contains condition information for a EtcdCluster.

func (*EtcdClusterCondition) DeepCopy

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

func (*EtcdClusterCondition) DeepCopyInto

func (in *EtcdClusterCondition) DeepCopyInto(out *EtcdClusterCondition)

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

type EtcdClusterConditionType

type EtcdClusterConditionType string
const (
	EtcdClusterConditionCreate EtcdClusterConditionType = "Create"
	EtcdClusterConditionImport EtcdClusterConditionType = "Import"
	EtcdClusterConditionUpdate EtcdClusterConditionType = "Update"
	EtcdClusterConditionDelete EtcdClusterConditionType = "Delete"
)

type EtcdClusterList

type EtcdClusterList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
	Items           []EtcdCluster `json:"items" protobuf:"bytes,2,rep,name=items"`
}

EtcdClusterList contains a list of EtcdCluster

func (*EtcdClusterList) DeepCopy

func (in *EtcdClusterList) DeepCopy() *EtcdClusterList

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

func (*EtcdClusterList) DeepCopyInto

func (in *EtcdClusterList) DeepCopyInto(out *EtcdClusterList)

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

func (*EtcdClusterList) DeepCopyObject

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

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

type EtcdClusterPhase

type EtcdClusterPhase string
const (
	EtcdClusterInit      EtcdClusterPhase = "Initing"
	EtcdCluterCreating   EtcdClusterPhase = "Creating"
	EtcdClusterRunning   EtcdClusterPhase = "Running"
	EtcdClusterUpdating  EtcdClusterPhase = "Updating"
	EtcdClusterDeleteing EtcdClusterPhase = "Deleting"
	EtcdClusterDeleted   EtcdClusterPhase = "Deleted"
	EtcdClusterUnknown   EtcdClusterPhase = "Unknown"   // connection refused or other errors
	EtcdClusterUnhealthy EtcdClusterPhase = "UnHealthy" // node health check returns unhealthy
)

type EtcdClusterSpec

type EtcdClusterSpec struct {
	Name        string `json:"name" protobuf:"bytes,1,opt,name=name"`               // etcd cluster name,uniqueKey
	Description string `json:"description" protobuf:"bytes,2,opt,name=description"` // etcd description

	AuthConfig AuthConfig `json:"authConfig,omitempty" protobuf:"bytes,3,opt,name=authConfig"` // tls config

	TotalCpu uint   `json:"totalCpu" protobuf:"varint,4,opt,name=totalCpu"` // single node's cpu, unit: Core
	TotalMem uint   `json:"totalMem" protobuf:"varint,5,opt,name=totalMem"` // single node's mem, unit: GiB
	DiskType string `json:"diskType" protobuf:"bytes,6,opt,name=diskType"`  // disk type, CLOUD_SSD/CLOUD_PREMIUM/CLOUD_BASIC
	DiskSize uint   `json:"diskSize" protobuf:"varint,7,opt,name=diskSize"` // single node's disk size, unit: GB
	Size     uint   `json:"size"  protobuf:"varint,8,opt,name=size"`        // etcd cluster member count: support 1, 3, 5, 7

	Affinity   corev1.Affinity `json:"affinity,omitempty" protobuf:"bytes,9,opt,name=affinity"`
	Args       []string        `json:"args,omitempty" protobuf:"bytes,10,rep,name=args"`
	Env        []corev1.EnvVar `json:"env,omitempty" protobuf:"bytes,11,rep,name=env"`               // etcd environment variables
	Version    string          `json:"version" protobuf:"bytes,12,opt,name=version"`                 // etcd version
	Repository string          `json:"repository,omitempty" protobuf:"bytes,13,opt,name=repository"` // etcd image

	ClusterType EtcdClusterType `json:"clusterType" protobuf:"bytes,14,opt,name=clusterType,casttype=EtcdClusterType"` // ClusterType specifies the etcd cluster provider.
}

EtcdClusterSpec defines the desired state of EtcdCluster

func (*EtcdClusterSpec) DeepCopy

func (in *EtcdClusterSpec) DeepCopy() *EtcdClusterSpec

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

func (*EtcdClusterSpec) DeepCopyInto

func (in *EtcdClusterSpec) DeepCopyInto(out *EtcdClusterSpec)

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

type EtcdClusterStatus

type EtcdClusterStatus struct {
	Conditions         []EtcdClusterCondition   `json:"conditions,omitempty" protobuf:"bytes,1,rep,name=conditions"`
	Phase              EtcdClusterPhase         `json:"phase" protobuf:"bytes,2,opt,name=phase,casttype=EtcdClusterPhase"`
	Members            []MemberStatus           `json:"members,omitempty" protobuf:"bytes,3,rep,name=members"`
	FeatureGatesStatus map[KStoneFeature]string `json:"featureGatesStatus,omitempty" protobuf:"bytes,4,rep,name=featureGatesStatus,castkey=KStoneFeature"`
	ServiceName        string                   `json:"serviceName,omitempty" protobuf:"bytes,5,opt,name=serviceName"`
}

EtcdClusterStatus defines the actual state of EtcdCluster.

func (*EtcdClusterStatus) DeepCopy

func (in *EtcdClusterStatus) DeepCopy() *EtcdClusterStatus

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

func (*EtcdClusterStatus) DeepCopyInto

func (in *EtcdClusterStatus) DeepCopyInto(out *EtcdClusterStatus)

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

type EtcdClusterType

type EtcdClusterType string
const (
	EtcdClusterKstone   EtcdClusterType = "kstone-etcd-operator"
	EtcdClusterImported EtcdClusterType = "imported"
)

type EtcdInspection

type EtcdInspection struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`

	Spec   EtcdInspectionSpec   `json:"spec,omitempty" protobuf:"bytes,2,opt,name=spec"`
	Status EtcdInspectionStatus `json:"status,omitempty" protobuf:"bytes,3,opt,name=status"`
}

EtcdInspection is a specification for a EtcdInspection resource

func (*EtcdInspection) DeepCopy

func (in *EtcdInspection) DeepCopy() *EtcdInspection

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

func (*EtcdInspection) DeepCopyInto

func (in *EtcdInspection) DeepCopyInto(out *EtcdInspection)

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

func (*EtcdInspection) DeepCopyObject

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

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

type EtcdInspectionList

type EtcdInspectionList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata" protobuf:"bytes,1,opt,name=metadata"`

	Items []EtcdInspection `json:"items" protobuf:"bytes,2,rep,name=items"`
}

EtcdInspectionList is a list of EtcdInspection resources

func (*EtcdInspectionList) DeepCopy

func (in *EtcdInspectionList) DeepCopy() *EtcdInspectionList

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

func (*EtcdInspectionList) DeepCopyInto

func (in *EtcdInspectionList) DeepCopyInto(out *EtcdInspectionList)

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

func (*EtcdInspectionList) DeepCopyObject

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

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

type EtcdInspectionRecord

type EtcdInspectionRecord struct {
	// Last time we got an update on a given condition.
	// +optional
	StartTime metav1.Time `json:"startTime,omitempty" protobuf:"bytes,1,opt,name=startTime"`
	// Last time the condition transit from one status to another.
	// +optional
	EndTime metav1.Time `json:"endTime,omitempty" protobuf:"bytes,2,opt,name=endTime"`
	// (brief) reason for the condition's last transition.
	// +optional
	Reason string `json:"reason,omitempty" protobuf:"bytes,3,opt,name=reason"`
	// Human readable message indicating details about last transition.
	// +optional
	Message string `json:"message,omitempty" protobuf:"bytes,4,opt,name=message"`
}

EtcdInspectionRecord is the status record for a EtcdInspectionRecord resource

func (*EtcdInspectionRecord) DeepCopy

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

func (*EtcdInspectionRecord) DeepCopyInto

func (in *EtcdInspectionRecord) DeepCopyInto(out *EtcdInspectionRecord)

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

type EtcdInspectionSpec

type EtcdInspectionSpec struct {
	ClusterName        string `json:"clusterName" protobuf:"bytes,1,opt,name=clusterName"`
	InspectionType     string `json:"inspectionType" protobuf:"bytes,2,opt,name=inspectionType"`
	InspectionProvider string `json:"inspectionProvider,omitempty" protobuf:"bytes,3,opt,name=inspectionProvider"`
	IntervalInSecond   int    `json:"intervalInSecond,omitempty" protobuf:"varint,4,opt,name=intervalInSecond"`
}

EtcdInspectionSpec is the spec for a EtcdInspectionSpec resource

func (*EtcdInspectionSpec) DeepCopy

func (in *EtcdInspectionSpec) DeepCopy() *EtcdInspectionSpec

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

func (*EtcdInspectionSpec) DeepCopyInto

func (in *EtcdInspectionSpec) DeepCopyInto(out *EtcdInspectionSpec)

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

type EtcdInspectionStatus

type EtcdInspectionStatus struct {
	Reason          string                 `json:"reason,omitempty" protobuf:"bytes,1,opt,name=reason"`
	Message         string                 `json:"message,omitempty" protobuf:"bytes,2,opt,name=message"`
	Records         []EtcdInspectionRecord `json:"records,omitempty" protobuf:"bytes,3,rep,name=records"`
	LastUpdatedTime metav1.Time            `json:"lastUpdatedTime,omitempty" protobuf:"bytes,4,opt,name=lastUpdatedTime"`
}

EtcdInspectionStatus is the status for a EtcdInspectionStatus resource

func (*EtcdInspectionStatus) DeepCopy

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

func (*EtcdInspectionStatus) DeepCopyInto

func (in *EtcdInspectionStatus) DeepCopyInto(out *EtcdInspectionStatus)

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

type EtcdMemberRole

type EtcdMemberRole string
const (
	EtcdMemberLearner EtcdMemberRole = "Learner"
	// kstone can get the list of etcd members, but cannot connect to the endpoint.
	EtcdMemberUnKnown  EtcdMemberRole = "UnKnown"
	EtcdMemberFollower EtcdMemberRole = "Follower"
	EtcdMemberLeader   EtcdMemberRole = "Leader"
)

type KStoneFeature

type KStoneFeature string
const (
	KStoneFeatureAnno                      = "featureGates"
	KStoneFeatureMonitor     KStoneFeature = "monitor"
	KStoneFeatureBackup      KStoneFeature = "backup"
	KStoneFeatureHealthy     KStoneFeature = "healthy"
	KStoneFeatureConsistency KStoneFeature = "consistency"
	KStoneFeatureRequest     KStoneFeature = "request"
	KStoneFeatureAlarm       KStoneFeature = "alarm"
	KStoneFeatureBackupCheck KStoneFeature = "backupcheck"
)

type MemberPhase

type MemberPhase string
const (
	MemberPhaseUnStarted MemberPhase = "UnStarted" // etcd member list return unstarted
	MemberPhaseUnKnown   MemberPhase = "UnKnown"   // endpoint can not be connected
	MemberPhaseRunning   MemberPhase = "Running"   // health check returns healthy
	MemberPhaseUnHealthy MemberPhase = "UnHealthy" // health check returns unhealthy
)

type MemberStatus

type MemberStatus struct {
	Name               string         `json:"name" protobuf:"bytes,1,opt,name=name"`
	MemberId           string         `json:"memberId" protobuf:"bytes,2,opt,name=memberId"`
	Status             MemberPhase    `json:"status" protobuf:"bytes,3,opt,name=status,casttype=MemberPhase"`
	Version            string         `json:"version" protobuf:"bytes,4,opt,name=version"`
	Endpoint           string         `json:"endpoint" protobuf:"bytes,5,opt,name=endpoint"`
	Port               string         `json:"port" protobuf:"bytes,6,opt,name=port"`
	ClientUrl          string         `json:"clientUrl" protobuf:"bytes,7,opt,name=clientUrl"`
	ExtensionClientUrl string         `json:"extensionClientUrl" protobuf:"bytes,8,opt,name=extensionClientUrl"`
	Role               EtcdMemberRole `json:"role" protobuf:"bytes,9,opt,name=role,casttype=EtcdMemberRole"`
	Errors             []string       `json:"errors,omitempty" protobuf:"bytes,10,rep,name=errors"`
}

func (*MemberStatus) DeepCopy

func (in *MemberStatus) DeepCopy() *MemberStatus

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

func (*MemberStatus) DeepCopyInto

func (in *MemberStatus) DeepCopyInto(out *MemberStatus)

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