From 3f597799bd779ece946dd31acbf663c6a65f6dfb Mon Sep 17 00:00:00 2001 From: gornication <49779801+gornication@users.noreply.github.com> Date: Thu, 5 Oct 2023 19:27:54 +0700 Subject: [PATCH] Update name length limit --- charts/brokencrystals-experimental/templates/_helpers.tpl | 4 ++-- .../templates/bc-postgres-deployment.yaml | 2 +- .../templates/bc-prod-deployment.yaml | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/charts/brokencrystals-experimental/templates/_helpers.tpl b/charts/brokencrystals-experimental/templates/_helpers.tpl index e66810ae..db6130ff 100644 --- a/charts/brokencrystals-experimental/templates/_helpers.tpl +++ b/charts/brokencrystals-experimental/templates/_helpers.tpl @@ -12,13 +12,13 @@ If release name contains chart name it will be used as a full name. */}} {{- define "brokencrystals.fullname" -}} {{- if .Values.fullnameOverride }} -{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" }} +{{- .Values.fullnameOverride | trunc 54 | trimSuffix "-" }} {{- else }} {{- $name := default .Chart.Name .Values.nameOverride }} {{- if contains $name .Release.Name }} {{- .Release.Name | trunc 63 | trimSuffix "-" }} {{- else }} -{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" }} +{{- printf "%s-%s" .Release.Name $name | trunc 54 | trimSuffix "-" }} {{- end }} {{- end }} {{- end }} diff --git a/charts/brokencrystals-experimental/templates/bc-postgres-deployment.yaml b/charts/brokencrystals-experimental/templates/bc-postgres-deployment.yaml index 6572243e..e15fa4f8 100644 --- a/charts/brokencrystals-experimental/templates/bc-postgres-deployment.yaml +++ b/charts/brokencrystals-experimental/templates/bc-postgres-deployment.yaml @@ -49,7 +49,7 @@ spec: kind: Service apiVersion: v1 metadata: - name: {{ include "brokencrystals.fullname" . }}-postgres-service + name: {{ include "brokencrystals.fullname" . }}-postgres-nodejs namespace: {{ .Release.Namespace }} spec: selector: diff --git a/charts/brokencrystals-experimental/templates/bc-prod-deployment.yaml b/charts/brokencrystals-experimental/templates/bc-prod-deployment.yaml index 5c2b986a..3840e28d 100644 --- a/charts/brokencrystals-experimental/templates/bc-prod-deployment.yaml +++ b/charts/brokencrystals-experimental/templates/bc-prod-deployment.yaml @@ -25,7 +25,7 @@ spec: value: "https://{{ .Values.ingress.url }}" # value: "https://brokencrystals.com" - name: DATABASE_HOST - value: "{{ include "brokencrystals.fullname" . }}-postgres-service" + value: "{{ include "brokencrystals.fullname" . }}-postgres-nodejs" - name: DATABASE_SCHEMA value: "bc" - name: DATABASE_USER