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

Openstack: add port metadata #12122

Merged
merged 2 commits into from
Aug 10, 2021

Conversation

mitch000001
Copy link
Contributor

This adds some more tags to the Openstack ports.
Specifically the previous code added the cluster name as an unkeyed tag. Now the cluster name gets added with a named tag, following the server metadata:
The cluster name is tagged by adding KubernetesCluster=cluster-name as a tag. Also, the instance group name and the stripped port name (without instance group and cluster name).

This is a preparation of enabling rolling update with surge (detaching instances) for Openstack. The goal is to be able to remove the port name which also embeds the order of the port within the instance group and to replace it with a hashed name, similar to how the servers are created.

@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Aug 9, 2021
@k8s-ci-robot k8s-ci-robot added area/provider/openstack Issues or PRs related to openstack provider needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Aug 9, 2021
@k8s-ci-robot
Copy link
Contributor

Hi @mitch000001. Thanks for your PR.

I'm waiting for a kubernetes 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 added the size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. label Aug 9, 2021
@johngmyers
Copy link
Member

/ok-to-test
/cc @zetaab

@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 Aug 9, 2021
The overall goal is to get rid of the specific port names and replace
them with hashed ones. This in turn allows us to introduce rolling
updates for Openstack in a later stage.
OpenStack limits the tag length to 60 characters.
@mitch000001
Copy link
Contributor Author

/retest

@mitch000001
Copy link
Contributor Author

/test pull-kops-verify-bazel

@zetaab
Copy link
Member

zetaab commented Aug 9, 2021

@mitch000001 when we are thinking to recreate ports in rolling update. We need also check that internal certificates will work after that (in k8s). Also another problem is that bastion host in that case will be changing floatingip all the time. So we need take care that old one is deleted correctly.

I will check content of this pr tomorrow. Anyways I like the idea of detaching instances

@mitch000001
Copy link
Contributor Author

Well, that PR is only attaching useful information to the ports for later use. I haven't looked into the issues you mentioned but thanks for the heads-up 🙂

@johngmyers
Copy link
Member

Consider using kubernetes.io/cluster/NAME: owned instead of legacy tag names.

@zetaab
Copy link
Member

zetaab commented Aug 10, 2021

@johngmyers the problem with openstack is that all metadata does not allow / chars and also the maximum length is quite small. I do not know what is the case with ports, maybe works maybe not

@zetaab
Copy link
Member

zetaab commented Aug 10, 2021

for me this looks valid. However, @mitch000001 could you check comment #12122 (comment) and test can we use those tags? It might be that we cannot

@mitch000001
Copy link
Contributor Author

So, I guess it could be possible to add that label. The problem is more that those things are really tags, so we'd use the artificial key=value.
I can try out if slashes are valid characters for tags and add them if possible.

@mitch000001
Copy link
Contributor Author

mitch000001 commented Aug 10, 2021

Having said my earlier comment the main problem with tags is that they have a length limit, I think it's 60 characters, so the proposed label could be slightly too long given that it contains both key and value.

Copy link
Member

@zetaab zetaab left a comment

Choose a reason for hiding this comment

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

/approve
/lgtm

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

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: zetaab

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 Aug 10, 2021
@k8s-ci-robot k8s-ci-robot merged commit 4a0fa2d into kubernetes:master Aug 10, 2021
@k8s-ci-robot k8s-ci-robot added this to the v1.22 milestone Aug 10, 2021
@mitch000001 mitch000001 deleted the openstack-port-metadata branch August 11, 2021 06:55
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/provider/openstack Issues or PRs related to openstack provider 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/XL Denotes a PR that changes 500-999 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants