Skip to content

Commit

Permalink
Avoided empty blocks
Browse files Browse the repository at this point in the history
  • Loading branch information
mihailradkov committed May 10, 2024
1 parent 9ed146f commit c85f24e
Show file tree
Hide file tree
Showing 7 changed files with 34 additions and 19 deletions.
6 changes: 3 additions & 3 deletions templates/ingress.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ metadata:
{{- with .Values.ingress.labels }}
{{- tpl (toYaml .) $ | nindent 4 }}
{{- end }}
{{- with (mergeOverwrite (deepCopy .Values.annotations) .Values.ingress.annotations) }}
annotations:
{{- with (mergeOverwrite (deepCopy .Values.annotations) .Values.ingress.annotations) }}
{{- tpl (toYaml .) $ | nindent 4 }}
{{- end }}
{{- tpl (toYaml .) $ | nindent 4 }}
{{- end }}
spec:
{{- with .Values.ingress.className }}
ingressClassName: {{ . }}
Expand Down
9 changes: 6 additions & 3 deletions templates/jobs/job-create-cluster.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,9 @@ spec:
imagePullSecrets:
{{- include "graphdb.combinedImagePullSecrets" . | nindent 8 }}
{{- end }}
securityContext:
{{- .Values.jobs.podSecurityContext | toYaml | nindent 8 }}
{{- with .Values.jobs.podSecurityContext }}
securityContext: {{ toYaml . | nindent 8 }}
{{- end }}
volumes:
- name: job-temp
emptyDir: {{ .Values.jobs.persistence.emptyDir | toYaml | nindent 12 }}
Expand All @@ -51,7 +52,9 @@ spec:
secretKeyRef:
name: {{ coalesce .Values.security.provisioner.existingSecret (include "graphdb.fullname.secret.provisioning-user" .) }}
key: {{ .Values.security.provisioner.tokenKey }}
securityContext: {{- .Values.jobs.securityContext | toYaml | nindent 12 }}
{{- with .Values.jobs.securityContext }}
securityContext: {{ toYaml . | nindent 12 }}
{{- end }}
{{- with .Values.jobs.resources }}
resources: {{ toYaml . | nindent 12 }}
{{- end }}
Expand Down
9 changes: 6 additions & 3 deletions templates/jobs/job-patch-cluster.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,9 @@ spec:
imagePullSecrets:
{{- include "graphdb.combinedImagePullSecrets" . | nindent 8 }}
{{- end }}
securityContext:
{{- .Values.jobs.podSecurityContext | toYaml | nindent 8 }}
{{- with .Values.jobs.podSecurityContext }}
securityContext: {{ toYaml . | nindent 8 }}
{{- end }}
volumes:
- name: job-temp
emptyDir: {{ .Values.jobs.persistence.emptyDir | toYaml | nindent 12 }}
Expand Down Expand Up @@ -55,7 +56,9 @@ spec:
secretKeyRef:
name: {{ coalesce .Values.security.provisioner.existingSecret (include "graphdb.fullname.secret.provisioning-user" .) }}
key: {{ .Values.security.provisioner.tokenKey }}
securityContext: {{- .Values.jobs.securityContext | toYaml | nindent 12 }}
{{- with .Values.jobs.securityContext }}
securityContext: {{ toYaml . | nindent 12 }}
{{- end }}
{{- with .Values.jobs.resources }}
resources: {{ toYaml . | nindent 12 }}
{{- end }}
Expand Down
9 changes: 6 additions & 3 deletions templates/jobs/job-provision-repositories.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,9 @@ spec:
imagePullSecrets:
{{- include "graphdb.combinedImagePullSecrets" . | nindent 8 }}
{{- end }}
securityContext:
{{- .Values.jobs.podSecurityContext | toYaml | nindent 8 }}
{{- with .Values.jobs.podSecurityContext }}
securityContext: {{ toYaml . | nindent 8 }}
{{- end }}
volumes:
- name: job-temp
emptyDir: {{ .Values.jobs.persistence.emptyDir | toYaml | nindent 12 }}
Expand All @@ -51,7 +52,9 @@ spec:
secretKeyRef:
name: {{ coalesce .Values.security.provisioner.existingSecret (include "graphdb.fullname.secret.provisioning-user" .) }}
key: {{ .Values.security.provisioner.tokenKey }}
securityContext: {{- .Values.jobs.securityContext | toYaml | nindent 12 }}
{{- with .Values.jobs.securityContext }}
securityContext: {{ toYaml . | nindent 12 }}
{{- end }}
{{- with .Values.jobs.resources }}
resources: {{ toYaml . | nindent 12 }}
{{- end }}
Expand Down
9 changes: 6 additions & 3 deletions templates/jobs/job-scale-down-cluster.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,9 @@ spec:
imagePullSecrets:
{{- include "graphdb.combinedImagePullSecrets" . | nindent 8 }}
{{- end }}
securityContext:
{{- .Values.jobs.podSecurityContext | toYaml | nindent 8 }}
{{- with .Values.jobs.podSecurityContext }}
securityContext: {{ toYaml . | nindent 8 }}
{{- end }}
volumes:
- name: job-temp
emptyDir: {{ .Values.jobs.persistence.emptyDir | toYaml | nindent 12 }}
Expand Down Expand Up @@ -53,7 +54,9 @@ spec:
secretKeyRef:
name: {{ coalesce .Values.security.provisioner.existingSecret (include "graphdb.fullname.secret.provisioning-user" .) }}
key: {{ .Values.security.provisioner.tokenKey }}
securityContext: {{- .Values.jobs.securityContext | toYaml | nindent 12 }}
{{- with .Values.jobs.securityContext }}
securityContext: {{ toYaml . | nindent 12 }}
{{- end }}
{{- with .Values.jobs.resources }}
resources: {{ toYaml . | nindent 12 }}
{{- end }}
Expand Down
9 changes: 6 additions & 3 deletions templates/jobs/job-scale-up-cluster.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,9 @@ spec:
imagePullSecrets:
{{- include "graphdb.combinedImagePullSecrets" . | nindent 8 }}
{{- end }}
securityContext:
{{- .Values.jobs.podSecurityContext | toYaml | nindent 8 }}
{{- with .Values.jobs.podSecurityContext }}
securityContext: {{ toYaml . | nindent 8 }}
{{- end }}
volumes:
- name: job-temp
emptyDir: {{ .Values.jobs.persistence.emptyDir | toYaml | nindent 12 }}
Expand Down Expand Up @@ -54,7 +55,9 @@ spec:
secretKeyRef:
name: {{ coalesce .Values.security.provisioner.existingSecret (include "graphdb.fullname.secret.provisioning-user" .) }}
key: {{ .Values.security.provisioner.tokenKey }}
securityContext: {{- .Values.jobs.securityContext | toYaml | nindent 12 }}
{{- with .Values.jobs.securityContext }}
securityContext: {{ toYaml . | nindent 12 }}
{{- end }}
{{- with .Values.jobs.resources }}
resources: {{ toYaml . | nindent 12 }}
{{- end }}
Expand Down
2 changes: 1 addition & 1 deletion values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -389,7 +389,7 @@ resources:
memory: 2Gi
requests:
memory: 2Gi
cpu: 0.5
cpu: 500m

# initContainerResources defines resource requests and limits for the node containers provisioning configurations for graphdb.
initContainerResources: {}
Expand Down

0 comments on commit c85f24e

Please sign in to comment.