Documentation ¶
Overview ¶
+k8s:deepcopy-gen=package,register +groupName=etcd.database.coreos.com
Index ¶
- Constants
- Variables
- func RegisterDeepCopies(scheme *runtime.Scheme) errordeprecated
- func Resource(resource string) schema.GroupResource
- type ABSSource
- type BackupCRStatus
- type BackupPolicy
- type BackupServiceStatus
- type BackupSpec
- type BackupStatus
- type BackupStorageSource
- type BackupStorageType
- type ClusterCondition
- type ClusterConditionType
- type ClusterPhase
- type ClusterSpec
- type ClusterStatus
- func (cs *ClusterStatus) ClearCondition(t ClusterConditionType)
- func (cs *ClusterStatus) Control()
- func (in *ClusterStatus) DeepCopy() *ClusterStatus
- func (in *ClusterStatus) DeepCopyInto(out *ClusterStatus)
- func (cs *ClusterStatus) IsFailed() bool
- func (cs *ClusterStatus) PauseControl()
- func (cs *ClusterStatus) SetPhase(p ClusterPhase)
- func (cs *ClusterStatus) SetReadyCondition()
- func (cs *ClusterStatus) SetReason(r string)
- func (cs *ClusterStatus) SetRecoveringCondition()
- func (cs *ClusterStatus) SetScalingDownCondition(from, to int)
- func (cs *ClusterStatus) SetScalingUpCondition(from, to int)
- func (cs *ClusterStatus) SetUpgradingCondition(to string)
- func (cs *ClusterStatus) SetVersion(v string)
- func (cs *ClusterStatus) UpgradeVersionTo(v string)
- type EtcdBackup
- type EtcdBackupList
- type EtcdCluster
- type EtcdClusterList
- type EtcdRestore
- type EtcdRestoreList
- type MemberSecret
- type MembersStatus
- type PVSource
- type PodPolicy
- type RestorePolicy
- type RestoreSpec
- type RestoreStatus
- type S3Source
- type SelfHostedPolicy
- type StaticTLS
- type StorageSource
- type TLSPolicy
Constants ¶
const ( BackupStorageTypeDefault = "" BackupStorageTypePersistentVolume = "PersistentVolume" BackupStorageTypeS3 = "S3" BackupStorageTypeABS = "ABS" AWSSecretCredentialsFileName = "credentials" AWSSecretConfigFileName = "config" // ABSStorageAccount defines the key for the Azure Storage Account value in the ABS Kubernetes secret ABSStorageAccount = "storage-account" // ABSStorageKey defines the key for the Azure Storage Key value in the ABS Kubernetes secret ABSStorageKey = "storage-key" )
const ( CRDResourceKind = "EtcdCluster" CRDResourcePlural = "etcdclusters" EtcdBackupResourceKind = "EtcdBackup" EtcdBackupResourcePlural = "etcdbackups" EtcdRestoreResourceKind = "EtcdRestore" EtcdRestoreResourcePlural = "etcdrestores" )
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" )
Variables ¶
var ( SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes) AddToScheme = SchemeBuilder.AddToScheme SchemeGroupVersion = schema.GroupVersion{Group: groupName, Version: "v1beta2"} CRDName = CRDResourcePlural + "." + groupName EtcdBackupCRDName = EtcdBackupResourcePlural + "." + groupName EtcdRestoreCRDName = EtcdRestoreResourcePlural + "." + groupName )
var ( // TODO: move validation code into separate package. ErrBackupUnsetRestoreSet = errors.New("spec: backup policy must be set if restore policy is set") )
Functions ¶
func RegisterDeepCopies
deprecated
func Resource ¶
func Resource(resource string) schema.GroupResource
Resource gets an EtcdCluster GroupResource for a specified resource
Types ¶
type ABSSource ¶
type ABSSource struct { // ABSContainer is the name of the ABS container to store backups in. ABSContainer string `json:"absContainer,omitempty"` // ABSSecret is the name of the secret object that stores the ABS credentials. // // Within the secret object, the following fields MUST be provided: // 'storage-account' holding the Azure Storage account name // 'storage-key' holding the Azure Storage account key ABSSecret string `json:"absSecret,omitempty"` }
ABSSource represents an Azure Blob Storage (ABS) backup storage source
func (*ABSSource) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ABSSource.
func (*ABSSource) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type BackupCRStatus ¶ added in v0.6.1
type BackupCRStatus 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"` }
BackupCRStatus represents the status of the EtcdBackup Custom Resource.
func (*BackupCRStatus) DeepCopy ¶ added in v0.6.1
func (in *BackupCRStatus) DeepCopy() *BackupCRStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BackupCRStatus.
func (*BackupCRStatus) DeepCopyInto ¶ added in v0.6.1
func (in *BackupCRStatus) DeepCopyInto(out *BackupCRStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type BackupPolicy ¶
type BackupPolicy struct { // Pod defines the policy to create the backup pod. Pod *PodPolicy `json:"pod,omitempty"` // StorageType specifies the type of storage device to store backup files. // If it's not set by user, the default is "PersistentVolume". StorageType BackupStorageType `json:"storageType"` StorageSource `json:",inline"` // BackupIntervalInSecond specifies the interval between two backups. // The default interval is 1800 seconds. BackupIntervalInSecond int `json:"backupIntervalInSecond"` // If greater than 0, MaxBackups is the maximum number of backup files to retain. // If equal to 0, it means unlimited backups. // Otherwise, it is invalid. MaxBackups int `json:"maxBackups"` // AutoDelete tells whether to cleanup backup data if cluster is deleted. // By default (false), operator will keep the backup data. AutoDelete bool `json:"autoDelete"` }
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.
func (*BackupPolicy) Validate ¶
func (bp *BackupPolicy) Validate() error
type BackupServiceStatus ¶
type BackupServiceStatus struct { // RecentBackup is status of the most recent backup created by // the backup service RecentBackup *BackupStatus `json:"recentBackup,omitempty"` // Backups is the totoal number of existing backups Backups int `json:"backups"` // BackupSize is the total size of existing backups in MB. BackupSize float64 `json:"backupSize"` }
func (*BackupServiceStatus) DeepCopy ¶
func (in *BackupServiceStatus) DeepCopy() *BackupServiceStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BackupServiceStatus.
func (*BackupServiceStatus) DeepCopyInto ¶
func (in *BackupServiceStatus) DeepCopyInto(out *BackupServiceStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type BackupSpec ¶ added in v0.6.1
type BackupSpec struct { // ClusterName is the etcd cluster name. ClusterName string `json:"clusterName,omitempty"` // StorageType is the etcd backup storage type. StorageType string `json:"storageType"` // BackupStorageSource is the backup storage source. BackupStorageSource `json:",inline"` }
BackupSpec contains a backup specification for an etcd cluster.
func (*BackupSpec) DeepCopy ¶ added in v0.6.1
func (in *BackupSpec) DeepCopy() *BackupSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BackupSpec.
func (*BackupSpec) DeepCopyInto ¶ added in v0.6.1
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 { // Creation time of the backup. CreationTime string `json:"creationTime"` // Size is the size of the backup in MB. Size float64 `json:"size"` // Revision is the revision of the backup. Revision int64 `json:"revision"` // Version is the version of the backup cluster. Version string `json:"version"` // TimeTookInSecond is the total time took to create the backup. TimeTookInSecond int `json:"timeTookInSecond"` }
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 BackupStorageSource ¶ added in v0.6.1
type BackupStorageSource struct {
S3 *S3Source `json:"s3,omitempty"`
}
BackupStorageSource contains the supported backup sources.
func (*BackupStorageSource) DeepCopy ¶ added in v0.6.1
func (in *BackupStorageSource) DeepCopy() *BackupStorageSource
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BackupStorageSource.
func (*BackupStorageSource) DeepCopyInto ¶ added in v0.6.1
func (in *BackupStorageSource) DeepCopyInto(out *BackupStorageSource)
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"` // BaseImage is the base etcd image name that will be used to launch // etcd clusters. This is useful for private registries, etc. // // If image is not set, default is quay.io/coreos/etcd BaseImage string `json:"baseImage"` // 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.1.8". // Only etcd released versions are supported: https://github.com/coreos/etcd/releases // // If version is not set, default is "3.1.8". 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"` // Backup defines the policy to backup data of etcd cluster if not nil. // If backup policy is set but restore policy not, and if a previous backup exists, // this cluster would face conflict and fail to start. Backup *BackupPolicy `json:"backup,omitempty"` // Restore defines the policy to restore cluster form existing backup if not nil. // It's not allowed if restore policy is set and backup policy not. // // Restore is a cluster initialization configuration. It cannot be updated. Restore *RestorePolicy `json:"restore,omitempty"` // SelfHosted determines if the etcd cluster is used for a self-hosted // Kubernetes cluster. // // SelfHosted is a cluster initialization configuration. It cannot be updated. SelfHosted *SelfHostedPolicy `json:"selfHosted,omitempty"` // etcd cluster TLS configuration TLS *TLSPolicy `json:"TLS,omitempty"` }
func (*ClusterSpec) Cleanup ¶
func (c *ClusterSpec) Cleanup()
Cleanup cleans up user passed spec, e.g. defaulting, transforming fields. TODO: move this to admission controller
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
type ClusterStatus ¶
type ClusterStatus struct { // Phase is the cluster running phase Phase ClusterPhase `json:"phase"` Reason string `json:"reason"` // ControlPuased indicates the operator pauses the control of the cluster. ControlPaused bool `json:"controlPaused"` // Condition keeps track of all cluster conditions, if they exist. Conditions []ClusterCondition `json:"conditions"` // Size is the current size of the cluster Size int `json:"size"` // 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"` // BackupServiceStatus is the status of the backup service. // BackupServiceStatus only exists when backup is enabled in the // cluster spec. BackupServiceStatus *BackupServiceStatus `json:"backupServiceStatus,omitempty"` }
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 ¶ added in v0.6.1
type EtcdBackup struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata"` Spec BackupSpec `json:"spec"` Status BackupCRStatus `json:"status,omitempty"` }
EtcdBackup represents a Kubernetes EtcdBackup Custom Resource.
func (*EtcdBackup) DeepCopy ¶ added in v0.6.1
func (in *EtcdBackup) DeepCopy() *EtcdBackup
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EtcdBackup.
func (*EtcdBackup) DeepCopyInto ¶ added in v0.6.1
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 ¶ added in v0.6.1
func (in *EtcdBackup) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type EtcdBackupList ¶ added in v0.6.1
type EtcdBackupList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata"` Items []EtcdBackup `json:"items"` }
EtcdBackupList is a list of EtcdBackup.
func (*EtcdBackupList) DeepCopy ¶ added in v0.6.1
func (in *EtcdBackupList) DeepCopy() *EtcdBackupList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EtcdBackupList.
func (*EtcdBackupList) DeepCopyInto ¶ added in v0.6.1
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 ¶ added in v0.6.1
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.
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 EtcdRestore ¶ added in v0.6.1
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.
func (*EtcdRestore) DeepCopy ¶ added in v0.6.1
func (in *EtcdRestore) DeepCopy() *EtcdRestore
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EtcdRestore.
func (*EtcdRestore) DeepCopyInto ¶ added in v0.6.1
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 ¶ added in v0.6.1
func (in *EtcdRestore) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type EtcdRestoreList ¶ added in v0.6.1
type EtcdRestoreList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata"` Items []EtcdRestore `json:"items"` }
EtcdRestoreList is a list of EtcdRestore.
func (*EtcdRestoreList) DeepCopy ¶ added in v0.6.1
func (in *EtcdRestoreList) DeepCopy() *EtcdRestoreList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EtcdRestoreList.
func (*EtcdRestoreList) DeepCopyInto ¶ added in v0.6.1
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 ¶ added in v0.6.1
func (in *EtcdRestoreList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
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 PVSource ¶
type PVSource struct { // VolumeSizeInMB specifies the required volume size. VolumeSizeInMB int `json:"volumeSizeInMB"` // StorageClass indicates what Kubernetes storage class will be used. // This enables the user to have fine-grained control over how persistent // volumes are created since it uses the existing StorageClass mechanism in // Kubernetes. StorageClass string `json:"storageClass"` }
func (*PVSource) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PVSource.
func (*PVSource) DeepCopyInto ¶
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"` // AntiAffinity determines if the etcd-operator tries to avoid putting // the etcd members in the same cluster onto the same node. 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"` // PV represents a Persistent Volume resource. // If defined new pods will use a persistent volume to store etcd data. // TODO(sgotti) unimplemented PV *PVSource `json:"pv,omitempty"` // By default, kubernetes will mount a service account token into the etcd pods. // AutomountServiceAccountToken indicates whether pods running with the service account should have an API token automatically mounted. AutomountServiceAccountToken *bool `json:"automountServiceAccountToken,omitempty"` }
PodPolicy defines the policy to create pod for the etcd container.
func (*PodPolicy) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PodPolicy.
func (*PodPolicy) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type RestorePolicy ¶
type RestorePolicy struct { // BackupClusterName is the cluster name of the backup to recover from. BackupClusterName string `json:"backupClusterName"` // StorageType specifies the type of storage device to store backup files. // If not set, the default is "PersistentVolume". StorageType BackupStorageType `json:"storageType"` }
RestorePolicy defines the policy to restore cluster form existing backup if not nil.
func (*RestorePolicy) DeepCopy ¶
func (in *RestorePolicy) DeepCopy() *RestorePolicy
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RestorePolicy.
func (*RestorePolicy) DeepCopyInto ¶
func (in *RestorePolicy) DeepCopyInto(out *RestorePolicy)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type RestoreSpec ¶ added in v0.6.1
type RestoreSpec struct { // ClusterSpec defines the same spec that etcd operator will run later. // using this spec, restore operator will create the seed etcd member that // etcd operator will pick up later. ClusterSpec ClusterSpec `json:"clusterSpec"` // BackupSpec defines the same spec that backup operator uses to save the backup. // restore operator will have the same logic as backup operator to discover // any existing backups and find the one with largest revision. BackupSpec BackupSpec `json:"backupSpec"` }
RestoreSpec defines how to restore an etcd cluster from existing backup.
func (*RestoreSpec) DeepCopy ¶ added in v0.6.1
func (in *RestoreSpec) DeepCopy() *RestoreSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RestoreSpec.
func (*RestoreSpec) DeepCopyInto ¶ added in v0.6.1
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 ¶ added in v0.6.1
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"` }
RestoreStatus reports the status of this restore operation.
func (*RestoreStatus) DeepCopy ¶ added in v0.6.1
func (in *RestoreStatus) DeepCopy() *RestoreStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RestoreStatus.
func (*RestoreStatus) DeepCopyInto ¶ added in v0.6.1
func (in *RestoreStatus) DeepCopyInto(out *RestoreStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type S3Source ¶
type S3Source struct { // The name of the AWS S3 bucket to store backups in. // // S3Bucket overwrites the default etcd operator wide bucket. S3Bucket string `json:"s3Bucket,omitempty"` // Prefix is the S3 prefix used to prefix the bucket path. // It's the prefix at the beginning. // After that, it will have version and cluster specific paths. Prefix string `json:"prefix,omitempty"` // 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,omitempty"` }
TODO: support per cluster S3 Source configuration.
func (*S3Source) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new S3Source.
func (*S3Source) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type SelfHostedPolicy ¶
type SelfHostedPolicy struct { // BootMemberClientEndpoint specifies a bootstrap member for the cluster. // If there is no bootstrap member, a completely new cluster will be created. // The boot member will be removed from the cluster once the self-hosted cluster // setup successfully. BootMemberClientEndpoint string `json:"bootMemberClientEndpoint,omitempty"` // SkipBootMemberRemoval specifies whether the removal of the bootstrap member // should be skipped. By default the operator will automatically remove the // bootstrap member from the new cluster - this happens during the pivot // procedure and is the first step of decommissioning the bootstrap member. // If unspecified, the default is `false`. If set to `true`, you are // expected to remove the boot member yourself from the etcd cluster. SkipBootMemberRemoval bool `json:"skipBootMemberRemoval,omitempty"` }
func (*SelfHostedPolicy) DeepCopy ¶
func (in *SelfHostedPolicy) DeepCopy() *SelfHostedPolicy
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SelfHostedPolicy.
func (*SelfHostedPolicy) DeepCopyInto ¶
func (in *SelfHostedPolicy) DeepCopyInto(out *SelfHostedPolicy)
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 ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StaticTLS.
func (*StaticTLS) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type StorageSource ¶
type StorageSource struct { // PV represents a Persistent Volume resource, operator will claim the // required size before creating the etcd cluster for backup purpose. // If the snapshot size is larger than the size specified operator would // kill the cluster and report failure condition in status. PV *PVSource `json:"pv,omitempty"` S3 *S3Source `json:"s3,omitempty"` // ABS represents an Azure Blob Storage resource for storing etcd backups ABS *ABSSource `json:"abs,omitempty"` }
func (*StorageSource) DeepCopy ¶
func (in *StorageSource) DeepCopy() *StorageSource
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StorageSource.
func (*StorageSource) DeepCopyInto ¶
func (in *StorageSource) DeepCopyInto(out *StorageSource)
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 ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TLSPolicy.
func (*TLSPolicy) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.