v1alpha1

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jun 4, 2023 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Overview

Package v1alpha1 contains API Schema definitions for the middleware v1alpha1 API group +kubebuilder:object:generate=true +groupName=middleware.fedstate.io

Index

Constants

View Source
const (
	// 表示服务的状况
	ServerInitialized      ConditionType = "ServerInitialized"     // 服务初始化成功即创建pp下发成功
	ServerScheduledResult  ConditionType = "ServerScheduledResult" // 服务得到调度结果
	ServerWaitingScaleDown ConditionType = "ServerWaitingScaleDown"
	ServerCheck            ConditionType = "ServerCheck"
	ServerSubHealthy       ConditionType = "ServerSubHealthy" // 服务亚健康状况
	ServerUnHealthy        ConditionType = "ServerUnHealthy"  // 服务不健康状况
	ServerReady            ConditionType = "ServerReady"      // 对应state的Health状态

	// 表示对应ConditionType是否适用
	True    ConditionStatus = "True"    // 适用
	False   ConditionStatus = "False"   // 不适用
	Unknown ConditionStatus = "Unknown" // 未知
)
View Source
const (
	MultiCloudMongoServiceName              = "federation-mongo-manager-service"
	MultiCloudMongoWebhookDefaultSecretName = "federation-mongo-operator-webhook-cert"
	MongoWebhookCertDir                     = "/tmp/k8s-webhook-server/serving-certs"
	MultiCloudMongoWebhookCaName            = "federation-mongo-operator-ca"
	MultiCloudMongoWebhookCaOrganization    = "federation-mongo-operator"

	MongoServiceName              = "mongo-manager"
	MongoWebhookDefaultSecretName = "mongo-operator-webhook-cert"
	MongoWebhookCaName            = "mongo-operator-ca"
	MongoWebhookCaOrganization    = "mongo-operator"
	TypeReplicaSet                = "ReplicaSet"

	// mongo cr default value
	DefaultMongoRootPassword = "123456"
	DefaultStorage           = "1Gi"
	DefaultMembers           = 1

	// 标识configmap名称
	MembersConfigMapName = "hostconf"
	// 标识mongo的服务
	ServiceNameInfix = "mongodb"
	// 标识arbiter节点
	ArbiterName = "arbiter"
)
View Source
const (
	ConditionTypeUserRoot           MongoConditionType = "userRoot"
	ConditionTypeUserClusterAdmin                      = "userClusterAdmin"
	ConditionTypeUserClusterMonitor                    = "userClusterMonitor"
	ConditionTypeUserDB                                = "userDB"
	ConditionTypeRsInit                                = "rsInit"
	ConditionTypeRsConfig                              = "rsConfig"
)
View Source
const (
	RestartStateSecondaryDeleted = "SecondaryDeleted"
	RestartStatePrimaryDeleted   = "PrimaryDeleted"
	RestartStateNotInProcess     = "NotInProcess"
)
View Source
const (
	UniformScheduling = "Uniform"
	WeightScheduling  = "Weighting"
)

Variables

View Source
var (
	DefaultCpu    = resource.MustParse("1000m")
	DefaultMemory = resource.MustParse("1024Mi")

	DefaultExporterCpu    = resource.MustParse("50m")
	DefaultExporterMemory = resource.MustParse("100Mi")
)
View Source
var (
	// GroupVersion is group version used to register these objects
	GroupVersion = schema.GroupVersion{Group: "middleware.fedstate.io", Version: "v1alpha1"}

	// 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
)
View Source
var MongoWebhook = &Webhook{
	ServiceName:       MongoServiceName,
	DefaultSecretName: MongoWebhookDefaultSecretName,
	CertDir:           MongoWebhookCertDir,
	CaName:            MongoWebhookCaName,
	CaOrganization:    MongoWebhookCaOrganization,
}
View Source
var MultiCloudMongoWebhook = &Webhook{
	ServiceName:       MultiCloudMongoServiceName,
	DefaultSecretName: MultiCloudMongoWebhookDefaultSecretName,
	CertDir:           MongoWebhookCertDir,
	CaName:            MultiCloudMongoWebhookCaName,
	CaOrganization:    MultiCloudMongoWebhookCaOrganization,
}

Functions

This section is empty.

Types

type AuthSetting

type AuthSetting struct {
	RootPasswd *string `json:"rootPasswd,omitempty"`
}

