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

🏃 Update KCP hash to include KubeadmConfigSpec #2392

Merged
merged 1 commit into from
Mar 2, 2020

Conversation

detiber
Copy link
Member

@detiber detiber commented Feb 20, 2020

What this PR does / why we need it:

Updates the hashing used by KubeadmControlPlane to include changes to Spec.KubeadmConfigSpec, so that we can make at least a subset of that field mutable in the future.

@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Feb 20, 2020
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: detiber

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 Feb 20, 2020
@chuckha
Copy link
Contributor

chuckha commented Feb 20, 2020

we are holding off on this feature, as well as the webhook modifications to allow mutable specs until after v0.3.0 gets released

/hold

@k8s-ci-robot k8s-ci-robot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Feb 20, 2020
@chuckha
Copy link
Contributor

chuckha commented Feb 21, 2020

/milestone v0.3.x

@k8s-ci-robot k8s-ci-robot added this to the v0.3.x milestone Feb 21, 2020
"sigs.k8s.io/cluster-api/controllers/mdutil"
controlplanev1 "sigs.k8s.io/cluster-api/controlplane/kubeadm/api/v1alpha3"
)

type fieldsToHash struct {
version string
infrastructureTemplate corev1.ObjectReference
kubeadmConfigSpec cabpkv1.KubeadmConfigSpec
}

// Compute will generate a 32-bit FNV-1a Hash of the Version and InfrastructureTemplate
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
// Compute will generate a 32-bit FNV-1a Hash of the Version and InfrastructureTemplate
// Compute will generate a 32-bit FNV-1a Hash of the Version, InfrastructureTemplate and KubeadmConfigSpec

@ncdc ncdc added the area/control-plane Issues or PRs related to control-plane lifecycle management label Feb 21, 2020
@vincepri
Copy link
Member

vincepri commented Mar 2, 2020

@chuckha @detiber Are we considering to allow the kubeadmconfig spec to change in a future version of v0.3.x? If so, we should probably merge this PR to include the field in the hash (but still disallow it through webhooks). This will allow us to release v0.3.0 with an immutable kubeadmconfig spec. When, in the future, we'll relax the webhook requirements the hash won't change and the controller won't detect it as a rolling upgrade.

@chuckha
Copy link
Contributor

chuckha commented Mar 2, 2020

@chuckha @detiber Are we considering to allow the kubeadmconfig spec to change in a future version of v0.3.x? If so, we should probably merge this PR to include the field in the hash (but still disallow it through webhooks). This will allow us to release v0.3.0 with an immutable kubeadmconfig spec. When, in the future, we'll relax the webhook requirements the hash won't change and the controller won't detect it as a rolling upgrade.

works for me, it's already disabled in the webhook.
/hold cancel

@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 2, 2020
Copy link
Member

@vincepri vincepri left a comment

Choose a reason for hiding this comment

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

/milestone v0.3.0

LGTM pending @CecileRobertMichon's comment fix

@k8s-ci-robot k8s-ci-robot modified the milestones: v0.3.x, v0.3.0 Mar 2, 2020
@k8s-ci-robot k8s-ci-robot added size/S Denotes a PR that changes 10-29 lines, ignoring generated files. and removed size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Mar 2, 2020
@detiber detiber changed the title 🐛 Update hash to include KubeadmConfigSpec, since at least part of it is now mutable Update hash to include KubeadmConfigSpec, since we plan on making at least part of it mutable Mar 2, 2020
@detiber
Copy link
Member Author

detiber commented Mar 2, 2020

/test pull-cluster-api-capd-e2e

@k8s-ci-robot
Copy link
Contributor

@detiber: The following test failed, say /retest to rerun all failed tests:

Test name Commit Details Rerun command
pull-cluster-api-capd-e2e 1928ed7 link /test pull-cluster-api-capd-e2e

Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR.

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. I understand the commands that are listed here.

@vincepri
Copy link
Member

vincepri commented Mar 2, 2020

/retitle 🏃 Update KCP hash to include KubeadmConfigSpec

@k8s-ci-robot k8s-ci-robot changed the title Update hash to include KubeadmConfigSpec, since we plan on making at least part of it mutable 🏃 Update KCP hash to include KubeadmConfigSpec Mar 2, 2020
@vincepri
Copy link
Member

vincepri commented Mar 2, 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 2, 2020
@k8s-ci-robot k8s-ci-robot merged commit 265d6de into kubernetes-sigs:master Mar 2, 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. area/control-plane Issues or PRs related to control-plane lifecycle management 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/S Denotes a PR that changes 10-29 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants