Documentation ¶
Index ¶
- Constants
- Variables
- func CentralLoggingConfiguration() (component.CentralLoggingConfig, error)
- func DependencyWatchdogConfiguration(role string) (string, error)
- func Name(role string) string
- func NewBootstrapper(client client.Client, namespace string, image string, ...) component.DeployWaiter
- func ServiceName(role string) string
- func WaitUntilEtcdsReady(ctx context.Context, c client.Client, logger logrus.FieldLogger, ...) error
- type BackupConfig
- type Class
- type Etcd
- type HVPAConfig
- type Secrets
Constants ¶
const ( // ClassNormal is a constant for a normal etcd (without extensive metrics or higher resource settings, etc.) ClassNormal Class = "normal" // ClassImportant is a constant for an important etcd (with extensive metrics or higher resource settings, etc.). // Such etcds are also unsafe to evict (from the PoV of the cluster-autoscaler when trying to scale down). ClassImportant Class = "important" // SecretNameCA is the name of the secret containing the CA certificate and key for the etcd. SecretNameCA = v1beta1constants.SecretNameCAETCD // SecretNameServer is the name of the secret containing the server certificate and key for the etcd. SecretNameServer = "etcd-server-cert" // SecretNameClient is the name of the secret containing the client certificate and key for the etcd. SecretNameClient = "etcd-client-tls" // LabelAppValue is the value of a label whose key is 'app'. LabelAppValue = "etcd-statefulset" // NetworkPolicyName is the name of a network policy that allows ingress traffic to etcd from certain sources. NetworkPolicyName = "allow-etcd" )
const (
// Druid is a constant for the name of the etcd-druid.
Druid = "etcd-druid"
)
Variables ¶
var ( // TimeNow is a function returning the current time exposed for testing. TimeNow = time.Now // PortEtcdServer is the port exposed by etcd for server-to-server communication. PortEtcdServer = 2380 // PortEtcdClient is the port exposed by etcd for client communication. PortEtcdClient = 2379 // PortBackupRestore is the client port exposed by the backup-restore sidecar container. PortBackupRestore = 8080 )
var TimeoutWaitForManagedResource = 2 * time.Minute
TimeoutWaitForManagedResource is the timeout used while waiting for the ManagedResources to become healthy or deleted.
Functions ¶
func CentralLoggingConfiguration ¶
func CentralLoggingConfiguration() (component.CentralLoggingConfig, error)
CentralLoggingConfiguration returns a fluent-bit parser and filter for the etcd and backup-restore sidecar logs.
func DependencyWatchdogConfiguration ¶
DependencyWatchdogConfiguration returns the configuration for the dependency watchdog ensuring that its dependant pods are restarted as soon as it recovers from a crash loop.
func NewBootstrapper ¶
func NewBootstrapper( client client.Client, namespace string, image string, kubernetesVersion *semver.Version, imageVectorOverwrite *string, ) component.DeployWaiter
NewBootstrapper creates a new instance of DeployWaiter for the etcd bootstrapper.
func ServiceName ¶
ServiceName returns the service name for an etcd for the given role.
func WaitUntilEtcdsReady ¶
func WaitUntilEtcdsReady( ctx context.Context, c client.Client, logger logrus.FieldLogger, namespace string, count int, interval time.Duration, severeThreshold time.Duration, timeout time.Duration, ) error
WaitUntilEtcdsReady waits until all etcds in the given namespace are ready.
Types ¶
type BackupConfig ¶
type BackupConfig struct { // Provider is the name of the infrastructure provider for the blob storage bucket. Provider string // Container is the name of the blob storage bucket. Container string // SecretRefName is the name of a Secret object containing the credentials of the selected infrastructure provider. SecretRefName string // Prefix is a prefix that shall be used for the filename of the backups of this etcd. Prefix string // FullSnapshotSchedule is a cron schedule that declares how frequent full snapshots shall be taken. FullSnapshotSchedule string }
BackupConfig contains information for configuring the backup-restore sidecar so that it takes regularly backups of the etcd's data directory.
type Etcd ¶
type Etcd interface { component.DeployWaiter component.MonitoringComponent // ServiceDNSNames returns the service DNS names for the etcd. ServiceDNSNames() []string // Snapshot triggers the backup-restore sidecar to perform a full snapshot in case backup configuration is provided. Snapshot(context.Context, kubernetes.PodExecutor) error // SetSecrets sets the secrets. SetSecrets(Secrets) // SetBackupConfig sets the backup configuration. SetBackupConfig(config *BackupConfig) // SetHVPAConfig sets the HVPA configuration. SetHVPAConfig(config *HVPAConfig) }
Etcd contains functions for a etcd deployer.
type HVPAConfig ¶
type HVPAConfig struct { // Enabled states whether an HVPA object shall be deployed. Enabled bool // MaintenanceTimeWindow contains begin and end of a time window that allows down-scaling the etcd in case its // resource requests/limits are unnecessarily high. MaintenanceTimeWindow gardencorev1beta1.MaintenanceTimeWindow }
HVPAConfig contains information for configuring the HVPA object for the etcd.
type Secrets ¶
type Secrets struct { // CA is a secret containing the CA certificate and key. CA component.Secret // Server is a secret containing the server certificate and key. Server component.Secret // Client is a secret containing the client certificate and key. Client component.Secret }
Secrets is collection of secrets for the etcd.