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

Validate cluster cloud labels #10599

Merged
merged 2 commits into from
Jan 17, 2021

Conversation

olemarkus
Copy link
Member

Users can now set labels such as Name on all resources kOps creates. This breaks consequtive runs of kops update cluster as kOps cannot find its resources.

Fixes #10596

@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 Jan 17, 2021
@k8s-ci-robot k8s-ci-robot added area/api approved Indicates a PR has been approved by an approver from all required OWNERS files. labels Jan 17, 2021
@hakman
Copy link
Member

hakman commented Jan 17, 2021

/test pull-kops-e2e-kubernetes-aws
/test pull-kops-e2e-k8s-containerd

Copy link
Member

@hakman hakman left a comment

Choose a reason for hiding this comment

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

Looks good from my point of view. Not sure if message can be improved.
/lgtm
/hold

pkg/apis/kops/validation/cluster.go Outdated Show resolved Hide resolved
pkg/apis/kops/validation/cluster.go Outdated Show resolved Hide resolved
@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 Jan 17, 2021
@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Jan 17, 2021
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: hakman, olemarkus

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

@rifelpet
Copy link
Member

We should apply the same validation to the instance group cloud labels

@olemarkus
Copy link
Member Author

kOps sets the reserved names before validation so there we already check that this value has not been changed. We could (should) change this behaviour so that these labels are not "sent through" the cluster spec. Then we could pass both maps through the same validation function.

Co-authored-by: Ciprian Hacman <ciprianhacman@gmail.com>
@k8s-ci-robot k8s-ci-robot removed the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Jan 17, 2021
@hakman
Copy link
Member

hakman commented Jan 17, 2021

/lgtm
/hold cancel

@k8s-ci-robot k8s-ci-robot added lgtm "Looks good to me", indicates that a PR is ready to be merged. and removed do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. labels Jan 17, 2021
@hakman
Copy link
Member

hakman commented Jan 17, 2021

/retest

@k8s-ci-robot k8s-ci-robot merged commit 70a9804 into kubernetes:master Jan 17, 2021
@k8s-ci-robot k8s-ci-robot added this to the v1.20 milestone Jan 17, 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. area/api 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.

Update cluster attempts to create resources that already exist.
4 participants