template_enricher can't handle label app.kubernetes.io/name
Opened this issue · 2 comments
zmx commented
Describe the bug
K8s Pod create by Argo CD will have label app.kubernetes.io/name
The KubernetesResourceEvent have that label, but string.Template.safe_substitute can't handle dot and slash
To Reproduce
$ kubectl get pod cert-manager-758c6b68ff-v2zwl -n cert-manager -o yaml
apiVersion: v1
kind: Pod
metadata:
annotations:
prometheus.io/path: /metrics
prometheus.io/port: "9402"
prometheus.io/scrape: "true"
creationTimestamp: "2023-11-16T22:55:04Z"
generateName: cert-manager-758c6b68ff-
labels:
app: cert-manager
app.kubernetes.io/component: controller
app.kubernetes.io/instance: cert-manager
app.kubernetes.io/managed-by: Helm
app.kubernetes.io/name: cert-manager
app.kubernetes.io/version: v1.11.2
azure.workload.identity/use: "true"
helm.sh/chart: cert-manager-v1.11.2
Expected behavior
template could handle ${app.kubernetes.io/name}
github-actions commented
zmx commented
https://kubernetes.io/docs/concepts/overview/working-with-objects/common-labels/#labels
It is Recommended Labels