디렉토리 구조 및 각 서비스 추가
This commit is contained in:
43
helm/sonarqube/templates/ingress.yaml
Normal file
43
helm/sonarqube/templates/ingress.yaml
Normal file
@@ -0,0 +1,43 @@
|
||||
{{- if .Values.ingress.enabled -}}
|
||||
{{- $serviceName := include "sonarqube.fullname" . -}}
|
||||
{{- $servicePort := .Values.service.externalPort -}}
|
||||
apiVersion: networking.k8s.io/v1
|
||||
kind: Ingress
|
||||
metadata:
|
||||
name: {{ template "sonarqube.fullname" . }}
|
||||
labels:
|
||||
app: {{ template "sonarqube.name" . }}
|
||||
chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
|
||||
release: {{ .Release.Name }}
|
||||
heritage: {{ .Release.Service }}
|
||||
{{- if .Values.ingress.labels }}
|
||||
{{ .Values.ingress.labels | toYaml | trimSuffix "\n"| indent 4 -}}
|
||||
{{- end}}
|
||||
{{- if .Values.ingress.annotations}}
|
||||
annotations:
|
||||
{{- range $key, $value := .Values.ingress.annotations }}
|
||||
{{ $key }}: {{ $value | quote }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
spec:
|
||||
{{- if .Values.ingress.ingressClassName }}
|
||||
ingressClassName: {{ .Values.ingress.ingressClassName }}
|
||||
{{- end }}
|
||||
rules:
|
||||
{{- range .Values.ingress.hosts }}
|
||||
- host: {{ printf "%s" .name }}
|
||||
http:
|
||||
paths:
|
||||
- backend:
|
||||
service:
|
||||
name: {{ default $serviceName .serviceName }}
|
||||
port:
|
||||
number: {{ default $servicePort .servicePort }}
|
||||
path: {{ .path | default (include "sonarqube.webcontext" $) }}
|
||||
pathType: {{ default "ImplementationSpecific" .pathType }}
|
||||
{{- end }}
|
||||
{{- if .Values.ingress.tls }}
|
||||
tls:
|
||||
{{ toYaml .Values.ingress.tls | indent 4 }}
|
||||
{{- end -}}
|
||||
{{- end }}
|
||||
Reference in New Issue
Block a user