Skip to content

Commit fea0943

Browse files
author
Vadym Mudryi
committed
Small fixes
1 parent 349f3af commit fea0943

File tree

8 files changed

+78
-33
lines changed

8 files changed

+78
-33
lines changed
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
apiVersion: v2
2-
name: opencrvs-services-chart
2+
name: opencrvs-services
33
description: OpenCRVS Services
44
type: application
5-
version: 0.1.0
5+
version: 0.0.1

charts/opencrvs-services/TODO.md

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
# Reduce number of hardcoded variables
2+
3+
CERT_PUBLIC_KEY_PATH is common for almost all services
4+
5+
Few examples of common variables:
6+
COUNTRY_CONFIG_URL
7+
USER_MANAGEMENT_URL
8+
COUNTRY_CONFIG_URL_INTERNAL
9+
10+
Variable with mutations: MONGO_URL
11+
12+
13+
# Publish helm charts
14+
15+
We are starting development, but helm charts already exist and once we setup server environment there will be need to have repository.
16+
17+
# Add github workflows for kubernetes
18+
19+
1. Add workflow for kubernetes deployment
20+
- github actions
21+
- helm deployment
22+
2. Add workflow for kubernetes data seed
23+
- check if it's possible to build post-deploy job for opencrvs-services chart
24+
3. Add workflow for creating users in ELK and mongo
25+
- check if it's possible to build post-deploy job for dependencies chart
26+
# Monitoring
27+
28+
1. Review option of replacing ELK with something more simple
29+
30+
# SSL
31+
32+
Automatically issue SSL secret for traefix, check possibility to issue valid SSL certificate. Cloud Flare allows to use domain validation for SSL. It is possible to issue valid SSL for dev environment and then use Certificate across all dev environments within local.opencrvs.dev domain.
33+
34+
# Fixes
35+
36+
1. Fix events
37+
2. Fix clients

charts/opencrvs-services/TODO.txt

Whitespace-only changes.

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

Lines changed: 13 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ metadata:
66
name: config
77
spec:
88
ports:
9-
- port: 2021
10-
targetPort: 2021
9+
- port: {{ .Values.config.container_port }}
10+
targetPort: {{ .Values.config.container_port }}
1111
selector:
1212
app: config
1313
type: LoadBalancer
@@ -25,7 +25,7 @@ spec:
2525
services:
2626
- name: config
2727
namespace: opencrvs-services-dev
28-
port: 2021
28+
port: {{ .Values.config.container_port }}
2929
middlewares:
3030
- name: sts-and-basic-response-headers
3131
---
@@ -49,34 +49,20 @@ spec:
4949
- name: config
5050
image: "ghcr.io/opencrvs/ocrvs-config:{{ .Values.image.tag }}"
5151
env:
52-
- name: HOST
53-
value: 0.0.0.0
54-
- name: CHECK_INVALID_TOKEN
55-
value: "true"
52+
{{- range $k, $v := .Values.env }}
53+
- name: {{ $k }}
54+
value: {{ $v | quote }}
55+
{{- end }}
56+
{{- range $k, $v := .Values.config.env }}
57+
- name: {{ $k }}
58+
value: {{ $v | quote }}
59+
{{- end }}
5660
- name: PORT
57-
value: "2021"
58-
- name: AUTH_URL
59-
value: http://auth.opencrvs-services-dev.svc.cluster.local:4040 # FIXME: harcoded
60-
- name: COUNTRY_CONFIG_URL_INTERNAL
61-
value: http://countryconfig.opencrvs-services-dev.svc.cluster.local:3040 # FIXME: harcoded
62-
- name: DOCUMENTS_URL
63-
value: http://documents.opencrvs-services-dev.svc.cluster.local:9050 # FIXME: harcoded
64-
- name: FHIR_URL
65-
value: http://hearth-1.hearth.opencrvs-deps-dev.svc.cluster.local:3447/fhir # FIXME: harcoded
66-
- name: GATEWAY_URL
67-
value: http://gateway.opencrvs-services-dev.svc.cluster.local:7070/ # FIXME: harcoded
68-
- name: METRICS_URL
69-
value: http://metrics.opencrvs-services-dev.svc.cluster.local:1050 # FIXME: harcoded
70-
- name: MONGO_URL
71-
value: mongodb://mongodb-0.mongodb.opencrvs-deps-dev.svc.cluster.local/application-config # FIXME: harcoded
72-
- name: SEARCH_URL
73-
value: http://search.opencrvs-deps-dev.svc.cluster.local:9090/ # FIXME: harcoded
74-
- name: USER_MANAGEMENT_URL
75-
value: http://user-mgnt.opencrvs-services-dev.svc.cluster.local:3030/ # FIXME: hardcoded
61+
value: "{{ .Values.config.container_port }}"
7662
- name: CERT_PUBLIC_KEY_PATH
7763
value: /secrets/public-key.pem
7864
ports:
79-
- containerPort: 2021
65+
- containerPort: {{ .Values.config.container_port }}
8066
protocol: TCP
8167
volumeMounts:
8268
- mountPath: /secrets/public-key.pem

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

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,14 @@ spec:
5353
- containerPort: 80 #FIXME: non-low end port
5454
protocol: TCP
5555
env:
56+
{{- range $k, $v := .Values.env }}
57+
- name: {{ $k }}
58+
value: {{ $v | quote }}
59+
{{- end }}
60+
{{- range $k, $v := .Values.login.env }}
61+
- name: {{ $k }}
62+
value: {{ $v | quote }}
63+
{{- end }}
5664
- name: COUNTRY_CONFIG_URL_INTERNAL
5765
value: http://countryconfig.opencrvs-services-dev.svc.cluster.local:3040
5866
restartPolicy: Always

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

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,16 +32,24 @@ spec:
3232
- name: notification
3333
image: "ghcr.io/opencrvs/ocrvs-notification:{{ .Values.image.tag }}"
3434
env:
35+
{{- range $k, $v := .Values.env }}
36+
- name: {{ $k }}
37+
value: {{ $v | quote }}
38+
{{- end }}
39+
{{- range $k, $v := .Values.notification.env }}
40+
- name: {{ $k }}
41+
value: {{ $v | quote }}
42+
{{- end }}
3543
- name: CERT_PUBLIC_KEY_PATH
3644
value: /secrets/public-key.pem
37-
- name: COUNTRY
38-
value: bgd
3945
- name: COUNTRY_CONFIG_URL
4046
value: http://countryconfig.opencrvs-services-dev.svc.cluster.local:3040 # FIXME: harcoded
4147
- name: MONGO_URL
4248
value: mongodb://mongodb-0.mongodb.opencrvs-deps-dev.svc.cluster.local/notification
4349
- name: HOST
4450
value: 0.0.0.0
51+
- name: USER_MANAGEMENT_URL
52+
value: http://user-mgnt.opencrvs-services-dev.svc.cluster.local:3030/ # FIXME: harcoded
4553
ports:
4654
- containerPort: 2020
4755
protocol: TCP
Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,13 @@
11
image:
2-
tag: local
2+
tag: v1.6.0
33

44
hostname: opencrvs.localhost
55
dev_mode: false
66

77
countryconfig:
88
image:
9-
tag: v1.6.0
9+
tag: latest
10+
11+
notification:
12+
env:
13+
FOO: bar

charts/opencrvs-services/values.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@ login:
2222
metrics:
2323
replicas: 1
2424
notification:
25+
env:
26+
COUNTRY: bgd
2527
replicas: 1
2628
search:
2729
replicas: 1

0 commit comments

Comments
 (0)