Skip to content

Commit c6f785a

Browse files
committed
chore(migrate): use helm hook replace cluster lock
1 parent fe79b99 commit c6f785a

3 files changed

Lines changed: 2 additions & 54 deletions

File tree

charts/controller/templates/controller-api-deployment.yaml

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -38,16 +38,6 @@ spec:
3838
- -a
3939
- $(DRYCC_REDIS_ADDRS)
4040
{{- include "controller.envs" . | indent 8 }}
41-
- name: drycc-controller-waitting
42-
image: {{.Values.imageRegistry}}/{{.Values.imageOrg}}/controller:{{.Values.imageTag}}
43-
imagePullPolicy: {{.Values.imagePullPolicy}}
44-
args:
45-
- /usr/bin/env
46-
- bash
47-
- -ec
48-
- |
49-
python -u /workspace/manage.py cluster_lock waitting
50-
{{- include "controller.envs" . | indent 8 }}
5141
containers:
5242
- name: drycc-controller
5343
image: {{.Values.imageRegistry}}/{{.Values.imageOrg}}/controller:{{.Values.imageTag}}

charts/controller/templates/controller-job-upgrade.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ metadata:
66
heritage: drycc
77
annotations:
88
component.drycc.cc/version: {{ .Values.imageTag }}
9+
helm.sh/hook: post-install,pre-upgrade,pre-rollback
10+
helm.sh/hook-delete-policy: hook-succeeded
911
spec:
1012
template:
1113
metadata:
@@ -37,11 +39,9 @@ spec:
3739
- bash
3840
- -ec
3941
- |
40-
python -u /workspace/manage.py cluster_lock lock
4142
python -u /workspace/manage.py migrate --noinput
4243
python -u /workspace/manage.py loaddata /etc/controller/limit-specs.json
4344
python -u /workspace/manage.py loaddata /etc/controller/limit-plans.json
44-
python -u /workspace/manage.py cluster_lock unlock
4545
{{- end }}
4646
{{- include "controller.envs" . | indent 8 }}
4747
volumeMounts:

rootfs/api/management/commands/cluster_lock.py

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

0 commit comments

Comments
 (0)