* feat(argocd-applicationset): Add service and ingress for webhook Signed-off-by: Jos van Bakel <jos@codeaddict.org> * Bump chart version Signed-off-by: Marco Kilchhofer <mkilchhofer@users.noreply.github.com> * Cleanup README Signed-off-by: Marco Kilchhofer <mkilchhofer@users.noreply.github.com> * Cleanup values.yaml Signed-off-by: Jos van Bakel <jos@codeaddict.org> * Add missing var 'kubeVersionOverride' to values and README Signed-off-by: Marco Kilchhofer <mkilchhofer@users.noreply.github.com> * Clarify changelog Signed-off-by: Marco Kilchhofer <mkilchhofer@users.noreply.github.com> Co-authored-by: Marco Kilchhofer <mkilchhofer@users.noreply.github.com>
89 lines
3.1 KiB
YAML
89 lines
3.1 KiB
YAML
{{- if .Values.webhook.ingress.enabled -}}
|
|
{{- $serviceName := include "argo-applicationset.fullname" . -}}
|
|
{{- $servicePort := "webhook" -}}
|
|
{{- $paths := .Values.webhook.ingress.paths -}}
|
|
{{- $extraPaths := .Values.webhook.ingress.extraPaths -}}
|
|
{{- $pathType := .Values.webhook.ingress.pathType -}}
|
|
apiVersion: {{ include "argo-applicationset.ingress.apiVersion" . }}
|
|
kind: Ingress
|
|
metadata:
|
|
{{- if .Values.webhook.ingress.annotations }}
|
|
annotations:
|
|
{{- range $key, $value := .Values.webhook.ingress.annotations }}
|
|
{{ $key }}: {{ $value | quote }}
|
|
{{- end }}
|
|
{{- end }}
|
|
name: {{ include "argo-applicationset.fullname" . }}
|
|
labels:
|
|
{{- include "argo-applicationset.labels" . | nindent 4 }}
|
|
{{- if .Values.webhook.ingress.labels }}
|
|
{{- toYaml .Values.webhook.ingress.labels | nindent 4 }}
|
|
{{- end }}
|
|
spec:
|
|
{{- if eq (include "argo-applicationset.ingress.apiVersion" $) "networking.k8s.io/v1" }}
|
|
{{- with .Values.webhook.ingress.ingressClassName }}
|
|
ingressClassName: {{ . }}
|
|
{{- end }}
|
|
{{- end }}
|
|
rules:
|
|
{{- if .Values.webhook.ingress.hosts }}
|
|
{{- range $host := .Values.webhook.ingress.hosts }}
|
|
- host: {{ $host }}
|
|
http:
|
|
paths:
|
|
{{- if $extraPaths }}
|
|
{{- toYaml $extraPaths | nindent 10 }}
|
|
{{- end }}
|
|
{{- range $p := $paths }}
|
|
- path: {{ $p }}
|
|
{{- if eq (include "argo-applicationset.ingress.apiVersion" $) "networking.k8s.io/v1" }}
|
|
pathType: {{ $pathType }}
|
|
{{- end }}
|
|
backend:
|
|
{{- if eq (include "argo-applicationset.ingress.apiVersion" $) "networking.k8s.io/v1" }}
|
|
service:
|
|
name: {{ $serviceName }}
|
|
port:
|
|
{{- if kindIs "float64" $servicePort }}
|
|
number: {{ $servicePort }}
|
|
{{- else }}
|
|
name: {{ $servicePort }}
|
|
{{- end }}
|
|
{{- else }}
|
|
serviceName: {{ $serviceName }}
|
|
servicePort: {{ $servicePort }}
|
|
{{- end }}
|
|
{{- end -}}
|
|
{{- end -}}
|
|
{{- else }}
|
|
- http:
|
|
paths:
|
|
{{- if $extraPaths }}
|
|
{{- toYaml $extraPaths | nindent 10 }}
|
|
{{- end }}
|
|
{{- range $p := $paths }}
|
|
- path: {{ $p }}
|
|
{{- if eq (include "argo-applicationset.ingress.apiVersion" $) "networking.k8s.io/v1" }}
|
|
pathType: {{ $pathType }}
|
|
{{- end }}
|
|
backend:
|
|
{{- if eq (include "argo-applicationset.ingress.apiVersion" $) "networking.k8s.io/v1" }}
|
|
service:
|
|
name: {{ $serviceName }}
|
|
port:
|
|
{{- if kindIs "float64" $servicePort }}
|
|
number: {{ $servicePort }}
|
|
{{- else }}
|
|
name: {{ $servicePort }}
|
|
{{- end }}
|
|
{{- else }}
|
|
serviceName: {{ $serviceName }}
|
|
servicePort: {{ $servicePort }}
|
|
{{- end }}
|
|
{{- end -}}
|
|
{{- end -}}
|
|
{{- if .Values.webhook.ingress.tls }}
|
|
tls:
|
|
{{- toYaml .Values.webhook.ingress.tls | nindent 4 }}
|
|
{{- end -}}
|
|
{{- end -}}
|