Documentation ¶
Index ¶
- Constants
- Variables
- func AddRecoveryToPod(pod *v1.Pod, clusterName, token string, m *etcdutil.Member, cs api.ClusterSpec)
- func AttachABSToPodSpec(ps *v1.PodSpec, ws api.ABSSource)
- func AttachS3ToPodSpec(ps *v1.PodSpec, ss api.S3Source)
- func BackupServiceAddr(clusterName string) string
- func BackupSidecarLabels(clusterName string) map[string]string
- func BackupSidecarName(clusterName string) string
- func CascadeDeleteOptions(gracePeriodSeconds int64) *metav1.DeleteOptions
- func ClientServiceName(clusterName string) string
- func ClusterListOpt(clusterName string) metav1.ListOptions
- func CopyVolume(kubecli kubernetes.Interface, fromClusterName, toClusterName, ns string) error
- func CreateAndWaitPVC(kubecli kubernetes.Interface, clusterName, ns, storageClass string, ...) error
- func CreateAndWaitPod(kubecli kubernetes.Interface, ns string, pod *v1.Pod, timeout time.Duration) (*v1.Pod, error)
- func CreateCRD(clientset apiextensionsclient.Interface) error
- func CreateClientService(kubecli kubernetes.Interface, clusterName, ns string, ...) error
- func CreatePatch(o, n, datastruct interface{}) ([]byte, error)
- func CreatePeerService(kubecli kubernetes.Interface, clusterName, ns string, ...) error
- func CreateStorageClass(kubecli kubernetes.Interface, pvProvisioner string) error
- func DeletePVC(kubecli kubernetes.Interface, clusterName, ns string) error
- func GetClusterList(restcli rest.Interface, ns string) (*api.EtcdClusterList, error)
- func GetEtcdVersion(pod *v1.Pod) string
- func GetPodNames(pods []*v1.Pod) []string
- func ImageName(baseImage, version string) string
- func InClusterConfig() (*rest.Config, error)
- func IsKubernetesResourceAlreadyExistError(err error) bool
- func IsKubernetesResourceNotFoundError(err error) bool
- func IsNodeReady(n v1.Node) bool
- func IsPodReady(pod *v1.Pod) bool
- func LabelsForCluster(clusterName string) map[string]string
- func MemberRemoveEvent(memberName string, cl *api.EtcdCluster) *v1.Event
- func MemberUpgradedEvent(memberName, oldVersion, newVersion string, cl *api.EtcdCluster) *v1.Event
- func MustNewKubeClient() kubernetes.Interface
- func MustNewKubeExtClient() apiextensionsclient.Interface
- func NewBackupDeploymentManifest(name string, dplSel map[string]string, pl v1.PodTemplateSpec, ...) *appsv1beta1.Deployment
- func NewBackupPodTemplate(clusterName, account string, sp api.ClusterSpec) v1.PodTemplateSpec
- func NewBackupServiceManifest(clusterName string, owner metav1.OwnerReference) *v1.Service
- func NewEtcdPod(m *etcdutil.Member, initialCluster []string, clusterName, state, token string, ...) *v1.Pod
- func NewMemberAddEvent(memberName string, cl *api.EtcdCluster) *v1.Event
- func NewSelfHostedEtcdPod(m *etcdutil.Member, initialCluster, endpoints []string, ...) *v1.Pod
- func PatchDeployment(kubecli kubernetes.Interface, namespace, name string, ...) error
- func PodSpecToPrettyJSON(pod *v1.Pod) (string, error)
- func PodSpecWithPV(ps *v1.PodSpec, clusterName string)
- func PodWithAntiAffinity(pod *v1.Pod, clusterName string) *v1.Pod
- func PodWithNodeSelector(p *v1.Pod, ns map[string]string) *v1.Pod
- func ReplacingDeadMemberEvent(memberName string, cl *api.EtcdCluster) *v1.Event
- func SetEtcdVersion(pod *v1.Pod, version string)
- func WaitCRDReady(clientset apiextensionsclient.Interface) error
- type EtcdClusterCRUpdateFunc
- type TLSData
Constants ¶
View Source
const ( // StorageClassPrefix is the prefix used when creating custom storage classes // for backups through a given provisioner. StorageClassPrefix = "etcd-backup" BackupPodSelectorAppField = "etcd_backup_tool" PVBackupV1 = "v1" // TODO: refactor and combine this with pkg/backup.PVBackupV1 )
View Source
const TolerateUnreadyEndpointsAnnotation = "service.alpha.kubernetes.io/tolerate-unready-endpoints"
Variables ¶
View Source
var BackupImage = "quay.io/coreos/etcd-operator:latest"
Functions ¶
func AddRecoveryToPod ¶
func AttachABSToPodSpec ¶ added in v0.5.2
AttachABSToPodSpec attaches ABS credentials to a Pod
func BackupServiceAddr ¶ added in v0.2.1
func BackupSidecarLabels ¶ added in v0.2.6
func BackupSidecarName ¶ added in v0.2.6
func CascadeDeleteOptions ¶ added in v0.3.1
func CascadeDeleteOptions(gracePeriodSeconds int64) *metav1.DeleteOptions
func ClientServiceName ¶ added in v0.2.5
func ClusterListOpt ¶ added in v0.2.0
func ClusterListOpt(clusterName string) metav1.ListOptions
We are using internal api types for cluster related.
func CopyVolume ¶ added in v0.2.0
func CopyVolume(kubecli kubernetes.Interface, fromClusterName, toClusterName, ns string) error
func CreateAndWaitPVC ¶ added in v0.2.0
func CreateAndWaitPVC(kubecli kubernetes.Interface, clusterName, ns, storageClass string, volumeSizeInMB int) error
func CreateAndWaitPod ¶
func CreateAndWaitPod(kubecli kubernetes.Interface, ns string, pod *v1.Pod, timeout time.Duration) (*v1.Pod, error)
CreateAndWaitPod is a workaround for self hosted and util for testing. We should eventually get rid of this in critical code path and move it to test util.
func CreateCRD ¶ added in v0.5.0
func CreateCRD(clientset apiextensionsclient.Interface) error
func CreateClientService ¶ added in v0.2.5
func CreateClientService(kubecli kubernetes.Interface, clusterName, ns string, owner metav1.OwnerReference) error
func CreatePatch ¶ added in v0.2.5
func CreatePeerService ¶ added in v0.2.5
func CreatePeerService(kubecli kubernetes.Interface, clusterName, ns string, owner metav1.OwnerReference) error
func CreateStorageClass ¶
func CreateStorageClass(kubecli kubernetes.Interface, pvProvisioner string) error
func DeletePVC ¶ added in v0.2.0
func DeletePVC(kubecli kubernetes.Interface, clusterName, ns string) error
func GetClusterList ¶ added in v0.2.0
func GetEtcdVersion ¶
func GetPodNames ¶
func InClusterConfig ¶ added in v0.2.2
func IsNodeReady ¶ added in v0.5.0
IsNodeReady checks if the Node condition is ready.
func IsPodReady ¶ added in v0.3.3
IsPodReady returns false if the Pod Status is nil
func LabelsForCluster ¶ added in v0.2.6
func MemberRemoveEvent ¶ added in v0.6.0
func MemberRemoveEvent(memberName string, cl *api.EtcdCluster) *v1.Event
func MemberUpgradedEvent ¶ added in v0.6.0
func MemberUpgradedEvent(memberName, oldVersion, newVersion string, cl *api.EtcdCluster) *v1.Event
func MustNewKubeClient ¶ added in v0.2.1
func MustNewKubeClient() kubernetes.Interface
func MustNewKubeExtClient ¶ added in v0.5.0
func MustNewKubeExtClient() apiextensionsclient.Interface
func NewBackupDeploymentManifest ¶ added in v0.2.6
func NewBackupDeploymentManifest(name string, dplSel map[string]string, pl v1.PodTemplateSpec, owner metav1.OwnerReference) *appsv1beta1.Deployment
func NewBackupPodTemplate ¶ added in v0.2.6
func NewBackupPodTemplate(clusterName, account string, sp api.ClusterSpec) v1.PodTemplateSpec
func NewBackupServiceManifest ¶ added in v0.2.0
func NewBackupServiceManifest(clusterName string, owner metav1.OwnerReference) *v1.Service
func NewEtcdPod ¶ added in v0.2.1
func NewEtcdPod(m *etcdutil.Member, initialCluster []string, clusterName, state, token string, cs api.ClusterSpec, owner metav1.OwnerReference) *v1.Pod
func NewMemberAddEvent ¶ added in v0.6.0
func NewMemberAddEvent(memberName string, cl *api.EtcdCluster) *v1.Event
func NewSelfHostedEtcdPod ¶ added in v0.2.1
func NewSelfHostedEtcdPod(m *etcdutil.Member, initialCluster, endpoints []string, clusterName, state, token string, cs api.ClusterSpec, owner metav1.OwnerReference) *v1.Pod
func PatchDeployment ¶ added in v0.3.0
func PatchDeployment(kubecli kubernetes.Interface, namespace, name string, updateFunc func(*appsv1beta1.Deployment)) error
func PodSpecWithPV ¶ added in v0.2.0
func PodWithAntiAffinity ¶ added in v0.2.0
func ReplacingDeadMemberEvent ¶ added in v0.6.0
func ReplacingDeadMemberEvent(memberName string, cl *api.EtcdCluster) *v1.Event
func SetEtcdVersion ¶
func WaitCRDReady ¶ added in v0.5.0
func WaitCRDReady(clientset apiextensionsclient.Interface) error
Types ¶
type EtcdClusterCRUpdateFunc ¶ added in v0.5.0
type EtcdClusterCRUpdateFunc func(*api.EtcdCluster)
EtcdClusterCRUpdateFunc is a function to be used when atomically updating a Cluster CR.
Click to show internal directories.
Click to hide internal directories.