v1beta2

package
v0.0.0-...-04b7f26 Latest Latest
Warning

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

Go to latest
Published: Sep 20, 2021 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Overview

+k8s:deepcopy-gen=package +groupName=etcd.database.coreos.com

Index

Constants

View Source
const (
	// AWS S3 related consts
	BackupStorageTypeS3          BackupStorageType = "S3"
	AWSSecretCredentialsFileName                   = "credentials"
	AWSSecretConfigFileName                        = "config"

	// Azure ABS related consts
	BackupStorageTypeABS      BackupStorageType = "ABS"
	AzureSecretStorageAccount                   = "storage-account"
	AzureSecretStorageKey                       = "storage-key"
	AzureCloudKey                               = "cloud"

	// Google GCS related consts
	BackupStorageTypeGCS BackupStorageType = "GCS"
	GCPAccessToken                         = "access-token"
	GCPCredentialsJson                     = "credentials.json"

	// Alibaba Cloud OSS related consts
	BackupStorageTypeOSS                         BackupStorageType = "OSS"
	AlibabaCloudSecretCredentialsAccessKeyID                       = "accessKeyID"
	AlibabaCloudSecretCredentialsAccessKeySecret                   = "accessKeySecret"
)
View Source
const (
	EtcdClusterResourceKind   = "EtcdCluster"
	EtcdClusterResourcePlural = "etcdclusters"

	EtcdBackupResourceKind   = "EtcdBackup"
	EtcdBackupResourcePlural = "etcdbackups"

	EtcdRestoreResourceKind   = "EtcdRestore"
	EtcdRestoreResourcePlural = "etcdrestores"
)
View Source
const (
	ClusterPhaseNone     ClusterPhase = ""
	ClusterPhaseCreating              = "Creating"
	ClusterPhaseRunning               = "Running"
	ClusterPhaseFailed                = "Failed"

	// See ./doc/user/conditions_and_events.md
	ClusterConditionAvailable  ClusterConditionType = "Available"
	ClusterConditionRecovering                      = "Recovering"
	ClusterConditionScaling                         = "Scaling"
	ClusterConditionUpgrading                       = "Upgrading"
)
View Source
const (
	DefaultEtcdVersion = "3.2.13"
)

Variables

View Source
var (
	SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes)
	AddToScheme   = SchemeBuilder.AddToScheme

	SchemeGroupVersion = schema.GroupVersion{Group: groupName, Version: "v1beta2"}
	EtcdClusterCRDName = EtcdClusterResourcePlural + "." + groupName
	EtcdBackupCRDName  = EtcdBackupResourcePlural + "." + groupName
	EtcdRestoreCRDName = EtcdRestoreResourcePlural + "." + groupName
)
View Source
var (
	// TODO: move validation code into separate package.
	ErrBackupUnsetRestoreSet = errors.New("spec: backup policy must be set if restore policy is set")
)

Functions

func Resource

func Resource(resource string) schema.GroupResource

Resource gets an EtcdCluster GroupResource for a specified resource

Types

type ABSBackupSource

type ABSBackupSource struct {
	// Path is the full abs path where the backup is saved.
	// The format of the path must be: "<abs-container-name>/<path-to-backup-file>"
	// e.g: "myabscontainer/etcd.backup"
	Path string `json:"path"`

	// The name of the secret object that stores the Azure storage credential
	ABSSecret string `json:"absSecret"`
}

ABSBackupSource provides the spec how to store backups on ABS.

func (*ABSBackupSource) DeepCopy

func (in *ABSBackupSource) DeepCopy() *ABSBackupSource

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

func (*ABSBackupSource) DeepCopyInto

func (in *ABSBackupSource) DeepCopyInto(out *ABSBackupSource)

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

type ABSRestoreSource

type ABSRestoreSource struct {
	// Path is the full abs path where the backup is saved.
	// The format of the path must be: "<abs-container-name>/<path-to-backup-file>"
	// e.g: "myabscontainer/etcd.backup"
	Path string `json:"path"`

	// The name of the secret object that stores the Azure Blob Storage credential.
	ABSSecret string `json:"absSecret"`
}

func (*ABSRestoreSource) DeepCopy

func (in *ABSRestoreSource) DeepCopy() *ABSRestoreSource

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

