File tree Expand file tree Collapse file tree
tests/templates/kuttl/metrics Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -7,11 +7,12 @@ commands:
77 PROMETHEUS_HELM_CHART_NAME=kube-prometheus-stack
88
99 # `kube-prometheus-stack.fullname` in the Prometheus Helm Chart is used to create the
10- # ServiceAccount names. It is set to `<.Release.Name>-<.Chart.Name>` and truncated to
11- # 26 characters, see
10+ # ServiceAccount names. It is set to `<.Release.Name>-<.Chart.Name>` and truncated to
11+ # 26 characters without dashes at the end , see
1212 # https://github.com/prometheus-community/helm-charts/blob/kube-prometheus-stack-81.2.2/charts/kube-prometheus-stack/templates/_helpers.tpl#L22
1313 KUBE_PROMETHEUS_STACK_FULLNAME=$PROMETHEUS_HELM_RELEASE_NAME-$PROMETHEUS_HELM_CHART_NAME
14- export KUBE_PROMETHEUS_STACK_FULLNAME=${KUBE_PROMETHEUS_STACK_FULLNAME:0:26}
14+ KUBE_PROMETHEUS_STACK_FULLNAME=$(echo -n $KUBE_PROMETHEUS_STACK_FULLNAME | head --bytes=26)
15+ export KUBE_PROMETHEUS_STACK_FULLNAME=$(echo -n $KUBE_PROMETHEUS_STACK_FULLNAME | sed 's/-*$//')
1516
1617 envsubst '$KUBE_PROMETHEUS_STACK_FULLNAME' < 01_rbac.yaml | \
1718 kubectl apply --namespace=$NAMESPACE --filename=-
You can’t perform that action at this time.
0 commit comments