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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: added "strategy.rolling_update.max_surge" attr to daemonset #2416

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

manjinder-mckc
Copy link

@manjinder-mckc manjinder-mckc commented Feb 5, 2024

Description

Enhancement: #2106

Acceptance tests

  • Have you added an acceptance test for the functionality being added?
  • Have you run the acceptance tests on this branch?

Output from acceptance testing:

$ make testacc TESTARGS='-run=TestAccKubernetesDaemonSetV1_basic'
==> Checking that code complies with gofmt requirements...
go vet ./...
TF_ACC=1 go test "/Users/manjinder_singh/Builds/forks/terraform-provider-kubernetes/kubernetes" -v -vet=off -run=TestAccKubernetesDaemonSetV1_basic -parallel 8 -timeout 3h
=== RUN   TestAccKubernetesDaemonSetV1_basic
=== PAUSE TestAccKubernetesDaemonSetV1_basic
=== CONT  TestAccKubernetesDaemonSetV1_basic
--- PASS: TestAccKubernetesDaemonSetV1_basic (4.73s)
PASS
ok  	github.com/hashicorp/terraform-provider-kubernetes/kubernetes	5.791s

...

Release Note

Release note for CHANGELOG:

- Updated daemonset resource to support max_surge attribute of rolling_update strategy

References

Community Note

  • Please vote on this issue by adding a 馃憤 reaction to the original issue to help the community and maintainers prioritize this request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment

@manjinder-mckc manjinder-mckc requested a review from a team as a code owner February 5, 2024 07:28
@hashicorp-cla
Copy link

hashicorp-cla commented Feb 5, 2024

CLA assistant check
All committers have signed the CLA.

Copy link
Contributor

@sheneska sheneska left a comment

Choose a reason for hiding this comment

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

Hi @manjinder-mckc, thank you for these changes! Please take a look at the comment I left in the code.

Description: "The maximum number of nodes with an existing available DaemonSet pod that can have an updated DaemonSet pod during during an update. Value can be an absolute number (ex: 5) or a percentage of desired pods (ex: 10%). This can not be 0 if MaxUnavailable is 0. Absolute number is calculated from percentage by rounding up to a minimum of 1. Default value is 0. Example: when this is set to 30%, at most 30% of the total number of nodes that should be running the daemon pod (i.e. status.desiredNumberScheduled) can have their a new pod created before the old pod is marked as deleted.",
Optional: true,
Default: "0",
ValidateFunc: validation.StringMatch(regexp.MustCompile(`^([0-9]+|[0-9]+%|)$`), ""),
Copy link
Contributor

Choose a reason for hiding this comment

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

This expression allows percentages higher than 100, here is an example that captures a more precise range of values.

@iBrandyJackson
Copy link
Member

iBrandyJackson commented Mar 28, 2024

Quick check-in on this PR. @manjinder-mckc please take a look at our comment and let us know if you have any questions with the suggested improvement. We would love to move forward with merging. Thanks!

@manjinder-mckc
Copy link
Author

@iBrandyJackson @sheneska Apologies for late reply. Thank you for reviewing. I will take a look and pick this up now.

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

Successfully merging this pull request may close these issues.

None yet

4 participants