func (*ABSRestoreSource) DeepCopyInto

func (in *ABSRestoreSource) DeepCopyInto(out *ABSRestoreSource)

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

type BackupPolicy

type BackupPolicy struct {
	// TimeoutInSecond is the maximal allowed time in second of the entire backup process.
	TimeoutInSecond int64 `json:"timeoutInSecond,omitempty"`
	// BackupIntervalInSecond is to specify how often operator take snapshot
	// 0 is magic number to indicate one-shot backup
	BackupIntervalInSecond int64 `json:"backupIntervalInSecond,omitempty"`
	// MaxBackups is to specify how many backups we want to keep
	// 0 is magic number to indicate un-limited backups
	MaxBackups int `json:"maxBackups,omitempty"`
}

BackupPolicy defines backup policy.

func (*BackupPolicy) DeepCopy

func (in *BackupPolicy) DeepCopy() *BackupPolicy

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

func (*BackupPolicy) DeepCopyInto

func (in *BackupPolicy) DeepCopyInto(out *BackupPolicy)

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

type BackupSource

type BackupSource struct {
	// S3 defines the S3 backup source spec.
	S3 *S3BackupSource `json:"s3,omitempty"`
	// ABS defines the ABS backup source spec.
	ABS *ABSBackupSource `json:"abs,omitempty"`
	// GCS defines the GCS backup source spec.
	GCS *GCSBackupSource `json:"gcs,omitempty"`
	// OSS defines the OSS backup source spec.
	OSS *OSSBackupSource `json:"oss,omitempty"`
}

BackupSource contains the supported backup sources.

func (*BackupSource) DeepCopy

func (in *BackupSource) DeepCopy() *BackupSource

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

func (*BackupSource) DeepCopyInto

func (in *BackupSource) DeepCopyInto(out *BackupSource)

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

type BackupSpec

type BackupSpec struct {
	// EtcdEndpoints specifies the endpoints of an etcd cluster.
	// When multiple endpoints are given, the backup operator retrieves
	// the backup from the endpoint that has the most up-to-date state.
	// The given endpoints must belong to the same etcd cluster.
	EtcdEndpoints []string `json:"etcdEndpoints,omitempty"`
	// StorageType is the etcd backup storage type.
	// We need this field because CRD doesn't support validation against invalid fields
	// and we cannot verify invalid backup storage source.
	StorageType BackupStorageType `json:"storageType"`
	// BackupPolicy configures the backup process.
	BackupPolicy *BackupPolicy `json:"backupPolicy,omitempty"`
	// BackupSource is the backup storage source.
	BackupSource `json:",inline"`
	// ClientTLSSecret is the secret containing the etcd TLS client certs and
	// must contain the following data items:
	// data:
	//    "etcd-client.crt": <pem-encoded-cert>
	//    "etcd-client.key": <pem-encoded-key>
	//    "etcd-client-ca.crt": <pem-encoded-ca-cert>
	ClientTLSSecret string `json:"clientTLSSecret,omitempty"`
}

BackupSpec contains a backup specification for an etcd cluster.

func (*BackupSpec) DeepCopy

func (in *BackupSpec) DeepCopy() *BackupSpec

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

func (*BackupSpec) DeepCopyInto

func (in *BackupSpec) DeepCopyInto(out *BackupSpec)

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

type BackupStatus

type BackupStatus struct {
	// Succeeded indicates if the backup has Succeeded.
	Succeeded bool `json:"succeeded"`
	// Reason indicates the reason for any backup related failures.
	Reason string `json:"Reason,omitempty"`
	// EtcdVersion is the version of the backup etcd server.
	EtcdVersion string `json:"etcdVersion,omitempty"`
	// EtcdRevision is the revision of etcd's KV store where the backup is performed on.
	EtcdRevision int64 `json:"etcdRevision,omitempty"`
	// LastSuccessDate indicate the time to get snapshot last time
	LastSuccessDate metav1.Time `json:"lastSuccessDate,omitempty"`
}

BackupStatus represents the status of the EtcdBackup Custom Resource.

func (*BackupStatus) DeepCopy

func (in *BackupStatus) DeepCopy() *BackupStatus

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

func (*BackupStatus) DeepCopyInto

func (in *BackupStatus) DeepCopyInto(out *BackupStatus)

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

