Documentation ¶
Index ¶
- func CreateClusterRole(c client.Client) error
- func CreateClusterRoleBinding(c client.Client) error
- func CreateMinioObjectStorageSecret() error
- func CreatePrometheus(c client.Client) error
- func CreateServiceAccount(c client.Client) error
- func GetNonEmptyLines(output string) []string
- func GetProjectDir() (string, error)
- func InstallCertManager() error
- func InstallMinIO() error
- func InstallPrometheusOperator() error
- func LoadImageToKindClusterWithName(name string) error
- func RemoteWrite(req RemoteWriteRequest, roundTripper http.RoundTripper, ...) error
- func Run(cmd *exec.Cmd) ([]byte, error)
- func SetUpPrometheus(c client.Client) error
- func StartPortForward(ctx context.Context, port intstr.IntOrString, scheme, name, ns string) (func(), error)
- func UninstallCertManager()
- func UninstallMinIO()
- func UninstallPrometheusOperator()
- func ValidateHasLabels(t *testing.T, obj client.Object, labels map[string]string)
- func ValidateIsNamedPodDisruptionBudget(t *testing.T, obj client.Object, b manifests.Buildable, namespace string, ...)
- func ValidateIsNamedServiceAccount(t *testing.T, obj client.Object, b manifests.Buildable, namespace string)
- func ValidateLabelsMatch(t *testing.T, objWithSelector client.Object, matches client.Object)
- func ValidateNameAndNamespace(t *testing.T, obj client.Object, name, namespace string)
- func ValidateNameNamespaceAndLabels(t *testing.T, obj client.Object, name, namespace string, ...)
- func ValidateObjectLabelsEqual(t *testing.T, wantLabels map[string]string, onObjs ...client.Object)
- func ValidateObjectsEqual(t *testing.T, got client.Object, want client.Object)
- func VerifyCfgMapOrSecretEnvVarExists(c client.Client, obj client.Object, name, ns string, containerIndex int, ...) bool
- func VerifyConfigMapContents(c client.Client, name, namespace, key, expect string) bool
- func VerifyConfigMapExists(c client.Client, name, namespace string) bool
- func VerifyDeploymentArgs(c client.Client, name string, namespace string, containerIndex int, ...) bool
- func VerifyDeploymentExists(c client.Client, name string, namespace string) bool
- func VerifyDeploymentReplicasRunning(c client.Client, expect int, name string, namespace string) bool
- func VerifySecretExists(c client.Client, name string, namespace string) bool
- func VerifyServiceAccountExists(c client.Client, name string, namespace string) bool
- func VerifyServiceExists(c client.Client, name string, namespace string) bool
- func VerifyServiceMonitorExists(c client.Client, name, ns string) bool
- func VerifyStatefulSetArgs(c client.Client, name string, namespace string, containerIndex int, ...) bool
- func VerifyStatefulSetExists(c client.Client, name string, namespace string) bool
- func VerifyStatefulSetReplicas(c client.Client, expect int, name string, namespace string) bool
- func VerifyStatefulSetReplicasRunning(c client.Client, expect int, name string, namespace string) bool
- type PrometheusResponse
- type RemoteWriteRequest
- type Verifier
- func (v Verifier) Verify(c client.Client, name, ns string) bool
- func (v Verifier) WithConfigMap() Verifier
- func (v Verifier) WithDeployment() Verifier
- func (v Verifier) WithSecret() Verifier
- func (v Verifier) WithService() Verifier
- func (v Verifier) WithServiceAccount() Verifier
- func (v Verifier) WithServiceMonitor() Verifier
- func (v Verifier) WithStatefulSet() Verifier
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateClusterRole ¶
func CreateMinioObjectStorageSecret ¶
func CreateMinioObjectStorageSecret() error
func CreatePrometheus ¶
func CreateServiceAccount ¶
create service account for prometheus
func GetNonEmptyLines ¶
GetNonEmptyLines converts given command output string into individual objects according to line breakers, and ignores the empty elements in it.
func GetProjectDir ¶
GetProjectDir will return the directory where the project is
func InstallCertManager ¶
func InstallCertManager() error
InstallCertManager installs the cert manager bundle.
func InstallPrometheusOperator ¶
func InstallPrometheusOperator() error
InstallPrometheusOperator installs the prometheus Operator to be used to export the enabled metrics.
func LoadImageToKindClusterWithName ¶
LoadImageToKindClusterWithName loads a local docker image to the kind cluster
func RemoteWrite ¶
func RemoteWrite(req RemoteWriteRequest, roundTripper http.RoundTripper, headers map[string]string) error
RemoteWrite sends a remote write request to the remote write endpoint which is running on localhost.
func SetUpPrometheus ¶
func StartPortForward ¶
func StartPortForward(ctx context.Context, port intstr.IntOrString, scheme, name, ns string) (func(), error)
StartPortForward initiates a port forwarding connection to a pod on the localhost interface. It returns a closer function that should be invoked to stop the proxy server. The function blocks until the port forwarding proxy server is ready to receive connections or the context is canceled.
func UninstallCertManager ¶
func UninstallCertManager()
UninstallCertManager uninstalls the cert manager
func UninstallPrometheusOperator ¶
func UninstallPrometheusOperator()
UninstallPrometheusOperator uninstalls the prometheus
func ValidateHasLabels ¶
func ValidateLabelsMatch ¶
func ValidateObjectsEqual ¶
func VerifyConfigMapContents ¶
func VerifyConfigMapExists ¶
func VerifyDeploymentArgs ¶
func VerifyDeploymentExists ¶
func VerifySecretExists ¶
func VerifyServiceExists ¶
func VerifyStatefulSetArgs ¶
func VerifyStatefulSetExists ¶
Types ¶
type PrometheusResponse ¶
type PrometheusResponse struct { Status string `json:"status"` Data struct { ResultType string `json:"resultType"` Result []struct { Metric map[string]string `json:"metric"` Value []interface{} `json:"value"` // Use interface{} because value can be mixed types } `json:"result"` } `json:"data"` }
func QueryPrometheus ¶
func QueryPrometheus(query string) (*PrometheusResponse, error)
type RemoteWriteRequest ¶
RemoteWriteRequest is a struct that represents the request to be sent to the remote write endpoint.
func DefaultRemoteWriteRequest ¶
func DefaultRemoteWriteRequest() RemoteWriteRequest
DefaultRemoteWriteRequest returns a default RemoteWriteRequest.
type Verifier ¶
type Verifier struct {
// contains filtered or unexported fields
}