Skip to content

Commit

Permalink
Enable customizing for basic auth gateway (#6)
Browse files Browse the repository at this point in the history
Co-authored-by: Victor Getz <sd>
  • Loading branch information
victorgetz authored May 8, 2023
1 parent 9a9872c commit e9427ce
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 11 deletions.
2 changes: 1 addition & 1 deletion charts/basic-auth-gateway/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
apiVersion: v2
description: basic auth gateway chart for traefik
name: basic-auth-gateway
version: 0.2.5
version: 0.3.0
1 change: 0 additions & 1 deletion charts/basic-auth-gateway/security/users

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ metadata:
spec:
basicAuth:
secret: admin-secret
headerField: X-WebAuth-User
headerField: X-WebAuth-User
2 changes: 1 addition & 1 deletion charts/basic-auth-gateway/templates/basic-auth-secret.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ metadata:
name: admin-secret
data:
users: |2
{{ printf "security/users" | .Files.Get | trim | b64enc }}
{{.Values.credentials | trim | b64enc }}
4 changes: 2 additions & 2 deletions charts/basic-auth-gateway/templates/route.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ spec:
middlewares:
- name: basic-auth-gateway
services:
- name: {{ .Values.upstream.service.name }}
port: {{ .Values.upstream.service.port }}
- name: {{ .Values.ingressRoute.upstream.service.name }}
port: {{ .Values.ingressRoute.upstream.service.port }}
tls:
secretName: {{.Values.ingressRoute.certificate.name}}
domains:
Expand Down
12 changes: 7 additions & 5 deletions charts/basic-auth-gateway/values.yaml
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
upstream:
service:
name: traefik-websecure-internal
port: 8444

#https://doc.traefik.io/traefik/middlewares/http/basicauth/
credentials: |-
admin:$2y$05$4F7SwJRC6SL.uu0DUr1cjO.IOnY3uVb12MWTi/YG/TVsFulTRk4qe
ingressRoute:
upstream:
service:
name: traefik-websecure-internal
port: 8444
adminDomain: "admin.my-domain.com"
entryPointName: "websecure"
certificate:
Expand Down

0 comments on commit e9427ce

Please sign in to comment.