func (*AuthSetting) DeepCopy

func (in *AuthSetting) DeepCopy() *AuthSetting

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

func (*AuthSetting) DeepCopyInto

func (in *AuthSetting) DeepCopyInto(out *AuthSetting)

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

type ConditionStatus

type ConditionStatus string

type ConditionType

type ConditionType string

type ConfigSetting

type ConfigSetting struct {
	ConfigSet map[string]string `json:"configSet,omitempty"`
	ConfigRef *string           `json:"configRef,omitempty"`
	Arbiter   bool              `json:"arbiter,omitempty"`
}

ConfigSetting

@Description: 配置文件设置

func (*ConfigSetting) DeepCopy

func (in *ConfigSetting) DeepCopy() *ConfigSetting

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

func (*ConfigSetting) DeepCopyInto

func (in *ConfigSetting) DeepCopyInto(out *ConfigSetting)

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

type ConfigVar

type ConfigVar struct {
	Name  string `json:"name,omitempty"`
	Value string `json:"value,omitempty"`
}

func (*ConfigVar) DeepCopy

func (in *ConfigVar) DeepCopy() *ConfigVar

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

func (*ConfigVar) DeepCopyInto

func (in *ConfigVar) DeepCopyInto(out *ConfigVar)

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

type CurrentInfo

type CurrentInfo struct {
	// 数据库用户密码支持动态变更, 根据此字段检测变更条件
	DBUserPassword string `json:"dbUserPassword,omitempty"`

	// 需要重启等额外操作才能变更的资源
	Resources *ResourceSetting `json:"resources,omitempty"`

	CustomConfig string `json:"customConfig,omitempty"`
	Members      int    `json:"members"`
}

func (*CurrentInfo) DeepCopy

func (in *CurrentInfo) DeepCopy() *CurrentInfo

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

func (*CurrentInfo) DeepCopyInto

func (in *CurrentInfo) DeepCopyInto(out *CurrentInfo)

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

type DBUserSpec

type DBUserSpec struct {
	Name     string `json:"name,omitempty"`
	User     string `json:"user,omitempty"`
	Password string `json:"password,omitempty"`
	Enable   bool   `json:"enable,omitempty"`
}

func (*DBUserSpec) DeepCopy

func (in *DBUserSpec) DeepCopy() *DBUserSpec

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

func (*DBUserSpec) DeepCopyInto

func (in *DBUserSpec) DeepCopyInto(out *DBUserSpec)

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

type ExportSetting

type ExportSetting struct {
	Resource ResourceSetting `json:"resource,omitempty"`
	Enable   bool            `json:"enable,omitempty"`
}

ExportSetting

@Description: export设置

func (*ExportSetting) DeepCopy

func (in *ExportSetting) DeepCopy() *ExportSetting

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

func (*ExportSetting) DeepCopyInto

func (in *ExportSetting) DeepCopyInto(out *ExportSetting)

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

type ImagePullSecretReference

type ImagePullSecretReference struct {
	User   string `json:"user,omitempty"`   // 镜像仓库用户名
	Passwd string `json:"passwd,omitempty"` // 镜像仓库密码
}

ImagePullSecretReference

@Description: 需要登陆的镜像仓库认证

func (*ImagePullSecretReference) DeepCopy

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

func (*ImagePullSecretReference) DeepCopyInto

func (in *ImagePullSecretReference) DeepCopyInto(out *ImagePullSecretReference)

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

type ImagePullSecretSpec

type ImagePullSecretSpec struct {
	Username string `json:"username,omitempty"`
	Password string `json:"password,omitempty"`
}

func (*ImagePullSecretSpec) DeepCopy

func (in *ImagePullSecretSpec) DeepCopy() *ImagePullSecretSpec

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

func (*ImagePullSecretSpec) DeepCopyInto

func (in *ImagePullSecretSpec) DeepCopyInto(out *ImagePullSecretSpec)

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

type ImageSetting

type ImageSetting struct {
	Image           string                   `json:"image,omitempty"`
	ImagePullPolicy corev1.PullPolicy        `json:"imagePullPolicy,omitempty"` // 镜像拉取策略
	ImagePullSecret ImagePullSecretReference `json:"imagePullSecret,omitempty"` // 镜像仓库用户名密码
}

ImageSetting

@Description: 镜像设置

func (*ImageSetting) DeepCopy

