Documentation ¶
Overview ¶
Package operator package contains types and functions used directly by the Operator main
Index ¶
- Constants
- Variables
- func DetectKubernetesVersion(cs clients.ClientSet) (*version.Version, error)
- func GetCACertRotateBefore() time.Duration
- func GetDefaultCoherenceImage() string
- func GetDefaultOperatorImage() string
- func GetGlobalAnnotations(v *viper.Viper) (map[string]string, error)
- func GetGlobalAnnotationsNoError() map[string]string
- func GetGlobalLabels(v *viper.Viper) (map[string]string, error)
- func GetGlobalLabelsNoError() map[string]string
- func GetNamespace() string
- func GetRackLabel() []string
- func GetRestHost() string
- func GetRestPort() int32
- func GetRestServiceName() string
- func GetRestServicePort() int32
- func GetSiteLabel() []string
- func GetVersion() string
- func GetViper() *viper.Viper
- func GetWatchNamespace() []string
- func GetWebhookCertDir() string
- func GetWebhookServiceDNSNames() []string
- func IsDevMode() bool
- func IsDryRun() bool
- func SetVersion(v string)
- func SetViper(v *viper.Viper)
- func SetupFlags(cmd *cobra.Command, v *viper.Viper)
- func SetupOperatorManagerFlags(cmd *cobra.Command, v *viper.Viper)
- func ShouldEnableWebhooks() bool
- func ShouldInstallCRDs() bool
- func ShouldUseCertManager() bool
- func ShouldUseSelfSignedCerts() bool
- func ValidateFlags(v *viper.Viper) error
Constants ¶
View Source
const ( DefaultRestHost = "0.0.0.0" DefaultRestPort int32 = 8000 // DefaultCertValidity makes new certificates default to a one-year expiration DefaultCertValidity = 365 * 24 * time.Hour // DefaultRotateBefore defines how long before expiration a certificate // should be re-issued DefaultRotateBefore = 24 * time.Hour // CertFileName is used for Certificates inside a secret CertFileName = "tls.crt" // KeyFileName is used for Private Keys inside a secret KeyFileName = "tls.key" CertTypeSelfSigned = "self-signed" CertTypeCertManager = "cert-manager" CertTypeManual = "manual" CertManagerIssuerName = "coherence-webhook-server-issuer" DefaultMutatingWebhookName = "coherence-operator-mutating-webhook-configuration" DefaultValidatingWebhookName = "coherence-operator-validating-webhook-configuration" FlagCACertRotateBefore = "ca-cert-rotate-before" FlagCACertValidity = "ca-cert-validity" FlagCertType = "cert-type" FlagCertIssuer = "cert-issuer" FlagCoherenceImage = "coherence-image" FlagCRD = "install-crd" FlagDevMode = "coherence-dev-mode" FlagDryRun = "dry-run" FlagEnableWebhook = "enable-webhook" FlagGlobalAnnotation = "global-annotation" FlagGlobalLabel = "global-label" FlagHealthAddress = "health-addr" FlagLeaderElection = "enable-leader-election" FlagMetricsAddress = "metrics-addr" FlagMutatingWebhookName = "mutating-webhook-name" FlagOperatorNamespace = "operator-namespace" FlagRackLabel = "rack-label" FlagRestHost = "rest-host" FlagRestPort = "rest-port" FlagServiceName = "service-name" FlagServicePort = "service-port" FlagSiteLabel = "site-label" FlagSkipServiceSuspend = "skip-service-suspend" FlagOperatorImage = "operator-image" FlagValidatingWebhookName = "validating-webhook-name" FlagWebhookCertDir = "webhook-cert-dir" FlagWebhookSecret = "webhook-secret" FlagWebhookService = "webhook-service" // 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" // LabelHostName is the Node label for the Node's hostname. LabelHostName = "kubernetes.io/hostname" )
Variables ¶
View Source
var ( DefaultSiteLabels = []string{corev1.LabelTopologyZone, corev1.LabelFailureDomainBetaZone} DefaultRackLabels = []string{LabelOciNodeFaultDomain, corev1.LabelTopologyZone, corev1.LabelFailureDomainBetaZone} )
Functions ¶
func DetectKubernetesVersion ¶
func GetCACertRotateBefore ¶
func GetDefaultCoherenceImage ¶
func GetDefaultCoherenceImage() string
func GetDefaultOperatorImage ¶
func GetDefaultOperatorImage() string
func GetGlobalLabelsNoError ¶
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 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 GetWatchNamespace ¶
func GetWatchNamespace() []string
GetWatchNamespace returns the Namespace(s) the operator should be watching for changes
func GetWebhookCertDir ¶
func GetWebhookCertDir() string
func GetWebhookServiceDNSNames ¶
func GetWebhookServiceDNSNames() []string
func SetVersion ¶
func SetVersion(v string)
func ShouldEnableWebhooks ¶
func ShouldEnableWebhooks() bool
func ShouldInstallCRDs ¶
func ShouldInstallCRDs() bool
func ShouldUseCertManager ¶
func ShouldUseCertManager() bool
func ShouldUseSelfSignedCerts ¶
func ShouldUseSelfSignedCerts() bool
func ValidateFlags ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.