cetic / helm-zabbix

Helm Chart For Zabbix
https://artifacthub.io/packages/helm/cetic/zabbix
Apache License 2.0
56 stars 57 forks source link

[cetic/zabbix] Helm Chart: Allow configuration of `metadata:labels` for jobs & cronjobs #76

Closed Rabattkarte closed 2 years ago

Rabattkarte commented 2 years ago

Is your feature request related to a problem? Please describe.

I have the following situation. In my Kubernetes platform I'm only able to work in a pre-defined workspace. I have a Zabbix deployment based on your Helm chart there. Part of this Kubernetes platform is Istio Service Mesh, which mutates all my resources by adding a istio sidecar container.

Now, when I set .Values.zabbixserver.ha_nodes_autoclean.enabled: true, my cronjobs will not finish. The reason for this is that the Zabbix container is quicker with connecting to the database and exiting than the spawn of the Istio sidecar. Which leaves me with a Pod running 1/2 containers - the Istio sidecar. Which again will not finish the cronjob.

Describe the solution you'd like

By setting a metadata:label of sidecar.istio.io/inject=false in the cronjob's pod spec, I could disable the additional Istio sidecar creation. Which would eliminate my problem. Therefore, I need a Helm value to configure this label.

Describe alternatives you've considered

Disabling Istio sidecars on a namespace level is not feasible, since I would be unable to reach my zabbix-web pod then.

Additional context

This explained issue also applies to the init-db-schema job.


Please see this output:

$ kubectl get po
NAME                                   READY   STATUS     RESTARTS   AGE
zabbix-init-db-schema-25mbg            1/2     NotReady   0          17d
zabbix-nodesclean-27686940-4gq2r       1/2     NotReady   1          17d
zabbix-nodesclean-27688380-8zg58       1/2     NotReady   2          16d
zabbix-nodesclean-27689820-v66kb       1/2     NotReady   1          15d
zabbix-nodesclean-27691260-cr89k       1/2     NotReady   1          14d
zabbix-nodesclean-27692700-f4qzf       1/2     NotReady   1          13d
zabbix-nodesclean-27694140-hnt8h       1/2     NotReady   1          12d
zabbix-nodesclean-27695580-f8cq2       1/2     NotReady   1          11d
zabbix-nodesclean-27697020-gxktk       1/2     NotReady   2          10d
zabbix-nodesclean-27698460-5mrkl       1/2     NotReady   1          9d
zabbix-nodesclean-27701340-kj5qz       1/2     NotReady   1          7d6h
zabbix-nodesclean-27702780-dj5lg       1/2     NotReady   1          6d6h
zabbix-nodesclean-27704220-kdxhn       1/2     NotReady   1          5d6h
zabbix-nodesclean-27705660-8h4fn       1/2     NotReady   1          4d6h
zabbix-nodesclean-27707100-8rbl2       1/2     NotReady   2          3d6h
zabbix-nodesclean-27708540-mwgb6       1/2     NotReady   2          2d6h
zabbix-nodesclean-27709980-fphmb       1/2     NotReady   1          30h
zabbix-nodesclean-27711420-6gc6d       1/2     NotReady   1          6h37m
zabbix-zabbix-server-f976c44f8-89ldn   3/3     Running    0          9d
zabbix-zabbix-server-f976c44f8-jj6v7   3/3     Running    0          9d
zabbix-zabbix-server-f976c44f8-lx4nv   3/3     Running    0          9d
zabbix-zabbix-web-74c68cdc6c-gvhqk     2/2     Running    0          9d
$ kubectl get jobs
NAME                         COMPLETIONS   DURATION   AGE
zabbix-init-db-schema        1/1           10m        17d
zabbix-nodesclean-27686940   0/1           17d        17d
zabbix-nodesclean-27688380   0/1           16d        16d
zabbix-nodesclean-27689820   0/1           15d        15d
zabbix-nodesclean-27691260   0/1           14d        14d
zabbix-nodesclean-27692700   0/1           13d        13d
zabbix-nodesclean-27694140   0/1           12d        12d
zabbix-nodesclean-27695580   0/1           11d        11d
zabbix-nodesclean-27697020   0/1           10d        10d
zabbix-nodesclean-27698460   0/1           9d         9d
zabbix-nodesclean-27701340   0/1           7d11h      7d11h
zabbix-nodesclean-27702780   0/1           6d11h      6d11h
zabbix-nodesclean-27704220   0/1           5d11h      5d11h
zabbix-nodesclean-27705660   0/1           4d11h      4d11h
zabbix-nodesclean-27707100   0/1           3d11h      3d11h
zabbix-nodesclean-27708540   0/1           2d11h      2d11h
zabbix-nodesclean-27709980   0/1           35h        35h
zabbix-nodesclean-27711420   0/1           11h        11h
aeciopires commented 2 years ago

Hi @Rabattkarte!

Thank you very much for open issue with very details and well writed. It's a advanced case use of Zabbix with Kubernetes. This is great and I think that is possible to implement your suggestion.

We intend work in this case, but we first need to migrate the code of helm chart to new repo (see this issue). Our deadline for migration is October. After this, we will work in this issue. You can to wait?

Have a nice weekend.

CC: @sa-ChristianAnton

aeciopires commented 2 years ago

Hi @Rabattkarte!

This project is no longer supported. The code was migrated for https://github.com/zabbix-community/helm-zabbix Please, do you can to open this issue in the new repository? We can continue the conversation...