 Documentation
      ¶
      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 where the watch activity happens. // this value is empty if the operator is running with clusterScope. 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 ¶
      View Source
      
  var ErrNoNamespace = fmt.Errorf("namespace not found for current environment")
    errNoNS indicates that a namespace could not be found for the current environment
Functions ¶
func GetOperatorName ¶
GetOperatorName return the operator name
func GetOperatorNamespace ¶ added in v0.4.0
GetOperatorNamespace returns the namespace the operator should be running in.
func GetWatchNamespace ¶
GetWatchNamespace returns the namespace the operator should be watching for changes
func InitOperatorService ¶
InitOperatorService return the static service which expose operator metrics
func ResourceExists ¶ added in v0.4.0
func ResourceExists(dc discovery.DiscoveryInterface, apiGroupVersion, kind string) (bool, error)
ResourceExists returns true if the given resource kind exists in the given api groupversion
Types ¶
This section is empty.
 Click to show internal directories. 
   Click to hide internal directories.