v1alpha1

package
v0.0.0-...-34c4156 Latest Latest
Warning

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

Go to latest
Published: Mar 7, 2024 License: MIT Imports: 18 Imported by: 0

Documentation

Overview

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

Index

Constants

View Source
const (
	ClusterLabel           = "cluster.operator.etcd.io"
	CleanupSecretFinalizer = "cleanup-secret.operator.etcd.io"
)

Variables

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

Functions

func AdvertiseClientURL

func AdvertiseClientURL(name, namespace, service string) string

func AdvertisePeerURL

func AdvertisePeerURL(name, namespace, service string) string

func MemberFQDN

func MemberFQDN(name, namespace, service string) string

Types

type Backup

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

	Spec   BackupSpec   `json:"spec,omitempty"`
	Status BackupStatus `json:"status,omitempty"`
}

Backup is the Schema for the backups API

func (*Backup) DeepCopy

func (in *Backup) DeepCopy() *Backup

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

func (*Backup) DeepCopyInto

func (in *Backup) DeepCopyInto(out *Backup)

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

func (*Backup) DeepCopyObject

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

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

func (Backup) Prettify

func (in Backup) Prettify() interface{}

type BackupList

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

BackupList contains a list of Backup

func (*BackupList) DeepCopy

func (in *BackupList) DeepCopy() *BackupList

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

func (*BackupList) DeepCopyInto

func (in *BackupList) DeepCopyInto(out *BackupList)

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

func (*BackupList) DeepCopyObject

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

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

func (BackupList) Header

func (in BackupList) Header() table.Row

func (BackupList) Prettify

func (in BackupList) Prettify() interface{}

func (BackupList) Rows

func (in BackupList) Rows() []table.Row

type BackupSchedule

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

	Spec   BackupScheduleSpec   `json:"spec,omitempty"`
	Status BackupScheduleStatus `json:"status,omitempty"`
}

BackupSchedule is the Schema for the backupschedules API

func (*BackupSchedule) DeepCopy

func (in *BackupSchedule) DeepCopy() *BackupSchedule

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

func (*BackupSchedule) DeepCopyInto

func (in *BackupSchedule) DeepCopyInto(out *BackupSchedule)

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

func (*BackupSchedule) DeepCopyObject

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

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

func (*BackupSchedule) GetBackup

func (in *BackupSchedule) GetBackup() *Backup

type BackupScheduleList

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

BackupScheduleList contains a list of BackupSchedule

func (*BackupScheduleList) DeepCopy

func (in *BackupScheduleList) DeepCopy() *BackupScheduleList

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

func (*BackupScheduleList) DeepCopyInto

func (in *BackupScheduleList) DeepCopyInto(out *BackupScheduleList)

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

func (*BackupScheduleList) DeepCopyObject

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

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

type BackupScheduleSpec

type BackupScheduleSpec struct {
	CreationPeriod  time.Duration `json:"creationPeriod,omitempty"`
	RetentionPeriod time.Duration `json:"retentionPeriod,omitempty"`
}

BackupScheduleSpec defines the desired state of BackupSchedule

func (*BackupScheduleSpec) DeepCopy

func (in *BackupScheduleSpec) DeepCopy() *BackupScheduleSpec

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

func (*BackupScheduleSpec) DeepCopyInto

func (in *BackupScheduleSpec) DeepCopyInto(out *BackupScheduleSpec)

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

type BackupScheduleStatus

type BackupScheduleStatus struct {
}

BackupScheduleStatus defines the observed state of BackupSchedule

func (*BackupScheduleStatus) DeepCopy

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

func (*BackupScheduleStatus) DeepCopyInto

func (in *BackupScheduleStatus) DeepCopyInto(out *BackupScheduleStatus)

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

type BackupSpec

type BackupSpec struct {
	RetentionPeriod time.Duration `json:"retentionPeriod,omitempty"`
}

BackupSpec defines the desired state of Backup

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 {
	Finished metav1.Time `json:"finishedTime,omitempty"`
	URL      string      `json:"url,omitempty"`
}

BackupStatus defines the observed state of Backup

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 Cluster

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

	Spec   ClusterSpec   `json:"spec,omitempty"`
	Status ClusterStatus `json:"status,omitempty"`
}

Cluster is the Schema for the clusters API

func (*Cluster) DeepCopy

func (in *Cluster) DeepCopy() *Cluster

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

func (*Cluster) DeepCopyInto

func (in *Cluster) DeepCopyInto(out *Cluster)

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

func (*Cluster) DeepCopyObject

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

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

func (*Cluster) GetBackupSchedule

func (in *Cluster) GetBackupSchedule() *BackupSchedule

func (*Cluster) GetCACertificate

func (in *Cluster) GetCACertificate(clusterIssuer string) *certv1.Certificate

func (*Cluster) GetCAIssuer

