Documentation ¶
Index ¶
- Constants
- func AddZookeeperVolumeToPod(pod *v1.Pod, pvc *v1.PersistentVolumeClaim)
- func CascadeDeleteOptions(gracePeriodSeconds int64) *metav1.DeleteOptions
- func ClientServiceName(clusterName string) string
- func ClusterListOpt(clusterName string) metav1.ListOptions
- 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 GetClusterList(restcli rest.Interface, ns string) (*api.ZookeeperClusterList, error)
- func GetPodNames(pods []*v1.Pod) []string
- func GetZookeeperVersion(pod *v1.Pod) string
- func ImageName(repo, 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.ZookeeperCluster) *v1.Event
- func MemberUpgradedEvent(memberName, oldVersion, newVersion string, cl *api.ZookeeperCluster) *v1.Event
- func MustNewKubeClient() kubernetes.Interface
- func MustNewKubeExtClient() apiextensionsclient.Interface
- func NewMemberAddEvent(memberName string, cl *api.ZookeeperCluster) *v1.Event
- func NewZookeeperPod(m *zookeeperutil.Member, existingCluster []string, clusterName, state string, ...) *v1.Pod
- func PVCNameFromMember(memberName string) string
- func PatchDeployment(kubecli kubernetes.Interface, namespace, name string, ...) error
- func PodSpecToPrettyJSON(pod *v1.Pod) (string, error)
- func PodWithNodeSelector(p *v1.Pod, ns map[string]string) *v1.Pod
- func ReplacingDeadMemberEvent(memberName string, cl *api.ZookeeperCluster) *v1.Event
- func SetZookeeperVersion(pod *v1.Pod, version string)
- func UniqueMemberName(clusterName string) string
- func WaitCRDReady(clientset apiextensionsclient.Interface, crdName string) error
- type ZookeeperClusterCRUpdateFunc
Constants ¶
View Source
const ( // ZookeeperClientPort is the client port on client service and zookeeper nodes. ZookeeperClientPort = 2181 // AnnotationScope annotation name for defining instance scope. Used for specifing cluster wide clusters. AnnotationScope = "zookeeper.database.apache.com/scope" //AnnotationClusterWide annotation value for cluster wide clusters. AnnotationClusterWide = "clusterwide" )
View Source
const TolerateUnreadyEndpointsAnnotation = "service.alpha.kubernetes.io/tolerate-unready-endpoints"
Variables ¶
This section is empty.
Functions ¶
func AddZookeeperVolumeToPod ¶
func AddZookeeperVolumeToPod(pod *v1.Pod, pvc *v1.PersistentVolumeClaim)
AddZookeeperVolumeToPod abstract the process of appending volume spec to pod spec
func CascadeDeleteOptions ¶
func CascadeDeleteOptions(gracePeriodSeconds int64) *metav1.DeleteOptions
func ClientServiceName ¶
func ClusterListOpt ¶
func ClusterListOpt(clusterName string) metav1.ListOptions
We are using internal api types for cluster related.
func CreateAndWaitPod ¶
func CreateAndWaitPod(kubecli kubernetes.Interface, ns string, pod *v1.Pod, timeout time.Duration) (*v1.Pod, error)
CreateAndWaitPod creates a pod and waits until it is running
func CreateCRD ¶
func CreateCRD(clientset apiextensionsclient.Interface, crdName, rkind, rplural, shortName string) error
func CreateClientService ¶
func CreateClientService(kubecli kubernetes.Interface, clusterName, ns string, owner metav1.OwnerReference) error
func CreatePatch ¶
func CreatePeerService ¶
func CreatePeerService(kubecli kubernetes.Interface, clusterName, ns string, owner metav1.OwnerReference) error
func GetClusterList ¶
func GetPodNames ¶
func GetZookeeperVersion ¶
func InClusterConfig ¶
func IsNodeReady ¶
IsNodeReady checks if the Node condition is ready.
func IsPodReady ¶
IsPodReady returns false if the Pod Status is nil
func LabelsForCluster ¶
func MemberRemoveEvent ¶
func MemberRemoveEvent(memberName string, cl *api.ZookeeperCluster) *v1.Event
func MemberUpgradedEvent ¶
func MemberUpgradedEvent(memberName, oldVersion, newVersion string, cl *api.ZookeeperCluster) *v1.Event
func MustNewKubeClient ¶
func MustNewKubeClient() kubernetes.Interface
func MustNewKubeExtClient ¶
func MustNewKubeExtClient() apiextensionsclient.Interface
func NewMemberAddEvent ¶
func NewMemberAddEvent(memberName string, cl *api.ZookeeperCluster) *v1.Event
func NewZookeeperPod ¶
func NewZookeeperPod(m *zookeeperutil.Member, existingCluster []string, clusterName, state string, cs api.ClusterSpec, owner metav1.OwnerReference) *v1.Pod
func PVCNameFromMember ¶
PVCNameFromMember the way we get PVC name from the member name
func PatchDeployment ¶
func PatchDeployment(kubecli kubernetes.Interface, namespace, name string, updateFunc func(*appsv1beta1.Deployment)) error
func ReplacingDeadMemberEvent ¶
func ReplacingDeadMemberEvent(memberName string, cl *api.ZookeeperCluster) *v1.Event
func SetZookeeperVersion ¶
func UniqueMemberName ¶
func WaitCRDReady ¶
func WaitCRDReady(clientset apiextensionsclient.Interface, crdName string) error
Types ¶
type ZookeeperClusterCRUpdateFunc ¶
type ZookeeperClusterCRUpdateFunc func(*api.ZookeeperCluster)
ZookeeperClusterCRUpdateFunc is a function to be used when atomically updating a Cluster CR.
Click to show internal directories.
Click to hide internal directories.