Skip to content

Commit 2ee14b3

Browse files
authored
Merge pull request teamhephy#51 from jianxiaoguo/main
chore(chart): modify the problem of using buildpack and pretty pods list print
2 parents 8ed2860 + cdea890 commit 2ee14b3

File tree

4 files changed

+2
-12
lines changed

4 files changed

+2
-12
lines changed

charts/controller/templates/controller-celery.yaml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@ spec:
3333
- celery -A api worker -Q priority.high --autoscale=32,1 --loglevel=WARNING
3434
{{- include "controller.limits" . | indent 10 }}
3535
{{- include "controller.envs" . | indent 10 }}
36-
{{- include "controller.volumeMounts" . | indent 10 }}
3736
- name: drycc-controller-celery-middle
3837
image: {{.Values.image_registry}}/{{.Values.org}}/controller:{{.Values.image_tag}}
3938
imagePullPolicy: {{.Values.image_pull_policy}}
@@ -44,7 +43,6 @@ spec:
4443
- celery -A api worker -Q priority.middle --autoscale=16,1 --loglevel=WARNING
4544
{{- include "controller.limits" . | indent 10 }}
4645
{{- include "controller.envs" . | indent 10 }}
47-
{{- include "controller.volumeMounts" . | indent 10 }}
4846
- name: drycc-controller-celery-low
4947
image: {{.Values.image_registry}}/{{.Values.org}}/controller:{{.Values.image_tag}}
5048
imagePullPolicy: {{.Values.image_pull_policy}}
@@ -55,5 +53,3 @@ spec:
5553
- celery -A api worker -Q priority.low --autoscale=8,1 --loglevel=WARNING
5654
{{- include "controller.limits" . | indent 10 }}
5755
{{- include "controller.envs" . | indent 10 }}
58-
{{- include "controller.volumeMounts" . | indent 10 }}
59-
{{- include "controller.volumes" . | indent 6 }}

charts/controller/templates/controller-cronjob-daily.yaml

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@ spec:
2626
args:
2727
- python /app/manage.py load_db_state_to_k8s
2828
{{- include "controller.envs" . | indent 12 }}
29-
{{- include "controller.volumeMounts" . | indent 12 }}
3029
- image: {{.Values.image_registry}}/{{.Values.org}}/controller:{{.Values.image_tag}}
3130
imagePullPolicy: {{.Values.pull_policy}}
3231
name: drycc-controller-measure-app
@@ -36,7 +35,6 @@ spec:
3635
args:
3736
- python -u /app/manage.py measure_app
3837
{{- include "controller.envs" . | indent 12 }}
39-
{{- include "controller.volumeMounts" . | indent 12 }}
4038
- image: {{.Values.image_registry}}/{{.Values.org}}/controller:{{.Values.image_tag}}
4139
imagePullPolicy: {{.Values.pull_policy}}
4240
name: drycc-controller-measure-config
@@ -46,7 +44,6 @@ spec:
4644
args:
4745
- python -u /app/manage.py measure_config
4846
{{- include "controller.envs" . | indent 12 }}
49-
{{- include "controller.volumeMounts" . | indent 12 }}
5047
- image: {{.Values.image_registry}}/{{.Values.org}}/controller:{{.Values.image_tag}}
5148
imagePullPolicy: {{.Values.pull_policy}}
5249
name: drycc-controller-measure-resources
@@ -56,7 +53,6 @@ spec:
5653
args:
5754
- python -u /app/manage.py measure_resources
5855
{{- include "controller.envs" . | indent 12 }}
59-
{{- include "controller.volumeMounts" . | indent 12 }}
6056
- image: {{.Values.image_registry}}/{{.Values.org}}/controller:{{.Values.image_tag}}
6157
imagePullPolicy: {{.Values.pull_policy}}
6258
name: drycc-controller-measure-volumes
@@ -66,5 +62,3 @@ spec:
6662
args:
6763
- python -u /app/manage.py measure_volumes
6864
{{- include "controller.envs" . | indent 12 }}
69-
{{- include "controller.volumeMounts" . | indent 12 }}
70-
{{- include "controller.volumes" . | indent 10 }}

charts/controller/templates/controller-deployment.yaml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,5 +44,3 @@ spec:
4444
name: http
4545
{{- include "controller.limits" . | indent 10 }}
4646
{{- include "controller.envs" . | indent 10 }}
47-
{{- include "controller.volumeMounts" . | indent 10 }}
48-
{{- include "controller.volumes" . | indent 6 }}

rootfs/api/views.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -352,6 +352,8 @@ def list(self, *args, **kwargs):
352352
exist_pod_type = list(set([_["type"] for _ in data if _["type"]]))
353353
structure = self.get_app().structure
354354
procfile_structure = self.get_app().procfile_structure
355+
# remove prev release container type
356+
structure = {k: v for k, v in structure.items() if (v != 0 or k in procfile_structure)} # noqa
355357
for _ in structure.keys():
356358
if _ not in exist_pod_type:
357359
replicas = str(autoscale[_]['min']) + '-' + str(autoscale[_]['max']) \

0 commit comments

Comments
 (0)