Skip to content

Commit

Permalink
trunc 63 metadata.name
Browse files Browse the repository at this point in the history
Signed-off-by: TheRealNoob <[email protected]>
  • Loading branch information
TheRealNoob committed Jan 29, 2025
1 parent 13d57b1 commit c8658c9
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@
apiVersion: v1
kind: List
metadata:
name: {{ include "kube-prometheus-stack.fullname" $ }}-additional-prometheus-rules
name: {{ printf "%s-%s" (include "kube-prometheus-stack.fullname" $) "additional-prometheus-rules" | trunc 63 | trimSuffix "-" }}
namespace: {{ template "kube-prometheus-stack.namespace" . }}
items:
{{- if .Values.additionalPrometheusRulesMap }}
{{- range $prometheusRuleName, $prometheusRule := .Values.additionalPrometheusRulesMap }}
- apiVersion: monitoring.coreos.com/v1
kind: PrometheusRule
metadata:
name: {{ template "kube-prometheus-stack.fullname" $ }}-{{ $prometheusRuleName }}
name: {{ printf "%s-%s" (include "kube-prometheus-stack.fullname" $) $prometheusRuleName | trunc 63 | trimSuffix "-" }}
namespace: {{ template "kube-prometheus-stack.namespace" $ }}
labels:
app: {{ template "kube-prometheus-stack.name" $ }}
Expand All @@ -27,7 +27,7 @@ items:
- apiVersion: monitoring.coreos.com/v1
kind: PrometheusRule
metadata:
name: {{ template "kube-prometheus-stack.fullname" $ }}-{{ .name }}
name: {{ printf "%s-%s" (include "kube-prometheus-stack.fullname" $) .name | trunc 63 | trimSuffix "-" }}
namespace: {{ template "kube-prometheus-stack.namespace" $ }}
labels:
app: {{ template "kube-prometheus-stack.name" $ }}
Expand Down

0 comments on commit c8658c9

Please sign in to comment.