|
1 |
| -{{- if .Values.enabled }} |
2 |
| -{{- if .Values.scheduler }} |
| 1 | +{ { - if .Values.enabled } } |
| 2 | + { { - if .Values.scheduler } } |
3 | 3 | apiVersion: apps/v1
|
4 | 4 | kind: Deployment
|
5 | 5 | metadata:
|
6 | 6 | labels:
|
7 |
| -{{ include "spaceone.labels" . | indent 4 }} |
8 |
| - spaceone.service: {{ .Values.name }} |
9 |
| - name: {{ .Values.name }}-scheduler |
10 |
| - namespace: {{ .Values.global.namespace | default .Release.Namespace }} |
| 7 | + { { include "spaceone.labels" . | indent 4 } } |
| 8 | +spaceone.service: { { .Values.name } } |
| 9 | +name: { { .Values.name } }-scheduler |
| 10 | +namespace: { { .Values.global.namespace | default .Release.Namespace } } |
11 | 11 | spec:
|
12 | 12 | replicas: 1
|
13 | 13 | revisionHistoryLimit: 3
|
14 | 14 | selector:
|
15 | 15 | matchLabels:
|
16 |
| - spaceone.service: {{ .Values.name }}-scheduler |
| 16 | + spaceone.service: { { .Values.name } }-scheduler |
17 | 17 | template:
|
18 | 18 | metadata:
|
19 | 19 | annotations:
|
20 | 20 | spaceone.deployment.tool: helm
|
21 |
| - spaceone.database-flag: {{ print .Values.database | sha256sum }} |
22 |
| - spaceone.shared-flag: {{ print .Values.global.shared | sha256sum }} |
23 |
| - spaceone.application-flag: {{ print .Values.application_scheduler | sha256sum }} |
| 21 | + spaceone.database-flag: { { print .Values.database | sha256sum } } |
| 22 | + spaceone.shared-flag: { { print .Values.global.shared | sha256sum } } |
| 23 | + spaceone.application-flag: { { print .Values.application_scheduler | sha256sum } } |
24 | 24 | labels:
|
25 |
| -{{ include "spaceone.labels" . | indent 8 }} |
26 |
| - spaceone.service: {{ .Values.name }}-scheduler |
27 |
| - spec: |
28 |
| -{{- if .Values.global.serviceAccountName }} |
29 |
| - serviceAccountName: {{ .Values.global.serviceAccountName }} |
30 |
| -{{- end }} |
31 |
| - terminationGracePeriodSeconds: {{ .Values.gracePeriod }} |
32 |
| -{{- if .Values.imagePullSecrets}} |
33 |
| - {{- with .Values.imagePullSecrets }} |
34 |
| - imagePullSecrets: |
35 |
| - {{- toYaml . | nindent 8 }} |
36 |
| - {{- end }} |
37 |
| -{{- end}} |
38 |
| - containers: |
39 |
| - - name: {{ .Values.name }}-scheduler |
40 |
| - image: {{ .Values.image.name }}:{{ .Values.image.version }} |
41 |
| - imagePullPolicy: {{ .Values.imagePullPolicy }} |
42 |
| -{{- if .Values.resources.scheduler }} |
43 |
| - resources: |
44 |
| - {{- toYaml .Values.resources.scheduler | nindent 12 }} |
45 |
| -{{- end }} |
46 |
| - command: ['spaceone', 'scheduler', 'spaceone.{{ regexReplaceAll "-" .Values.name "_" }}'] |
47 |
| - volumeMounts: |
48 |
| - - name: default-conf |
49 |
| - mountPath: /opt/spaceone/{{ .Values.name }}/config/config.yaml |
50 |
| - subPath: config.yaml |
51 |
| - readOnly: true |
52 |
| - - name: timezone |
53 |
| - mountPath: /etc/localtime |
54 |
| - - name: log-volume |
55 |
| - mountPath: /var/log/spaceone |
56 |
| - - name: database-conf |
57 |
| - mountPath: /opt/spaceone/{{ .Values.name }}/config/database.yaml |
58 |
| - subPath: database.yaml |
59 |
| - readOnly: true |
60 |
| - - name: shared-conf |
61 |
| - mountPath: /opt/spaceone/{{ .Values.name }}/config/shared.yaml |
62 |
| - subPath: shared.yaml |
63 |
| - readOnly: true |
64 |
| - - name: application-conf |
65 |
| - mountPath: /opt/spaceone/{{ .Values.name }}/config/application.yaml |
66 |
| - subPath: application.yaml |
67 |
| - readOnly: true |
68 |
| -{{- if .Values.volumeMounts.application_scheduler }} |
69 |
| -{{- toYaml .Values.volumeMounts.application_scheduler | nindent 12 }} |
70 |
| -{{- end }} |
71 |
| - env: |
72 |
| - - name: SPACEONE_CONFIG_FILE |
73 |
| - value: /opt/spaceone/{{ .Values.name }}/config/config.yaml |
74 |
| -{{- if .Values.global.common_env }} |
75 |
| -{{- toYaml .Values.global.common_env | nindent 12 }} |
76 |
| -{{- end }} |
77 |
| - |
78 |
| -{{- if .Values.sidecar.scheduler }} |
79 |
| -{{- toYaml .Values.sidecar.scheduler | nindent 8 }} |
80 |
| -{{- end }} |
81 |
| - |
82 |
| - |
83 |
| -{{- if .Values.global.backend.sidecar }} |
84 |
| -{{- toYaml .Values.global.backend.sidecar | nindent 8 }} |
85 |
| -{{- end }} |
| 25 | + { { include "spaceone.labels" . | indent 8 } } |
| 26 | +spaceone.service: { { .Values.name } }-scheduler |
| 27 | +spec: |
| 28 | + { { - if .Values.global.serviceAccountName } } |
| 29 | +serviceAccountName: { { .Values.global.serviceAccountName } } |
| 30 | + { { - end } } |
| 31 | +terminationGracePeriodSeconds: { { .Values.gracePeriod } } |
| 32 | + { { - if .Values.imagePullSecrets } } |
| 33 | + { { - with .Values.imagePullSecrets } } |
| 34 | +imagePullSecrets: |
| 35 | + { { - toYaml . | nindent 8 } } |
| 36 | + { { - end } } |
| 37 | + { { - end } } |
| 38 | +containers: |
| 39 | + - name: { { .Values.name } }-scheduler |
| 40 | + image: { { .Values.image.name } }:{{ .Values.image.version }} |
| 41 | + imagePullPolicy: { { .Values.imagePullPolicy } } |
| 42 | + { { - if .Values.resources.scheduler } } |
| 43 | +resources: |
| 44 | + { { - toYaml .Values.resources.scheduler | nindent 12 } } |
| 45 | + { { - end } } |
| 46 | +command: [ 'spaceone', 'run', 'scheduler', 'spaceone.{{ regexReplaceAll "-" .Values.name "_" }}' ] |
| 47 | +volumeMounts: |
| 48 | + - name: default-conf |
| 49 | + mountPath: /opt/spaceone/{{ .Values.name }}/config/config.yaml |
| 50 | + subPath: config.yaml |
| 51 | + readOnly: true |
| 52 | + - name: timezone |
| 53 | + mountPath: /etc/localtime |
| 54 | + - name: log-volume |
| 55 | + mountPath: /var/log/spaceone |
| 56 | + - name: database-conf |
| 57 | + mountPath: /opt/spaceone/{{ .Values.name }}/config/database.yaml |
| 58 | + subPath: database.yaml |
| 59 | + readOnly: true |
| 60 | + - name: shared-conf |
| 61 | + mountPath: /opt/spaceone/{{ .Values.name }}/config/shared.yaml |
| 62 | + subPath: shared.yaml |
| 63 | + readOnly: true |
| 64 | + - name: application-conf |
| 65 | + mountPath: /opt/spaceone/{{ .Values.name }}/config/application.yaml |
| 66 | + subPath: application.yaml |
| 67 | + readOnly: true |
| 68 | + { { - if .Values.volumeMounts.application_scheduler } } |
| 69 | + { { - toYaml .Values.volumeMounts.application_scheduler | nindent 12 } } |
| 70 | + { { - end } } |
| 71 | +env: |
| 72 | + - name: SPACEONE_CONFIG_FILE |
| 73 | + value: /opt/spaceone/{{ .Values.name }}/config/config.yaml |
| 74 | + { { - if .Values.global.common_env } } |
| 75 | + { { - toYaml .Values.global.common_env | nindent 12 } } |
| 76 | + { { - end } } |
86 | 77 |
|
87 |
| - volumes: |
88 |
| - - name: default-conf |
89 |
| - configMap: |
90 |
| - name: {{ .Values.name }}-conf |
91 |
| - - name: database-conf |
92 |
| - configMap: |
93 |
| - name: {{ .Values.name }}-database-conf |
94 |
| - - name: shared-conf |
95 |
| - configMap: |
96 |
| - name: shared-conf |
97 |
| - - name: application-conf |
98 |
| - configMap: |
99 |
| - name: {{ .Values.name }}-application-scheduler-conf |
| 78 | + { { - if .Values.sidecar.scheduler } } |
| 79 | + { { - toYaml .Values.sidecar.scheduler | nindent 8 } } |
| 80 | + { { - end } } |
100 | 81 |
|
101 |
| -{{- if .Values.volumes }} |
102 |
| -{{- toYaml .Values.volumes | nindent 8 }} |
103 |
| -{{- end }} |
104 | 82 |
|
105 |
| -{{- if .Values.global.backend.volumes }} |
106 |
| -{{- toYaml .Values.global.backend.volumes | nindent 8 }} |
107 |
| -{{- end }} |
| 83 | + { { - if .Values.global.backend.sidecar } } |
| 84 | + { { - toYaml .Values.global.backend.sidecar | nindent 8 } } |
| 85 | + { { - end } } |
108 | 86 |
|
109 |
| -{{- if .Values.pod.spec }} |
110 |
| -{{- toYaml .Values.pod.spec | nindent 6 }} |
111 |
| -{{- end }} |
| 87 | +volumes: |
| 88 | + - name: default-conf |
| 89 | + configMap: |
| 90 | + name: { { .Values.name } }-conf |
| 91 | + - name: database-conf |
| 92 | + configMap: |
| 93 | + name: { { .Values.name } }-database-conf |
| 94 | + - name: shared-conf |
| 95 | + configMap: |
| 96 | + name: shared-conf |
| 97 | + - name: application-conf |
| 98 | + configMap: |
| 99 | + name: { { .Values.name } }-application-scheduler-conf |
112 | 100 |
|
113 |
| -{{- end }} |
114 |
| -{{- end }} |
| 101 | + { { - if .Values.volumes } } |
| 102 | + { { - toYaml .Values.volumes | nindent 8 } } |
| 103 | + { { - end } } |
| 104 | + |
| 105 | + { { - if .Values.global.backend.volumes } } |
| 106 | + { { - toYaml .Values.global.backend.volumes | nindent 8 } } |
| 107 | + { { - end } } |
| 108 | + |
| 109 | + { { - if .Values.pod.spec } } |
| 110 | + { { - toYaml .Values.pod.spec | nindent 6 } } |
| 111 | + { { - end } } |
| 112 | + |
| 113 | + { { - end } } |
| 114 | + { { - end } } |
0 commit comments