Documentation ¶
Index ¶
- Constants
- Variables
- func AddRecoveryToPod(pod *v1.Pod, clusterName, name, token string, cs spec.ClusterSpec)
- func ClusterListOpt(clusterName string) api.ListOptions
- func CopyVolume(kubecli kubernetes.Interface, fromClusterName, toClusterName, ns string) error
- func CreateAndWaitPVC(kubecli kubernetes.Interface, clusterName, ns, pvProvisioner string, ...) error
- func CreateAndWaitPod(kubecli kubernetes.Interface, ns string, pod *v1.Pod, timeout time.Duration) (*v1.Pod, error)
- func CreateEtcdService(kubecli kubernetes.Interface, clusterName, ns string, ...) (*v1.Service, error)
- func CreateMemberService(kubecli kubernetes.Interface, ns string, svc *v1.Service) (*v1.Service, error)
- func CreateStorageClass(kubecli kubernetes.Interface, pvProvisioner string) error
- func DeletePVC(kubecli kubernetes.Interface, clusterName, ns string) error
- func GetClusterList(restcli *rest.RESTClient, ns string) (*spec.EtcdClusterList, error)
- func GetClusterTPRObject(restcli *rest.RESTClient, ns, name string) (*spec.EtcdCluster, error)
- func GetEtcdVersion(pod *v1.Pod) string
- func GetNodePortString(srv *v1.Service) string
- func GetPodNames(pods []*v1.Pod) []string
- func IsKubernetesResourceAlreadyExistError(err error) bool
- func IsKubernetesResourceNotFoundError(err error) bool
- func MakeBackupHostPort(clusterName string) string
- func MakeBackupName(clusterName string) string
- func MakeBackupPodSpec(clusterName string, policy *spec.BackupPolicy) (*v1.PodSpec, error)
- func MakeEtcdImage(version string) string
- func MakeEtcdPod(m *etcdutil.Member, initialCluster []string, clusterName, state, token string, ...) *v1.Pod
- func MakeSelfHostedEtcdPod(name string, initialCluster []string, clusterName, state, token string, ...) *v1.Pod
- func MustCreateClient(host string, tlsInsecure bool, tlsConfig *rest.TLSClientConfig) kubernetes.Interface
- func MustGetInClusterMasterHost() string
- func NewBackupReplicaSetManifest(clusterName string, ps v1.PodSpec, owner metatypes.OwnerReference) *v1beta1extensions.ReplicaSet
- func NewBackupServiceManifest(clusterName string, owner metatypes.OwnerReference) *v1.Service
- func NewMemberServiceManifest(etcdName, clusterName string, owner metatypes.OwnerReference) *v1.Service
- func PodSpecWithPV(ps *v1.PodSpec, clusterName string) *v1.PodSpec
- func PodSpecWithS3(ps *v1.PodSpec, s3Ctx s3config.S3Context) *v1.PodSpec
- func PodWithAddMemberInitContainer(p *v1.Pod, endpoints []string, name string, peerURLs []string, ...) *v1.Pod
- func PodWithAntiAffinity(pod *v1.Pod, clusterName string) *v1.Pod
- func PodWithNodeSelector(p *v1.Pod, ns map[string]string) *v1.Pod
- func SetEtcdVersion(pod *v1.Pod, version string)
- func UpdateClusterTPRObject(restcli *rest.RESTClient, ns string, e *spec.EtcdCluster) (*spec.EtcdCluster, error)
- func UpdateClusterTPRObjectUnconditionally(restcli *rest.RESTClient, ns string, e *spec.EtcdCluster) (*spec.EtcdCluster, error)
- func WaitEtcdTPRReady(restcli *rest.RESTClient, interval, timeout time.Duration, ns string) error
- func WatchClusters(host, ns string, httpClient *http.Client, resourceVersion string) (*http.Response, error)
Constants ¶
View Source
const ( BackupPodSelectorAppField = "etcd_backup_tool" PVBackupV1 = "v1" // TODO: refactor and combine this with pkg/backup.PVBackupV1 )
Variables ¶
View Source
var BackupImage = "quay.io/coreos/etcd-operator:latest"
Functions ¶
func AddRecoveryToPod ¶
func AddRecoveryToPod(pod *v1.Pod, clusterName, name, token string, cs spec.ClusterSpec)
func ClusterListOpt ¶ added in v0.2.0
func ClusterListOpt(clusterName string) api.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, pvProvisioner 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 CreateEtcdService ¶
func CreateEtcdService(kubecli kubernetes.Interface, clusterName, ns string, owner metatypes.OwnerReference) (*v1.Service, error)
func CreateMemberService ¶ added in v0.2.0
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 GetClusterList(restcli *rest.RESTClient, ns string) (*spec.EtcdClusterList, error)
func GetClusterTPRObject ¶ added in v0.2.0
func GetClusterTPRObject(restcli *rest.RESTClient, ns, name string) (*spec.EtcdCluster, error)
func GetEtcdVersion ¶
func GetNodePortString ¶
func GetPodNames ¶
func MakeBackupHostPort ¶
func MakeBackupName ¶
func MakeBackupPodSpec ¶ added in v0.2.0
func MakeEtcdImage ¶
func MakeEtcdPod ¶
func MakeEtcdPod(m *etcdutil.Member, initialCluster []string, clusterName, state, token string, cs spec.ClusterSpec, owner metatypes.OwnerReference) *v1.Pod
func MakeSelfHostedEtcdPod ¶ added in v0.2.0
func MakeSelfHostedEtcdPod(name string, initialCluster []string, clusterName, state, token string, cs spec.ClusterSpec, owner metatypes.OwnerReference) *v1.Pod
func MustCreateClient ¶
func MustCreateClient(host string, tlsInsecure bool, tlsConfig *rest.TLSClientConfig) kubernetes.Interface
tlsConfig isn't modified inside this function. The reason it's a pointer is that it's not necessary to have tlsconfig to create a client.
func MustGetInClusterMasterHost ¶
func MustGetInClusterMasterHost() string
func NewBackupReplicaSetManifest ¶ added in v0.2.0
func NewBackupReplicaSetManifest(clusterName string, ps v1.PodSpec, owner metatypes.OwnerReference) *v1beta1extensions.ReplicaSet
func NewBackupServiceManifest ¶ added in v0.2.0
func NewBackupServiceManifest(clusterName string, owner metatypes.OwnerReference) *v1.Service
func NewMemberServiceManifest ¶ added in v0.2.0
func NewMemberServiceManifest(etcdName, clusterName string, owner metatypes.OwnerReference) *v1.Service
TODO: converge the port logic with member ClientAddr() and PeerAddr()
func PodSpecWithPV ¶ added in v0.2.0
func PodSpecWithS3 ¶ added in v0.2.0
func PodWithAntiAffinity ¶ added in v0.2.0
func SetEtcdVersion ¶
func UpdateClusterTPRObject ¶ added in v0.2.0
func UpdateClusterTPRObject(restcli *rest.RESTClient, ns string, e *spec.EtcdCluster) (*spec.EtcdCluster, error)
UpdateClusterTPRObject updates the given TPR object. ResourceVersion of the object MUST be set or update will fail.
func UpdateClusterTPRObjectUnconditionally ¶ added in v0.2.0
func UpdateClusterTPRObjectUnconditionally(restcli *rest.RESTClient, ns string, e *spec.EtcdCluster) (*spec.EtcdCluster, error)
UpdateClusterTPRObjectUnconditionally updates the given TPR object. This should only be used in tests.
func WaitEtcdTPRReady ¶
Types ¶
This section is empty.
Directories ¶
Path | Synopsis |
---|---|
Package election implements leader election of a set of endpoints.
|
Package election implements leader election of a set of endpoints. |
Click to show internal directories.
Click to hide internal directories.