Skip to content

Commit

Permalink
syntactically awesome
Browse files Browse the repository at this point in the history
  • Loading branch information
aprilrieger committed Feb 21, 2024
1 parent 080c6be commit c7b4fd7
Showing 1 changed file with 146 additions and 146 deletions.
292 changes: 146 additions & 146 deletions ops/demo-deploy.tmpl.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ replicaCount: 2
imagePullSecrets:
- name: github

# fullnameoverride: palni-palci-demo
fullnameoverride: palni-palci-demo

resources:
limits:
Expand Down Expand Up @@ -222,158 +222,158 @@ workerAuxiliary:

extraDeploy:
- |-
apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ include "hyrax.fullname" . }}-auxiliary-worker
labels:
{{- include "hyrax.labels" . | nindent 4 }}
spec:
replicas: {{ .Values.workerAuxiliary.replicaCount }}
selector:
matchLabels:
{{- include "hyrax.workerSelectorLabels" . | nindent 6 }}
template:
metadata:
{{- with .Values.podAnnotations }}
annotations:
{{- toYaml . | nindent 8 }}
{{- end }}
labels:
{{- include "hyrax.workerSelectorLabels" . | nindent 8 }}
spec:
initContainers:
- name: db-wait
image: "{{ .Values.worker.image.repository }}:{{ .Values.worker.image.tag | default .Chart.AppVersion }}"
imagePullPolicy: {{ .Values.worker.image.pullPolicy }}
envFrom:
- configMapRef:
name: {{ include "hyrax.fullname" . }}-env
- secretRef:
name: {{ template "hyrax.fullname" . }}
env:
{{- range .Values.workerAuxiliary.extraDeployEnvVars }}
- name: {{ .name }}
value: {{ .value | quote }}
{{- end }}
{{- range .Values.workerAuxiliary.extraEnvVars }}
- name: {{ .name }}
value: {{ .value | quote }}
{{- end }}
command:
- sh
- -c
- "db-wait.sh {{ include "hyrax.redis.host" . }}:6379"
{{- if .Values.worker.extraInitContainers }}
{{- toYaml .Values.worker.extraInitContainers | nindent 8 }}
{{- end }}
{{- with .Values.imagePullSecrets }}
imagePullSecrets:
{{- toYaml . | nindent 8 }}
apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ include "hyrax.fullname" . }}-auxiliary-worker
labels:
{{- include "hyrax.labels" . | nindent 4 }}
spec:
replicas: {{ .Values.workerAuxiliary.replicaCount }}
selector:
matchLabels:
{{- include "hyrax.workerSelectorLabels" . | nindent 6 }}
template:
metadata:
{{- with .Values.podAnnotations }}
annotations:
{{- toYaml . | nindent 8 }}
{{- end }}
labels:
{{- include "hyrax.workerSelectorLabels" . | nindent 8 }}
spec:
initContainers:
- name: db-wait
image: "{{ .Values.worker.image.repository }}:{{ .Values.worker.image.tag | default .Chart.AppVersion }}"
imagePullPolicy: {{ .Values.worker.image.pullPolicy }}
envFrom:
- configMapRef:
name: {{ include "hyrax.fullname" . }}-env
- secretRef:
name: {{ template "hyrax.fullname" . }}
env:
{{- range .Values.workerAuxiliary.extraDeployEnvVars }}
- name: {{ .name }}
value: {{ .value | quote }}
{{- end }}
{{- range .Values.workerAuxiliary.extraEnvVars }}
- name: {{ .name }}
value: {{ .value | quote }}
{{- end }}
command:
- sh
- -c
- "db-wait.sh {{ include "hyrax.redis.host" . }}:6379"
{{- if .Values.worker.extraInitContainers }}
{{- toYaml .Values.worker.extraInitContainers | nindent 8 }}
{{- end }}
serviceAccountName: {{ include "hyrax.serviceAccountName" . }}
securityContext:
{{- toYaml .Values.worker.podSecurityContext | nindent 8 }}
containers:
- name: {{ .Chart.Name }}-worker
securityContext:
{{- toYaml .Values.worker.securityContext | nindent 12 }}
image: "{{ .Values.worker.image.repository }}:{{ .Values.worker.image.tag | default .Chart.AppVersion }}"
imagePullPolicy: {{ .Values.worker.image.pullPolicy }}
envFrom:
- configMapRef:
name: {{ include "hyrax.fullname" . }}-env
- secretRef:
name: {{ template "hyrax.fullname" . }}
{{- if .Values.solrExistingSecret }}
- secretRef:
name: {{ .Values.solrExistingSecret }}
{{- end }}
{{- with .Values.worker.extraEnvFrom }}
{{- toYaml . | nindent 12 }}
{{- end }}
env:
{{- range .Values.worker.extraDeployEnvVars }}
- name: {{ .name }}
value: {{ .value | quote }}
{{- end }}
{{- range .Values.worker.extraEnvVars }}
- name: {{ .name }}
value: {{ .value | quote }}
{{- end }}
{{- if .Values.worker.readinessProbe.enabled }}
readinessProbe:
exec:
command:
{{- toYaml .Values.worker.readinessProbe.command | nindent 16 }}
failureThreshold: {{ .Values.worker.readinessProbe.failureThreshold }}
initialDelaySeconds: {{ .Values.worker.readinessProbe.initialDelaySeconds }}
periodSeconds: {{ .Values.worker.readinessProbe.periodSeconds }}
successThreshold: {{ .Values.worker.readinessProbe.successThreshold }}
timeoutSeconds: {{ .Values.worker.readinessProbe.timeoutSeconds }}
{{- with .Values.imagePullSecrets }}
imagePullSecrets:
{{- toYaml . | nindent 8 }}
{{- end }}
serviceAccountName: {{ include "hyrax.serviceAccountName" . }}
securityContext:
{{- toYaml .Values.worker.podSecurityContext | nindent 8 }}
containers:
- name: {{ .Chart.Name }}-worker
securityContext:
{{- toYaml .Values.worker.securityContext | nindent 12 }}
image: "{{ .Values.worker.image.repository }}:{{ .Values.worker.image.tag | default .Chart.AppVersion }}"
imagePullPolicy: {{ .Values.worker.image.pullPolicy }}
envFrom:
- configMapRef:
name: {{ include "hyrax.fullname" . }}-env
- secretRef:
name: {{ template "hyrax.fullname" . }}
{{- if .Values.solrExistingSecret }}
- secretRef:
name: {{ .Values.solrExistingSecret }}
{{- end }}
volumeMounts:
- name: derivatives
mountPath: /app/samvera/derivatives
- name: uploads
subPath: file_cache
mountPath: /app/samvera/file_cache
- name: uploads
subPath: uploads
mountPath: /app/samvera/uploads
{{- if .Values.applicationExistingClaim }}
- name: application
mountPath: /app/samvera/hyrax-webapp
{{- end }}
{{- with .Values.worker.extraVolumeMounts }}
{{- with .Values.worker.extraEnvFrom }}
{{- toYaml . | nindent 12 }}
{{- end }}
resources:
{{- toYaml .Values.workerAuxiliary.resources | nindent 12 }}
{{- with .Values.extraContainerConfiguration }}
{{- toYaml . | nindent 10 }}
{{- end }}
volumes:
- name: "derivatives"
{{- if and .Values.derivativesVolume.enabled .Values.derivativesVolume.existingClaim }}
persistentVolumeClaim:
claimName: {{ .Values.derivativesVolume.existingClaim }}
{{- else if .Values.derivativesVolume.enabled }}
persistentVolumeClaim:
claimName: {{ template "hyrax.fullname" . }}-derivatives
{{ else }}
emptyDir: {}
{{ end }}
- name: "uploads"
{{- if and .Values.uploadsVolume.enabled .Values.uploadsVolume.existingClaim }}
persistentVolumeClaim:
claimName: {{ .Values.uploadsVolume.existingClaim }}
{{- else if .Values.uploadsVolume.enabled }}
persistentVolumeClaim:
claimName: {{ template "hyrax.fullname" . }}-uploads
{{ else }}
emptyDir: {}
{{ end }}
{{- if .Values.applicationExistingClaim }}
- name: "application"
persistentVolumeClaim:
claimName: {{ .Values.applicationExistingClaim }}
env:
{{- range .Values.worker.extraDeployEnvVars }}
- name: {{ .name }}
value: {{ .value | quote }}
{{- end }}
{{- range .Values.worker.extraEnvVars }}
- name: {{ .name }}
value: {{ .value | quote }}
{{- end }}
{{- if .Values.worker.readinessProbe.enabled }}
readinessProbe:
exec:
command:
{{- toYaml .Values.worker.readinessProbe.command | nindent 16 }}
failureThreshold: {{ .Values.worker.readinessProbe.failureThreshold }}
initialDelaySeconds: {{ .Values.worker.readinessProbe.initialDelaySeconds }}
periodSeconds: {{ .Values.worker.readinessProbe.periodSeconds }}
successThreshold: {{ .Values.worker.readinessProbe.successThreshold }}
timeoutSeconds: {{ .Values.worker.readinessProbe.timeoutSeconds }}
{{- end }}
{{- with .Values.worker.extraVolumes }}
{{- toYaml . | nindent 8 }}
volumeMounts:
- name: derivatives
mountPath: /app/samvera/derivatives
- name: uploads
subPath: file_cache
mountPath: /app/samvera/file_cache
- name: uploads
subPath: uploads
mountPath: /app/samvera/uploads
{{- if .Values.applicationExistingClaim }}
- name: application
mountPath: /app/samvera/hyrax-webapp
{{- end }}
{{- with .Values.worker.extraVolumeMounts }}
{{- toYaml . | nindent 12 }}
{{- end }}
resources:
{{- toYaml .Values.workerAuxiliary.resources | nindent 12 }}
{{- with .Values.extraContainerConfiguration }}
{{- toYaml . | nindent 10 }}
{{- end }}
{{- with .Values.worker.nodeSelector }}
nodeSelector:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.worker.affinity }}
affinity:
{{- toYaml . | nindent 8 }}
volumes:
- name: "derivatives"
{{- if and .Values.derivativesVolume.enabled .Values.derivativesVolume.existingClaim }}
persistentVolumeClaim:
claimName: {{ .Values.derivativesVolume.existingClaim }}
{{- else if .Values.derivativesVolume.enabled }}
persistentVolumeClaim:
claimName: {{ template "hyrax.fullname" . }}-derivatives
{{ else }}
emptyDir: {}
{{ end }}
- name: "uploads"
{{- if and .Values.uploadsVolume.enabled .Values.uploadsVolume.existingClaim }}
persistentVolumeClaim:
claimName: {{ .Values.uploadsVolume.existingClaim }}
{{- else if .Values.uploadsVolume.enabled }}
persistentVolumeClaim:
claimName: {{ template "hyrax.fullname" . }}-uploads
{{ else }}
emptyDir: {}
{{ end }}
{{- if .Values.applicationExistingClaim }}
- name: "application"
persistentVolumeClaim:
claimName: {{ .Values.applicationExistingClaim }}
{{- end }}
{{- with .Values.worker.tolerations }}
tolerations:
{{- toYaml . | nindent 8 }}
{{- with .Values.worker.extraVolumes }}
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.worker.nodeSelector }}
nodeSelector:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.worker.affinity }}
affinity:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.worker.tolerations }}
tolerations:
{{- toYaml . | nindent 8 }}
{{- end }}
podSecurityContext:
runAsUser: 1001
Expand All @@ -386,7 +386,7 @@ embargoRelease:
leaseRelease:
enabled: false

nameOverride: pals
# nameOverride: pals
fcrepo:
enabled: false
postgresql:
Expand Down

0 comments on commit c7b4fd7

Please sign in to comment.