Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Introduced feature gates in etcd druid and added UseEtcdWrapper feature gate #646

Merged
merged 8 commits into from
Jul 31, 2023

Conversation

aaronfern
Copy link
Contributor

@aaronfern aaronfern commented Jul 19, 2023

How to categorize this PR?

/area disaster-recovery
/kind enhancement

What this PR does / why we need it:
This PR achieves the following

  1. Introduce feature gates in etcd-druid. Now large or experimental changes can be made available via a feature gate to only those who opt for them

  2. A new feature gate UseEtcdWrapper has been added. Enabling this feature gates instructs to deploy an etcd-wrapper container along with a distroless etcd-backup-restore conatainer via the statefulset instead of the etcd-custom-image container along with a previous version of the etcd-backup-restore container based on the alpine distro

Which issue(s) this PR fixes:
Fixes partially #643

Special notes for your reviewer:
This PR is to be merged only after a release of etcd-custom-image is made

Release note:

Feature gates have been introduced in etcd-druid, and can be specified using CLI flag `--feature-gate`.
`UseEtcdWrapper` feature gate has been introduced to allow users to opt for the new [etcd-wrapper](https://github.com/gardener/etcd-wrapper) image.

@aaronfern aaronfern requested a review from a team as a code owner July 19, 2023 17:31
@gardener-robot gardener-robot added needs/review Needs review area/disaster-recovery Disaster recovery related kind/enhancement Enhancement, improvement, extension size/l Size of pull request is large (see gardener-robot robot/bots/size.py) needs/second-opinion Needs second review by someone else labels Jul 19, 2023
@gardener-robot-ci-1 gardener-robot-ci-1 added reviewed/ok-to-test Has approval for testing (check PR in detail before setting this label because PR is run on CI/CD) needs/ok-to-test Needs approval for testing (check PR in detail before setting this label because PR is run on CI/CD) and removed reviewed/ok-to-test Has approval for testing (check PR in detail before setting this label because PR is run on CI/CD) labels Jul 19, 2023
@gardener-robot-ci-3 gardener-robot-ci-3 added reviewed/ok-to-test Has approval for testing (check PR in detail before setting this label because PR is run on CI/CD) and removed reviewed/ok-to-test Has approval for testing (check PR in detail before setting this label because PR is run on CI/CD) labels Jul 19, 2023
@gardener-robot-ci-3 gardener-robot-ci-3 added the reviewed/ok-to-test Has approval for testing (check PR in detail before setting this label because PR is run on CI/CD) label Jul 19, 2023
@gardener-robot-ci-1 gardener-robot-ci-1 removed the reviewed/ok-to-test Has approval for testing (check PR in detail before setting this label because PR is run on CI/CD) label Jul 19, 2023
@gardener-robot gardener-robot added size/xl Size of pull request is huge (see gardener-robot robot/bots/size.py) and removed size/l Size of pull request is large (see gardener-robot robot/bots/size.py) labels Jul 21, 2023
@gardener-robot-ci-3 gardener-robot-ci-3 added the reviewed/ok-to-test Has approval for testing (check PR in detail before setting this label because PR is run on CI/CD) label Jul 21, 2023
@gardener-robot-ci-2 gardener-robot-ci-2 removed the reviewed/ok-to-test Has approval for testing (check PR in detail before setting this label because PR is run on CI/CD) label Jul 21, 2023
Copy link
Contributor

@shreyas-s-rao shreyas-s-rao left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@aaronfern thanks for the PR! I've tested the changes and it works well.
Please rename all occurrences of feature flags to feature gates since we no longer use individual CLI flags for setting each feature, but rather use a single --feature-gates flag for this, similar to upstream k8s feature gates.

Change release notes to:

feature operator

Feature gates have been introduced in etcd-druid, and can be specified using CLI flag `--feature-gate`.

feature operator

`UseEtcdWrapper` feature gate has been introduced to allow users to opt for the new [etcd-wrapper](https://github.com/gardener/etcd-wrapper) image.

Also update PR description to say that this PR partially fixes #643

docs/deployment/feature-flags.md Outdated Show resolved Hide resolved
charts/druid/templates/controller-deployment.yaml Outdated Show resolved Hide resolved
charts/druid/templates/controller-deployment.yaml Outdated Show resolved Hide resolved
charts/druid/templates/controller-deployment.yaml Outdated Show resolved Hide resolved
charts/druid/templates/controller-deployment.yaml Outdated Show resolved Hide resolved
main.go Outdated Show resolved Hide resolved
main.go Outdated Show resolved Hide resolved
controllers/etcd/config.go Outdated Show resolved Hide resolved
pkg/component/etcd/statefulset/statefulset.go Show resolved Hide resolved
pkg/component/etcd/statefulset/values_helper.go Outdated Show resolved Hide resolved
@gardener-robot gardener-robot added the needs/changes Needs (more) changes label Jul 22, 2023
@gardener-robot-ci-3 gardener-robot-ci-3 added reviewed/ok-to-test Has approval for testing (check PR in detail before setting this label because PR is run on CI/CD) and removed reviewed/ok-to-test Has approval for testing (check PR in detail before setting this label because PR is run on CI/CD) labels Jul 24, 2023
Co-authored-by: Shreyas Rao <[email protected]>
@gardener-robot-ci-3 gardener-robot-ci-3 added the reviewed/ok-to-test Has approval for testing (check PR in detail before setting this label because PR is run on CI/CD) label Jul 24, 2023
Copy link
Contributor

@seshachalam-yv seshachalam-yv left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall looks good to me
/lgtm

Copy link
Contributor

@shreyas-s-rao shreyas-s-rao left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm

@gardener-robot gardener-robot added needs/second-opinion Needs second review by someone else and removed reviewed/lgtm Has approval for merging labels Jul 28, 2023
@gardener-robot-ci-2 gardener-robot-ci-2 removed the reviewed/ok-to-test Has approval for testing (check PR in detail before setting this label because PR is run on CI/CD) label Jul 28, 2023
@gardener-robot-ci-2 gardener-robot-ci-2 added the reviewed/ok-to-test Has approval for testing (check PR in detail before setting this label because PR is run on CI/CD) label Jul 28, 2023
@gardener-robot-ci-2 gardener-robot-ci-2 removed the reviewed/ok-to-test Has approval for testing (check PR in detail before setting this label because PR is run on CI/CD) label Jul 28, 2023
@gardener-robot-ci-3 gardener-robot-ci-3 added the reviewed/ok-to-test Has approval for testing (check PR in detail before setting this label because PR is run on CI/CD) label Jul 28, 2023
@gardener-robot-ci-2 gardener-robot-ci-2 removed the reviewed/ok-to-test Has approval for testing (check PR in detail before setting this label because PR is run on CI/CD) label Jul 28, 2023
@shreyas-s-rao
Copy link
Contributor

/test pull-etcd-druid-e2e-kind

@shreyas-s-rao
Copy link
Contributor

@aaronfern I ran the e2e tests locally with feature gates enabled, and I see that some of the tests fail since they are timing out. I've attached the test logs here.

e2e-test-feature-gates.log

I see that the issue is resolved by doubling the values for timeouts singleNodeEtcdTimeout and multiNodeEtcdTimeout in the e2e tests. After this I ran the e2e test again and had a flake as well. Attaching logs from two runs of e2e tests, where one passed and one failed. PTAL

e2e-test-feature-gates-changed-passed.log
e2e-test-feature-gates-changed-failed.log

Please make the changes in this PR before we merge it. Thanks!

@shreyas-s-rao
Copy link
Contributor

/hold until e2e tests when feature-gates are enabled, are fixed.
I suspect it could be due to the additional init container that takes some time to run, in addition to the image pull time.

@gardener-robot gardener-robot added the reviewed/do-not-merge Has no approval for merging as it may break things, be of poor quality or have (ext.) dependencies label Jul 28, 2023
@aaronfern aaronfern added the reviewed/ok-to-test Has approval for testing (check PR in detail before setting this label because PR is run on CI/CD) label Jul 31, 2023
@aaronfern
Copy link
Contributor Author

/test pull-etcd-druid-e2e-kind-alpha-features

2 similar comments
@aaronfern
Copy link
Contributor Author

/test pull-etcd-druid-e2e-kind-alpha-features

@aaronfern
Copy link
Contributor Author

/test pull-etcd-druid-e2e-kind-alpha-features

@shreyas-s-rao
Copy link
Contributor

shreyas-s-rao commented Jul 31, 2023

/unhold as e2e tests are passing with feature gates enabled, as can be seen from the prow job pull-etcd-druid-e2e-kind-alpha-features.

@gardener-robot gardener-robot removed the reviewed/do-not-merge Has no approval for merging as it may break things, be of poor quality or have (ext.) dependencies label Jul 31, 2023
@shreyas-s-rao shreyas-s-rao merged commit d391910 into gardener:master Jul 31, 2023
@gardener-robot gardener-robot added the status/closed Issue is closed (either delivered or triaged) label Jul 31, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/disaster-recovery Disaster recovery related kind/enhancement Enhancement, improvement, extension merge/squash Should be merged via 'Squash and merge' needs/ok-to-test Needs approval for testing (check PR in detail before setting this label because PR is run on CI/CD) needs/second-opinion Needs second review by someone else reviewed/ok-to-test Has approval for testing (check PR in detail before setting this label because PR is run on CI/CD) size/l Size of pull request is large (see gardener-robot robot/bots/size.py) status/closed Issue is closed (either delivered or triaged)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants