Skip to content

Commit

Permalink
fix(traefik): reference to incorrect middlewares
Browse files Browse the repository at this point in the history
  • Loading branch information
james-d-elliott committed Feb 16, 2021
1 parent d73af57 commit 56914c9
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 6 deletions.
2 changes: 1 addition & 1 deletion charts/authelia/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
apiVersion: v2
name: authelia
version: 0.1.14
version: 0.1.15
kubeVersion: ">= 1.13.0"
description: Authelia is a Single Sign-On Multi-Factor portal for web apps
type: application
Expand Down
2 changes: 1 addition & 1 deletion charts/authelia/templates/NOTES.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ You should be able to access Authelia soon via https://{{ include "authelia.ingr

You will also need to direct your ingress to use the following path for forward auth: {{ include "authelia.forwardAuthPath" (merge (dict "Namespace" .Release.Namespace) .) }}.
{{- else if (include "authelia.enabled.ingress.traefik" .) }}
You have selected the Traefik CRD to deploy the ingress. You can apply the {{ include "authelia.ingress.traefikCRD.middleware.name.forwardAuth" . }} ({{ .Release.Namespace }} namespace) middleware to any Traefik ingress type in order to use Authelia auth with that ingress.
You have selected the Traefik CRD to deploy the ingress. You can apply the {{ include "authelia.ingress.traefikCRD.middleware.name.chainAuth" . }} ({{ .Release.Namespace }} namespace) middleware to any Traefik ingress type in order to use Authelia auth with that ingress.

You should be able to access Authelia soon via https://{{ include "authelia.ingressHostWithPath" . }} if everything is configured correctly in your values and the DNS record points to the correct location.
{{- else -}}
Expand Down
9 changes: 8 additions & 1 deletion charts/authelia/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -142,14 +142,21 @@ Returns true if duo secret is configured.
{{/*
Returns the name of the chain Middleware for forward auth which gets applied to other IngressRoutes.
*/}}
{{- define "authelia.ingress.traefikCRD.middleware.name.chain" -}}
{{- define "authelia.ingress.traefikCRD.middleware.name.chainAuth" -}}
{{- if .Values.ingress.traefikCRD.middlewares.chains.auth.nameOverride -}}
{{- .Values.ingress.traefikCRD.middlewares.chains.auth.nameOverride -}}
{{- else -}}
{{- printf "chain-%s-auth" (include "authelia.name" .) -}}
{{- end -}}
{{- end -}}

{{/*
Returns the name of the chain Middleware for forward auth which gets applied to other IngressRoutes.
*/}}
{{- define "authelia.ingress.traefikCRD.middleware.name.chainIngress" -}}
{{- printf "chain-%s" (include "authelia.name" .) -}}
{{- end -}}

{{/*
Special Annotations Generator for the Ingress kind.
*/}}
Expand Down
2 changes: 1 addition & 1 deletion charts/authelia/templates/traefikCRD/ingressRoute.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ spec:
match: {{ default (printf "Host(`%s`) && PathPrefix(`%s`)" (include "authelia.ingressHost" .) (include "authelia.path" .)) .Values.ingress.traefikCRD.matchOverride }}
priority: {{ default 10 .Values.ingress.traefikCRD.priority }}
middlewares:
- name: {{ include "authelia.ingress.traefikCRD.middleware.name.chain" . }}
- name: {{ include "authelia.ingress.traefikCRD.middleware.name.chainIngress" . }}
namespace: {{ .Release.Namespace }}
services:
- kind: Service
Expand Down
4 changes: 2 additions & 2 deletions charts/authelia/templates/traefikCRD/middlewares.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ spec:
apiVersion: traefik.containo.us/v1alpha1
kind: Middleware
metadata:
name: {{ include "authelia.ingress.traefikCRD.middleware.name.chain" . }}
name: {{ include "authelia.ingress.traefikCRD.middleware.name.chainAuth" . }}
labels: {{ include "authelia.labels" . | nindent 4 }}
{{- with $annotations := include "authelia.annotations" . }}
annotations: {{ $annotations | nindent 4 }}
Expand All @@ -55,7 +55,7 @@ spec:
apiVersion: traefik.containo.us/v1alpha1
kind: Middleware
metadata:
name: {{ include "authelia.name" . }}
name: {{ include "authelia.ingress.traefikCRD.middleware.name.chainIngress" . }}
labels:
{{- include "authelia.labels" . | nindent 4 }}
{{- with $annotations := (include "authelia.annotations" .) }}
Expand Down

0 comments on commit 56914c9

Please sign in to comment.