mirror of
https://github.com/ZwareBear/JFrog-Cloud-Installers.git
synced 2026-01-22 02:06:58 -06:00
Openshift4 operator for Artifactory HA v7.0.2
This commit is contained in:
56
Openshift4/artifactoryha-helm/templates/ingress.yaml
Executable file
56
Openshift4/artifactoryha-helm/templates/ingress.yaml
Executable file
@@ -0,0 +1,56 @@
|
||||
{{- if .Values.ingress.enabled -}}
|
||||
{{- $serviceName := include "artifactory-ha.fullname" . -}}
|
||||
{{- $servicePort := .Values.artifactory.externalPort -}}
|
||||
{{- $artifactoryServicePort := .Values.artifactory.externalArtifactoryPort -}}
|
||||
{{- if semverCompare ">=v1.14.0" .Capabilities.KubeVersion.GitVersion }}
|
||||
apiVersion: networking.k8s.io/v1beta1
|
||||
{{- else }}
|
||||
apiVersion: extensions/v1beta1
|
||||
{{- end }}
|
||||
kind: Ingress
|
||||
metadata:
|
||||
name: {{ template "artifactory-ha.fullname" . }}
|
||||
labels:
|
||||
app: {{ template "artifactory-ha.name" . }}
|
||||
chart: {{ template "artifactory-ha.chart" . }}
|
||||
release: {{ .Release.Name }}
|
||||
heritage: {{ .Release.Service }}
|
||||
{{- if .Values.ingress.labels }}
|
||||
{{ .Values.ingress.labels | toYaml | trimSuffix "\n"| indent 4 -}}
|
||||
{{- end}}
|
||||
{{- if .Values.ingress.annotations }}
|
||||
annotations:
|
||||
force-update: "{{ randAlpha 63 | lower }}"
|
||||
{{ .Values.ingress.annotations | toYaml | trimSuffix "\n" | indent 4 -}}
|
||||
{{- end }}
|
||||
spec:
|
||||
{{- if .Values.ingress.defaultBackend.enabled }}
|
||||
backend:
|
||||
serviceName: {{ $serviceName }}
|
||||
servicePort: {{ $servicePort }}
|
||||
{{- end }}
|
||||
rules:
|
||||
{{- if .Values.ingress.hosts }}
|
||||
{{- range $host := .Values.ingress.hosts }}
|
||||
- host: {{ $host | quote }}
|
||||
http:
|
||||
paths:
|
||||
- path: {{ $.Values.ingress.routerPath }}
|
||||
backend:
|
||||
serviceName: {{ $serviceName }}
|
||||
servicePort: {{ $servicePort }}
|
||||
- path: {{ $.Values.ingress.artifactoryPath }}
|
||||
backend:
|
||||
serviceName: {{ $serviceName }}
|
||||
servicePort: {{ $artifactoryServicePort }}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
{{- with .Values.ingress.additionalRules }}
|
||||
{{ tpl . $ | indent 2 }}
|
||||
{{- end }}
|
||||
|
||||
{{- if .Values.ingress.tls }}
|
||||
tls:
|
||||
{{ toYaml .Values.ingress.tls | indent 4 }}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
Reference in New Issue
Block a user