-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #30 from ImMin5/master
Modify run command at deployment.yaml
- Loading branch information
Showing
2 changed files
with
191 additions
and
191 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,114 +1,114 @@ | ||
{{- if .Values.enabled }} | ||
{{- if .Values.scheduler }} | ||
{ { - if .Values.enabled } } | ||
{ { - if .Values.scheduler } } | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
labels: | ||
{{ include "spaceone.labels" . | indent 4 }} | ||
spaceone.service: {{ .Values.name }} | ||
name: {{ .Values.name }}-scheduler | ||
namespace: {{ .Values.global.namespace | default .Release.Namespace }} | ||
{ { include "spaceone.labels" . | indent 4 } } | ||
spaceone.service: { { .Values.name } } | ||
name: { { .Values.name } }-scheduler | ||
namespace: { { .Values.global.namespace | default .Release.Namespace } } | ||
spec: | ||
replicas: 1 | ||
revisionHistoryLimit: 3 | ||
selector: | ||
matchLabels: | ||
spaceone.service: {{ .Values.name }}-scheduler | ||
spaceone.service: { { .Values.name } }-scheduler | ||
template: | ||
metadata: | ||
annotations: | ||
spaceone.deployment.tool: helm | ||
spaceone.database-flag: {{ print .Values.database | sha256sum }} | ||
spaceone.shared-flag: {{ print .Values.global.shared | sha256sum }} | ||
spaceone.application-flag: {{ print .Values.application_scheduler | sha256sum }} | ||
spaceone.database-flag: { { print .Values.database | sha256sum } } | ||
spaceone.shared-flag: { { print .Values.global.shared | sha256sum } } | ||
spaceone.application-flag: { { print .Values.application_scheduler | sha256sum } } | ||
labels: | ||
{{ include "spaceone.labels" . | indent 8 }} | ||
spaceone.service: {{ .Values.name }}-scheduler | ||
spec: | ||
{{- if .Values.global.serviceAccountName }} | ||
serviceAccountName: {{ .Values.global.serviceAccountName }} | ||
{{- end }} | ||
terminationGracePeriodSeconds: {{ .Values.gracePeriod }} | ||
{{- if .Values.imagePullSecrets}} | ||
{{- with .Values.imagePullSecrets }} | ||
imagePullSecrets: | ||
{{- toYaml . | nindent 8 }} | ||
{{- end }} | ||
{{- end}} | ||
containers: | ||
- name: {{ .Values.name }}-scheduler | ||
image: {{ .Values.image.name }}:{{ .Values.image.version }} | ||
imagePullPolicy: {{ .Values.imagePullPolicy }} | ||
{{- if .Values.resources.scheduler }} | ||
resources: | ||
{{- toYaml .Values.resources.scheduler | nindent 12 }} | ||
{{- end }} | ||
command: ['spaceone', 'scheduler', 'spaceone.{{ regexReplaceAll "-" .Values.name "_" }}'] | ||
volumeMounts: | ||
- name: default-conf | ||
mountPath: /opt/spaceone/{{ .Values.name }}/config/config.yaml | ||
subPath: config.yaml | ||
readOnly: true | ||
- name: timezone | ||
mountPath: /etc/localtime | ||
- name: log-volume | ||
mountPath: /var/log/spaceone | ||
- name: database-conf | ||
mountPath: /opt/spaceone/{{ .Values.name }}/config/database.yaml | ||
subPath: database.yaml | ||
readOnly: true | ||
- name: shared-conf | ||
mountPath: /opt/spaceone/{{ .Values.name }}/config/shared.yaml | ||
subPath: shared.yaml | ||
readOnly: true | ||
- name: application-conf | ||
mountPath: /opt/spaceone/{{ .Values.name }}/config/application.yaml | ||
subPath: application.yaml | ||
readOnly: true | ||
{{- if .Values.volumeMounts.application_scheduler }} | ||
{{- toYaml .Values.volumeMounts.application_scheduler | nindent 12 }} | ||
{{- end }} | ||
env: | ||
- name: SPACEONE_CONFIG_FILE | ||
value: /opt/spaceone/{{ .Values.name }}/config/config.yaml | ||
{{- if .Values.global.common_env }} | ||
{{- toYaml .Values.global.common_env | nindent 12 }} | ||
{{- end }} | ||
|
||
{{- if .Values.sidecar.scheduler }} | ||
{{- toYaml .Values.sidecar.scheduler | nindent 8 }} | ||
{{- end }} | ||
|
||
|
||
{{- if .Values.global.backend.sidecar }} | ||
{{- toYaml .Values.global.backend.sidecar | nindent 8 }} | ||
{{- end }} | ||
{ { include "spaceone.labels" . | indent 8 } } | ||
spaceone.service: { { .Values.name } }-scheduler | ||
spec: | ||
{ { - if .Values.global.serviceAccountName } } | ||
serviceAccountName: { { .Values.global.serviceAccountName } } | ||
{ { - end } } | ||
terminationGracePeriodSeconds: { { .Values.gracePeriod } } | ||
{ { - if .Values.imagePullSecrets } } | ||
{ { - with .Values.imagePullSecrets } } | ||
imagePullSecrets: | ||
{ { - toYaml . | nindent 8 } } | ||
{ { - end } } | ||
{ { - end } } | ||
containers: | ||
- name: { { .Values.name } }-scheduler | ||
image: { { .Values.image.name } }:{{ .Values.image.version }} | ||
imagePullPolicy: { { .Values.imagePullPolicy } } | ||
{ { - if .Values.resources.scheduler } } | ||
resources: | ||
{ { - toYaml .Values.resources.scheduler | nindent 12 } } | ||
{ { - end } } | ||
command: [ 'spaceone', 'run', 'scheduler', 'spaceone.{{ regexReplaceAll "-" .Values.name "_" }}' ] | ||
volumeMounts: | ||
- name: default-conf | ||
mountPath: /opt/spaceone/{{ .Values.name }}/config/config.yaml | ||
subPath: config.yaml | ||
readOnly: true | ||
- name: timezone | ||
mountPath: /etc/localtime | ||
- name: log-volume | ||
mountPath: /var/log/spaceone | ||
- name: database-conf | ||
mountPath: /opt/spaceone/{{ .Values.name }}/config/database.yaml | ||
subPath: database.yaml | ||
readOnly: true | ||
- name: shared-conf | ||
mountPath: /opt/spaceone/{{ .Values.name }}/config/shared.yaml | ||
subPath: shared.yaml | ||
readOnly: true | ||
- name: application-conf | ||
mountPath: /opt/spaceone/{{ .Values.name }}/config/application.yaml | ||
subPath: application.yaml | ||
readOnly: true | ||
{ { - if .Values.volumeMounts.application_scheduler } } | ||
{ { - toYaml .Values.volumeMounts.application_scheduler | nindent 12 } } | ||
{ { - end } } | ||
env: | ||
- name: SPACEONE_CONFIG_FILE | ||
value: /opt/spaceone/{{ .Values.name }}/config/config.yaml | ||
{ { - if .Values.global.common_env } } | ||
{ { - toYaml .Values.global.common_env | nindent 12 } } | ||
{ { - end } } | ||
|
||
volumes: | ||
- name: default-conf | ||
configMap: | ||
name: {{ .Values.name }}-conf | ||
- name: database-conf | ||
configMap: | ||
name: {{ .Values.name }}-database-conf | ||
- name: shared-conf | ||
configMap: | ||
name: shared-conf | ||
- name: application-conf | ||
configMap: | ||
name: {{ .Values.name }}-application-scheduler-conf | ||
{ { - if .Values.sidecar.scheduler } } | ||
{ { - toYaml .Values.sidecar.scheduler | nindent 8 } } | ||
{ { - end } } | ||
|
||
{{- if .Values.volumes }} | ||
{{- toYaml .Values.volumes | nindent 8 }} | ||
{{- end }} | ||
|
||
{{- if .Values.global.backend.volumes }} | ||
{{- toYaml .Values.global.backend.volumes | nindent 8 }} | ||
{{- end }} | ||
{ { - if .Values.global.backend.sidecar } } | ||
{ { - toYaml .Values.global.backend.sidecar | nindent 8 } } | ||
{ { - end } } | ||
|
||
{{- if .Values.pod.spec }} | ||
{{- toYaml .Values.pod.spec | nindent 6 }} | ||
{{- end }} | ||
volumes: | ||
- name: default-conf | ||
configMap: | ||
name: { { .Values.name } }-conf | ||
- name: database-conf | ||
configMap: | ||
name: { { .Values.name } }-database-conf | ||
- name: shared-conf | ||
configMap: | ||
name: shared-conf | ||
- name: application-conf | ||
configMap: | ||
name: { { .Values.name } }-application-scheduler-conf | ||
|
||
{{- end }} | ||
{{- end }} | ||
{ { - if .Values.volumes } } | ||
{ { - toYaml .Values.volumes | nindent 8 } } | ||
{ { - end } } | ||
|
||
{ { - if .Values.global.backend.volumes } } | ||
{ { - toYaml .Values.global.backend.volumes | nindent 8 } } | ||
{ { - end } } | ||
|
||
{ { - if .Values.pod.spec } } | ||
{ { - toYaml .Values.pod.spec | nindent 6 } } | ||
{ { - end } } | ||
|
||
{ { - end } } | ||
{ { - end } } |
Oops, something went wrong.