Skip to content

Commit

Permalink
Remove UseEtcdWrapper feature gate (#999)
Browse files Browse the repository at this point in the history
  • Loading branch information
shreyas-s-rao authored Feb 27, 2025
1 parent 495bef3 commit c5d8f6e
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 36 deletions.
8 changes: 4 additions & 4 deletions docs/concepts/etcd-cluster-components.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,21 +8,21 @@ For every `Etcd` cluster that is provisioned by `etcd-druid` it deploys a set of

* Replicas for the StatefulSet are derived from `Etcd.Spec.Replicas` in the custom resource.

* Each pod comprises of two containers:
* Each pod comprises two containers:
* `etcd-wrapper` : This is the main container which runs an etcd process.

* `etcd-backup-restore` : This is a side-container which does the following:

* Orchestrates the initialization of etcd. This includes validation of any existing etcd data directory, restoration in case of corrupt etcd data directory files for a single-member etcd cluster.
* Periodically renewes member lease.
* Optionally takes schedule and thresold based delta and full snapshots and pushes them to a configured object store.
* Periodically renews member lease.
* Optionally takes schedule and threshold based delta and full snapshots and pushes them to a configured object store.
* Orchestrates scheduled etcd-db defragmentation.

> NOTE: This is not a complete list of functionalities offered out of `etcd-backup-restore`.
**Code reference:** [StatefulSet-Component](https://github.com/gardener/etcd-druid/tree/480213808813c5282b19aff5f3fd6868529e779c/internal/component/statefulset)

> For detailed information on each container you can visit [etcd-wrapper](https://github.com/gardener/etcd-wrapper) and [etcd-backup-restore](https://github.com/gardener/etcd-backup-restore) respositories.
> For detailed information on each container you can visit [etcd-wrapper](https://github.com/gardener/etcd-wrapper) and [etcd-backup-restore](https://github.com/gardener/etcd-backup-restore) repositories.
## ConfigMap

Expand Down
11 changes: 6 additions & 5 deletions docs/deployment/feature-gates.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,12 @@ The following tables are a summary of the feature gates that you can set on etcd

## Feature Gates for Graduated or Deprecated Features

| Feature | Default | Stage | Since | Until |
|------------------|---------|---------|--------|--------|
| `UseEtcdWrapper` | `false` | `Alpha` | `0.19` | `0.21` |
| `UseEtcdWrapper` | `true` | `Beta` | `0.22` | `0.24` |
| `UseEtcdWrapper` | `true` | `GA` | `0.25` | |
| Feature | Default | Stage | Since | Until |
|------------------|---------|-----------|--------|--------|
| `UseEtcdWrapper` | `false` | `Alpha` | `0.19` | `0.21` |
| `UseEtcdWrapper` | `true` | `Beta` | `0.22` | `0.24` |
| `UseEtcdWrapper` | `true` | `GA` | `0.25` | `0.27` |
| `UseEtcdWrapper` | | `Removed` | `0.28` | |

## Using a Feature

Expand Down
12 changes: 6 additions & 6 deletions docs/deployment/version-compatibility-matrix.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,15 @@
We strongly recommend using `etcd-druid` with the supported kubernetes versions, published in this document.
The following is a list of kubernetes versions supported by the respective `etcd-druid` versions.

| etcd-druid version | Kubernetes version |
|------|------|
| >=v0.20 | >=v1.21 |
| >=v0.14 && <0.20 | All versions supported |
| <v0.14 | < v1.25 |
| etcd-druid version | Kubernetes version |
|--------------------|------------------------|
| >=v0.20 | >=v1.21 |
| >=v0.14 && <0.20 | All versions supported |
| <v0.14 | < v1.25 |

## etcd-backup-restore & etcd-wrapper

| etcd-druid version | etcd-backup-restore version | etcd-wrapper version |
| ------------------ | --------------------------- | -------------------- |
|--------------------|-----------------------------|----------------------|
| >=v0.23.1 | >=v0.30.2 | >=v0.2.0 |

1 change: 0 additions & 1 deletion internal/component/statefulset/builder.go
Original file line number Diff line number Diff line change
Expand Up @@ -468,7 +468,6 @@ func (b *stsBuilder) getBackupRestoreContainerCommandArgs() []string {
commandArgs = append(commandArgs, fmt.Sprintf("--snapstore-temp-directory=%s/temp", common.VolumeMountPathEtcdData))
commandArgs = append(commandArgs, fmt.Sprintf("--etcd-connection-timeout=%s", defaultEtcdConnectionTimeout))
commandArgs = append(commandArgs, "--enable-member-lease-renewal=true")
// Enable/Disable use Etcd Wrapper in BackupRestore container. Once `use-etcd-wrapper` feature-gate is GA then this value will always be true.
commandArgs = append(commandArgs, "--use-etcd-wrapper=true")

var quota = defaultQuota
Expand Down
27 changes: 7 additions & 20 deletions internal/features/features.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,28 +9,15 @@ import (
)

const (
// Every feature should add method here following this template:
//
// // MyFeature enables Foo.
// // owner: @username
// // alpha: v0.X
// MyFeature featuregate.Feature = "MyFeature"

// UseEtcdWrapper enables the use of etcd-wrapper image and a compatible version
// of etcd-backup-restore, along with component-specific configuration
// changes required for the usage of the etcd-wrapper image.
// owner @unmarshall @aaronfern
// alpha: v0.19
// beta: v0.22
// GA: v0.25
UseEtcdWrapper featuregate.Feature = "UseEtcdWrapper"
// Every feature should add method here following this template:
//
// // MyFeature enables Foo.
// // owner: @username
// // alpha: v0.X
// MyFeature featuregate.Feature = "MyFeature"
)

var defaultFeatures = map[featuregate.Feature]featuregate.FeatureSpec{
UseEtcdWrapper: {Default: true, PreRelease: featuregate.GA, LockToDefault: true},
}

// GetDefaultFeatures returns the default feature gates known to etcd-druid.
func GetDefaultFeatures() map[featuregate.Feature]featuregate.FeatureSpec {
return defaultFeatures
return nil
}

0 comments on commit c5d8f6e

Please sign in to comment.