Orange-OpenSource / galera-operator

Galera Operator automates tasks for managing a Galera cluster in Kubernetes
Apache License 2.0
34 stars 18 forks source link

annotation support #17

Open punasusi opened 3 years ago

punasusi commented 3 years ago

adding annotations to the sql.databases/v1beta2 Galera template which could be added to the Galera pods created by the operator would be very useful feature. (maybe labels also?)

sebs42 commented 3 years ago

Have you an example about your needs ? Today, Labels and Annotations are available for the Galera object, and are not copied to pods (and we do not have labels and annotations in pod template) because you should not manage pods but only Galera objects. Today we are missing a client or an api (api is experimented but it is not a clean solution, the design of mysql and Galera is cli oriented) to execute commands on Galera cluster and we have to connect at the beginning to create tables, users and so on. Have you something else in mind ?

punasusi commented 3 years ago

Our monitoring solution needs pods to have annotations, in order to export the metrics. The idea is not to really manage the pods, but to be able to select them based on annotations by other tools/scripts/jobs. I don't have any use case for labels currently. We also generate pod usage reports for cost allocations based on annotations and labels (still proof of concept). Just considering that is 'passing annotations and labels' from Galera object to the pods it manages, it shouldn't really cause any issues I can see, and adds other possibilities.

sebs42 commented 3 years ago

ok so Annotations and Labels can be implemented in PodTemplate, It means it can be different from Annotations and Labels provided for the Galera Object. I will check that.