Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

enable TLS for local environment #1868

Draft
wants to merge 6 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 17 additions & 1 deletion k8s/helmfile/env/local/api.values.yaml.gotmpl
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,23 @@ image:
tag: 10x.18.1

ingress:
tls: null
tls:
- hosts:
- wbaas.localhost
secretName: wikibase-local-tls
enabled: true
annotations:
kubernetes.io/ingress.class: nginx
nginx.ingress.kubernetes.io/use-regex: "true"
nginx.ingress.kubernetes.io/rewrite-target: /$2
hosts:
{{- range .Values.services.app.ingressHosts }}
- host: {{ .host }}
paths:
{{- range .paths }}
- {{ . | quote }}
{{- end }}
{{- end }}

platform:
backendMwHost: mediawiki-139-app-backend.default.svc.cluster.local
Expand Down
5 changes: 2 additions & 3 deletions k8s/helmfile/env/local/base.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
ip: ""
ingressHost: "*.wbaas.localhost"
ingressNameSuffix: main
forceSSL: false
tls: false
tls: true
wbstack:
subdomainSuffix: ".wbaas.localhost"
uiurl: http://wbaas.localhost
uiurl: https://wbaas.localhost
8 changes: 8 additions & 0 deletions k8s/helmfile/env/local/certificates.values.yaml.gotmpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
certificates:
- name: wikibase-local-tls
commonName: wbaas.localhost
dnsNames:
- '*.wbaas.localhost'
- 'wbaas.localhost'
secretName: wikibase-local-tls
issuerRef: selfsigned-cluster-issuer
7 changes: 4 additions & 3 deletions k8s/helmfile/env/local/private.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ gcsApiStaticBucket: 'something'

# TODO move this (and many other things) out of private file...
uiHostName: www.wbaas.localhost
tlsSecret: wikibase-dev-tls
tlsSecret: wikibase-local-tls
ingressNameSuffix: wikibase-local

services:
queryservice:
Expand All @@ -13,8 +14,8 @@ services:

app:
mailer: smtp
url: http://www.wbaas.localhost
apiUrl: http://api.wbaas.localhost
url: https://www.wbaas.localhost
apiUrl: https://api.wbaas.localhost
ingressHosts:
- host: api.wbaas.localhost
paths:
Expand Down
5 changes: 4 additions & 1 deletion k8s/helmfile/env/local/ui.values.yaml.gotmpl
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,10 @@ ui:
recaptchaSitekeySecretKey: site_key

ingress:
tls: null
tls:
- hosts:
- {{ .Values.uiHostName }}
secretName: {{ .Values.tlsSecret }}

resources:
limits:
Expand Down
Loading