operator

package
v0.0.0-...-ed6da17 Latest Latest
Warning

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

Go to latest
Published: Nov 3, 2025 License: UPL-1.0 Imports: 15 Imported by: 0

Documentation

Overview

Package operator package contains types and functions used directly by the Operator main

Index

Constants

View Source
const (
	DefaultRestHost       = "0.0.0.0"
	DefaultRestPort int32 = 8000

	DefaultMutatingWebhookName   = "coherence-operator-mutating-webhook-configuration"
	DefaultValidatingWebhookName = "coherence-operator-validating-webhook-configuration"

	FlagCoherenceImage         = "coherence-image"
	FlagCRD                    = "install-crd"
	FlagJobCRD                 = "install-job-crd"
	FlagEnableCoherenceJobs    = "enable-jobs"
	FlagDevMode                = "coherence-dev-mode"
	FlagCipherDenyList         = "cipher-deny-list"
	FlagCipherAllowList        = "cipher-allow-list"
	FlagConfig                 = "config"
	FlagConfigType             = "config-type"
	FlagDryRun                 = "dry-run"
	FlagEnableWebhook          = "enable-webhook"
	FlagEnableHttp2            = "enable-http2"
	FlagGlobalAnnotation       = "global-annotation"
	FlagGlobalLabel            = "global-label"
	FlagHealthAddress          = "health-addr"
	FlagLeaderElection         = "enable-leader-election"
	FlagLeaderElectionDuration = "leader-election-duration"
	FlagLeaderElectionRenew    = "leader-election-renew-timeout"
	FlagMetricsAddress         = "metrics-addr"
	FlagOperatorNamespace      = "operator-namespace"
	FlagNodeLookupEnabled      = "node-lookup-enabled"
	FlagRackLabel              = "rack-label"
	FlagRestHost               = "rest-host"
	FlagRestPort               = "rest-port"
	FlagSecureMetrics          = "metrics-secure"
	FlagServiceName            = "service-name"
	FlagServicePort            = "service-port"
	FlagSiteLabel              = "site-label"
	FlagSkipServiceSuspend     = "skip-service-suspend"
	FlagOperatorImage          = "operator-image"
	FlagEnvVar                 = "env"
	FlagJvmArg                 = "jvm"
	FlagKubernetesCheckTimeout = "kubernetes-check-timeout"

	// EnvVarWatchNamespace is the environment variable to use to set the watch namespace(s)
	EnvVarWatchNamespace = "WATCH_NAMESPACE"
	// EnvVarCoherenceImage is the environment variable to use to set the default Coherence image
	EnvVarCoherenceImage = "COHERENCE_IMAGE"

	// LabelOciNodeFaultDomain is the OCI Node label for the fault domain.
	LabelOciNodeFaultDomain = "oci.oraclecloud.com/fault-domain"
	// LabelTopologySubZone is the k8s topology label for sub-zone.
	LabelTopologySubZone = "topology.kubernetes.io/subzone"

	// LabelHostName is the Node label for the Node's hostname.
	LabelHostName = "kubernetes.io/hostname"

	// LabelTestHostName is a label applied to Pods to set a testing host name
	LabelTestHostName = "coherence.oracle.com/test_hostname"
	// LabelTestHealthPort is a label applied to Pods to set a testing health check port
	LabelTestHealthPort = "coherence.oracle.com/test_health_port"

	// DefaultKubernetesCheckTimeout is the default timeout applied to the initial Kubernetes API connection check.
	DefaultKubernetesCheckTimeout = time.Minute
	// MinKubernetesCheckTimeout is the minimum timeout applied to the initial Kubernetes API connection check.
	MinKubernetesCheckTimeout = 10 * time.Second
)

Variables

Functions

func DefaultCipherDenyList

func DefaultCipherDenyList() []uint16

DefaultCipherDenyList returns the default list of ciphers disabled by Oracle's policies.

func DetectKubernetesVersion

func DetectKubernetesVersion(cs clients.ClientSet) (*version.Version, error)

func GetDefaultCoherenceImage

func GetDefaultCoherenceImage() string

func GetDefaultOperatorImage

func GetDefaultOperatorImage() string

func GetExtraEnvVars

func GetExtraEnvVars() []string

func GetExtraJvmArgs

func GetExtraJvmArgs() []string

func GetGlobalAnnotations

func GetGlobalAnnotations(v *viper.Viper) (map[string]string, error)

func GetGlobalAnnotationsNoError

func GetGlobalAnnotationsNoError() map[string]string

func GetGlobalLabels

func GetGlobalLabels(v *viper.Viper) (map[string]string, error)

func GetGlobalLabelsNoError

func GetGlobalLabelsNoError() map[string]string

func GetNamespace

func GetNamespace() string

func GetRackLabel

func GetRackLabel() []string

func GetRestHost

func GetRestHost() string

func GetRestPort

func GetRestPort() int32

func GetRestServiceName

func GetRestServiceName() string

func GetRestServicePort

func GetRestServicePort() int32

func GetSiteLabel

func GetSiteLabel() []string

func GetTlsCipherAllowList

func GetTlsCipherAllowList(v *viper.Viper) []string

GetTlsCipherAllowList returns the names of the TLS cipher suites to be enabled.

func GetTlsCipherDenyList

func GetTlsCipherDenyList(v *viper.Viper) []string

GetTlsCipherDenyList returns the names of the TLS cipher suites to be disabled.

func GetVersion

func GetVersion() string

GetVersion returns the Operator version. The Operator version is injected at compile time. In development environments, for example running in an IDE where the version has not been injected the version 999.0.0 will be returned

func GetViper

func GetViper() *viper.Viper

func GetWatchNamespace

func GetWatchNamespace() []string

GetWatchNamespace returns the Namespace(s) the operator should be watching for changes

func IsDryRun

func IsDryRun() bool

func IsNodeLookupEnabled

func IsNodeLookupEnabled() bool

func NewCipherSuiteConfig

func NewCipherSuiteConfig(v *viper.Viper, log logr.Logger) (func(c *tls.Config), error)

NewCipherSuiteConfig returns a function that will configure the allowed cipher suites for a TLS configuration.

func RemoveAllFromUInt16Array

func RemoveAllFromUInt16Array(arr []uint16, toRemove ...uint16) []uint16

RemoveAllFromUInt16Array removes all the specified values from a uint16 array, returning the updated array.

func RemoveFromUInt16Array

func RemoveFromUInt16Array(arr []uint16, toRemove uint16) []uint16

RemoveFromUInt16Array removes a value from a uint16 array, returning the updated array.

func SetVersion

func SetVersion(v string)

func SetViper

func SetViper(v *viper.Viper)

func SetupFlags

func SetupFlags(cmd *cobra.Command, v *viper.Viper)

func SetupOperatorManagerFlags

func SetupOperatorManagerFlags(cmd *cobra.Command, v *viper.Viper)

func ShouldSupportCoherenceJob

func ShouldSupportCoherenceJob() bool

Types

This section is empty.

Jump to

Keyboard shortcuts

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