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

Add comment pointing out incorrect SDN annotation naming #12627

Merged
merged 1 commit into from
Jan 25, 2017

Conversation

danwinship
Copy link
Contributor

In openshift/openshift-sdn#271 we added the pod.network.openshift.io/assign-macvlan annotation, with the name based on comments from @smarterclayton (specifically openshift/openshift-sdn#271 (comment)).

Two later annotations copied the pod.network.openshift.io/ part despite being HostSubnet annotations rather than Pod annotations. So it seems to me that those names were wrong, and while we can't fix them now (because API) we can at least clearly note that they're wrong so that people don't keep copying the wrongness.

I argue in the comment here that they should have the prefix hostsubnet.openshift.io/, because they're HostSubnet annotations, and because including network in there like with the macvlan annotation would be redundant, since HostSubnet, unlike Pod, is inherently networking-related. But then maybe it would be better with network, just for consistently namespacing sdn-related annotations?

(This came up while figuring out what to call the NetNamespace annotation for enabling multicast in the namespace, which, FTR, I'm planning to call netnamespace.openshift.io/multicast-enabled, by the same logic.)

@smarterclayton does this match your view of how annotation names should work?

@smarterclayton
Copy link
Contributor

smarterclayton commented Jan 23, 2017 via email

@smarterclayton
Copy link
Contributor

smarterclayton commented Jan 23, 2017 via email

Also document other SDN annotations, and fix up a constant name to
match conventions.
@danwinship
Copy link
Contributor Author

I would recommend "namespace.network.openshift.io/*" for your suggested name

It's an annotation on the NetNamespace object, not the Namespace though, so maybe "netnamespace.network.openshift.io" would be best?

(That's about the next PR though. For this PR, it sounds like HostSubnet annotations should definitely be "hostsubnet.network.openshift.io/", so I've updated the comment accordingly. OK @openshift/networking ?)

Copy link
Contributor

@knobunc knobunc left a comment

Choose a reason for hiding this comment

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

The proposed ideal name seems reasonable.

Thanks for putting in the comment so that whoever uses this code makes a more correct decision.

@danwinship
Copy link
Contributor Author

[merge]

@danwinship
Copy link
Contributor Author

flake is #11016 (via #12322). [merge]

@openshift-bot
Copy link
Contributor

Evaluated for origin merge up to 1b59b71

@openshift-bot
Copy link
Contributor

openshift-bot commented Jan 25, 2017

continuous-integration/openshift-jenkins/merge SUCCESS (https://ci.openshift.redhat.com/jenkins/job/test_pr_origin/13303/) (Base Commit: 7b6ccb0) (Image: devenv-rhel7_5777)

@openshift-bot openshift-bot merged commit 59e57b1 into openshift:master Jan 25, 2017
@danwinship danwinship deleted the annotations branch January 26, 2017 16:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants