k8sutil

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Nov 2, 2016 License: Apache-2.0 Imports: 23 Imported by: 0

Documentation

Index

Constants

View Source
const (
	BackupPodSelectorAppField = "etcd_backup_tool"
)

Variables

View Source
var BackupImage = "quay.io/coreos/etcd-operator:latest"

Functions

func AddRecoveryToPod

func AddRecoveryToPod(pod *api.Pod, clusterName, name, token string, cs *spec.ClusterSpec)

func CreateAndWaitPod

func CreateAndWaitPod(kclient *unversioned.Client, ns string, pod *api.Pod, timeout time.Duration) error

func CreateBackupReplicaSetAndService

func CreateBackupReplicaSetAndService(kubecli *unversioned.Client, clusterName, ns string, policy spec.BackupPolicy) error

func CreateEtcdNodePortService

func CreateEtcdNodePortService(kclient *unversioned.Client, etcdName, clusterName, ns string) (*api.Service, error)

func CreateEtcdService

func CreateEtcdService(kclient *unversioned.Client, etcdName, clusterName, ns string) (*api.Service, error)

func CreateStorageClass

func CreateStorageClass(kubecli *unversioned.Client, pvProvisioner string) error

func DeleteBackupReplicaSetAndService

func DeleteBackupReplicaSetAndService(kubecli *unversioned.Client, clusterName, ns string, cleanup bool) error

func EtcdPodListOpt

func EtcdPodListOpt(clusterName string) api.ListOptions

func GetEtcdVersion

func GetEtcdVersion(pod *api.Pod) string

func GetNodePortString

func GetNodePortString(srv *api.Service) string

func GetPodNames

func GetPodNames(pods []*api.Pod) []string

func IsKubernetesResourceAlreadyExistError

func IsKubernetesResourceAlreadyExistError(err error) bool

func IsKubernetesResourceNotFoundError

func IsKubernetesResourceNotFoundError(err error) bool

func ListETCDCluster

func ListETCDCluster(host, ns string, httpClient *http.Client) (*http.Response, error)

func MakeBackupHostPort

func MakeBackupHostPort(clusterName string) string

func MakeBackupName

func MakeBackupName(clusterName string) string

func MakeEtcdImage

func MakeEtcdImage(version string) string

func MakeEtcdPod

func MakeEtcdPod(m *etcdutil.Member, initialCluster []string, clusterName, state, token string, cs *spec.ClusterSpec) *api.Pod

func MustCreateClient

func MustCreateClient(host string, tlsInsecure bool, tlsConfig *restclient.TLSClientConfig) *unversioned.Client

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 PodWithAddMemberInitContainer

func PodWithAddMemberInitContainer(p *api.Pod, name string, peerURLs []string, cs *spec.ClusterSpec) *api.Pod

func PodWithNodeSelector

func PodWithNodeSelector(p *api.Pod, ns map[string]string) *api.Pod

func SetEtcdVersion

func SetEtcdVersion(pod *api.Pod, version string)

func WaitEtcdTPRReady

func WaitEtcdTPRReady(httpClient *http.Client, interval, timeout time.Duration, host, ns string) error

func WatchETCDCluster

func WatchETCDCluster(host, ns string, httpClient *http.Client, resourceVersion string) (*http.Response, error)

Types

This section is empty.

Jump to

Keyboard shortcuts

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