flags

package
v0.0.0-...-67aceb4 Latest Latest
Warning

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

Go to latest
Published: Dec 20, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultKymaRequeueSuccessInterval                                   = 30 * time.Second
	DefaultKymaRequeueErrInterval                                       = 2 * time.Second
	DefaultKymaRequeueWarningInterval                                   = 30 * time.Second
	DefaultKymaRequeueBusyInterval                                      = 5 * time.Second
	DefaultManifestRequeueSuccessInterval                               = 30 * time.Second
	DefaultManifestRequeueErrInterval                                   = 2 * time.Second
	DefaultManifestRequeueWarningInterval                               = 30 * time.Second
	DefaultManifestRequeueBusyInterval                                  = 5 * time.Second
	DefaultManifestRequeueJitterProbability                             = 0.02
	DefaultManifestRequeueJitterPercentage                              = 0.02
	DefaultMandatoryModuleRequeueSuccessInterval                        = 30 * time.Second
	DefaultMandatoryModuleDeletionRequeueSuccessInterval                = 30 * time.Second
	DefaultWatcherRequeueSuccessInterval                                = 30 * time.Second
	DefaultClientQPS                                                    = 300
	DefaultClientBurst                                                  = 600
	DefaultPprofServerTimeout                                           = 90 * time.Second
	RateLimiterBurstDefault                                             = 200
	RateLimiterFrequencyDefault                                         = 30
	FailureBaseDelayDefault                                             = 100 * time.Millisecond
	FailureMaxDelayDefault                                              = 5 * time.Second
	DefaultCacheSyncTimeout                                             = 2 * time.Minute
	DefaultLogLevel                                                     = log.WarnLevel
	DefaultPurgeFinalizerTimeout                                        = 5 * time.Minute
	DefaultMaxConcurrentManifestReconciles                              = 1
	DefaultMaxConcurrentKymaReconciles                                  = 1
	DefaultMaxConcurrentWatcherReconciles                               = 1
	DefaultMaxConcurrentMandatoryModuleReconciles                       = 1
	DefaultMaxConcurrentMandatoryModuleDeletionReconciles               = 1
	DefaultIstioGatewayName                                             = "klm-watcher"
	DefaultIstioGatewayNamespace                                        = "kcp-system"
	DefaultIstioNamespace                                               = "istio-system"
	DefaultCaCertName                                                   = "klm-watcher-serving"
	DefaultSelfSignedCertDuration                         time.Duration = 90 * 24 * time.Hour
	DefaultSelfSignedCertRenewBefore                      time.Duration = 60 * 24 * time.Hour
	DefaultSelfSignedCertificateRenewBuffer                             = 24 * time.Hour
	DefaultSelfSignedCertKeySize                                        = 4096
	DefaultRemoteSyncNamespace                                          = shared.DefaultRemoteNamespace
	DefaultMetricsAddress                                               = ":8080"
	DefaultProbeAddress                                                 = ":8081"
	DefaultKymaListenerAddress                                          = ":8082"
	DefaultManifestListenerAddress                                      = ":8083"
	DefaultPprofAddress                                                 = ":8084"
	DefaultWatcherImageName                                             = "runtime-watcher"
	DefaultWatcherImageRegistry                                         = "europe-docker.pkg.dev/kyma-project/prod"
	DefaultWatcherResourcesPath                                         = "./skr-webhook"
	DefaultWatcherResourceLimitsCPU                                     = "0.1"
	DefaultWatcherResourceLimitsMemory                                  = "200Mi"
	DefaultDropCrdStoredVersionMap                                      = "Manifest:v1beta1,Watcher:v1beta1,ModuleTemplate:v1beta1,Kyma:v1beta1"
	DefaultMetricsCleanupIntervalInMinutes                              = 15
	DefaultLeaderElectionLeaseDuration                                  = 180 * time.Second
	DefaultLeaderElectionRenewDeadline                                  = 120 * time.Second
)

Variables

