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

[chart] Node update strategy & auto driver image tag #988

Merged

Conversation

stevehipwell
Copy link
Contributor

@stevehipwell stevehipwell commented Jul 23, 2021

Is this a bug fix or adding new feature?
This PR adds the ability to configure the node update strategy and uses the chart app version for the image tag.

Fixes #985.

What is this PR about? / Why do we need it?
With the default update strategy the more nodes added to the cluster the longer it takes to upgrade, this PR makes this customisable and sets the default to the 10% unavailable strategy used by the aws-vpc-cni and the EKS kube-proxy daemonsets.

What testing is done?
Helm template output validated.

@k8s-ci-robot k8s-ci-robot added the needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. label Jul 23, 2021
@k8s-ci-robot
Copy link
Contributor

Welcome @stevehipwell!

It looks like this is your first PR to kubernetes-sigs/aws-ebs-csi-driver 🎉. Please refer to our pull request process documentation to help your PR have a smooth ride to approval.

You will be prompted by a bot to use commands during the review process. Do not be afraid to follow the prompts! It is okay to experiment. Here is the bot commands documentation.

You can also check if kubernetes-sigs/aws-ebs-csi-driver has its own contribution guidelines.

You may want to refer to our testing guide if you run into trouble with your tests not passing.

If you are having difficulty getting your pull request seen, please follow the recommended escalation practices. Also, for tips and tricks in the contribution process you may want to read the Kubernetes contributor cheat sheet. We want to make sure your contribution gets all the attention it needs!

Thank you, and welcome to Kubernetes. 😃

@k8s-ci-robot
Copy link
Contributor

Hi @stevehipwell. Thanks for your PR.

I'm waiting for a kubernetes-sigs member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@k8s-ci-robot k8s-ci-robot requested review from ddebroy and vdhanan July 23, 2021 09:06
@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Jul 23, 2021
@krmichel
Copy link
Contributor

krmichel commented Jul 23, 2021

/approve

@vdhanan
Copy link
Contributor

vdhanan commented Jul 23, 2021

/ok-to-test

@k8s-ci-robot k8s-ci-robot added ok-to-test Indicates a non-member PR verified by an org member that is safe to test. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Jul 23, 2021
@stevehipwell
Copy link
Contributor Author

@vdhanan any chance this could be merged?

@vdhanan
Copy link
Contributor

vdhanan commented Jul 26, 2021

thanks for the PR, i'll review it today

@stevehipwell stevehipwell force-pushed the add-update-strategy branch from 2a17cbc to 95cd6f5 Compare July 28, 2021 08:21
@k8s-ci-robot k8s-ci-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jul 28, 2021
@stevehipwell stevehipwell changed the title [chart] Add updateStrategy to daemonsets [chart] Update driver to v1.2.0, auto image tag & node update strategy Jul 28, 2021
@stevehipwell stevehipwell force-pushed the add-update-strategy branch 2 times, most recently from 19df27f to 26a652d Compare July 28, 2021 08:26
@stevehipwell stevehipwell changed the title [chart] Update driver to v1.2.0, auto image tag & node update strategy [chart] Node update strategy & auto driver image tag Jul 28, 2021
@stevehipwell stevehipwell force-pushed the add-update-strategy branch from 26a652d to fa02d70 Compare July 28, 2021 08:29
@k8s-ci-robot k8s-ci-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jul 28, 2021
@stevehipwell
Copy link
Contributor Author

@vdhanan I've rebased to capture the last chart release and updated the changelog again for the last chart release. Is there any chance of a review today, I need the update strategy feature ASAP.

@stevehipwell stevehipwell force-pushed the add-update-strategy branch from fa02d70 to 16de75b Compare July 28, 2021 09:07
@@ -1,8 +1,8 @@
apiVersion: v2
appVersion: "1.1.3"
appVersion: 1.1.3
Copy link
Contributor

Choose a reason for hiding this comment

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

Is there a reason to add the v elsewhere instead of just setting this to "v1.1.3"

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Although the spec says that appVersion needn't be a valid SemVer version, there are tools that either don't work correctly or error if it's not. The comment about quotes being recommended is also misleading as they're only relevant if you have a version that is a different data type.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Additionally, for many reasons which I won't bother listing, sticking with a valid SemVer 2 version here will cause the least potential for disruption as tools and technologies move on.

Copy link
Contributor

Choose a reason for hiding this comment

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

Fair enough

@k8s-ci-robot k8s-ci-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jul 29, 2021
@stevehipwell stevehipwell force-pushed the add-update-strategy branch from 16de75b to 951de5f Compare July 29, 2021 08:01
@k8s-ci-robot k8s-ci-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jul 29, 2021
@stevehipwell
Copy link
Contributor Author

@krmichel @vdhanan I've rebased and updated the changelog again.

@krmichel
Copy link
Contributor

@stevehipwell I am not an owner, so I can't trigger a merge. @vdhanan can you get this merged for Steve?

Comment on lines +19 to +24
annotations:
artifacthub.io/changes: |
- kind: changed
description: Use chart app version as default image tag
- kind: changed
description: Add updateStrategy to daemonsets
Copy link
Contributor

Choose a reason for hiding this comment

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

i'm curious what purpose these annotations serve when we already have a helm chart changelog

Copy link
Contributor

Choose a reason for hiding this comment

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

They will show up on artifact.io when the issue to publish there gets completed

@vdhanan
Copy link
Contributor

vdhanan commented Jul 30, 2021

sorry for the delayed review, and thanks for the PR -- could you please run make generate-kustomize so that the updateStrategy is available for kustomize users as well? otherwise, LGTM. i'll get this merged immediately once that change is made

@@ -54,7 +56,7 @@ spec:
{{- end }}
containers:
- name: ebs-plugin
image: {{ .Values.image.repository }}:{{ .Values.image.tag }}
image: {{ printf "%s:%s" .Values.image.repository (default (printf "v%s" .Chart.AppVersion) (toString .Values.image.tag)) }}
Copy link
Contributor

Choose a reason for hiding this comment

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

Will .Values.image.tag be empty after change?
Can we use the v{Chart.appversion} in values.yaml continue use the tag field in the template?

Copy link
Contributor

Choose a reason for hiding this comment

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

If image.tag is not set it will fall back to the value in appVersion. When running a helm install/upgrade you can either use --values to pass a yaml file of values that could contain image.tag to provide a version or use --set image.tag to set the version to use.

https://helm.sh/docs/helm/helm_install/

Signed-off-by: Steve Hipwell <steve.hipwell@gmail.com>
@stevehipwell stevehipwell force-pushed the add-update-strategy branch from 951de5f to 10af684 Compare July 30, 2021 07:58
@stevehipwell
Copy link
Contributor Author

Thanks @vdhanan, I've re-generated the Kustomize maifests.

@vdhanan
Copy link
Contributor

vdhanan commented Jul 30, 2021

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Jul 30, 2021
@vdhanan
Copy link
Contributor

vdhanan commented Jul 30, 2021

/approve

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: krmichel, stevehipwell, vdhanan

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jul 30, 2021
@k8s-ci-robot k8s-ci-robot merged commit 2c9ad2b into kubernetes-sigs:master Jul 30, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[chart] Add updateStrategy to chart for daemonsets
5 participants