type BackupStorageType

type BackupStorageType string

type ClusterCondition

type ClusterCondition struct {
	// Type of cluster condition.
	Type ClusterConditionType `json:"type"`
	// Status of the condition, one of True, False, Unknown.
	Status v1.ConditionStatus `json:"status"`
	// The last time this condition was updated.
	LastUpdateTime string `json:"lastUpdateTime,omitempty"`
	// Last time the condition transitioned from one status to another.
	LastTransitionTime string `json:"lastTransitionTime,omitempty"`
	// The reason for the condition's last transition.
	Reason string `json:"reason,omitempty"`
	// A human readable message indicating details about the transition.
	Message string `json:"message,omitempty"`
}

ClusterCondition represents one current condition of an etcd cluster. A condition might not show up if it is not happening. For example, if a cluster is not upgrading, the Upgrading condition would not show up. If a cluster is upgrading and encountered a problem that prevents the upgrade, the Upgrading condition's status will would be False and communicate the problem back.

func (*ClusterCondition) DeepCopy

func (in *ClusterCondition) DeepCopy() *ClusterCondition

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

func (*ClusterCondition) DeepCopyInto

func (in *ClusterCondition) DeepCopyInto(out *ClusterCondition)

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

type ClusterConditionType

type ClusterConditionType string

type ClusterPhase

type ClusterPhase string

type ClusterSpec

type ClusterSpec struct {
	// Size is the expected size of the etcd cluster.
	// The etcd-operator will eventually make the size of the running
	// cluster equal to the expected size.
	// The vaild range of the size is from 1 to 7.
	Size int `json:"size"`
	// Repository is the name of the repository that hosts
	// etcd container images. It should be direct clone of the repository in official
	// release:
	//   https://github.com/coreos/etcd/releases
	// That means, it should have exact same tags and the same meaning for the tags.
	//
	// By default, it is `quay.io/coreos/etcd`.
	Repository string `json:"repository,omitempty"`

	// Version is the expected version of the etcd cluster.
	// The etcd-operator will eventually make the etcd cluster version
	// equal to the expected version.
	//
	// The version must follow the [semver]( http://semver.org) format, for example "3.2.13".
	// Only etcd released versions are supported: https://github.com/coreos/etcd/releases
	//
	// If version is not set, default is "3.2.13".
	Version string `json:"version,omitempty"`

	// Paused is to pause the control of the operator for the etcd cluster.
	Paused bool `json:"paused,omitempty"`

	// Pod defines the policy to create pod for the etcd pod.
	//
	// Updating Pod does not take effect on any existing etcd pods.
	Pod *PodPolicy `json:"pod,omitempty"`

	// etcd cluster TLS configuration
	TLS *TLSPolicy `json:"TLS,omitempty"`
}

func (*ClusterSpec) DeepCopy

func (in *ClusterSpec) DeepCopy() *ClusterSpec

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

func (*ClusterSpec) DeepCopyInto

func (in *ClusterSpec) DeepCopyInto(out *ClusterSpec)

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

func (*ClusterSpec) Validate

func (c *ClusterSpec) Validate() error

TODO: move this to initializer

type ClusterStatus

type ClusterStatus struct {
	// Phase is the cluster running phase
	Phase  ClusterPhase `json:"phase"`
	Reason string       `json:"reason,omitempty"`

	// ControlPuased indicates the operator pauses the control of the cluster.
	ControlPaused bool `json:"controlPaused,omitempty"`

	// Condition keeps track of all cluster conditions, if they exist.
	Conditions []ClusterCondition `json:"conditions,omitempty"`

	// Size is the current size of the cluster
	Size int `json:"size"`

	// ServiceName is the LB service for accessing etcd nodes.
	ServiceName string `json:"serviceName,omitempty"`

	// ClientPort is the port for etcd client to access.
	// It's the same on client LB service and etcd nodes.
	ClientPort int `json:"clientPort,omitempty"`

	// Members are the etcd members in the cluster
	Members MembersStatus `json:"members"`
	// CurrentVersion is the current cluster version
	CurrentVersion string `json:"currentVersion"`
	// TargetVersion is the version the cluster upgrading to.
	// If the cluster is not upgrading, TargetVersion is empty.
	TargetVersion string `json:"targetVersion"`
}

