Skip to content

Commit

Permalink
fix: helm chart fixes for version 2.10
Browse files Browse the repository at this point in the history
  • Loading branch information
armandomiani committed Jan 31, 2025
1 parent fb571aa commit a3d24dc
Show file tree
Hide file tree
Showing 6 changed files with 36 additions and 25 deletions.
12 changes: 6 additions & 6 deletions k8s/airflow/chart/airflow/templates/_helpers/pods.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,8 @@ EXAMPLE USAGE: {{ include "airflow.init_container.check_db" (dict "Release" .Rel
command:
{{- include "airflow.command" . | indent 4 }}
args:
- "bash"
- "-c"
- "exec timeout 60s airflow db check"
- "db"
- "check"
volumeMounts:
{{- include "airflow.volumeMounts" . | indent 4 }}
{{- end }}
Expand All @@ -53,9 +52,10 @@ EXAMPLE USAGE: {{ include "airflow.init_container.wait_for_db_migrations" (dict
command:
{{- include "airflow.command" . | indent 4 }}
args:
- "bash"
- "-c"
- "exec airflow db check-migrations -t 60"
- "db"
- "check-migrations"
- "-t"
- "60"
volumeMounts:
{{- include "airflow.volumeMounts" . | indent 4 }}
{{- end }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ spec:
name: {{ .Release.Name }}
spec:
restartPolicy: Always
terminationGracePeriodSeconds: 120
serviceAccountName: {{ include "airflow.serviceAccountName" . }}
initContainers:
{{- include "airflow.init_container.check_db" . | indent 8 }}
Expand All @@ -38,19 +39,21 @@ spec:
env:
{{- include "airflow.env" . | indent 12 }}
command:
{{- include "airflow.command" . | indent 12 }}
- python
args:
- "python"
- "-u"
- "/mnt/scripts/db_migrations.py"
volumeMounts:
{{- include "airflow.volumeMounts" . | indent 12 }}
- name: scripts
mountPath: /mnt/scripts
readOnly: true
lifecycle:
preStop:
exec:
command: ["/bin/bash", "-c", "pkill -SIGTERM python"]
volumes:
{{- include "airflow.volumes" . | indent 8 }}
- name: scripts
secret:
secretName: {{ .Release.Name }}-db-migrations

12 changes: 12 additions & 0 deletions k8s/airflow/chart/airflow/templates/nfs/nfs_server_pvc.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,18 @@
---
kind: PersistentVolumeClaim
apiVersion: v1
metadata:
name: {{ .Release.Name }}-nfs-server-pvc
spec:
storageClassName: "{{ .Values.nfs.persistence.storageClass }}"
accessModes:
- ReadWriteOnce
resources:
requests:
storage: {{ .Values.nfs.persistence.size | quote }}
---
kind: PersistentVolumeClaim
apiVersion: v1
metadata:
name: {{ .Release.Name }}-nfs-dags-logs
labels:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ spec:
name: {{ .Release.Name }}
spec:
restartPolicy: Always
terminationGracePeriodSeconds: 60
serviceAccountName: {{ include "airflow.serviceAccountName" . }}
initContainers:
{{- include "airflow.init_container.check_db" . | indent 8 }}
Expand All @@ -43,11 +44,11 @@ spec:
command:
{{- include "airflow.command" . | indent 12 }}
args:
- "bash"
- "-c"
- "exec airflow scheduler -n -1"
- "scheduler"
- "-n"
- "-1"
livenessProbe:
initialDelaySeconds: 10
initialDelaySeconds: 10
periodSeconds: 30
failureThreshold: 5
timeoutSeconds: 60
Expand Down Expand Up @@ -91,4 +92,3 @@ spec:
- name: pod-template
configMap:
name: {{ .Release.Name }}-pod-template

Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ spec:
name: {{ .Release.Name }}
spec:
restartPolicy: Always
terminationGracePeriodSeconds: 60
serviceAccountName: {{ include "airflow.serviceAccountName" . }}
initContainers:
{{- include "airflow.init_container.check_db" . | indent 8 }}
Expand All @@ -44,11 +45,9 @@ spec:
command:
{{- include "airflow.command" . | indent 12 }}
args:
- "bash"
- "-c"
- "exec airflow triggerer"
- "triggerer"
livenessProbe:
initialDelaySeconds: 10
initialDelaySeconds: 10
periodSeconds: 30
timeoutSeconds: 60
failureThreshold: 5
Expand Down Expand Up @@ -86,4 +85,3 @@ spec:
{{- include "airflow.volumeMounts" . | indent 12 }}
volumes:
{{- include "airflow.volumes" . | indent 8 }}

Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ spec:
name: {{ .Release.Name }}
spec:
restartPolicy: Always
terminationGracePeriodSeconds: 60
serviceAccountName: {{ include "airflow.serviceAccountName" . }}
initContainers:
{{- include "airflow.init_container.check_db" . | indent 8 }}
Expand All @@ -45,16 +46,14 @@ spec:
{{- include "airflow.envFrom" . | indent 12 }}
env:
{{- include "airflow.env" . | indent 12 }}
- name: _AIRFLOW_WWW_USER_CREATE
- name: _AIRFLOW_WWW_USER_CREATE
value: 'true'
command:
{{- include "airflow.command" . | indent 12 }}
args:
- "bash"
- "-c"
- "exec airflow webserver"
- "webserver"
livenessProbe: &probes
initialDelaySeconds: 30
initialDelaySeconds: 30
periodSeconds: 10
timeoutSeconds: 5
failureThreshold: 6
Expand Down Expand Up @@ -98,4 +97,3 @@ spec:
secret:
secretName: {{ .Release.Name }}-webserver-config
defaultMode: 0644

0 comments on commit a3d24dc

Please sign in to comment.