Skip to content

Commit fd8461c

Browse files
authored
Merge pull request #30 from ImMin5/master
Modify run command at deployment.yaml
2 parents 1fc3a4f + a7ba47d commit fd8461c

File tree

2 files changed

+191
-191
lines changed

2 files changed

+191
-191
lines changed
Lines changed: 95 additions & 95 deletions
Original file line numberDiff line numberDiff line change
@@ -1,114 +1,114 @@
1-
{{- if .Values.enabled }}
2-
{{- if .Values.scheduler }}
1+
{ { - if .Values.enabled } }
2+
{ { - if .Values.scheduler } }
33
apiVersion: apps/v1
44
kind: Deployment
55
metadata:
66
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 } }
1111
spec:
1212
replicas: 1
1313
revisionHistoryLimit: 3
1414
selector:
1515
matchLabels:
16-
spaceone.service: {{ .Values.name }}-scheduler
16+
spaceone.service: { { .Values.name } }-scheduler
1717
template:
1818
metadata:
1919
annotations:
2020
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 } }
2424
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 } }
8677

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 } }
10081

101-
{{- if .Values.volumes }}
102-
{{- toYaml .Values.volumes | nindent 8 }}
103-
{{- end }}
10482

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 } }
10886

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
112100

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

Comments
 (0)