Replies: 3 comments
-
You can use But that doesn't really seem like a correct or optimal approach to your problem. Labels are used for filtering in k8s, so I would suggest using those. You could also use some of the existing labels that the Controller automatically adds.
I see you added this later. You could limit which labels you retain. |
Beta Was this translation helpful? Give feedback.
-
I don't think passing the prefix of pod names into prometheus metric label will increase the cardinality. Shouldn't the following two usages have similar effects?
|
Beta Was this translation helpful? Give feedback.
-
@agilgur5 Anyways, @agilgur5, @jswxstw, thank you for your answers. You convinced me to give a chance to the labels approach. I will try to enable |
Beta Was this translation helpful? Give feedback.
-
Summary
Can we add a prefix to the pods names launched by the Workflows?
We tried to set some extra configuration on a custom workflow-controller-configmap , trying for example to use
podSpecPatch
inworkflowDefaults
, but with unsuccessful results.Motivation
The workflow pods finish in a Failed state in different situations, e.g. an error on the
WorkflowTemplate
manifest. We want to exclude these pods from the KubePodNotReady Prometheus Alert that we have in place. So, our first approach is adding a prefix on the pods names.Our second approach could be maybe launching these pods in another namespace, but this is a "migration" task that we would like to avoid.
Also, we would want to avoid passing labels to the prometheus metrics to control our cardinality.
Extra notes
We also added the Role and RoleBinding needed to patch the pods:
kube-prometheus-stack KubePodNotReady expression:
Thanks!
Beta Was this translation helpful? Give feedback.
All reactions