Skip to content

Commit

Permalink
Updates charts to support custom certificate
Browse files Browse the repository at this point in the history
  • Loading branch information
GoelDeepak committed Jan 17, 2020
1 parent 5dbdd66 commit 483390b
Show file tree
Hide file tree
Showing 13 changed files with 46 additions and 14 deletions.
2 changes: 1 addition & 1 deletion staging/dex-k8s-authenticator/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apiVersion: v1
appVersion: "v1.1.1"
description: "Authenticator for using Dex with Kubernetes"
name: dex-k8s-authenticator
version: 1.1.12
version: 1.1.13
home: https://github.com/mesosphere/charts
sources:
- https://github.com/mintel/dex-k8s-authenticator
Expand Down
16 changes: 15 additions & 1 deletion staging/dex-k8s-authenticator/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -65,10 +65,15 @@ spec:
- name: html-templates
mountPath: /app/templates/
{{- if .Values.caCerts.enabled }}
{{- if .Values.caCerts.secrets }}
{{- range .Values.caCerts.secrets }}
- name: {{ template "dex-k8s-authenticator.fullname" $ }}-{{ .name }}
mountPath: /certs/
{{- end }}
{{- else if .Values.caCerts.caSecretName }}
- name: {{ template "dex-k8s-authenticator.fullname" $ }}-ca-certificate
mountPath: /certs/
{{- end }}
{{- end }}
resources:
{{ toYaml .Values.resources | indent 10 }}
Expand Down Expand Up @@ -105,12 +110,21 @@ spec:
path: {{ base $path }}
{{- end }}
{{- if .Values.caCerts.enabled }}
{{- range .Values.caCerts.secrets }}
{{- if .Values.caCerts.secrets }}
{{- range .Values.caCerts.secrets }}
- name: {{ template "dex-k8s-authenticator.fullname" $ }}-{{ .name }}
secret:
secretName: {{ template "dex-k8s-authenticator.fullname" $ }}-{{ .name }}
items:
- key: {{ .name }}
path: {{ .filename }}
{{- end }}
{{- else if .Values.caCerts.caSecretName }}
- name: {{ template "dex-k8s-authenticator.fullname" $ }}-ca-certificate
secret:
secretName: {{ .Values.caCerts.caSecretName }}
items:
- key: ca.crt
path: ca.crt
{{- end }}
{{- end }}
2 changes: 2 additions & 0 deletions staging/dex-k8s-authenticator/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,8 @@ resources: {}

caCerts:
enabled: false
# specify either caSecretName or secrets
caSecretName:
secrets: {}
# Array of Self Signed Certificates
# cat CA.crt | base64 -w 0
Expand Down
2 changes: 1 addition & 1 deletion staging/kube-oidc-proxy/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ appVersion: "v0.1.1"
description: A Helm chart for kube-oidc-proxy
home: https://github.com/mesosphere/charts
name: kube-oidc-proxy
version: 0.1.7
version: 0.1.8
sources:
- https://github.com/jetstack/kube-oidc-proxy
maintainers:
Expand Down
11 changes: 9 additions & 2 deletions staging/kube-oidc-proxy/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ spec:
- "--oidc-client-id=$(OIDC_CLIENT_ID)"
- "--oidc-issuer-url=$(OIDC_ISSUER_URL)"
- "--oidc-username-claim=$(OIDC_USERNAME_CLAIM)"
{{- if .Values.oidc.caPEM }}
{{- if or .Values.oidc.caPEM .Values.oidc.caSecretName }}
- "--oidc-ca-file=/etc/oidc/oidc-ca.pem"
{{ end }}
{{- if .Values.oidc.usernamePrefix }}
Expand Down Expand Up @@ -141,7 +141,7 @@ spec:
key: api-audiences
{{ end }}
volumeMounts:
{{ if .Values.oidc.caPEM }}
{{ if or .Values.oidc.caPEM .Values.oidc.caSecretName }}
- name: kube-oidc-proxy-config
mountPath: /etc/oidc
readOnly: true
Expand All @@ -157,6 +157,13 @@ spec:
items:
- key: oidc.ca-pem
path: oidc-ca.pem
{{- else if .Values.oidc.caSecretName }}
- name: kube-oidc-proxy-config
secret:
secretName: {{ .Values.oidc.caSecretName }}
items:
- key: ca.crt
path: oidc-ca.pem
{{ end }}
- name: kube-oidc-proxy-tls
secret:
Expand Down
1 change: 1 addition & 0 deletions staging/kube-oidc-proxy/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ oidc:
# ...
# -----END CERTIFICATE-----
caPEM:
caSecretName: # specify caPEM or caSecretName

usernamePrefix:
groupsClaim:
Expand Down
2 changes: 1 addition & 1 deletion staging/traefik-forward-auth/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ apiVersion: v1
appVersion: "latest"
description: Minimal forward authentication service that provides OIDC based login and authentication for the traefik reverse proxy
name: traefik-forward-auth
version: 0.2.11
version: 0.2.12
keywords:
- traefik-forward-auth
- traefik
Expand Down
11 changes: 9 additions & 2 deletions staging/traefik-forward-auth/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,13 @@ spec:
items:
- key: ca.crt
path: ca.crt
{{- else if .Values.traefikForwardAuth.caSecretName }}
- name: etc-traefik-forward-auth-ca
secret:
secretName: {{ .Values.traefikForwardAuth.caSecretName }}
items:
- key: ca.crt
path: ca.crt
{{- end }}
- name: etc-traefik-forward-auth-config
configMap:
Expand All @@ -48,7 +55,7 @@ spec:
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
volumeMounts:
{{- if .Values.traefikForwardAuth.caCertificate }}
{{- if or .Values.traefikForwardAuth.caCertificate .Values.traefikForwardAuth.caSecretName }}
- name: etc-traefik-forward-auth-ca
mountPath: "/etc/traefik-forward-auth/ca"
readOnly: true
Expand All @@ -66,7 +73,7 @@ spec:
- name: CONFIG
value: "/etc/traefik-forward-auth/config/config.ini"
- name: SSL_CERT_FILE
{{- if .Values.traefikForwardAuth.caCertificate }}
{{- if or .Values.traefikForwardAuth.caCertificate .Values.traefikForwardAuth.caSecretName }}
value: "/etc/traefik-forward-auth/ca/ca.crt"
{{- else}}
value: "/var/run/secrets/kubernetes.io/serviceaccount/ca.crt"
Expand Down
1 change: 1 addition & 0 deletions staging/traefik-forward-auth/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ traefikForwardAuth:
# -----BEGIN
# ...
# -----END
# or caSecretName: < name of the secret >
extraConfig: ""
userCookieName: "_forward_auth_name"

Expand Down
2 changes: 1 addition & 1 deletion staging/traefik/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
apiVersion: v1
name: traefik
version: 1.72.11
version: 1.72.12
appVersion: 1.7.12
description: A Traefik based Kubernetes ingress controller with Let's Encrypt support
keywords:
Expand Down
2 changes: 1 addition & 1 deletion staging/traefik/templates/configmap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ data:
{{- if .Values.ssl.sniStrict }}
sniStrict = true
{{- end }}
{{- if .Values.ssl.customCert }}
{{- if .Values.ssl.caSecretName }}
[[entryPoints.https.tls.certificates]]
certFile = "/custom-ssl/tls.crt"
keyFile = "/custom-ssl/tls.key"
Expand Down
6 changes: 3 additions & 3 deletions staging/traefik/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ spec:
- mountPath: /ssl
name: ssl
{{- end }}
{{- if .Values.ssl.customCert }}
{{- if .Values.ssl.caSecretName }}
- mountPath: /custom-ssl
name: custom-ssl
{{- end }}
Expand Down Expand Up @@ -188,10 +188,10 @@ spec:
secret:
secretName: {{ template "traefik.fullname" . }}-certificate
{{- end }}
{{- if .Values.ssl.customCert }}
{{- if .Values.ssl.caSecretName }}
- name: custom-ssl
secret:
secretName: {{ template "traefik.fullname" . }}-custom-certificate
secretName: {{ .Values.ssl.caSecretName }}
{{- end }}
{{- if .Values.acme.enabled }}
- name: acme
Expand Down
2 changes: 1 addition & 1 deletion staging/traefik/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ ssl:
# tlsMinVersion: VersionTLS12
# https://docs.traefik.io/configuration/entrypoints/#strict-sni-checking
# sniStrict: false
customCert: false
caSecretName: # for custom certificate
defaultCert: LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCk1JSUVtekNDQTRPZ0F3SUJBZ0l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ktPR0QyWG5YaENNVlRlL0FQNDJod294Nm02QkZpQgpvemZFa2wwak5uZmREcjZrL1p2MlQ1TnFzaWxaRXJBQlZGOTBKazdtUFBIa0Q2R1ZMUUJ4Ci0tLS0tRU5EIFJTQSBQUklWQVRFIEtFWS0tLS0tCg==
# Basic auth to protect all the routes. Can use htpasswd to generate passwords
Expand Down

0 comments on commit 483390b

Please sign in to comment.