Skip to content
Snippets Groups Projects

Remove all deployments from nomad-FAIR

Merged Ahmed Ilyas requested to merge remove-all-deployments into develop
Files
33
{{- if .Values.nomad.adminconsole.enabled -}}
apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ include "nomad.fullname" . }}-adminconsole
labels:
{{- include "nomad.labels" . | nindent 4 }}
app.kubernetes.io/component: adminconsole
spec:
replicas: {{ .Values.nomad.adminconsole.replicaCount }}
selector:
matchLabels:
{{- include "nomad.selectorLabels" . | nindent 6 }}
app.kubernetes.io/component: adminconsole
template:
metadata:
{{- with .Values.nomad.adminconsole.podAnnotations }}
annotations:
{{- toYaml . | nindent 8 }}
{{- if .Values.roll }}
rollme: {{ randAlphaNum 5 | quote }}
{{- end }}
{{- else }}
{{- if .Values.roll }}
annotations:
rollme: {{ randAlphaNum 5 | quote }}
{{- end }}
{{- end }}
labels:
{{- include "nomad.labels" . | nindent 8 }}
{{- with .Values.nomad.podLabels }}
{{- toYaml . | nindent 8 }}
{{- end }}
app.kubernetes.io/component: adminconsole
spec:
{{- with .Values.nomad.imagePullSecrets }}
imagePullSecrets:
{{- toYaml . | nindent 8 }}
{{- end }}
serviceAccountName: {{ include "nomad.serviceAccountName" . }}
{{- with .Values.nomad.adminconsole.podSecurityContext }}
securityContext:
{{- toYaml . | nindent 8 }}
{{- end }}
containers:
- name: {{ .Chart.Name }}-adminconsole
{{- with .Values.nomad.adminconsole.securityContext }}
securityContext:
{{- toYaml . | nindent 12 }}
{{- end }}
image: "{{ .Values.nomad.image.repository }}:{{ .Values.nomad.image.tag | default .Chart.AppVersion }}"
imagePullPolicy: {{ .Values.nomad.image.pullPolicy }}
{{- with .Values.nomad.adminconsole.resources }}
resources:
{{- toYaml . | nindent 12 }}
{{- end }}
volumeMounts:
- mountPath: /app/nomad.yaml
name: nomad-conf
subPath: nomad.yaml
- mountPath: /app/.volumes/fs/public
name: public-volume
- mountPath: /app/.volumes/fs/staging
name: staging-volume
- mountPath: /nomad
name: nomad-volume
{{- with .Values.nomad.volumeMounts }}
{{- toYaml . | nindent 12 }}
{{- end }}
env:
- name: JUPYTER_RUNTIME_DIR
value: /tmp
- name: JUPYTER_DATA_DIR
value: /tmp
- name: CELERY_ACKS_LATE
value: "True"
- name: NOMAD_META_SERVICE
value: "adminconsole"
- name: NOMAD_CONSOLE_LOG_LEVEL
value: "{{ .Values.nomad.config.worker.console_loglevel }}"
- name: NOMAD_LOGSTASH_LEVEL
value: "{{ .Values.nomad.config.worker.logstash_loglevel }}"
- name: NOMAD_CELERY_NODE_NAME
valueFrom:
fieldRef:
fieldPath: spec.nodeName
{{- if .Values.nomad.config.api.apiSecret }}
- name: NOMAD_SERVICES_API_SECRET
valueFrom:
secretKeyRef:
name: {{ .Values.nomad.config.api.apiSecret}}
key: password
{{- end }}
{{- if .Values.nomad.config.keycloak.clientSecret }}
- name: NOMAD_KEYCLOAK_CLIENT_SECRET
valueFrom:
secretKeyRef:
name: {{ .Values.nomad.config.keycloak.clientSecret }}
key: password
{{- end }}
{{- if .Values.nomad.config.keycloak.passwordSecret }}
- name: NOMAD_KEYCLOAK_PASSWORD
valueFrom:
secretKeyRef:
name: {{ .Values.nomad.config.keycloak.passwordSecret }}
key: password
{{- end }}
command: ["jupyter", "lab", "--notebook-dir", "/nomad/adminconsole"]
livenessProbe:
exec:
command:
- bash
- -c
- NOMAD_LOGSTASH_LEVEL=WARNING python -m celery -A nomad.processing status | grep "${NOMAD_CELERY_NODE_NAME}:.*OK"
initialDelaySeconds: 30
periodSeconds: 120
timeoutSeconds: 60
readinessProbe:
exec:
command:
- bash
- -c
- NOMAD_LOGSTASH_LEVEL=WARNING python -m celery -A nomad.processing status | grep "${NOMAD_CELERY_NODE_NAME}:.*OK"
initialDelaySeconds: 30
periodSeconds: 120
timeoutSeconds: 60
volumes:
{{- with .Values.nomad.volumes }}
{{- toYaml . | nindent 8 }}
{{- end }}
- name: nomad-conf
configMap:
name: {{ include "nomad.fullname" . }}-configmap
- name: public-volume
hostPath:
path: {{ .Values.nomad.config.volumes.public }}
# type: Directory
- name: staging-volume
{{ if (eq .Values.nomad.config.worker.storage "memory") }}
emptyDir:
medium: 'Memory'
{{ else }}
hostPath:
path: {{ .Values.nomad.config.volumes.staging}}
# type: Directory
{{ end }}
- name: nomad-volume
hostPath:
path: {{ .Values.nomad.config.volumes.nomad }}
# type: Directory
{{- with .Values.nomad.adminconsole.nodeSelector }}
nodeSelector:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.nomad.adminconsole.affinity }}
affinity:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.nomad.adminconsole.tolerations }}
tolerations:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- end }}
\ No newline at end of file
Loading