k8sutil

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Nov 30, 2018 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// KubeConfigEnvVar defines the env variable KUBECONFIG which
	// contains the kubeconfig file path.
	KubeConfigEnvVar = "KUBECONFIG"

	// WatchNamespaceEnvVar is the constant for env variable WATCH_NAMESPACE
	// which is the namespace that the pod is currently running in.
	WatchNamespaceEnvVar = "WATCH_NAMESPACE"

	// OperatorNameEnvVar is the constant for env variable OPERATOR_NAME
	// wich is the name of the current operator
	OperatorNameEnvVar = "OPERATOR_NAME"

	// PrometheusMetricsPort defines the port which expose prometheus metrics
	PrometheusMetricsPort = 60000

	// PrometheusMetricsPortName define the port name used in kubernetes deployment and service
	PrometheusMetricsPortName = "metrics"
)

Variables

This section is empty.

Functions

func GetOperatorName

func GetOperatorName() (string, error)

GetOperatorName return the operator name

func GetWatchNamespace

func GetWatchNamespace() (string, error)

GetWatchNamespace returns the namespace the operator should be watching for changes

func InitOperatorService

func InitOperatorService() (*v1.Service, error)

InitOperatorService return the static service which expose operator metrics

Types

This section is empty.

Jump to

Keyboard shortcuts

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