func (in *Cluster) GetCAIssuer() *certv1.Issuer

func (*Cluster) GetCASecretName

func (in *Cluster) GetCASecretName() string

func (*Cluster) GetCommonName

func (in *Cluster) GetCommonName() string

func (Cluster) GetEndpoints

func (in Cluster) GetEndpoints() []string

func (*Cluster) GetMember

func (in *Cluster) GetMember(num int) *Member

func (*Cluster) GetMemberName

func (in *Cluster) GetMemberName(num int) string

func (*Cluster) GetService

func (in *Cluster) GetService() *corev1.Service

func (Cluster) Prettify

func (in Cluster) Prettify() interface{}

func (*Cluster) SetupWebhookWithManager

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

func (*Cluster) ShouldUpdate

func (in *Cluster) ShouldUpdate() bool

func (*Cluster) ValidateCreate

func (r *Cluster) ValidateCreate() error

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

func (*Cluster) ValidateDelete

func (r *Cluster) ValidateDelete() error

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

func (*Cluster) ValidateUpdate

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

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

type ClusterList

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

ClusterList contains a list of Cluster

func (*ClusterList) DeepCopy

func (in *ClusterList) DeepCopy() *ClusterList

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

func (*ClusterList) DeepCopyInto

func (in *ClusterList) DeepCopyInto(out *ClusterList)

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

func (*ClusterList) DeepCopyObject

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

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

func (ClusterList) Header

func (in ClusterList) Header() table.Row

func (ClusterList) Prettify

func (in ClusterList) Prettify() interface{}

func (ClusterList) Rows

func (in ClusterList) Rows() []table.Row

type ClusterPhase

type ClusterPhase string
var (
	ClusterCreating     ClusterPhase = "Creating"
	ClusterRunning      ClusterPhase = "Running"
	ClusterUpdating     ClusterPhase = "Updating"
	ClusterMinorFailure ClusterPhase = "MinorFailure"
	ClusterFailed       ClusterPhase = "Failed"
)

type ClusterSpec

type ClusterSpec struct {
	Version               string        `json:"version,omitempty"`
	Size                  int           `json:"size,omitempty"`
	Backup                string        `json:"backup,omitempty"`
	BackupCreationPeriod  time.Duration `json:"backupCreationPeriod,omitempty"`
	BackupRetentionPeriod time.Duration `json:"backupRetentionPeriod,omitempty"`
}

ClusterSpec defines the desired state of etcd cluster

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.

type ClusterStatus

type ClusterStatus struct {
	Phase              ClusterPhase `json:"phase,omitempty" yaml:"phase,omitempty"`
	Version            string       `json:"version,omitempty" yaml:"version,omitempty"`
	CertificateExpires bool         `json:"certificateExpires,omitempty" yaml:"certificateExpires,omitempty"`
}

ClusterStatus defines the observed state of etcd cluster

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.

type Member

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

	Spec   MemberSpec   `json:"spec,omitempty"`
	Status MemberStatus `json:"status,omitempty"`
}

Member is the Schema for the members API

func (*Member) DeepCopy

func (in *Member) DeepCopy() *Member

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

func (*Member) DeepCopyInto

func (in *Member) DeepCopyInto(out *Member)

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

func (*Member) DeepCopyObject

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

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

func (Member) GetAdvertiseClientURL

func (in Member) GetAdvertiseClientURL() string

func (Member) GetAdvertisePeerURL

func (in Member) GetAdvertisePeerURL() string

func (Member) GetCertificate

func (in Member) GetCertificate(suffix string) *certv1.Certificate

func (Member) GetCertificateName

func (in Member) GetCertificateName(suffix string) string

func (Member) GetClientCertPath

func (in Member) GetClientCertPath() string

func (Member) GetClientCertSecret

func (in Member) GetClientCertSecret() string

func (Member) GetClientCertVolumeName

func (in Member) GetClientCertVolumeName() string

func (Member) GetCluster

func (in Member) GetCluster() string

func (Member) GetContainers

func (in Member) GetContainers() []corev1.Container

func (Member) GetDataPath

func (in Member) GetDataPath() string

func (Member) GetDataVolumeName

func (in Member) GetDataVolumeName() string

func (Member) GetEndpoints

func (in Member) GetEndpoints() []string

func (Member) GetFQDN

func (in Member) GetFQDN() string

func (Member) GetImage

func (in Member) GetImage() string

func (Member) GetInitContainers

func (in Member) GetInitContainers() []corev1.Container

func (Member) GetPVC

func (in Member) GetPVC() *corev1.PersistentVolumeClaim

func (Member) GetPeerCertPath

func (in Member) GetPeerCertPath() string

func (Member) GetPeerCertSecret

func (in Member) GetPeerCertSecret() string

func (Member) GetPeerCertVolumeName

func (in Member) GetPeerCertVolumeName() string

