add external device for dev
This commit is contained in:
29
helm/external-devices/dev/templates/middlewares.yaml
Normal file
29
helm/external-devices/dev/templates/middlewares.yaml
Normal file
@@ -0,0 +1,29 @@
|
||||
{{- if .Values.global.redirectHttpToHttps }}
|
||||
---
|
||||
# Middleware pour rediriger HTTP vers HTTPS
|
||||
apiVersion: traefik.io/v1alpha1
|
||||
kind: Middleware
|
||||
metadata:
|
||||
name: redirect-https
|
||||
namespace: {{ .Values.global.namespace }}
|
||||
spec:
|
||||
redirectScheme:
|
||||
scheme: https
|
||||
permanent: true
|
||||
{{- end }}
|
||||
|
||||
{{- range $name, $device := .Values.externalDevices }}
|
||||
{{- if and $device.enabled $device.basicAuth.enabled }}
|
||||
---
|
||||
# Middleware d'authentification basique pour {{ $name }}
|
||||
apiVersion: traefik.io/v1alpha1
|
||||
kind: Middleware
|
||||
metadata:
|
||||
name: {{ $name }}-auth
|
||||
namespace: {{ $device.namespace | default $.Values.global.namespace }}
|
||||
spec:
|
||||
basicAuth:
|
||||
secret: {{ $device.basicAuth.secretName }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
|
||||
Reference in New Issue
Block a user