func (in *ImageSetting) DeepCopy() *ImageSetting

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

func (*ImageSetting) DeepCopyInto

func (in *ImageSetting) DeepCopyInto(out *ImageSetting)

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

type MemberSetting

type MemberSetting struct {
	MemberConfigRef *string `json:"memberConfigRef,omitempty"`
}

func (*MemberSetting) DeepCopy

func (in *MemberSetting) DeepCopy() *MemberSetting

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

func (*MemberSetting) DeepCopyInto

func (in *MemberSetting) DeepCopyInto(out *MemberSetting)

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

type MetricsExporterSpec

type MetricsExporterSpec struct {
	Resources *ResourceSetting `json:"resources,omitempty"`
	Enable    bool             `json:"enable"`
}

func (*MetricsExporterSpec) DeepCopy

func (in *MetricsExporterSpec) DeepCopy() *MetricsExporterSpec

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

func (*MetricsExporterSpec) DeepCopyInto

func (in *MetricsExporterSpec) DeepCopyInto(out *MetricsExporterSpec)

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

type MongoCondition

type MongoCondition struct {
	Status             MongoConditionStatus `json:"status"`
	Type               MongoConditionType   `json:"type"`
	LastTransitionTime metav1.Time          `json:"lastTransitionTime,omitempty"`
	Reason             string               `json:"reason,omitempty"`
	Message            string               `json:"message,omitempty"`
}

func (*MongoCondition) DeepCopy

func (in *MongoCondition) DeepCopy() *MongoCondition

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

func (*MongoCondition) DeepCopyInto

func (in *MongoCondition) DeepCopyInto(out *MongoCondition)

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

type MongoConditionStatus

type MongoConditionStatus string
const (
	ConditionStatusTrue  MongoConditionStatus = "True"
	ConditionStatusFalse MongoConditionStatus = "False"
)

type MongoConditionType

type MongoConditionType string

type MongoDB

type MongoDB struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`
	Status            MongoDBStatus `json:"status,omitempty"`
	Spec              MongoDBSpec   `json:"spec,omitempty"`
}

MongoDB is the Schema for the mongodbs API

func (*MongoDB) DeepCopy

func (in *MongoDB) DeepCopy() *MongoDB

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

func (*MongoDB) DeepCopyInto

func (in *MongoDB) DeepCopyInto(out *MongoDB)

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

func (*MongoDB) DeepCopyObject

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

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

func (*MongoDB) Default

func (r *MongoDB) Default()

Default implements webhook.Defaulter so a webhook will be registered for the type

func (*MongoDB) SetupWebhookWithManager

func (r *MongoDB) SetupWebhookWithManager(mgr ctrl.Manager) error

func (*MongoDB) ValidateCreate

func (r *MongoDB) ValidateCreate() error

ValidateCreate implements webhook.Validator so a webhook will be registered for the type

func (*MongoDB) ValidateDelete

func (r *MongoDB) ValidateDelete() error

ValidateDelete implements webhook.Validator so a webhook will be registered for the type

func (*MongoDB) ValidateUpdate

func (r *MongoDB) ValidateUpdate(old runtime.Object) error

ValidateUpdate implements webhook.Validator so a webhook will be registered for the type

type MongoDBList

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

MongoDBList contains a list of MongoDB

func (*MongoDBList) DeepCopy

func (in *MongoDBList) DeepCopy() *MongoDBList

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

func (*MongoDBList) DeepCopyInto

func (in *MongoDBList) DeepCopyInto(out *MongoDBList)

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

func (*MongoDBList) DeepCopyObject

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

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

type MongoDBSpec

type MongoDBSpec struct {
	PodSpec             *PodSpec             `json:"podSpec,omitempty"`
	MetricsExporterSpec *MetricsExporterSpec `json:"metricsExporterSpec,omitempty"`
	Resources           *ResourceSetting     `json:"resources,omitempty"`
	DBUserSpec          DBUserSpec           `json:"dbUserSpec,omitempty"`
	Persistence         PersistenceSpec      `json:"persistence,omitempty"`
	ImagePullSecret     ImagePullSecretSpec  `json:"imagePullSecret,omitempty"`
	ImagePullPolicy     corev1.PullPolicy    `json:"imagePullPolicy,omitempty"`
	Type                string               `json:"type,omitempty"`
	RootPassword        string               `json:"rootPassword,omitempty"`
	Image               string               `json:"image,omitempty"`
	CustomConfigRef     string               `json:"customConfigRef,omitempty"`
	MemberConfigRef     string               `json:"memberConfigRef,omitempty"`
	Config              []ConfigVar          `json:"config,omitempty"`
	Members             int                  `json:"members,omitempty"`
	Arbiter             bool                 `json:"arbiter,omitempty"`
	Pause               bool                 `json:"pause,omitempty"`
	RsInit              bool                 `json:"rsInit,omitempty"`
}

MongoDBSpec defines the desired state of MongoDB

func (*MongoDBSpec) DeepCopy

func (in *MongoDBSpec) DeepCopy() *MongoDBSpec

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

func (*MongoDBSpec) DeepCopyInto

func (in *MongoDBSpec) DeepCopyInto(out *MongoDBSpec)

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

type MongoDBStatus

type MongoDBStatus struct {
	State        MongoState   `json:"state,omitempty"`
	RestartState RestartState `json:"restartState,omitempty"`

	InternalAddress string `json:"internalAddress,omitempty"`
	ExternalAddress string `json:"externalAddress,omitempty"`

	ReplSet []mgo.MemberStatus `json:"replset,omitempty"`

	CurrentRevision string      `json:"currentRevision,omitempty"`
	CurrentInfo     CurrentInfo `json:"currentInfo,omitempty"`

	Conditions []MongoCondition `json:"conditions,omitempty"`
}

MongoDBStatus defines the observed state of MongoDB

func (*MongoDBStatus) DeepCopy

func (in *MongoDBStatus) DeepCopy() *MongoDBStatus

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

func (*MongoDBStatus) DeepCopyInto

func (in *MongoDBStatus) DeepCopyInto(out *MongoDBStatus)

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

type MongoState

type MongoState string
const (
	StateRunning     MongoState = "Running"
	StatePause       MongoState = "Pause"
	StateReconciling MongoState = "Reconciling"
	StateError       MongoState = "Error"
	StateUnKnown     MongoState = "Unknown"
)

type MultiCloudMongoDB

type MultiCloudMongoDB struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`
	Status            MultiCloudMongoDBStatus `json:"status,omitempty"`
	Spec              MultiCloudMongoDBSpec   `json:"spec,omitempty"`
}