func (Member) GetPod

func (in Member) GetPod() *corev1.Pod

func (Member) GetProbe

func (in Member) GetProbe() *corev1.Probe

func (Member) GetState

func (in Member) GetState() string

func (Member) IsCreating

func (in Member) IsCreating() bool

func (*Member) SetFailed

func (in *Member) SetFailed()

func (Member) ShouldUpdate

func (in Member) ShouldUpdate() bool

type MemberList

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

MemberList contains a list of Member

func (*MemberList) DeepCopy

func (in *MemberList) DeepCopy() *MemberList

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

func (*MemberList) DeepCopyInto

func (in *MemberList) DeepCopyInto(out *MemberList)

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

func (*MemberList) DeepCopyObject

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

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

type MemberPhase

type MemberPhase string

MemberPhase defines status of specific etcd cluster member

var (
	MemberCreating   MemberPhase = "Creating"
	MemberRecreating MemberPhase = "Recreating"
	MemberRunning    MemberPhase = "Running"
	MemberUpdating   MemberPhase = "Updating"
	MemberFailed     MemberPhase = "Failed"
)

type MemberSpec

type MemberSpec struct {
	Version           string   `json:"version,omitempty"`
	Backup            string   `json:"backup,omitempty"`
	ClusterName       string   `json:"clusterName,omitempty"`
	ClusterToken      string   `json:"clusterToken,omitempty"`
	Members           []string `json:"members,omitempty"`
	Broken            bool     `json:"broken,omitempty"`
	CertificateUpdate bool     `json:"certificateUpdate,omitempty"`
}

MemberSpec defines the desired state of an etcd cluster member

func (*MemberSpec) DeepCopy

func (in *MemberSpec) DeepCopy() *MemberSpec

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

func (*MemberSpec) DeepCopyInto

func (in *MemberSpec) DeepCopyInto(out *MemberSpec)

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

type MemberStatus

type MemberStatus struct {
	Version            string      `json:"version,omitempty"`
	Phase              MemberPhase `json:"phase,omitempty"`
	FailedTime         metav1.Time `json:"failedTime,omitempty"`
	CertificateExpires bool        `json:"certificateExpires,omitempty"`
}

MemberStatus defines the observed state of an etcd cluster member

func (*MemberStatus) DeepCopy

func (in *MemberStatus) DeepCopy() *MemberStatus

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

func (*MemberStatus) DeepCopyInto

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

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

type PrettyBackup

type PrettyBackup struct {
	Name            string `json:"name,omitempty" yaml:"name,omitempty"`
	Namespace       string `json:"namespace,omitempty" yaml:"namespace,omitempty"`
	Cluster         string `json:"cluster,omitempty" yaml:"cluster,omitempty"`
	RetentionPeriod string `json:"retentionPeriod,omitempty" yaml:"retentionPeriod,omitempty"`
	Finished        string `json:"finished,omitempty" yaml:"finished,omitempty"`
	URL             string `json:"url,omitempty" yaml:"url,omitempty"`
}

func (*PrettyBackup) DeepCopy

func (in *PrettyBackup) DeepCopy() *PrettyBackup

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

func (*PrettyBackup) DeepCopyInto

func (in *PrettyBackup) DeepCopyInto(out *PrettyBackup)

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

type PrettyCluster

type PrettyCluster struct {
	Name      string            `json:"name,omitempty" yaml:"name,omitempty"`
	Namespace string            `json:"namespace,omitempty" yaml:"namespace,omitempty"`
	Spec      PrettyClusterSpec `json:"spec,omitempty" yaml:"spec,omitempty"`
	Status    ClusterStatus     `json:"status,omitempty" yaml:"status,omitempty"`
}

func (*PrettyCluster) DeepCopy

func (in *PrettyCluster) DeepCopy() *PrettyCluster

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

func (*PrettyCluster) DeepCopyInto

func (in *PrettyCluster) DeepCopyInto(out *PrettyCluster)

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

type PrettyClusterSpec

type PrettyClusterSpec struct {
	Size                  int    `json:"size,omitempty" yaml:"size,omitempty"`
	Version               string `json:"version,omitempty" yaml:"version,omitempty"`
	Backup                string `json:"backup,omitempty" yaml:"backup,omitempty"`
	BackupCreationPeriod  string `json:"backupCreationPeriod,omitempty" yaml:"backupCreationPeriod,omitempty"`
	BackupRetentionPeriod string `json:"backupRetentionPeriod,omitempty" yaml:"backupRetentionPeriod,omitempty"`
}

func (*PrettyClusterSpec) DeepCopy

func (in *PrettyClusterSpec) DeepCopy() *PrettyClusterSpec

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

func (*PrettyClusterSpec) DeepCopyInto

func (in *PrettyClusterSpec) DeepCopyInto(out *PrettyClusterSpec)

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