Skip to content
This repository was archived by the owner on May 28, 2021. It is now read-only.

How to label pods? #86

Open
kirreen opened this issue Apr 19, 2018 · 6 comments
Open

How to label pods? #86

kirreen opened this issue Apr 19, 2018 · 6 comments
Labels

Comments

@kirreen
Copy link

kirreen commented Apr 19, 2018

FEATURE REQUEST (?)

How can I label the mysql-pods? Is it possible to achieve from the mysqlcluster-resource?

@prydie
Copy link

prydie commented Apr 20, 2018

Hi @gites @kirreen, currently we apply a couple of labels in the operator but don't expose a mechanism for setting custom labels via the MySQLCluster custom resource. Would you mind expanding on your use case and we can see about implementing?

@marcogiacomassi
Copy link

It would be nice to have custom labels, for example, to define pod affinity or antiaffinity.

@prydie
Copy link

prydie commented Apr 27, 2018

Hi @marcogiacomassi, MySQLCluster has an affinity field for this purpose: .spec.affinity. It's not documented anywhere though which we should fix.

@kirreen does that solve your use-case too?

@kirreen
Copy link
Author

kirreen commented Apr 27, 2018 via email

@prydie
Copy link

prydie commented Apr 27, 2018

@kirreen Ah right. We should add a .spec.podLabels to MySQLCluster that we propagate down to the StatefulSet's Pod template.

@Berndinox
Copy link

Hi @marcogiacomassi, MySQLCluster has an affinity field for this purpose: .spec.affinity. It's not documented anywhere though which we should fix.

@kirreen does that solve your use-case too?

Some Docs on this would still be nice... BR B

tony84727 added a commit to tony84727/mysql-operator that referenced this issue Jan 8, 2020
Signed-off-by: tony84727 <[email protected]>
tony84727 added a commit to tony84727/mysql-operator that referenced this issue Jan 8, 2020
Signed-off-by: tony84727 <[email protected]>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

4 participants