MultiCloudMongoDB is the Schema for the multicloudmongodbs API

func (*MultiCloudMongoDB) DeepCopy

func (in *MultiCloudMongoDB) DeepCopy() *MultiCloudMongoDB

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

func (*MultiCloudMongoDB) DeepCopyInto

func (in *MultiCloudMongoDB) DeepCopyInto(out *MultiCloudMongoDB)

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

func (*MultiCloudMongoDB) DeepCopyObject

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

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

func (*MultiCloudMongoDB) Default

func (r *MultiCloudMongoDB) Default()

Default implements webhook.Defaulter so a webhook will be registered for the type

func (*MultiCloudMongoDB) SetupWebhookWithManager

func (r *MultiCloudMongoDB) SetupWebhookWithManager(mgr ctrl.Manager) error

func (*MultiCloudMongoDB) ValidateCreate

func (r *MultiCloudMongoDB) ValidateCreate() error

ValidateCreate implements webhook.Validator so a webhook will be registered for the type

func (*MultiCloudMongoDB) ValidateDelete

func (r *MultiCloudMongoDB) ValidateDelete() error

ValidateDelete implements webhook.Validator so a webhook will be registered for the type

func (*MultiCloudMongoDB) ValidateUpdate

func (r *MultiCloudMongoDB) ValidateUpdate(old runtime.Object) error

ValidateUpdate implements webhook.Validator so a webhook will be registered for the type

type MultiCloudMongoDBList

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

MultiCloudMongoDBList contains a list of MultiCloudMongoDB

func (*MultiCloudMongoDBList) DeepCopy

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

func (*MultiCloudMongoDBList) DeepCopyInto

func (in *MultiCloudMongoDBList) DeepCopyInto(out *MultiCloudMongoDBList)

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

func (*MultiCloudMongoDBList) DeepCopyObject

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

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

type MultiCloudMongoDBSpec

