feat(ingress): Traefik ingress to revproxy for web UI; ClusterIP revproxy in k3s example
Made-with: Cursor
This commit is contained in:
34
gitops/charts/onelab/templates/ingress.yaml
Normal file
34
gitops/charts/onelab/templates/ingress.yaml
Normal file
@@ -0,0 +1,34 @@
|
||||
{{- if .Values.ingress.enabled }}
|
||||
apiVersion: networking.k8s.io/v1
|
||||
kind: Ingress
|
||||
metadata:
|
||||
name: onelab-revproxy
|
||||
labels:
|
||||
{{- include "onelab.labels" . | nindent 4 }}
|
||||
annotations:
|
||||
argocd.argoproj.io/sync-wave: {{ .Values.syncWaves.apps | quote }}
|
||||
{{- with .Values.ingress.annotations }}
|
||||
{{- toYaml . | nindent 4 }}
|
||||
{{- end }}
|
||||
spec:
|
||||
{{- if .Values.ingress.className }}
|
||||
ingressClassName: {{ .Values.ingress.className | quote }}
|
||||
{{- end }}
|
||||
{{- if .Values.ingress.tls }}
|
||||
tls:
|
||||
- hosts:
|
||||
- {{ .Values.ingress.host | quote }}
|
||||
secretName: {{ if .Values.ingress.tlsSecretName }}{{ .Values.ingress.tlsSecretName | quote }}{{ else }}{{ printf "%s-tls" .Release.Name | quote }}{{ end }}
|
||||
{{- end }}
|
||||
rules:
|
||||
- host: {{ .Values.ingress.host | quote }}
|
||||
http:
|
||||
paths:
|
||||
- path: {{ .Values.ingress.path | quote }}
|
||||
pathType: {{ .Values.ingress.pathType | quote }}
|
||||
backend:
|
||||
service:
|
||||
name: revproxy
|
||||
port:
|
||||
name: http
|
||||
{{- end }}
|
||||
@@ -87,6 +87,17 @@ revproxy:
|
||||
nodePort: 30080
|
||||
ipv6Listen: true
|
||||
|
||||
# HTTP routing to internal nginx (revproxy). On k3s, set className: traefik (default controller).
|
||||
ingress:
|
||||
enabled: false
|
||||
className: ""
|
||||
host: onelab.local
|
||||
path: /
|
||||
pathType: Prefix
|
||||
annotations: {}
|
||||
tls: false
|
||||
tlsSecretName: ""
|
||||
|
||||
# Replica counts (api.apidevice etc. override defaults in templates/workloads.yaml via this map)
|
||||
replicas:
|
||||
api: 2
|
||||
|
||||
Reference in New Issue
Block a user