adjust the naming style for resources name to make them not pass the length limit (#12206)

Signed-off-by: Gang Liu <gang.liu@daocloud.io>

Signed-off-by: Gang Liu <gang.liu@daocloud.io>
This commit is contained in:
izturn
2022-08-31 21:13:39 +08:00
committed by GitHub
parent 0e539b9b5f
commit a0f2ba8b70
3 changed files with 4 additions and 4 deletions

View File

@@ -2,7 +2,7 @@
apiVersion: {{ include "common.capabilities.ingress.apiVersion" . }}
kind: Ingress
metadata:
name: {{ include "aspnet-core.fullname" . }}-health
name: {{ printf "%s-health" (include "aspnet-core.fullname" .) | trunc 63 | trimSuffix "-" }}
namespace: {{ include "common.names.namespace" . | quote }}
labels: {{- include "common.labels.standard" . | nindent 4 }}
{{- if .Values.commonLabels }}
@@ -57,7 +57,7 @@ spec:
{{- if .Values.healthIngress.tls }}
- hosts:
- {{ .Values.healthIngress.hostname }}
secretName: {{ printf "%s-tls" .Values.healthIngress.hostname }}
secretName: {{ printf "%s-tls" .Values.healthIngress.hostname | trunc 63 | trimSuffix "-" }}
{{- end }}
{{- if .Values.healthIngress.extraTls }}
{{- toYaml .Values.healthIngress.extraTls | nindent 4 }}

View File

@@ -54,7 +54,7 @@ spec:
{{- if .Values.ingress.tls }}
- hosts:
- {{ .Values.ingress.hostname }}
secretName: {{ printf "%s-tls" .Values.ingress.hostname }}
secretName: {{ printf "%s-tls" .Values.ingress.hostname | trunc 63 | trimSuffix "-" }}
{{- end }}
{{- if .Values.ingress.extraTls }}
{{- toYaml .Values.ingress.extraTls | nindent 4 }}

View File

@@ -47,7 +47,7 @@ data:
apiVersion: v1
kind: Secret
metadata:
name: {{ printf "%s-tls" .Values.ingress.hostname }}
name: {{ printf "%s-tls" .Values.ingress.hostname | trunc 63 | trimSuffix "-" }}
namespace: {{ include "common.names.namespace" . | quote }}
labels: {{- include "common.labels.standard" . | nindent 4 }}
{{- if .Values.commonLabels }}