func (*ClusterStatus) ClearCondition

func (cs *ClusterStatus) ClearCondition(t ClusterConditionType)

func (*ClusterStatus) Control

func (cs *ClusterStatus) Control()

func (*ClusterStatus) DeepCopy

func (in *ClusterStatus) DeepCopy() *ClusterStatus

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

func (*ClusterStatus) DeepCopyInto

func (in *ClusterStatus) DeepCopyInto(out *ClusterStatus)

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

func (*ClusterStatus) IsFailed

func (cs *ClusterStatus) IsFailed() bool

func (*ClusterStatus) PauseControl

func (cs *ClusterStatus) PauseControl()

func (*ClusterStatus) SetPhase

func (cs *ClusterStatus) SetPhase(p ClusterPhase)

func (*ClusterStatus) SetReadyCondition

func (cs *ClusterStatus) SetReadyCondition()

func (*ClusterStatus) SetReason

func (cs *ClusterStatus) SetReason(r string)

func (*ClusterStatus) SetRecoveringCondition

func (cs *ClusterStatus) SetRecoveringCondition()

func (*ClusterStatus) SetScalingDownCondition

func (cs *ClusterStatus) SetScalingDownCondition(from, to int)

func (*ClusterStatus) SetScalingUpCondition

func (cs *ClusterStatus) SetScalingUpCondition(from, to int)

func (*ClusterStatus) SetUpgradingCondition

func (cs *ClusterStatus) SetUpgradingCondition(to string)

func (*ClusterStatus) SetVersion

func (cs *ClusterStatus) SetVersion(v string)

func (*ClusterStatus) UpgradeVersionTo

func (cs *ClusterStatus) UpgradeVersionTo(v string)

type EtcdBackup

type EtcdBackup struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata"`
	Spec              BackupSpec   `json:"spec"`
	Status            BackupStatus `json:"status,omitempty"`
}

EtcdBackup represents a Kubernetes EtcdBackup Custom Resource.

func (*EtcdBackup) DeepCopy

func (in *EtcdBackup) DeepCopy() *EtcdBackup

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

func (*EtcdBackup) DeepCopyInto

func (in *EtcdBackup) DeepCopyInto(out *EtcdBackup)

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

func (*EtcdBackup) DeepCopyObject

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

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

type EtcdBackupList

type EtcdBackupList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata"`
	Items           []EtcdBackup `json:"items"`
}

EtcdBackupList is a list of EtcdBackup.

func (*EtcdBackupList) DeepCopy

func (in *EtcdBackupList) DeepCopy() *EtcdBackupList

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

func (*EtcdBackupList) DeepCopyInto

func (in *EtcdBackupList) DeepCopyInto(out *EtcdBackupList)

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

func (*EtcdBackupList) DeepCopyObject

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

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

type EtcdCluster

type EtcdCluster struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`
	Spec              ClusterSpec   `json:"spec"`
	Status            ClusterStatus `json:"status"`
}

func (*EtcdCluster) AsOwner

func (c *EtcdCluster) AsOwner() metav1.OwnerReference

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.

func (*EtcdCluster) SetDefaults

func (e *EtcdCluster) SetDefaults()

SetDefaults cleans up user passed spec, e.g. defaulting, transforming fields. TODO: move this to initializer

type EtcdClusterList

type EtcdClusterList struct {
	metav1.TypeMeta `json:",inline"`
	// Standard list metadata
	// More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata
	metav1.ListMeta `json:"metadata,omitempty"`
	Items           []EtcdCluster `json:"items"`
}

EtcdClusterList is a list of etcd clusters.

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 EtcdClusterRef

type EtcdClusterRef struct {
	// Name is the EtcdCluster resource name.
	// This reference EtcdCluster must be present in the same namespace as the restore-operator
	Name string `json:"name"`
}

EtcdCluster references an EtcdCluster resource whose metadata and spec will be used to create the new restored EtcdCluster CR. This reference EtcdCluster CR and all its resources will be deleted before the restored EtcdCluster CR is created.

func (*EtcdClusterRef) DeepCopy

func (in *EtcdClusterRef) DeepCopy() *EtcdClusterRef

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

func (*EtcdClusterRef) DeepCopyInto

func (in *EtcdClusterRef) DeepCopyInto(out *EtcdClusterRef)

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

type EtcdRestore

type EtcdRestore struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata"`
	Spec              RestoreSpec   `json:"spec"`
	Status            RestoreStatus `json:"status,omitempty"`
}

