diff --git a/templates/ingress.yaml b/templates/ingress.yaml index cb90c2f7773ed8166d472860f13600dfaa3b99c8..a890a1a7fb38bccca432006e2b9c02b016b4f52b 100644 --- a/templates/ingress.yaml +++ b/templates/ingress.yaml @@ -1,6 +1,6 @@ {{- if .Values.ingress.enabled -}} {{- $apiVersions := .Capabilities.APIVersions -}} -{{- $serviceName := include "docker-registry.fullname" . -}} +{{- $serviceName := .Values.service.name | default (include "docker-registry.fullname" .) -}} {{- $servicePort := .Values.service.port -}} {{- $path := .Values.ingress.path -}} apiVersion: {{- if $apiVersions.Has "networking.k8s.io/v1" }} networking.k8s.io/v1 {{- else }} networking.k8s.io/v1beta1 {{- end }} diff --git a/templates/service.yaml b/templates/service.yaml index 6cdc67f980732955b93059d6c87d1eab032437ff..921148138f6f00ec6cbfb48ade7ae8e7f6da76be 100644 --- a/templates/service.yaml +++ b/templates/service.yaml @@ -1,11 +1,7 @@ apiVersion: v1 kind: Service metadata: -{{- if .Values.service.name }} - name: {{ .Values.service.name }} -{{- else }} - name: {{ template "docker-registry.fullname" . }} -{{- end }} + name: {{ .Values.service.name | default (include "docker-registry.fullname" .) }} namespace: {{ .Values.namespace | default .Release.Namespace }} labels: app: {{ template "docker-registry.name" . }} diff --git a/values.yaml b/values.yaml index c077dfad47339ac710c8698078f3a3dbeac70495..a40f6368310d48cd5830c34c346336ed67f92c35 100644 --- a/values.yaml +++ b/values.yaml @@ -26,7 +26,7 @@ image: deployment: {} # annotations: service: - name: "" + name: "" type: ClusterIP # sessionAffinity: None # sessionAffinityConfig: {}