Documentation ¶
Index ¶
- Variables
- func CreateAndWaitForThirdPartyRessource(kubeClient kubernetes.Interface, relativePath string, apiPath string) error
- func CreateClusterRole(kubeClient kubernetes.Interface, relativePath string) error
- func CreateClusterRoleBinding(kubeClient kubernetes.Interface, ns string, relativePath string) (finalizerFn, error)
- func CreateDeployment(kubeClient kubernetes.Interface, namespace string, d *v1beta1.Deployment) error
- func CreateIngress(kubeClient kubernetes.Interface, namespace string, i *v1beta1.Ingress) error
- func CreateNamespace(kubeClient kubernetes.Interface, name string) (*v1.Namespace, error)
- func CreateRoleBinding(kubeClient kubernetes.Interface, ns string, relativePath string) (finalizerFn, error)
- func CreateServiceAccount(kubeClient kubernetes.Interface, namespace string, relativPath string) (finalizerFn, error)
- func CreateServiceAndWaitUntilReady(kubeClient kubernetes.Interface, namespace string, service *v1.Service) (finalizerFn, error)
- func DeleteClusterRole(kubeClient kubernetes.Interface, relativePath string) error
- func DeleteClusterRoleBinding(kubeClient kubernetes.Interface, relativePath string) error
- func DeleteDeployment(kubeClient kubernetes.Interface, namespace, name string) error
- func DeleteNamespace(kubeClient kubernetes.Interface, name string) error
- func DeleteNginxIngressControllerIncDefaultBackend(kubeClient kubernetes.Interface, namespace string) error
- func DeleteRoleBinding(kubeClient kubernetes.Interface, ns string, relativePath string) error
- func DeleteServiceAccount(kubeClient kubernetes.Interface, namespace string, relativPath string) error
- func DeleteServiceAndWaitUntilGone(kubeClient kubernetes.Interface, namespace string, serviceName string) error
- func DeleteThirdPartyResource(kubeClient kubernetes.Interface, relativePath string) error
- func GetIngressIP(kubeClient kubernetes.Interface, namespace string, ingressName string) (*string, error)
- func GetLogs(kubeClient kubernetes.Interface, namespace string, ...) (string, error)
- func MakeBasicIngress(serviceName string, servicePort int) *v1beta1.Ingress
- func MakeDeployment(pathToYaml string) (*v1beta1.Deployment, error)
- func PathToOSFile(relativPath string) (*os.File, error)
- func ProxyGetPod(kubeClient kubernetes.Interface, namespace string, podName string, port string, ...) *rest.Request
- func SetupNginxIngressControllerIncDefaultBackend(kubeClient kubernetes.Interface, namespace string) error
- func WaitForHTTPSuccessStatusCode(timeout time.Duration, url string) error
- func WaitForPodsReady(kubeClient kubernetes.Interface, namespace string, timeout time.Duration, ...) error
- func WaitForPodsRunImage(kubeClient kubernetes.Interface, namespace string, expectedReplicas int, ...) error
- func WaitForServiceReady(kubeClient kubernetes.Interface, namespace string, serviceName string) error
- func WaitForThridPartyRessource(kubeClient kubernetes.Interface, apiPath string) error
- func WaitUntilDeploymentGone(kubeClient kubernetes.Interface, namespace, name string, timeout time.Duration) error
- type Framework
- func (f *Framework) AddAlertingToPrometheus(p *monitoringv1.Prometheus, ns, name string)
- func (f *Framework) AlertmanagerConfigSecret(name string) (*v1.Secret, error)
- func (f *Framework) CreateAlertmanagerAndWaitUntilReady(ns string, a *monitoringv1.Alertmanager) error
- func (f *Framework) CreatePrometheusAndWaitUntilReady(ns string, p *monitoringv1.Prometheus) error
- func (f *Framework) DeleteAlertmanagerAndWaitUntilGone(ns, name string) error
- func (f *Framework) DeletePrometheusAndWaitUntilGone(ns, name string) error
- func (f *Framework) GetActiveTargets(ns, svcName string) ([]*Target, error)
- func (f *Framework) GetAlertmanagerConfig(ns, n string) (alertmanagerStatus, error)
- func (f *Framework) MakeAlertmanagerService(name, group string, serviceType v1.ServiceType) *v1.Service
- func (f *Framework) MakeBasicAlertmanager(name string, replicas int32) *monitoringv1.Alertmanager
- func (f *Framework) MakeBasicAlertmanagerV1alpha1(name string, replicas int32) *v1alpha1.Alertmanager
- func (f *Framework) MakeBasicPrometheus(ns, name, group string, replicas int32) *monitoringv1.Prometheus
- func (f *Framework) MakeBasicPrometheusV1alpha1(ns, name, group string, replicas int32) *v1alpha1.Prometheus
- func (f *Framework) MakeBasicServiceMonitor(name string) *monitoringv1.ServiceMonitor
- func (f *Framework) MakeBasicServiceMonitorV1alpha1(name string) *v1alpha1.ServiceMonitor
- func (f *Framework) MakePrometheusService(name, group string, serviceType v1.ServiceType) *v1.Service
- func (f *Framework) NewTestCtx(t *testing.T) TestCtx
- func (f *Framework) Poll(timeout, pollInterval time.Duration, pollFunc func() (bool, error)) error
- func (f *Framework) QueryPrometheusSVC(ns, svcName, endpoint string, query map[string]string) ([]byte, error)
- func (f *Framework) SecretFromYaml(filepath string) (*v1.Secret, error)
- func (f *Framework) Setup(opImage string) error
- func (f *Framework) Teardown() error
- func (f *Framework) UpdateAlertmanagerAndWaitUntilReady(ns string, a *monitoringv1.Alertmanager) error
- func (f *Framework) UpdatePrometheusAndWaitUntilReady(ns string, p *monitoringv1.Prometheus) error
- func (f *Framework) WaitForAlertmanagerInitializedMesh(ns, name string, amountPeers int) error
- func (f *Framework) WaitForAlertmanagerReady(ns, name string, replicas int) error
- func (f *Framework) WaitForPrometheusReady(p *monitoringv1.Prometheus, timeout time.Duration) error
- func (f *Framework) WaitForPrometheusRunImageAndReady(ns string, p *monitoringv1.Prometheus) error
- func (f *Framework) WaitForSpecificAlertmanagerConfig(ns, amName string, expectedConfig string) error
- func (f *Framework) WaitForTargets(ns, svcName string, amount int) error
- type Target
- type TestCtx
- func (ctx *TestCtx) AddFinalizerFn(fn finalizerFn)
- func (ctx *TestCtx) Cleanup(t *testing.T)
- func (ctx *TestCtx) CreateNamespace(t *testing.T, kubeClient kubernetes.Interface) string
- func (ctx *TestCtx) GetObjID() string
- func (ctx *TestCtx) SetupPrometheusRBAC(t *testing.T, ns string, kubeClient kubernetes.Interface)
Constants ¶
This section is empty.
Variables ¶
View Source
var ValidAlertmanagerConfig = `` /* 229-byte string literal not displayed */
Functions ¶
func CreateAndWaitForThirdPartyRessource ¶
func CreateAndWaitForThirdPartyRessource(kubeClient kubernetes.Interface, relativePath string, apiPath string) error
func CreateClusterRole ¶
func CreateClusterRole(kubeClient kubernetes.Interface, relativePath string) error
func CreateClusterRoleBinding ¶
func CreateClusterRoleBinding(kubeClient kubernetes.Interface, ns string, relativePath string) (finalizerFn, error)
func CreateDeployment ¶
func CreateDeployment(kubeClient kubernetes.Interface, namespace string, d *v1beta1.Deployment) error
func CreateIngress ¶
func CreateNamespace ¶
func CreateRoleBinding ¶
func CreateRoleBinding(kubeClient kubernetes.Interface, ns string, relativePath string) (finalizerFn, error)
func CreateServiceAccount ¶
func CreateServiceAccount(kubeClient kubernetes.Interface, namespace string, relativPath string) (finalizerFn, error)
func DeleteClusterRole ¶
func DeleteClusterRole(kubeClient kubernetes.Interface, relativePath string) error
func DeleteClusterRoleBinding ¶
func DeleteClusterRoleBinding(kubeClient kubernetes.Interface, relativePath string) error
func DeleteDeployment ¶
func DeleteDeployment(kubeClient kubernetes.Interface, namespace, name string) error
func DeleteNamespace ¶
func DeleteNamespace(kubeClient kubernetes.Interface, name string) error
func DeleteNginxIngressControllerIncDefaultBackend ¶
func DeleteNginxIngressControllerIncDefaultBackend(kubeClient kubernetes.Interface, namespace string) error
func DeleteRoleBinding ¶
func DeleteRoleBinding(kubeClient kubernetes.Interface, ns string, relativePath string) error
func DeleteServiceAccount ¶
func DeleteServiceAccount(kubeClient kubernetes.Interface, namespace string, relativPath string) error
func DeleteServiceAndWaitUntilGone ¶
func DeleteServiceAndWaitUntilGone(kubeClient kubernetes.Interface, namespace string, serviceName string) error
func DeleteThirdPartyResource ¶
func DeleteThirdPartyResource(kubeClient kubernetes.Interface, relativePath string) error
func GetIngressIP ¶
func MakeDeployment ¶
func MakeDeployment(pathToYaml string) (*v1beta1.Deployment, error)
func ProxyGetPod ¶
func SetupNginxIngressControllerIncDefaultBackend ¶
func SetupNginxIngressControllerIncDefaultBackend(kubeClient kubernetes.Interface, namespace string) error
func WaitForPodsReady ¶
func WaitForPodsReady(kubeClient kubernetes.Interface, namespace string, timeout time.Duration, expectedReplicas int, opts metav1.ListOptions) error
WaitForPodsReady waits for a selection of Pods to be running and each container to pass its readiness check.
func WaitForPodsRunImage ¶
func WaitForPodsRunImage(kubeClient kubernetes.Interface, namespace string, expectedReplicas int, image string, opts metav1.ListOptions) error
func WaitForServiceReady ¶
func WaitForServiceReady(kubeClient kubernetes.Interface, namespace string, serviceName string) error
func WaitForThridPartyRessource ¶
func WaitForThridPartyRessource(kubeClient kubernetes.Interface, apiPath string) error
func WaitUntilDeploymentGone ¶
Types ¶
type Framework ¶
type Framework struct { KubeClient kubernetes.Interface MonClient monitoringv1.MonitoringV1Interface HTTPClient *http.Client MasterHost string Namespace *v1.Namespace OperatorPod *v1.Pod DefaultTimeout time.Duration }
func (*Framework) AddAlertingToPrometheus ¶
func (f *Framework) AddAlertingToPrometheus(p *monitoringv1.Prometheus, ns, name string)
func (*Framework) AlertmanagerConfigSecret ¶
func (*Framework) CreateAlertmanagerAndWaitUntilReady ¶
func (f *Framework) CreateAlertmanagerAndWaitUntilReady(ns string, a *monitoringv1.Alertmanager) error
func (*Framework) CreatePrometheusAndWaitUntilReady ¶
func (f *Framework) CreatePrometheusAndWaitUntilReady(ns string, p *monitoringv1.Prometheus) error
func (*Framework) DeleteAlertmanagerAndWaitUntilGone ¶
func (*Framework) DeletePrometheusAndWaitUntilGone ¶
func (*Framework) GetActiveTargets ¶
func (*Framework) GetAlertmanagerConfig ¶
func (*Framework) MakeAlertmanagerService ¶
func (*Framework) MakeBasicAlertmanager ¶
func (f *Framework) MakeBasicAlertmanager(name string, replicas int32) *monitoringv1.Alertmanager
func (*Framework) MakeBasicAlertmanagerV1alpha1 ¶
func (f *Framework) MakeBasicAlertmanagerV1alpha1(name string, replicas int32) *v1alpha1.Alertmanager
func (*Framework) MakeBasicPrometheus ¶
func (f *Framework) MakeBasicPrometheus(ns, name, group string, replicas int32) *monitoringv1.Prometheus
func (*Framework) MakeBasicPrometheusV1alpha1 ¶
func (f *Framework) MakeBasicPrometheusV1alpha1(ns, name, group string, replicas int32) *v1alpha1.Prometheus
func (*Framework) MakeBasicServiceMonitor ¶
func (f *Framework) MakeBasicServiceMonitor(name string) *monitoringv1.ServiceMonitor
func (*Framework) MakeBasicServiceMonitorV1alpha1 ¶
func (f *Framework) MakeBasicServiceMonitorV1alpha1(name string) *v1alpha1.ServiceMonitor
func (*Framework) MakePrometheusService ¶
func (*Framework) QueryPrometheusSVC ¶
func (*Framework) SecretFromYaml ¶
func (*Framework) UpdateAlertmanagerAndWaitUntilReady ¶
func (f *Framework) UpdateAlertmanagerAndWaitUntilReady(ns string, a *monitoringv1.Alertmanager) error
func (*Framework) UpdatePrometheusAndWaitUntilReady ¶
func (f *Framework) UpdatePrometheusAndWaitUntilReady(ns string, p *monitoringv1.Prometheus) error
func (*Framework) WaitForAlertmanagerInitializedMesh ¶
func (*Framework) WaitForAlertmanagerReady ¶
func (*Framework) WaitForPrometheusReady ¶
func (f *Framework) WaitForPrometheusReady(p *monitoringv1.Prometheus, timeout time.Duration) error
func (*Framework) WaitForPrometheusRunImageAndReady ¶
func (f *Framework) WaitForPrometheusRunImageAndReady(ns string, p *monitoringv1.Prometheus) error
func (*Framework) WaitForSpecificAlertmanagerConfig ¶
type TestCtx ¶
type TestCtx struct { ID string // contains filtered or unexported fields }
func (*TestCtx) AddFinalizerFn ¶
func (ctx *TestCtx) AddFinalizerFn(fn finalizerFn)
func (*TestCtx) CreateNamespace ¶
func (*TestCtx) GetObjID ¶
GetObjID returns an ascending ID based on the length of cleanUpFns. It is based on the premise that every new object also appends a new finalizerFn on cleanUpFns. This can e.g. be used to create multiple namespaces in the same test context.
func (*TestCtx) SetupPrometheusRBAC ¶
Click to show internal directories.
Click to hide internal directories.