51 lines
1.8 KiB
YAML
51 lines
1.8 KiB
YAML
|
{{- if gt (.Values.artifactory.primary.replicaCount | int) 0 -}}
|
||
|
# Internal service for Artifactory primary node only!
|
||
|
# Used by member nodes to check readiness of primary node before starting up
|
||
|
apiVersion: v1
|
||
|
kind: Service
|
||
|
metadata:
|
||
|
name: {{ template "artifactory-ha.primary.name" . }}
|
||
|
labels:
|
||
|
app: {{ template "artifactory-ha.name" . }}
|
||
|
chart: {{ template "artifactory-ha.chart" . }}
|
||
|
component: {{ .Values.artifactory.name }}
|
||
|
heritage: {{ .Release.Service }}
|
||
|
release: {{ .Release.Name }}
|
||
|
{{- with .Values.artifactory.primary.labels }}
|
||
|
{{ toYaml . | indent 4 }}
|
||
|
{{- end }}
|
||
|
spec:
|
||
|
# Statically setting service type to ClusterIP since this is an internal only service
|
||
|
type: ClusterIP
|
||
|
{{- if and (eq .Values.artifactory.service.type "ClusterIP") .Values.artifactory.service.clusterIP }}
|
||
|
clusterIP: {{ .Values.artifactory.service.clusterIP }}
|
||
|
{{- end }}
|
||
|
ports:
|
||
|
- port: {{ .Values.artifactory.externalPort }}
|
||
|
targetPort: {{ .Values.artifactory.internalPort }}
|
||
|
protocol: TCP
|
||
|
name: http-router
|
||
|
- port: {{ .Values.artifactory.externalArtifactoryPort }}
|
||
|
targetPort: {{ .Values.artifactory.internalArtifactoryPort }}
|
||
|
protocol: TCP
|
||
|
name: http-artifactory
|
||
|
{{- if .Values.artifactory.ssh.enabled }}
|
||
|
- port: {{ .Values.artifactory.ssh.externalPort }}
|
||
|
targetPort: {{ .Values.artifactory.ssh.internalPort }}
|
||
|
protocol: TCP
|
||
|
name: tcp-ssh
|
||
|
{{- end }}
|
||
|
{{- with .Values.artifactory.primary.javaOpts.jmx }}
|
||
|
{{- if .enabled }}
|
||
|
- port: {{ .port }}
|
||
|
targetPort: {{ .port }}
|
||
|
protocol: TCP
|
||
|
name: tcp-jmx
|
||
|
{{- end }}
|
||
|
{{- end }}
|
||
|
selector:
|
||
|
role: {{ template "artifactory-ha.primary.name" . }}
|
||
|
app: {{ template "artifactory-ha.name" . }}
|
||
|
component: "{{ .Values.artifactory.name }}"
|
||
|
release: {{ .Release.Name }}
|
||
|
{{- end -}}
|