From c0ff49640c703134e281f7f33565b3a4a0bae482 Mon Sep 17 00:00:00 2001 From: Daniel Quackenbush <25692880+danquack@users.noreply.github.com> Date: Thu, 17 Mar 2022 12:58:25 -0400 Subject: [PATCH] rename schema registry ports --- charts/cp-schema-registry/templates/deployment.yaml | 2 +- charts/cp-schema-registry/templates/service.yaml | 9 +++++++-- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/charts/cp-schema-registry/templates/deployment.yaml b/charts/cp-schema-registry/templates/deployment.yaml index b94995f0..bfe419e6 100644 --- a/charts/cp-schema-registry/templates/deployment.yaml +++ b/charts/cp-schema-registry/templates/deployment.yaml @@ -64,7 +64,7 @@ spec: image: "{{ .Values.image }}:{{ .Values.imageTag }}" imagePullPolicy: "{{ .Values.imagePullPolicy }}" ports: - - name: schema-registry + - name: http containerPort: {{ .Values.servicePort }} protocol: TCP {{- if .Values.prometheus.jmx.enabled }} diff --git a/charts/cp-schema-registry/templates/service.yaml b/charts/cp-schema-registry/templates/service.yaml index f26d01eb..8772a056 100644 --- a/charts/cp-schema-registry/templates/service.yaml +++ b/charts/cp-schema-registry/templates/service.yaml @@ -1,7 +1,12 @@ +{{- $servicename := (include "cp-schema-registry.fullname" .) -}} +{{ if or (eq $servicename "schema-registry") (eq $servicename "schema_registry") }} + {{- fail "setting fullname to schema registry will require app to fail due to host environments: https://kubernetes.io/docs/concepts/services-networking/connect-applications-service/#environment-variables" }} +{{- end -}} + apiVersion: v1 kind: Service metadata: - name: {{ template "cp-schema-registry.fullname" . }} + name: {{ $servicename }} labels: app: {{ template "cp-schema-registry.name" . }} chart: {{ template "cp-schema-registry.chart" . }} @@ -9,7 +14,7 @@ metadata: heritage: {{ .Release.Service }} spec: ports: - - name: schema-registry + - name: http port: {{ .Values.servicePort }} {{- if .Values.prometheus.jmx.enabled }} - name: metrics