type MultiCloudMongoDBSpec struct {
	Resource          ResourceSetting  `json:"resource,omitempty"`
	Replicaset        *int32           `json:"replicaset,omitempty"`
	Auth              AuthSetting      `json:"auth,omitempty"`
	Member            MemberSetting    `json:"member,omitempty"`
	ImageSetting      ImageSetting     `json:"imageSetting,omitempty"`
	Storage           StorageSetting   `json:"storage,omitempty"`
	Export            ExportSetting    `json:"export,omitempty"`
	Config            ConfigSetting    `json:"config,omitempty"`
	Scheduler         SchedulerSetting `json:"scheduler,omitempty"`
	SpreadConstraints SpreadConstraint `json:"spreadConstraints,omitempty"`
}

MultiCloudMongoDBSpec

@Description: 定义控制面CR的Spec

func (*MultiCloudMongoDBSpec) DeepCopy

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

func (*MultiCloudMongoDBSpec) DeepCopyInto

func (in *MultiCloudMongoDBSpec) DeepCopyInto(out *MultiCloudMongoDBSpec)

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

type MultiCloudMongoDBStatus

type MultiCloudMongoDBStatus struct {
	ExternalAddr string             `json:"externalAddr,omitempty"` // 服务外部访问地址
	InternalAddr string             `json:"internalAddr,omitempty"` // 服务内部访问地址
	State        State              `json:"state,omitempty"`        // 服务状态
	Result       []*ServiceTopology `json:"result,omitempty"`       // 服务分发结果
	Conditions   []ServerCondition  `json:"conditions,omitempty"`   // 服务condition
}

MultiCloudMongoDBStatus 描述控制面CR状态

func (*MultiCloudMongoDBStatus) DeepCopy

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

func (*MultiCloudMongoDBStatus) DeepCopyInto

func (in *MultiCloudMongoDBStatus) DeepCopyInto(out *MultiCloudMongoDBStatus)

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

func (*MultiCloudMongoDBStatus) FindStatusCondition

func (m *MultiCloudMongoDBStatus) FindStatusCondition(conditions []ServerCondition, conditionType ConditionType) *ServerCondition

FindStatusCondition finds the conditionType in conditions.

func (*MultiCloudMongoDBStatus) SetStatusCondition

func (m *MultiCloudMongoDBStatus) SetStatusCondition(conditions *[]ServerCondition, newCondition ServerCondition)

func (*MultiCloudMongoDBStatus) SetTypeCondition

func (m *MultiCloudMongoDBStatus) SetTypeCondition(conditionType ConditionType, conditionStatus ConditionStatus, reason, message string)

type PersistenceSpec

type PersistenceSpec struct {
	// PV储存容量大小
	Storage string `json:"storage,omitempty"`
	// 指定storageClass,为空则使用默认storageClass
	StorageClassName string `json:"storageClassName,omitempty"`
}

func (*PersistenceSpec) DeepCopy

func (in *PersistenceSpec) DeepCopy() *PersistenceSpec

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

func (*PersistenceSpec) DeepCopyInto

func (in *PersistenceSpec) DeepCopyInto(out *PersistenceSpec)

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

type PodSpec

type PodSpec struct {
	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"`
	RestartPolicy             corev1.RestartPolicy              `json:"restartPolicy,omitempty" protobuf:"bytes,3,opt,name=restartPolicy,casttype=RestartPolicy"`
	Tolerations               []corev1.Toleration               `json:"tolerations,omitempty" protobuf:"bytes,22,opt,name=tolerations"`
	TopologySpreadConstraints []corev1.TopologySpreadConstraint `` /* 147-byte string literal not displayed */
}

copy from corev1.PodSpec

func (*PodSpec) DeepCopy

func (in *PodSpec) DeepCopy() *PodSpec

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

func (*PodSpec) DeepCopyInto

func (in *PodSpec) DeepCopyInto(out *PodSpec)

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

type ResourceSetting

type ResourceSetting struct {
	Limits   corev1.ResourceList `json:"limits,omitempty"`
	Requests corev1.ResourceList `json:"requests,omitempty"`
}

func (*ResourceSetting) DeepCopy

func (in *ResourceSetting) DeepCopy() *ResourceSetting

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

func (*ResourceSetting) DeepCopyInto

func (in *ResourceSetting) DeepCopyInto(out *ResourceSetting)

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

type RestartState

type RestartState string

type SchedulerSetting

