Fix lack of labelSelector for cockroachDB#584
Fix lack of labelSelector for cockroachDB#584kylepl wants to merge 2 commits intocockroachdb:masterfrom
Conversation
…s not match anything - so the spread constraint is not useful: kubernetes/kubernetes#135797 (comment). i I happened to notice this applies to cockroachDB too.
|
@kylepl Nice catch! Thanks for pointing out this. Instead of |
|
Sure, done! |
| whenUnsatisfiable: DoNotSchedule | ||
| labelSelector: | ||
| matchLabels: | ||
| crdb.cockroachlabs.com/cluster: cockroachdb |
There was a problem hiding this comment.
The label value will not always be cockroachdb. The value needs to be "{{ template \"cockroachdb.fullname\" . }}", similar to the CR name.
There was a problem hiding this comment.
Thanks for catching that.
To confirm, do you want the value of the row to be exactly:
crdb.cockroachlabs.com/cluster: cockroachdb: "{{ template \"cockroachdb.fullname\" . }}"
Not the quotations. I ask since I'm not sure how template evaluation works for things in values.yaml (rather than things in templates/) - and I don't see any examples of it in the same values.yaml file.
There was a problem hiding this comment.
Yeah that should work, you can test it out once by rendering templates.
I recently discovered that if you do not set a labelSelector, it seems not to match anything - so the spread constraint is not useful: kubernetes/kubernetes#135797 (comment).
I happened to notice this applies to cockroachDB too.