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

feat: support setting minReadySeconds on the stateful sets #1023

Merged

Conversation

mattrobinsonsre
Copy link
Contributor

@mattrobinsonsre mattrobinsonsre commented Jul 10, 2024

Description

minReadySeconds has been standard on stateful sets since v1.25 https://kubernetes.io/blog/2022/09/15/app-rollout-features-reach-stable/#solved-problem-statefulset-minreadyseconds
Configuring it allows one to control the rate at which pods are replaced. This is especially important for a replication+sentinel configuration where there needs to be a reasonable amount of time allowed for the failover processes to complete between pod replacements.

Fixes #1022

feature

  • New feature (non-breaking change which adds functionality)

Checklist

  • Tests have been added/modified and all tests pass.
  • Functionality/bugs have been confirmed to be unchanged or fixed.
  • I have performed a self-review of my own code.
  • Documentation has been updated or added where necessary.

Additional Context

@mattrobinsonsre
Copy link
Contributor Author

This probably needs more work, I couldn't find a suitable test to update. Would appreciate any pointers.

Copy link

gitguardian bot commented Jul 11, 2024

⚠️ GitGuardian has uncovered 16 secrets following the scan of your pull request.

Please consider investigating the findings and remediating the incidents. Failure to do so may lead to compromising the associated services or software components.

Since your pull request originates from a forked repository, GitGuardian is not able to associate the secrets uncovered with secret incidents on your GitGuardian dashboard.
Skipping this check run and merging your pull request will create secret incidents on your GitGuardian dashboard.

🔎 Detected hardcoded secrets in your pull request
GitGuardian id GitGuardian status Secret Commit Filename
5685959 Triggered Generic Password 6ce272d tests/e2e-chainsaw/v1beta2/password/redis-replication/secret.yaml View secret
5685959 Triggered Generic Password f5a837f tests/e2e-chainsaw/v1beta2/ha-setup/secured/partially-secured/replication-password/secret.yaml View secret
5685959 Triggered Generic Password f5a837f tests/e2e-chainsaw/v1beta2/ha-setup/secured/partially-secured/sentinel-password/secret.yaml View secret
5685959 Triggered Generic Password c676d3f tests/e2e-chainsaw/v1beta2/password/redis-cluster/secret.yaml View secret
5685959 Triggered Generic Password ee9f5de tests/e2e-chainsaw/v1beta2/password/redis-cluster/secret.yaml View secret
5685959 Triggered Generic Password e474d47 example/v1beta2/password_protected/secret.yaml View secret
5685959 Triggered Generic Password 34a530b example/v1beta2/password_protected/secret.yaml View secret
5685959 Triggered Generic Password c676d3f tests/e2e-chainsaw/v1beta2/password/redis-replication/secret.yaml View secret
5685959 Triggered Generic Password 34a530b example/v1beta1/password_protected/secret.yaml View secret
8742214 Triggered Generic Private Key c38b701 tests/testdata/secrets/tls.key View secret
9242444 Triggered Generic Password c676d3f tests/e2e-chainsaw/v1beta2/password/redis-standalone/secret.yaml View secret
9242444 Triggered Generic Password c676d3f tests/e2e-chainsaw/v1beta2/password/redis-replication/secret.yaml View secret
9242444 Triggered Generic Password c676d3f tests/e2e-chainsaw/v1beta2/password/redis-cluster/secret.yaml View secret
6356333 Triggered Generic Password a3941a4 example/v1beta2/backup_restore/restore/env-secret.yaml View secret
6356333 Triggered Generic Password a3941a4 scripts/backup/env_vars.env View secret
6356333 Triggered Generic Password a3941a4 scripts/restore/env_vars.env View secret
🛠 Guidelines to remediate hardcoded secrets
  1. Understand the implications of revoking this secret by investigating where it is used in your code.
  2. Replace and store your secrets safely. Learn here the best practices.
  3. Revoke and rotate these secrets.
  4. If possible, rewrite git history. Rewriting git history is not a trivial act. You might completely break other contributing developers' workflow and you risk accidentally deleting legitimate data.

To avoid such incidents in the future consider


🦉 GitGuardian detects secrets in your source code to help developers and security teams secure the modern development process. You are seeing this because you or someone else with access to this repository has authorized GitGuardian to scan your pull request.

Copy link

gitguardian bot commented Jul 11, 2024

️✅ There are no secrets present in this pull request anymore.

If these secrets were true positive and are still valid, we highly recommend you to revoke them.
Once a secret has been leaked into a git repository, you should consider it compromised, even if it was deleted immediately.
Find here more information about risks.


🦉 GitGuardian detects secrets in your source code to help developers and security teams secure the modern development process. You are seeing this because you or someone else with access to this repository has authorized GitGuardian to scan your pull request.

@mattrobinsonsre mattrobinsonsre marked this pull request as draft July 11, 2024 07:42
@mattrobinsonsre mattrobinsonsre marked this pull request as ready for review July 11, 2024 09:09
@mattrobinsonsre
Copy link
Contributor Author

Found and updated the tests and also updated the examples. Tests pass

Copy link

codecov bot commented Jul 23, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 46.19%. Comparing base (d121d86) to head (802f01b).
Report is 87 commits behind head on master.

Additional details and impacted files
@@             Coverage Diff             @@
##           master    #1023       +/-   ##
===========================================
+ Coverage   35.20%   46.19%   +10.99%     
===========================================
  Files          19       20        +1     
  Lines        3213     2704      -509     
===========================================
+ Hits         1131     1249      +118     
+ Misses       2015     1380      -635     
- Partials       67       75        +8     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@drivebyer
Copy link
Collaborator

Thanks for your contribution. @mattrobinsonsre

@drivebyer drivebyer enabled auto-merge (squash) July 23, 2024 05:50
@drivebyer drivebyer merged commit c3bbe88 into OT-CONTAINER-KIT:master Jul 23, 2024
30 checks passed
@drivebyer
Copy link
Collaborator

This PR causes backward compatibility problems, like #1030 (comment). We need to set minReadySeconds as an optional value in the chart.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

stateful set minReadySeconds
2 participants