EtcdRestore represents a Kubernetes EtcdRestore Custom Resource. The EtcdRestore CR name will be used as the name of the new restored cluster.

func (*EtcdRestore) DeepCopy

func (in *EtcdRestore) DeepCopy() *EtcdRestore

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

func (*EtcdRestore) DeepCopyInto

func (in *EtcdRestore) DeepCopyInto(out *EtcdRestore)

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

func (*EtcdRestore) DeepCopyObject

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

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

type EtcdRestoreList

type EtcdRestoreList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata"`
	Items           []EtcdRestore `json:"items"`
}

EtcdRestoreList is a list of EtcdRestore.

func (*EtcdRestoreList) DeepCopy

func (in *EtcdRestoreList) DeepCopy() *EtcdRestoreList

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

func (*EtcdRestoreList) DeepCopyInto

func (in *EtcdRestoreList) DeepCopyInto(out *EtcdRestoreList)

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

func (*EtcdRestoreList) DeepCopyObject

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

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

type GCSBackupSource

type GCSBackupSource struct {
	// Path is the full GCS path where the backup is saved.
	// The format of the path must be: "<gcs-bucket-name>/<path-to-backup-file>"
	// e.g: "mygcsbucket/etcd.backup"
	Path string `json:"path"`

	// The name of the secret object that stores the Google storage credential
	// containing at most ONE of the following:
	// An access token with file name of 'access-token'.
	// JSON credentials with file name of 'credentials.json'.
	//
	// If omitted, client will use the default application credentials.
	GCPSecret string `json:"gcpSecret,omitempty"`
}

GCSBackupSource provides the spec how to store backups on GCS.

func (*GCSBackupSource) DeepCopy

func (in *GCSBackupSource) DeepCopy() *GCSBackupSource

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

func (*GCSBackupSource) DeepCopyInto

func (in *GCSBackupSource) DeepCopyInto(out *GCSBackupSource)

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

type GCSRestoreSource

type GCSRestoreSource struct {
	// Path is the full GCS path where the backup is saved.
	// The format of the path must be: "<gcs-bucket-name>/<path-to-backup-file>"
	// e.g: "mygcsbucket/etcd.backup"
	Path string `json:"path"`

	// The name of the secret object that stores the Google storage credential
	// containing at most ONE of the following:
	// An access token with file name of 'access-token'.
	// JSON credentials with file name of 'credentials.json'.
	//
	// If omitted, client will use the default application credentials.
	GCPSecret string `json:"gcpSecret,omitempty"`
}

func (*GCSRestoreSource) DeepCopy

func (in *GCSRestoreSource) DeepCopy() *GCSRestoreSource

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

func (*GCSRestoreSource) DeepCopyInto

func (in *GCSRestoreSource) DeepCopyInto(out *GCSRestoreSource)

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

type MemberSecret

type MemberSecret struct {
	// PeerSecret is the secret containing TLS certs used by each etcd member pod
	// for the communication between etcd peers.
	PeerSecret string `json:"peerSecret,omitempty"`
	// ServerSecret is the secret containing TLS certs used by each etcd member pod
	// for the communication between etcd server and its clients.
	ServerSecret string `json:"serverSecret,omitempty"`
}

func (*MemberSecret) DeepCopy

func (in *MemberSecret) DeepCopy() *MemberSecret

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

func (*MemberSecret) DeepCopyInto

func (in *MemberSecret) DeepCopyInto(out *MemberSecret)

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

type MembersStatus

type MembersStatus struct {
	// Ready are the etcd members that are ready to serve requests
	// The member names are the same as the etcd pod names
	Ready []string `json:"ready,omitempty"`
	// Unready are the etcd members not ready to serve requests
	Unready []string `json:"unready,omitempty"`
}

func (*MembersStatus) DeepCopy

func (in *MembersStatus) DeepCopy() *MembersStatus

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

func (*MembersStatus) DeepCopyInto

func (in *MembersStatus) DeepCopyInto(out *MembersStatus)

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

type OSSBackupSource

type OSSBackupSource struct {
	// Path is the full abs path where the backup is saved.
	// The format of the path must be: "<oss-bucket-name>/<path-to-backup-file>"
	// e.g: "mybucket/etcd.backup"
	Path string `json:"path"`

	// The name of the secret object that stores the credential which will be used
	// to access Alibaba Cloud OSS.
	//
	// The secret must contain the following keys/fields:
	//     accessKeyID
	//     accessKeySecret
	//
	// The format of secret:
	//
	//   apiVersion: v1
	//   kind: Secret
	//   metadata:
	//     name: <my-credential-name>
	//   type: Opaque
	//   data:
	//     accessKeyID: <base64 of my-access-key-id>
	//     accessKeySecret: <base64 of my-access-key-secret>
	//
	OSSSecret string `json:"ossSecret"`

	// Endpoint is the OSS service endpoint on alibaba cloud, defaults to
	// "http://oss-cn-hangzhou.aliyuncs.com".
	//
	// Details about regions and endpoints, see:
	//  https://www.alibabacloud.com/help/doc-detail/31837.htm
	Endpoint string `json:"endpoint,omitempty"`
}

OSSBackupSource provides the spec how to store backups on OSS.

func (*OSSBackupSource) DeepCopy

func (in *OSSBackupSource) DeepCopy() *OSSBackupSource

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

func (*OSSBackupSource) DeepCopyInto

func (in *OSSBackupSource) DeepCopyInto(out *OSSBackupSource)

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

type OSSRestoreSource

type OSSRestoreSource struct {
	// Path is the full abs path where the backup is saved.
	// The format of the path must be: "<oss-bucket-name>/<path-to-backup-file>"
	// e.g: "myossbucket/etcd.backup"
	Path string `json:"path"`

	// The name of the secret object that stores the credential which will be used
	// to access Alibaba Cloud OSS.
	//
	// The secret must contain the following keys/fields:
	//     accessKeyID
	//     accessKeySecret
	//
	// The format of secret:
	//
	//   apiVersion: v1
	//   kind: Secret
	//   metadata:
	//     name: <my-credential-name>
	//   type: Opaque
	//   data:
	//     accessKeyID: <base64 of my-access-key-id>
	//     accessKeySecret: <base64 of my-access-key-secret>
	//
	OSSSecret string `json:"ossSecret"`

	// Endpoint is the OSS service endpoint on alibaba cloud, defaults to
	// "http://oss-cn-hangzhou.aliyuncs.com".
	//
	// Details about regions and endpoints, see:
	//  https://www.alibabacloud.com/help/doc-detail/31837.htm
	Endpoint string `json:"endpoint,omitempty"`
}

func (*OSSRestoreSource) DeepCopy

func (in *OSSRestoreSource) DeepCopy() *OSSRestoreSource

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

func (*OSSRestoreSource) DeepCopyInto

func (in *OSSRestoreSource) DeepCopyInto(out *OSSRestoreSource)

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

type PodPolicy

