Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix indent deployment yaml #31

Merged
merged 1 commit into from
Dec 20, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
190 changes: 95 additions & 95 deletions deploy/helm/templates/deployment-scheduler.yaml
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', '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 } }
{{ 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 }}

{{- if .Values.sidecar.scheduler }}
{{- toYaml .Values.sidecar.scheduler | nindent 8 }}
{{- end }}


{{- if .Values.global.backend.sidecar }}
{{- toYaml .Values.global.backend.sidecar | nindent 8 }}
{{- end }}

{ { - if .Values.sidecar.scheduler } }
{ { - toYaml .Values.sidecar.scheduler | nindent 8 } }
{ { - 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.volumes }}
{{- toYaml .Values.volumes | nindent 8 }}
{{- end }}

{ { - if .Values.global.backend.sidecar } }
{ { - toYaml .Values.global.backend.sidecar | nindent 8 } }
{ { - end } }
{{- if .Values.global.backend.volumes }}
{{- toYaml .Values.global.backend.volumes | nindent 8 }}
{{- 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.pod.spec }}
{{- toYaml .Values.pod.spec | nindent 6 }}
{{- 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 } }
{{- end }}
{{- end }}
Loading