Skip to content

Commit 714d107

Browse files
committed
fix: Naming conventions pre/post install/upgrade hooks
1 parent d842fe7 commit 714d107

File tree

8 files changed

+16
-15
lines changed

8 files changed

+16
-15
lines changed

.github/workflows/k8s-reset-data.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ jobs:
8282
matrix:
8383
job-name:
8484
- data-cleanup
85-
- postgres-on-update-core
85+
- postgres-on-deploy
8686
- data-migration
8787
- postgres-on-update-analytics
8888
steps:

charts/opencrvs-services/Chart.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@ apiVersion: v2
22
name: opencrvs-services
33
description: OpenCRVS Services
44
type: application
5-
version: 0.1.23
6-
appVersion: 1.9.0
5+
version: 0.1.24
6+
appVersion: 1.9.2

charts/opencrvs-services/templates/elasticsearch-on-update-configmap.yaml renamed to charts/opencrvs-services/templates/elasticsearch-on-deploy-configmap.yaml

File renamed without changes.

charts/opencrvs-services/templates/elasticsearch-on-update.yaml renamed to charts/opencrvs-services/templates/elasticsearch-on-deploy.yaml

File renamed without changes.

charts/opencrvs-services/templates/mongo-on-update-configmap.yaml renamed to charts/opencrvs-services/templates/mongo-on-deploy-configmap.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,5 +10,5 @@ metadata:
1010
annotations:
1111
"helm.sh/hook": pre-install,pre-upgrade
1212
"helm.sh/hook-weight": "0"
13-
name: mongo-on-update-script
13+
name: mongo-on-deploy-script
1414
{{- end }}

charts/opencrvs-services/templates/mongo-on-update.yaml renamed to charts/opencrvs-services/templates/mongo-on-deploy.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -57,11 +57,11 @@ spec:
5757
{{- end }}
5858
volumeMounts:
5959
- mountPath: /on-deploy.sh
60-
name: mongo-on-update-script
60+
name: mongo-on-deploy-script
6161
subPath: on-deploy.sh
6262
volumes:
63-
- name: mongo-on-update-script
63+
- name: mongo-on-deploy-script
6464
configMap:
65-
name: mongo-on-update-script
65+
name: mongo-on-deploy-script
6666
restartPolicy: "OnFailure"
6767
{{- end }}

charts/opencrvs-services/templates/postgres-on-update-configmap.yaml renamed to charts/opencrvs-services/templates/postgres-on-deploy-configmap.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ apiVersion: v1
33
data:
44
on-deploy.sh: |
55
{{- .Files.Get "files/postgres-on-deploy.sh" | indent 8 }}
6+
# TODO: Move to dedicated configmap
67
setup-analytics.sh: |
78
{{- .Files.Get "files/setup-analytics.sh" | indent 8 }}
89
kind: ConfigMap
@@ -12,4 +13,4 @@ metadata:
1213
annotations:
1314
"helm.sh/hook": pre-install,pre-upgrade
1415
"helm.sh/hook-weight": "0"
15-
name: postgres-on-update-script
16+
name: postgres-on-deploy-script

charts/opencrvs-services/templates/postgres-on-update-core-job.yaml renamed to charts/opencrvs-services/templates/postgres-on-deploy-job.yaml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,16 +6,16 @@ metadata:
66
"helm.sh/hook": pre-install,pre-upgrade
77
"helm.sh/hook-weight": "1"
88
labels:
9-
app: postgres-on-update-core
10-
name: postgres-on-update-core
9+
app: postgres-on-deploy
10+
name: postgres-on-deploy
1111
spec:
1212
template:
1313
metadata:
1414
labels:
15-
app: postgres-on-update-core
15+
app: postgres-on-deploy
1616
spec:
1717
containers:
18-
- name: postgres-on-update-core
18+
- name: postgres-on-deploy
1919
command: ["bash", "-c", "/scripts/on-deploy.sh"]
2020
image: postgres:17
2121
env:
@@ -73,10 +73,10 @@ spec:
7373
{{- include "render-env-vars" (dict "service_name" "postgres_on_deploy" "Values" .Values) }}
7474
volumeMounts:
7575
- mountPath: /scripts
76-
name: postgres-on-update-script
76+
name: postgres-on-deploy-script
7777
volumes:
78-
- name: postgres-on-update-script
78+
- name: postgres-on-deploy-script
7979
configMap:
80-
name: postgres-on-update-script
80+
name: postgres-on-deploy-script
8181
defaultMode: 0755
8282
restartPolicy: "OnFailure"

0 commit comments

Comments
 (0)