type PodPolicy struct {
	// Labels specifies the labels to attach to pods the operator creates for the
	// etcd cluster.
	// "app" and "etcd_*" labels are reserved for the internal use of the etcd operator.
	// Do not overwrite them.
	Labels map[string]string `json:"labels,omitempty"`

	// NodeSelector specifies a map of key-value pairs. For the pod to be eligible
	// to run on a node, the node must have each of the indicated key-value pairs as
	// labels.
	NodeSelector map[string]string `json:"nodeSelector,omitempty"`

	// The scheduling constraints on etcd pods.
	Affinity *v1.Affinity `json:"affinity,omitempty"`
	// **DEPRECATED**. Use Affinity instead.
	AntiAffinity bool `json:"antiAffinity,omitempty"`

	// Resources is the resource requirements for the etcd container.
	// This field cannot be updated once the cluster is created.
	Resources v1.ResourceRequirements `json:"resources,omitempty"`

	// Tolerations specifies the pod's tolerations.
	Tolerations []v1.Toleration `json:"tolerations,omitempty"`

	// List of environment variables to set in the etcd container.
	// This is used to configure etcd process. etcd cluster cannot be created, when
	// bad environement variables are provided. Do not overwrite any flags used to
	// bootstrap the cluster (for example `--initial-cluster` flag).
	// This field cannot be updated.
	EtcdEnv []v1.EnvVar `json:"etcdEnv,omitempty"`

	// PersistentVolumeClaimSpec is the spec to describe PVC for the etcd container
	// This field is optional. If no PVC spec, etcd container will use emptyDir as volume
	// Note. This feature is in alpha stage. It is currently only used as non-stable storage,
	// not the stable storage. Future work need to make it used as stable storage.
	PersistentVolumeClaimSpec *v1.PersistentVolumeClaimSpec `json:"persistentVolumeClaimSpec,omitempty"`

	// Annotations specifies the annotations to attach to pods the operator creates for the
	// etcd cluster.
	// The "etcd.version" annotation is reserved for the internal use of the etcd operator.
	Annotations map[string]string `json:"annotations,omitempty"`

	// busybox init container image. default is busybox:1.28.0-glibc
	// busybox:latest uses uclibc which contains a bug that sometimes prevents name resolution
	// More info: https://github.com/docker-library/busybox/issues/27
	BusyboxImage string `json:"busyboxImage,omitempty"`

	// SecurityContext specifies the security context for the entire pod
	// More info: https://kubernetes.io/docs/tasks/configure-pod-container/security-context
	SecurityContext *v1.PodSecurityContext `json:"securityContext,omitempty"`

	// DNSTimeoutInSecond is the maximum allowed time for the init container of the etcd pod to
	// reverse DNS lookup its IP given the hostname.
	// The default is to wait indefinitely and has a vaule of 0.
	DNSTimeoutInSecond int64 `json:"DNSTimeoutInSecond,omitempty"`

	// ClusterDomain is the cluster domain to use for member URLs E.g.
	// '.cluster.local'.
	// The default is to not set a cluster domain explicitly.
	ClusterDomain string `json:"ClusterDomain"`
}

PodPolicy defines the policy to create pod for the etcd container.

func (*PodPolicy) DeepCopy

func (in *PodPolicy) DeepCopy() *PodPolicy

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

func (*PodPolicy) DeepCopyInto

func (in *PodPolicy) DeepCopyInto(out *PodPolicy)

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

type RestoreSource

type RestoreSource struct {
	// S3 tells where on S3 the backup is saved and how to fetch the backup.
	S3 *S3RestoreSource `json:"s3,omitempty"`

	// ABS tells where on ABS the backup is saved and how to fetch the backup.
	ABS *ABSRestoreSource `json:"abs,omitempty"`

	// GCS tells where on GCS the backup is saved and how to fetch the backup.
	GCS *GCSRestoreSource `json:"gcs,omitempty"`

	// OSS tells where on OSS the backup is saved and how to fetch the backup.
	OSS *OSSRestoreSource `json:"oss,omitempty"`
}

func (*RestoreSource) DeepCopy

func (in *RestoreSource) DeepCopy() *RestoreSource

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

func (*RestoreSource) DeepCopyInto

func (in *RestoreSource) DeepCopyInto(out *RestoreSource)

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

type RestoreSpec

type RestoreSpec struct {
	// BackupStorageType is the type of the backup storage which is used as RestoreSource.
	BackupStorageType BackupStorageType `json:"backupStorageType"`
	// RestoreSource tells the where to get the backup and restore from.
	RestoreSource `json:",inline"`
	// EtcdCluster references an EtcdCluster resource whose metadata and spec
	// will be used to create the new restored EtcdCluster CR.
	// This reference EtcdCluster CR and all its resources will be deleted before the
	// restored EtcdCluster CR is created.
	EtcdCluster EtcdClusterRef `json:"etcdCluster"`
}

RestoreSpec defines how to restore an etcd cluster from existing backup.

func (*RestoreSpec) DeepCopy

func (in *RestoreSpec) DeepCopy() *RestoreSpec

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

func (*RestoreSpec) DeepCopyInto

func (in *RestoreSpec) DeepCopyInto(out *RestoreSpec)

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

type RestoreStatus

type RestoreStatus struct {
	// Succeeded indicates if the backup has Succeeded.
	Succeeded bool `json:"succeeded"`
	// Reason indicates the reason for any backup related failures.
	Reason string `json:"reason,omitempty"`
}

RestoreStatus reports the status of this restore operation.

