Skip to content

Conversation

@vincepri
Copy link
Member

@vincepri vincepri commented Mar 6, 2020

Signed-off-by: Vince Prignano [email protected]

What this PR does / why we need it:

Follow-up to #2579

  • Adds a conditional check to avoid issuing an Update to the ConfigMap hasn't changed.
  • Adds unit tests against UpdateEtcdMeta.

/assign @chuckha @ncdc
/cc @wfernandes
/milestone v0.3.0

@k8s-ci-robot k8s-ci-robot added this to the v0.3.0 milestone Mar 6, 2020
@k8s-ci-robot k8s-ci-robot requested a review from wfernandes March 6, 2020 22:48
@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Mar 6, 2020
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: vincepri

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

The pull request process is described here

Details 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 Author

vincepri commented Mar 6, 2020

Tested this on a running cluster

controllerManager:
  extraArgs:
    cloud-provider: aws
dns:
  type: CoreDNS
etcd:
  local:
    dataDir: /var/lib/etcd
    imageTag: 3.3.17-0
imageRepository: k8s.gcr.io
kind: ClusterConfiguration
kubernetesVersion: v1.16.4

got the expected result

@vincepri
Copy link
Member Author

vincepri commented Mar 6, 2020

/test pull-cluster-api-test

if err != nil {
return false, errors.Wrap(err, "unable to retrieve current image repository from kubeadm configmap")
}
if currentImageTag != imageTag {
Copy link
Contributor

@wfernandes wfernandes Mar 7, 2020

Choose a reason for hiding this comment

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

Do we need to do a semver based check or are we just going to set it to whatever is passed in? Asking because want to know what to do for CoreDNS imageTag? 🙂
I thought we discussed something on the lines, update if it is a semver patch update.

Copy link
Contributor

Choose a reason for hiding this comment

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

Unless that check is happening elsewhere?

Copy link
Contributor

Choose a reason for hiding this comment

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

that check should happen in the validating webhook so capi can reject the change as quickly as possible and not end up in an error loop that requires human intervention to fix

@vincepri vincepri force-pushed the add-tests-etcd-kcp branch from 1aa7994 to 60f82b0 Compare March 9, 2020 14:00
@vincepri
Copy link
Member Author

vincepri commented Mar 9, 2020

@wfernandes @chuckha fixed all the comments, apart from the verification one, which I agree it should probably go in a validation webhook. I think for now it's probably fine do allow any kind of changes to kubeadm, we can restrict it later on

@vincepri vincepri force-pushed the add-tests-etcd-kcp branch from 60f82b0 to 1641e54 Compare March 9, 2020 14:17
@vincepri vincepri force-pushed the add-tests-etcd-kcp branch from 1641e54 to 44bfb43 Compare March 9, 2020 16:27
@chuckha
Copy link
Contributor

chuckha commented Mar 9, 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 9, 2020
@k8s-ci-robot k8s-ci-robot merged commit 48be8c5 into kubernetes-sigs:master Mar 9, 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/L Denotes a PR that changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants