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

✨ Etcd version #2579

Merged
merged 1 commit into from
Mar 6, 2020
Merged

Conversation

chuckha
Copy link
Contributor

@chuckha chuckha commented Mar 6, 2020

/hold
Depends on #2553

What this PR does / why we need it:
This PR allows KCP to keep track of the local etcd version and manage the value stored in the kubeadm config map. The result is that when an upgrade is performed it will use the value found in the kubeadm config map.

The workflow I tested with was:

  1. Create a 3 node control plane cluster where the control plane is managed by a kubeadm control plane resource
  2. Find the image tag of etcd (3.3.15-0)
  3. Locate a list of existing etcd versions found at k8s.gcr.io/etcd (gcloud container images list-tags k8s.gcr.io/etcd)
  4. Pick a newer patch version (3.3.17-0)
  5. Update the kubeadm control plane's kubeadm cluster local etcd configuration to use the tag 3.3.17-0.
  6. Wait for the upgrade to finish
  7. Check the image of etcd on each of the new nodes to confirm it's 3.3.17-0

Which issue(s) this PR fixes (optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close the issue(s) when PR gets merged):
Fixes #2543

@k8s-ci-robot k8s-ci-robot added do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. labels Mar 6, 2020
@k8s-ci-robot k8s-ci-robot requested review from justinsb and ncdc March 6, 2020 21:07
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: chuckha

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 Mar 6, 2020
@vincepri
Copy link
Member

vincepri commented Mar 6, 2020

/milestone v0.3.0

@k8s-ci-robot k8s-ci-robot added this to the v0.3.0 milestone Mar 6, 2020
@vincepri
Copy link
Member

vincepri commented Mar 6, 2020

waiting for rebase, code changes related to the configmap are 👍

@k8s-ci-robot k8s-ci-robot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. labels Mar 6, 2020
@chuckha
Copy link
Contributor Author

chuckha commented Mar 6, 2020

/hold cancel

rebased

@k8s-ci-robot k8s-ci-robot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Mar 6, 2020
@vincepri
Copy link
Member

vincepri commented Mar 6, 2020

@chuckha should we add some unit tests? I known it’s eod for you, I can pick them up after we merge this

@chuckha
Copy link
Contributor Author

chuckha commented Mar 6, 2020

sure, i can add some

@chuckha
Copy link
Contributor Author

chuckha commented Mar 6, 2020

@vincepri actually yeah, if you don't mind. I can do them on Monday as well if you don't get to 'em today 👍

if err != nil {
return err
}
config := &kubeadmConfig{ConfigMap: kubeadmConfigMap}
Copy link
Member

Choose a reason for hiding this comment

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

Should we compare first the values in the map vs the ones we want to set before issuing the update?

Copy link
Member

Choose a reason for hiding this comment

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

I'll do a follow-up here as well

@vincepri
Copy link
Member

vincepri commented Mar 6, 2020

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Mar 6, 2020
@k8s-ci-robot k8s-ci-robot merged commit 4d0192c into kubernetes-sigs:master Mar 6, 2020
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. 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.

KCP: Handle etcd upgrades
3 participants