func (*RestoreStatus) DeepCopy

func (in *RestoreStatus) DeepCopy() *RestoreStatus

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

func (*RestoreStatus) DeepCopyInto

func (in *RestoreStatus) DeepCopyInto(out *RestoreStatus)

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

type S3BackupSource

type S3BackupSource struct {
	// Path is the full s3 path where the backup is saved.
	// The format of the path must be: "<s3-bucket-name>/<path-to-backup-file>"
	// e.g: "mybucket/etcd.backup"
	Path string `json:"path"`

	// The name of the secret object that stores the AWS credential and config files.
	// The file name of the credential MUST be 'credentials'.
	// The file name of the config MUST be 'config'.
	// The profile to use in both files will be 'default'.
	//
	// AWSSecret overwrites the default etcd operator wide AWS credential and config.
	AWSSecret string `json:"awsSecret"`

	// Endpoint if blank points to aws. If specified, can point to s3 compatible object
	// stores.
	Endpoint string `json:"endpoint,omitempty"`

	// ForcePathStyle forces to use path style over the default subdomain style.
	// This is useful when you have an s3 compatible endpoint that doesn't support
	// subdomain buckets.
	ForcePathStyle bool `json:"forcePathStyle"`
}

S3BackupSource provides the spec how to store backups on S3.

func (*S3BackupSource) DeepCopy

func (in *S3BackupSource) DeepCopy() *S3BackupSource

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

func (*S3BackupSource) DeepCopyInto

func (in *S3BackupSource) DeepCopyInto(out *S3BackupSource)

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

type S3RestoreSource

type S3RestoreSource struct {
	// Path is the full s3 path where the backup is saved.
	// The format of the path must be: "<s3-bucket-name>/<path-to-backup-file>"
	// e.g: "mybucket/etcd.backup"
	Path string `json:"path"`

	// The name of the secret object that stores the AWS credential and config files.
	// The file name of the credential MUST be 'credentials'.
	// The file name of the config MUST be 'config'.
	// The profile to use in both files will be 'default'.
	//
	// AWSSecret overwrites the default etcd operator wide AWS credential and config.
	AWSSecret string `json:"awsSecret"`

	// Endpoint if blank points to aws. If specified, can point to s3 compatible object
	// stores.
	Endpoint string `json:"endpoint"`

	// ForcePathStyle forces to use path style over the default subdomain style.
	// This is useful when you have an s3 compatible endpoint that doesn't support
	// subdomain buckets.
	ForcePathStyle bool `json:"forcePathStyle"`
}

func (*S3RestoreSource) DeepCopy

func (in *S3RestoreSource) DeepCopy() *S3RestoreSource

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

func (*S3RestoreSource) DeepCopyInto

func (in *S3RestoreSource) DeepCopyInto(out *S3RestoreSource)

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

type StaticTLS

type StaticTLS struct {
	// Member contains secrets containing TLS certs used by each etcd member pod.
	Member *MemberSecret `json:"member,omitempty"`
	// OperatorSecret is the secret containing TLS certs used by operator to
	// talk securely to this cluster.
	OperatorSecret string `json:"operatorSecret,omitempty"`
}

func (*StaticTLS) DeepCopy

func (in *StaticTLS) DeepCopy() *StaticTLS

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

func (*StaticTLS) DeepCopyInto

func (in *StaticTLS) DeepCopyInto(out *StaticTLS)

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

type TLSPolicy

type TLSPolicy struct {
	// StaticTLS enables user to generate static x509 certificates and keys,
	// put them into Kubernetes secrets, and specify them into here.
	Static *StaticTLS `json:"static,omitempty"`
}

TLSPolicy defines the TLS policy of an etcd cluster

func (*TLSPolicy) DeepCopy

func (in *TLSPolicy) DeepCopy() *TLSPolicy

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

func (*TLSPolicy) DeepCopyInto

func (in *TLSPolicy) DeepCopyInto(out *TLSPolicy)

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

func (*TLSPolicy) IsSecureClient

func (tp *TLSPolicy) IsSecureClient() bool

func (*TLSPolicy) IsSecurePeer

func (tp *TLSPolicy) IsSecurePeer() bool

func (*TLSPolicy) Validate

func (tp *TLSPolicy) Validate() error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL