-
Notifications
You must be signed in to change notification settings - Fork 1k
add pod metadata and annotations as part of the service discovery response #1254
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
Conversation
Configure Renovate
|
||
} | ||
|
||
public Metadata(@DefaultValue("true") boolean addLabels, String labelsPrefix, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
add a new constructor not to break the public existing one
this(instanceId, serviceId, host, port, metadata, secure, null, null, Map.of(), Map.of()); | ||
} | ||
|
||
public DefaultKubernetesServiceInstance(String instanceId, String serviceId, String host, int port, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
keep the previous constructor intact and introduce a new one
@ryanjbaxter ready to look at. thank you. |
} | ||
|
||
@Override | ||
public Map<String, String> podLabels() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there a reason to not just put this in the metadata?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was afraid that service labels and pod labels could create a mess if put together, like what if labels colide? i thought that separating them would be cleaner.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah that is kind of what I was saying here....I suppose there is no other way, we either run the risk of colliding or we separate things.
Since we have some freedom here with this new property could we make it Map<String, Map<String, String> call it podMetadata
and put both labels and annotations in that map?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is where I was hesitant too, I thought not everyone is interested in one or the other... I don't know. I'll listen to your advice here. I mean what if you want to separate your logic on labels only, for example?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if you enable one or the other only that one would be added to the map
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
my turn to miss-read!
Map<String, Map<String, String>
so something like : labels = {a = b}
and annotations = {c = d}
, right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
correct
No description provided.