Skip to content

Commit f06a42d

Browse files
author
Vadym Mudryi
committed
Use single multiple domains SSL instead of multiple certificates for each product
1 parent 600b47d commit f06a42d

File tree

11 files changed

+43
-69
lines changed

11 files changed

+43
-69
lines changed

README.md

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -252,6 +252,49 @@ Recommended way to install cert-manager is a helm chart, see official documentat
252252
253253
---
254254
255+
### traefik custom changes
256+
257+
traefik is used to proxy OpenCRVS services behind load balancer on kubernetes cluster.
258+
259+
Please change default traefik certificate with your own wildcard or SANs certificate by following guide at https://doc.traefik.io/traefik/https/tls/#default-certificate
260+
261+
If cert-manager is used create `Certificate manifest at traefik namespace:
262+
263+
```yaml
264+
apiVersion: cert-manager.io/v1
265+
kind: Certificate
266+
metadata:
267+
name: k8s-opencrvs-dev-ssl
268+
namespace: traefik
269+
spec:
270+
dnsNames:
271+
- '*.<your domain>'
272+
- <your domain>
273+
issuerRef:
274+
kind: ClusterIssuer
275+
name: <dns-cluster-issuer>
276+
secretName: traefik-cert-tls
277+
```
278+
279+
Make sure certificate was issued.
280+
```
281+
kubectl get cert
282+
```
283+
284+
Create default tls store traefik:
285+
```yaml
286+
apiVersion: traefik.io/v1alpha1
287+
kind: TLSStore
288+
metadata:
289+
name: default
290+
namespace: traefik
291+
spec:
292+
defaultCertificate:
293+
secretName: traefik-cert-tls
294+
295+
```
296+
297+
255298
## [🚧 ] Manual deployment guide
256299

257300
TODO: Add steps with middleware installation:

charts/dependencies/templates/minio.yaml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,6 @@ metadata:
1818
spec:
1919
entryPoints:
2020
- websecure
21-
{{- if .Values.cert_manager.enabled }}
22-
tls:
23-
secretName: {{ .Values.hostname | replace "." "-" }}-tls
24-
{{- end }}
2521
routes:
2622
- match: 'Host(`minio.{{ .Values.hostname }}`) || Host(`{{ .Values.hostname }}`)'
2723
kind: Rule

charts/dependencies/templates/wildcard-ssl.yaml

Lines changed: 0 additions & 14 deletions
This file was deleted.

charts/opencrvs-services/templates/client-deployment.yaml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,6 @@ metadata:
1919
spec:
2020
entryPoints:
2121
- websecure
22-
{{- if .Values.cert_manager.enabled }}
23-
tls:
24-
secretName: {{ .Values.hostname | replace "." "-" }}-tls
25-
{{- end }}
2622
routes:
2723
- match: 'Host(`register.{{ .Values.hostname }}`) || Host(`{{ .Values.hostname }}`)'
2824
kind: Rule

charts/opencrvs-services/templates/config-deployment.yaml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,6 @@ metadata:
1919
spec:
2020
entryPoints:
2121
- websecure
22-
{{- if .Values.cert_manager.enabled }}
23-
tls:
24-
secretName: {{ .Values.hostname | replace "." "-" }}-tls
25-
{{- end }}
2622
routes:
2723
- match: 'Host(`config.{{ .Values.hostname }}`)'
2824
kind: Rule

charts/opencrvs-services/templates/countryconfig-deployment.yaml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,6 @@ metadata:
1919
spec:
2020
entryPoints:
2121
- websecure
22-
{{- if .Values.cert_manager.enabled }}
23-
tls:
24-
secretName: {{ .Values.hostname | replace "." "-" }}-tls
25-
{{- end }}
2622
routes:
2723
- match: 'Host(`countryconfig.{{ .Values.hostname }}`) && !Path(`/email`) && !Path(`/notification`) && !Path(`/dashboards/queries.json`)'
2824
kind: Rule

charts/opencrvs-services/templates/gateway-deployment.yaml

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,6 @@ metadata:
1919
spec:
2020
entryPoints:
2121
- websecure
22-
{{- if .Values.cert_manager.enabled }}
23-
tls:
24-
secretName: {{ .Values.hostname | replace "." "-" }}-tls
25-
{{- end }}
2622
routes:
2723
- match: 'Host(`gateway.{{ .Values.hostname }}`)'
2824
kind: Rule
@@ -68,10 +64,6 @@ spec:
6864
value: "https://login.{{ .Values.hostname }}"
6965
- name: APPLICATION_CONFIG_URL
7066
value: "http://config.{{ .Release.Namespace }}.svc.cluster.local:2021"
71-
- name: CERT_PUBLIC_KEY_PATH
72-
value: /secrets/public-key.pem
73-
- name: APPLICATION_CONFIG_URL
74-
value: http://config.{{ .Release.Namespace }}.svc.cluster.local:2021 # FIXME: harcoded/
7567
- name: AUTH_URL
7668
value: http://auth.{{ .Release.Namespace }}.svc.cluster.local:4040
7769
- name: DOCUMENTS_URL

charts/opencrvs-services/templates/login-deployment.yaml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,6 @@ metadata:
1919
spec:
2020
entryPoints:
2121
- websecure
22-
{{- if .Values.cert_manager.enabled }}
23-
tls:
24-
secretName: {{ .Values.hostname | replace "." "-" }}-tls
25-
{{- end }}
2622
routes:
2723
- match: 'Host(`login.{{ .Values.hostname }}`)'
2824
kind: Rule

charts/opencrvs-services/templates/wildcard-ssl.yaml

Lines changed: 0 additions & 14 deletions
This file was deleted.

charts/opencrvs-services/values.yaml

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,6 @@ mongodb_host: mongodb-0.mongodb.opencrvs-deps-dev.svc.cluster.local
2525
# Example: hostname: opencrvs.localhost
2626
hostname: farajaland.com
2727

28-
cert_manager:
29-
enabled: false
30-
# Check doc at: https://cert-manager.io/docs/configuration/issuers/
31-
cluster_issuer: "<put issuer here>"
32-
3328
# TODO: Check the usage and purpose of this variable.
3429
# Developer mode flag.
3530
dev_mode: false
@@ -61,7 +56,6 @@ config:
6156
env:
6257
DOMAIN: "*"
6358
CHECK_INVALID_TOKEN: true
64-
NODE_ENV: production
6559
# Mapping for external secrets goes here:
6660
secrets: {}
6761

@@ -78,7 +72,6 @@ countryconfig:
7872
# INFOBIP_GATEWAY_ENDPOINT: ""
7973
# INFOBIP_SENDER_ID: ""
8074

81-
NODE_ENV: production
8275
NOTIFICATION_TRANSPORT: email
8376

8477
SENDER_EMAIL_ADDRESS: [email protected]
@@ -117,9 +110,6 @@ gateway:
117110
CONFIG_TOKEN_EXPIRY_SECONDS: "604800"
118111

119112
MINIO_BUCKET: "ocrvs"
120-
121-
NODE_ENV: production
122-
123113
COUNTRY: FAR
124114
DISABLE_RATE_LIMIT: "true"
125115
# # TODO: Check usage

0 commit comments

Comments
 (0)