View Source
var (
	ErrMissingWatcherImageTag                  = errors.New("runtime watcher image tag is not provided")
	ErrMissingWatcherImageRegistry             = errors.New("runtime watcher image registry is not provided")
	ErrWatcherDirNotExist                      = errors.New("failed to locate watcher resource manifest folder")
	ErrLeaderElectionTimeoutConfig             = errors.New("configured leader-election-renew-deadline must be less than leader-election-lease-duration")
	ErrInvalidSelfSignedCertKeyLength          = errors.New("invalid self-signed-cert-key-size: must be 4096")
	ErrInvalidManifestRequeueJitterPercentage  = errors.New("invalid manifest requeue jitter percentage: must be between 0 and 0.05")
	ErrInvalidManifestRequeueJitterProbability = errors.New("invalid manifest requeue jitter probability: must be between 0 and 1")
)

Functions

This section is empty.

Types

type FlagVar

type FlagVar struct {
	MetricsAddr                                    string
	EnableDomainNameVerification                   bool
	EnableLeaderElection                           bool
	LeaderElectionLeaseDuration                    time.Duration
	LeaderElectionRenewDeadline                    time.Duration
	EnablePurgeFinalizer                           bool
	EnableKcpWatcher                               bool
	EnableWebhooks                                 bool
	ProbeAddr                                      string
	KymaListenerAddr, ManifestListenerAddr         string
	MaxConcurrentKymaReconciles                    int
	MaxConcurrentManifestReconciles                int
	MaxConcurrentWatcherReconciles                 int
	MaxConcurrentMandatoryModuleReconciles         int
	MaxConcurrentMandatoryModuleDeletionReconciles int
	KymaRequeueSuccessInterval                     time.Duration
	KymaRequeueErrInterval                         time.Duration
	KymaRequeueBusyInterval                        time.Duration
	KymaRequeueWarningInterval                     time.Duration
	ManifestRequeueSuccessInterval                 time.Duration
	ManifestRequeueErrInterval                     time.Duration
	ManifestRequeueBusyInterval                    time.Duration
	ManifestRequeueWarningInterval                 time.Duration
	WatcherRequeueSuccessInterval                  time.Duration
	MandatoryModuleRequeueSuccessInterval          time.Duration
	MandatoryModuleDeletionRequeueSuccessInterval  time.Duration
	ClientQPS                                      float64
	ClientBurst                                    int
	IstioNamespace                                 string
	IstioGatewayName                               string
	IstioGatewayNamespace                          string
	AdditionalDNSNames                             string
	// ListenerPortOverwrite is used to enable the user to overwrite the port
	// used to expose the KCP cluster for the watcher. By default, it will be
	// fetched from the specified gateway.
	ListenerPortOverwrite                  string
	Pprof                                  bool
	PprofAddr                              string
	PprofServerTimeout                     time.Duration
	FailureBaseDelay, FailureMaxDelay      time.Duration
	RateLimiterBurst, RateLimiterFrequency int
	CacheSyncTimeout                       time.Duration
	LogLevel                               int
	InKCPMode                              bool
	PurgeFinalizerTimeout                  time.Duration
	SkipPurgingFor                         string
	RemoteSyncNamespace                    string
	CaCertName                             string
	IsKymaManaged                          bool
	SelfSignedCertDuration                 time.Duration
	SelfSignedCertRenewBefore              time.Duration
	SelfSignedCertRenewBuffer              time.Duration
	SelfSignedCertKeySize                  int
	DropCrdStoredVersionMap                string
	WatcherImageTag                        string
	WatcherImageName                       string
	WatcherImageRegistry                   string
	WatcherResourceLimitsMemory            string
	WatcherResourceLimitsCPU               string
	WatcherResourcesPath                   string
	MetricsCleanupIntervalInMinutes        int
	ManifestRequeueJitterProbability       float64
	ManifestRequeueJitterPercentage        float64
}

func DefineFlagVar

func DefineFlagVar() *FlagVar

func (FlagVar) GetWatcherImage

func (f FlagVar) GetWatcherImage() string

func (FlagVar) Validate

func (f FlagVar) Validate() error

Jump to

Keyboard shortcuts

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