- enhanced the strimzi helm template function to adhering to k8s object
naming rules as per https://kubernetes.io/docs/concepts/overview/working-with-objects/names/
- underscores to be replaced with hyphens and prefix and suffix hyphens
will be trimmed to make it a valid k8s object name
Issue-ID: CPS-2977
Change-Id: I255c257cd97c61c80b2e4e8dec8dd2de0a0d6dfd
Signed-off-by: mpriyank <priyank.maheshwari@est.tech>
kind: KafkaTopic
metadata:
{{- if (hasKey $topic "strimziTopicName") }}
- name: {{ ($topic.strimziTopicName) }}-kt
+ name: {{ ($topic.strimziTopicName | replace "_" "-" | trimPrefix "-" | trimSuffix "-") }}-kt
{{- else }}
- name: {{ ($topic.name) | lower }}-kt
+ name: {{ ($topic.name | lower | replace "_" "-" | trimPrefix "-" | trimSuffix "-") }}-kt
{{- end }}
labels:
{{- include "common.labels" $ | nindent 4 }}