Skip to content

Commit da40b72

Browse files
Add /var/lib/nginx/logs for chainguard nginx (#689)
* Add /var/lib/nginx/logs for chainguard nginx * v1.17.19 * add dagserver volume * add git-sync volume * add {"name": "nginx-access-logs", "emptyDir": {}}, volume * fix test * dagserver sts test fix --------- Co-authored-by: Shubham-astro <shubham.singh@astronomer.io>
1 parent 0350615 commit da40b72

File tree

6 files changed

+11
-1
lines changed

6 files changed

+11
-1
lines changed

Chart.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# apiVersion v2 is Helm 3
22
apiVersion: v2
33
name: airflow
4-
version: 1.17.18
4+
version: 1.17.19
55
description: Helm chart to deploy the Astronomer Platform Airflow module
66
icon: https://airflow.apache.org/docs/apache-airflow/stable/_images/pin_large.png
77
keywords:

templates/_helpers.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -431,6 +431,8 @@ Create the name of the cleanup service account to use
431431
periodSeconds: 10
432432
{{- end }}
433433
volumeMounts:
434+
- mountPath: /var/lib/nginx/logs
435+
name: nginx-access-logs
434436
- mountPath: /etc/nginx/nginx.conf
435437
name: nginx-sidecar-conf
436438
subPath: nginx.conf

templates/dag-deploy/dag-server-statefulset.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,8 @@ spec:
130130
name: nginx-cache
131131
- emptyDir: {}
132132
name: nginx-tmp
133+
- name: nginx-access-logs
134+
emptyDir: {}
133135
{{- end }}
134136
{{- if .Values.loggingSidecar.enabled }}
135137
- name: config-volume

templates/git-sync-relay/git-sync-relay-deployment.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,8 @@ spec:
6969
name: sidecar-logging-consumer
7070
{{- end }}
7171
{{- if and .Values.authSidecar.enabled (eq .Values.gitSyncRelay.repoFetchMode "webhook") }}
72+
- name: nginx-access-logs
73+
emptyDir: {}
7274
- name: nginx-sidecar-conf
7375
configMap:
7476
name: {{ .Release.Name }}-git-sync-relay-nginx-conf

tests/chart/test_dag_server_statefulset.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -297,6 +297,7 @@ def test_dag_server_statefulset_with_probes_and_authproxy_enabled(self, kube_ver
297297
{"name": "nginx-sidecar-conf", "configMap": {"name": "release-name-dag-server-nginx-conf"}},
298298
{"name": "nginx-cache", "emptyDir": {}},
299299
{"name": "nginx-tmp", "emptyDir": {}},
300+
{"name": "nginx-access-logs", "emptyDir": {}},
300301
{"name": "config-volume", "configMap": {"name": "release-name-sidecar-config"}},
301302
{"name": "sidecar-logging-consumer", "emptyDir": {}},
302303
]
@@ -312,6 +313,7 @@ def test_dag_server_statefulset_with_probes_and_authproxy_enabled(self, kube_ver
312313
assert livenessProbe == c_by_name["sidecar-log-consumer"]["livenessProbe"]
313314

314315
assert c_by_name["auth-proxy"]["volumeMounts"] == [
316+
{"mountPath": "/var/lib/nginx/logs", "name": "nginx-access-logs"},
315317
{"mountPath": "/etc/nginx/nginx.conf", "name": "nginx-sidecar-conf", "subPath": "nginx.conf"},
316318
{"mountPath": "/var/cache/nginx", "name": "nginx-cache"},
317319
{"mountPath": "/tmp", "name": "tmp"}, # noqa: S108

tests/chart/test_git_sync_relay_deployment.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -333,6 +333,7 @@ def test_git_sync_server_deployment_with_sidecar_and_authproxy_enabled(self, kub
333333
{"name": "release-name-git-sync-config", "configMap": {"name": "release-name-git-sync-config"}},
334334
{"name": "config-volume", "configMap": {"name": "release-name-sidecar-config"}},
335335
{"name": "sidecar-logging-consumer", "emptyDir": {}},
336+
{"name": "nginx-access-logs", "emptyDir": {}},
336337
{"name": "nginx-sidecar-conf", "configMap": {"name": "release-name-git-sync-relay-nginx-conf"}},
337338
{"name": "nginx-cache", "emptyDir": {}},
338339
{"name": "nginx-tmp", "emptyDir": {}},
@@ -352,6 +353,7 @@ def test_git_sync_server_deployment_with_sidecar_and_authproxy_enabled(self, kub
352353
]
353354

354355
assert c_by_name["auth-proxy"]["volumeMounts"] == [
356+
{"mountPath": "/var/lib/nginx/logs", "name": "nginx-access-logs"},
355357
{"mountPath": "/etc/nginx/nginx.conf", "name": "nginx-sidecar-conf", "subPath": "nginx.conf"},
356358
{"mountPath": "/var/cache/nginx", "name": "nginx-cache"},
357359
{"mountPath": "/tmp", "name": "tmp"}, # noqa: S108

0 commit comments

Comments
 (0)