NEXUS-34974 Publish nxrm helm charts to Sonatype helm repo and Artifact Hub
This commit is contained in:
66
nexus-repository-manager/templates/service.yaml
Normal file
66
nexus-repository-manager/templates/service.yaml
Normal file
@@ -0,0 +1,66 @@
|
||||
{{- if .Values.service.enabled -}}
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: {{ include "nexus.fullname" . }}
|
||||
{{- if .Values.service.annotations }}
|
||||
annotations:
|
||||
{{ toYaml .Values.service.annotations | indent 4 }}
|
||||
{{- end }}
|
||||
labels:
|
||||
{{- include "nexus.labels" . | nindent 4 }}
|
||||
{{- if .Values.nexus.extraLabels }}
|
||||
{{- with .Values.nexus.extraLabels }}
|
||||
{{ toYaml . | indent 4 }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
spec:
|
||||
type: {{ .Values.service.type }}
|
||||
ports:
|
||||
- port: {{ .Values.nexus.nexusPort }}
|
||||
protocol: TCP
|
||||
name: nexus-ui
|
||||
selector:
|
||||
{{- include "nexus.selectorLabels" . | nindent 4 }}
|
||||
{{- if .Values.nexus.extraSelectorLabels }}
|
||||
{{- with .Values.nexus.extraSelectorLabels }}
|
||||
{{ toYaml . | indent 4 }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
|
||||
{{- if .Values.nexus.docker.enabled }}
|
||||
{{- range $registry := .Values.nexus.docker.registries }}
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: {{ include "nexus.fullname" $ | trunc 49 }}-docker-{{ $registry.port }}
|
||||
{{- if $.Values.service.annotations }}
|
||||
annotations:
|
||||
{{ toYaml $.Values.service.annotations | indent 4 }}
|
||||
{{- end }}
|
||||
labels:
|
||||
{{- include "nexus.labels" $ | nindent 4 }}
|
||||
{{- if $.Values.nexus.extraLabels }}
|
||||
{{- with $.Values.nexus.extraLabels }}
|
||||
{{ toYaml . | indent 4 }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
spec:
|
||||
type: {{ $.Values.service.type }}
|
||||
ports:
|
||||
- port: {{ $registry.port }}
|
||||
protocol: TCP
|
||||
name: docker-{{ $registry.port }}
|
||||
selector:
|
||||
{{- include "nexus.selectorLabels" $ | nindent 4 }}
|
||||
{{- if $.Values.nexus.extraSelectorLabels }}
|
||||
{{- with $.Values.nexus.extraSelectorLabels }}
|
||||
{{ toYaml . | indent 4 }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
|
||||
{{- end }}
|
||||
{{- end }}
|
Reference in New Issue
Block a user