Documentation ¶
Index ¶
- Constants
- func APIServiceName(clusterName string) string
- func AddEtcdVolumeToPod(pod *v1.PodTemplateSpec, pvc *v1.PersistentVolumeClaim)
- func AgentServiceName(clusterName string) string
- func ClusterListOpt(clusterName string) metav1.ListOptions
- func CreateAPIService(kubecli kubernetes.Interface, clusterName, ns string, ...) error
- func CreateAgentService(kubecli kubernetes.Interface, clusterName, ns string, ...) error
- func CreateAndWaitDeployment(kubecli kubernetes.Interface, ns string, deployment *appsv1.Deployment, ...) (*appsv1.Deployment, error)
- func CreateAndWaitPod(kubecli kubernetes.Interface, ns string, pod *v1.Pod, timeout time.Duration) (*v1.Pod, error)
- func CreateCRD(clientset apiextensionsclient.Interface, ...) error
- func CreateDashboardService(kubecli kubernetes.Interface, clusterName, ns string, ...) error
- func CreateNetPolicy(kubecli kubernetes.Interface, clusterName, namespace string, ...) error
- func CreatePatch(o, n, datastruct interface{}) ([]byte, error)
- func CreatePeerService(kubecli kubernetes.Interface, clusterName, ns string, ...) error
- func DashboardServiceName(clusterName string) string
- func GetClusterList(restcli rest.Interface, ns string) (*api.SensuClusterList, error)
- func GetPodNames(pods []*v1.Pod) []string
- func GetSensuVersion(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 IsPodReady(pod *v1.Pod) bool
- func LabelsForCluster(clusterName string, extraLabels ...label) map[string]string
- func MemberRemoveEvent(cl *api.SensuCluster) *v1.Event
- func MemberUpgradedEvent(memberName, oldVersion, newVersion string, cl *api.SensuCluster) *v1.Event
- func MustNewKubeClient() kubernetes.Interface
- func MustNewKubeExtClient() apiextensionsclient.Interface
- func NewMemberAddEvent(cl *api.SensuCluster) *v1.Event
- func NewSensuPodPVC(m *etcdutil.MemberConfig, pvcSpec v1.PersistentVolumeClaimSpec, ...) *v1.PersistentVolumeClaim
- func NewSensuStatefulSet(m *etcdutil.MemberConfig, clusterName, token string, cs api.ClusterSpec, ...) *appsv1.StatefulSet
- func PVCNameFromMember(memberName string) string
- func PodSpecToPrettyJSON(pod *v1.Pod) (string, error)
- func PodWithNodeSelector(p *v1.PodTemplateSpec, ns map[string]string) *v1.PodTemplateSpec
- func ReplacingDeadMemberEvent(memberName string, cl *api.SensuCluster) *v1.Event
- func SetPodTemplateSensuVersion(pod *v1.PodTemplateSpec, version string)
- func SetSensuVersion(pod *v1.Pod, version string)
- func UniqueMemberName(clusterName string) string
- func WaitCRDReady(clientset apiextensionsclient.Interface, crdName string) error
- type SensuClusterCRUpdateFunc
- type TLSData
Constants ¶
const ( // EtcdClientPort is the client port on client service and etcd nodes. EtcdClientPort = 2379 // AnnotationScope annotation name for defining instance scope. Used for specifing cluster wide clusters. AnnotationScope = "objectrocket.com/scope" //AnnotationClusterWide annotation value for cluster wide clusters. AnnotationClusterWide = "clusterwide" )
const TolerateUnreadyEndpointsAnnotation = "service.alpha.kubernetes.io/tolerate-unready-endpoints"
Variables ¶
This section is empty.
Functions ¶
func APIServiceName ¶
func AddEtcdVolumeToPod ¶
func AddEtcdVolumeToPod(pod *v1.PodTemplateSpec, pvc *v1.PersistentVolumeClaim)
AddEtcdVolumeToPod abstract the process of appending volume spec to pod spec
func AgentServiceName ¶
func ClusterListOpt ¶
func ClusterListOpt(clusterName string) metav1.ListOptions
ClusterListOpt returns the ListOptions for selecting a Cluster
func CreateAPIService ¶
func CreateAPIService(kubecli kubernetes.Interface, clusterName, ns string, owner metav1.OwnerReference) error
func CreateAgentService ¶
func CreateAgentService(kubecli kubernetes.Interface, clusterName, ns string, owner metav1.OwnerReference) error
func CreateAndWaitDeployment ¶
func CreateAndWaitDeployment(kubecli kubernetes.Interface, ns string, deployment *appsv1.Deployment, timeout time.Duration) (*appsv1.Deployment, error)
CreateAndWaitDeployment creates a deployment and waits until the defined number of replicas is reached
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, validation *apiextensionsv1beta1.CustomResourceValidation) error
func CreateDashboardService ¶
func CreateDashboardService(kubecli kubernetes.Interface, clusterName, ns string, owner metav1.OwnerReference) error
func CreateNetPolicy ¶
func CreateNetPolicy(kubecli kubernetes.Interface, clusterName, namespace string, owner metav1.OwnerReference) error
CreateNetPolicy creates a NetworkPolicy for a Sensu cluster
func CreatePatch ¶
func CreatePeerService ¶
func CreatePeerService(kubecli kubernetes.Interface, clusterName, ns string, owner metav1.OwnerReference) error
func DashboardServiceName ¶
func GetClusterList ¶
func GetPodNames ¶
func GetSensuVersion ¶
func InClusterConfig ¶
func IsPodReady ¶
IsPodReady returns false if the Pod Status is nil
func LabelsForCluster ¶
func MemberRemoveEvent ¶
func MemberRemoveEvent(cl *api.SensuCluster) *v1.Event
func MemberUpgradedEvent ¶
func MemberUpgradedEvent(memberName, oldVersion, newVersion string, cl *api.SensuCluster) *v1.Event
func MustNewKubeClient ¶
func MustNewKubeClient() kubernetes.Interface
MustNewKubeClient creates a new Kubernetes client with an in cluster config or panics
func MustNewKubeExtClient ¶
func MustNewKubeExtClient() apiextensionsclient.Interface
func NewMemberAddEvent ¶
func NewMemberAddEvent(cl *api.SensuCluster) *v1.Event
func NewSensuPodPVC ¶
func NewSensuPodPVC(m *etcdutil.MemberConfig, pvcSpec v1.PersistentVolumeClaimSpec, clusterName, namespace string, owner metav1.OwnerReference) *v1.PersistentVolumeClaim
NewSensuPodPVC create PVC object from etcd pod's PVC spec
func NewSensuStatefulSet ¶
func NewSensuStatefulSet(m *etcdutil.MemberConfig, clusterName, token string, cs api.ClusterSpec, owner metav1.OwnerReference) *appsv1.StatefulSet
NewSensuStatefulSet creates a new StatefulSet for a Sensu cluster
func PVCNameFromMember ¶
PVCNameFromMember the way we get PVC name from the member name
func PodWithNodeSelector ¶
func PodWithNodeSelector(p *v1.PodTemplateSpec, ns map[string]string) *v1.PodTemplateSpec
func ReplacingDeadMemberEvent ¶
func ReplacingDeadMemberEvent(memberName string, cl *api.SensuCluster) *v1.Event
func SetPodTemplateSensuVersion ¶
func SetPodTemplateSensuVersion(pod *v1.PodTemplateSpec, version string)
func SetSensuVersion ¶
func UniqueMemberName ¶
func WaitCRDReady ¶
func WaitCRDReady(clientset apiextensionsclient.Interface, crdName string) error
Types ¶
type SensuClusterCRUpdateFunc ¶
type SensuClusterCRUpdateFunc func(*api.SensuCluster)
SensuClusterCRUpdateFunc is a function to be used when atomically updating a Cluster CR.
type TLSData ¶
func GetTLSDataFromSecret ¶
func GetTLSDataFromSecret(kubecli kubernetes.Interface, ns, se string) (*TLSData, error)
GetTLSDataFromSecret retrives the kubernete secret that contain etcd tls certs and put them into TLSData.
Directories ¶
Path | Synopsis |
---|---|
Package crdvalidation All of the included package included from https://github.com/ant31/crd-validation Imports were failing because of lack of any dependency locking Package crdvalidation All of the included package included from https://github.com/ant31/crd-validation Imports were failing because of lack of any dependency locking Package crdvalidation All of the included package included from https://github.com/ant31/crd-validation Imports were failing because of lack of any dependency locking
|
Package crdvalidation All of the included package included from https://github.com/ant31/crd-validation Imports were failing because of lack of any dependency locking Package crdvalidation All of the included package included from https://github.com/ant31/crd-validation Imports were failing because of lack of any dependency locking Package crdvalidation All of the included package included from https://github.com/ant31/crd-validation Imports were failing because of lack of any dependency locking |