type SchedulerSetting struct {
	SchedulerName *string `json:"schedulerName,omitempty"`
	// +kubebuilder:default:=Uniform
	// +kubebuilder:validation:Enum=Uniform;Weighting
	SchedulerMode *string             `json:"schedulerMode,omitempty"`
	Affinity      *corev1.Affinity    `json:"affinity,omitempty"`
	Tolerations   []corev1.Toleration `json:"tolerations,omitempty"`
}

SchedulerSetting

@Description: 调度设置

func (*SchedulerSetting) DeepCopy

func (in *SchedulerSetting) DeepCopy() *SchedulerSetting

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

func (*SchedulerSetting) DeepCopyInto

func (in *SchedulerSetting) DeepCopyInto(out *SchedulerSetting)

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

type ServerCondition

type ServerCondition struct {
	Type               ConditionType   `json:"type,omitempty"`               // 这个condition的类型
	Status             ConditionStatus `json:"status,omitempty"`             // 这个类型condition的状态
	LastTransitionTime metav1.Time     `json:"lastTransitionTime,omitempty"` // 由上一个状态转换到本次状态的时间
	Reason             string          `json:"reason,omitempty"`             // 出现这种问题的原因
	Message            string          `json:"message,omitempty"`            // 可读的信息
}

func (*ServerCondition) DeepCopy

func (in *ServerCondition) DeepCopy() *ServerCondition

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

func (*ServerCondition) DeepCopyInto

func (in *ServerCondition) DeepCopyInto(out *ServerCondition)

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

type ServiceTopology

type ServiceTopology struct {
	ReplicasetStatus    *int              `json:"replicasetStatus,omitempty"`
	ReplicasetSpec      *int              `json:"replicasetSpec,omitempty"`
	ConnectAddrWithRole map[string]string `json:"connectAddrWithRole,omitempty"`
	Cluster             string            `json:"cluster,omitempty"`
	State               MongoState        `json:"state,omitempty"`
	CurrentRevision     string            `json:"currentRevision,omitempty"`
	Applied             bool              `json:"applied,omitempty"`
}

ServiceTopology

@Description: 下发服务的拓扑状态

func (*ServiceTopology) DeepCopy

func (in *ServiceTopology) DeepCopy() *ServiceTopology

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

func (*ServiceTopology) DeepCopyInto

func (in *ServiceTopology) DeepCopyInto(out *ServiceTopology)

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

type SpreadConstraint

type SpreadConstraint struct {
	NodeSelect                map[string]string           `json:"nodeSelect,omitempty"`
	TopologySpreadConstraints map[string]string           `json:"topologySpreadConstraints,omitempty"`
	SpreadConstraints         []v1alpha1.SpreadConstraint `json:"spreadConstraints,omitempty"`
	AllowDynamicScheduler     bool                        `json:"allowDynamicScheduler,omitempty"`
}

SpreadConstraint

@Description: 资源传播约束

func (*SpreadConstraint) DeepCopy

func (in *SpreadConstraint) DeepCopy() *SpreadConstraint

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

func (*SpreadConstraint) DeepCopyInto

func (in *SpreadConstraint) DeepCopyInto(out *SpreadConstraint)

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

type SpreadFieldValue

type SpreadFieldValue string

type State

type State string
const (
	Health    State = "Health"    // 服务健康:可以提供服务,实际服务状态与期望一致
	SubHealth State = "SubHealth" // 服务亚健康:可以提供服务,但是实际服务状态与期望不一致
	UnHealth  State = "UnHealth"  // 服务不健康:无法提供服务
	UnKnown   State = "UnKnown"
)

type StorageSetting

type StorageSetting struct {
	StorageClass string `json:"storageClass,omitempty"` // sc名称
	//+kubebuilder:default:="2Gi"
	StorageSize string `json:"storageSize,omitempty"` // 申请的pv大小
}

StorageSetting

@Description: 存储设置

func (*StorageSetting) DeepCopy

func (in *StorageSetting) DeepCopy() *StorageSetting

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

func (*StorageSetting) DeepCopyInto

func (in *StorageSetting) DeepCopyInto(out *StorageSetting)

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

type Webhook

type Webhook struct {
	ServiceName       string
	DefaultSecretName string
	CertDir           string
	CaName            string
	CaOrganization    string
}

func (*Webhook) DeepCopy

func (in *Webhook) DeepCopy() *Webhook

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

func (*Webhook) DeepCopyInto

func (in *Webhook) DeepCopyInto(out *Webhook)

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