This is an automated email from the ASF dual-hosted git repository.
jedcunningham pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/airflow.git
The following commit(s) were added to refs/heads/main by this push:
new cbbb0bdd84 fix(chart): remove lifecycle from init containers (#34677)
cbbb0bdd84 is described below
commit cbbb0bdd848eeb8f3857de7957500082d2fb4b14
Author: Reza J. Bavaghoush <[email protected]>
AuthorDate: Sat Sep 30 01:05:44 2023 +0200
fix(chart): remove lifecycle from init containers (#34677)
---
.../templates/scheduler/scheduler-deployment.yaml | 4 -
.../templates/triggerer/triggerer-deployment.yaml | 4 -
.../templates/webserver/webserver-deployment.yaml | 4 -
chart/templates/workers/worker-deployment.yaml | 8 --
chart/values.schema.json | 145 ---------------------
chart/values.yaml | 10 --
6 files changed, 175 deletions(-)
diff --git a/chart/templates/scheduler/scheduler-deployment.yaml
b/chart/templates/scheduler/scheduler-deployment.yaml
index 04dc58b30d..2ea30e3e2e 100644
--- a/chart/templates/scheduler/scheduler-deployment.yaml
+++ b/chart/templates/scheduler/scheduler-deployment.yaml
@@ -42,7 +42,6 @@
{{- $containerSecurityContextWaitForMigrations := include
"containerSecurityContext" (list . .Values.scheduler.waitForMigrations) }}
{{- $containerSecurityContextLogGroomerSidecar := include
"containerSecurityContext" (list . .Values.scheduler.logGroomerSidecar) }}
{{- $containerLifecycleHooks := or .Values.scheduler.containerLifecycleHooks
.Values.containerLifecycleHooks }}
-{{- $containerLifecycleHooksWaitForMigrations := or
.Values.scheduler.waitForMigrations.containerLifecycleHooks
.Values.containerLifecycleHooks }}
{{- $containerLifecycleHooksLogGroomerSidecar := or
.Values.scheduler.logGroomerSidecar.containerLifecycleHooks
.Values.containerLifecycleHooks }}
apiVersion: apps/v1
kind: {{ if $stateful }}StatefulSet{{ else }}Deployment{{ end }}
@@ -146,9 +145,6 @@ spec:
image: {{ template "airflow_image_for_migrations" . }}
imagePullPolicy: {{ .Values.images.airflow.pullPolicy }}
securityContext: {{ $containerSecurityContextWaitForMigrations |
nindent 12 }}
- {{- if $containerLifecycleHooksWaitForMigrations }}
- lifecycle: {{- tpl (toYaml
$containerLifecycleHooksWaitForMigrations) . | nindent 12 }}
- {{- end }}
volumeMounts:
{{- include "airflow_config_mount" . | nindent 12 }}
{{- if .Values.volumeMounts }}
diff --git a/chart/templates/triggerer/triggerer-deployment.yaml
b/chart/templates/triggerer/triggerer-deployment.yaml
index ccaedb88c3..bef188f68a 100644
--- a/chart/templates/triggerer/triggerer-deployment.yaml
+++ b/chart/templates/triggerer/triggerer-deployment.yaml
@@ -35,7 +35,6 @@
{{- $containerSecurityContextWaitForMigrations := include
"containerSecurityContext" (list . .Values.triggerer.waitForMigrations) }}
{{- $containerSecurityContextLogGroomer := include "containerSecurityContext"
(list . .Values.triggerer.logGroomerSidecar) }}
{{- $containerLifecycleHooks := or .Values.triggerer.containerLifecycleHooks
.Values.containerLifecycleHooks }}
-{{- $containerLifecycleHooksWaitForMigrations := or
.Values.triggerer.waitForMigrations.containerLifecycleHooks
.Values.containerLifecycleHooks }}
{{- $containerLifecycleHooksLogGroomerSidecar := or
.Values.triggerer.logGroomerSidecar.containerLifecycleHooks
.Values.containerLifecycleHooks }}
apiVersion: apps/v1
kind: {{ if $persistence }}StatefulSet{{ else }}Deployment{{ end }}
@@ -137,9 +136,6 @@ spec:
image: {{ template "airflow_image_for_migrations" . }}
imagePullPolicy: {{ .Values.images.airflow.pullPolicy }}
securityContext: {{ $containerSecurityContextWaitForMigrations |
nindent 12 }}
- {{- if $containerLifecycleHooksWaitForMigrations }}
- lifecycle: {{- tpl (toYaml
$containerLifecycleHooksWaitForMigrations) . | nindent 12 }}
- {{- end }}
volumeMounts:
{{- include "airflow_config_mount" . | nindent 12 }}
{{- if .Values.volumeMounts }}
diff --git a/chart/templates/webserver/webserver-deployment.yaml
b/chart/templates/webserver/webserver-deployment.yaml
index 41a9d5ec63..26fe76d9ea 100644
--- a/chart/templates/webserver/webserver-deployment.yaml
+++ b/chart/templates/webserver/webserver-deployment.yaml
@@ -29,7 +29,6 @@
{{- $containerSecurityContext := include "containerSecurityContext" (list .
.Values.webserver) }}
{{- $containerSecurityContextWaitForMigrations := include
"containerSecurityContext" (list . .Values.webserver.waitForMigrations) }}
{{- $containerLifecycleHooks := or .Values.webserver.containerLifecycleHooks
.Values.containerLifecycleHooks }}
-{{- $containerLifecycleHooksWaitForMigrations := or
.Values.webserver.waitForMigrations.containerLifecycleHooks
.Values.containerLifecycleHooks }}
apiVersion: apps/v1
kind: Deployment
metadata:
@@ -139,9 +138,6 @@ spec:
image: {{ template "airflow_image_for_migrations" . }}
imagePullPolicy: {{ .Values.images.airflow.pullPolicy }}
securityContext: {{ $containerSecurityContextWaitForMigrations |
nindent 12 }}
- {{- if $containerLifecycleHooksWaitForMigrations }}
- lifecycle: {{- tpl (toYaml
$containerLifecycleHooksWaitForMigrations) . | nindent 12 }}
- {{- end }}
volumeMounts:
{{- include "airflow_config_mount" . | nindent 12 }}
{{- if .Values.volumeMounts }}
diff --git a/chart/templates/workers/worker-deployment.yaml
b/chart/templates/workers/worker-deployment.yaml
index f98ca3f09a..213fadbb03 100644
--- a/chart/templates/workers/worker-deployment.yaml
+++ b/chart/templates/workers/worker-deployment.yaml
@@ -35,8 +35,6 @@
{{- $containerSecurityContextLogGroomerSidecar := include
"containerSecurityContext" (list . .Values.workers.logGroomerSidecar) }}
{{- $containerSecurityContextKerberosSidecar := include
"containerSecurityContext" (list . .Values.workers.kerberosSidecar) }}
{{- $containerLifecycleHooks := or .Values.workers.containerLifecycleHooks
.Values.containerLifecycleHooks }}
-{{- $containerLifecycleHooksPersistence := or
.Values.workers.persistence.containerLifecycleHooks
.Values.containerLifecycleHooks }}
-{{- $containerLifecycleHooksWaitForMigrations := or
.Values.workers.waitForMigrations.containerLifecycleHooks
.Values.containerLifecycleHooks }}
{{- $containerLifecycleHooksLogGroomerSidecar := or
.Values.workers.logGroomerSidecar.containerLifecycleHooks
.Values.containerLifecycleHooks }}
{{- $containerLifecycleHooksKerberosSidecar := or
.Values.workers.kerberosSidecar.containerLifecycleHooks
.Values.containerLifecycleHooks }}
apiVersion: apps/v1
@@ -152,9 +150,6 @@ spec:
- "{{ include "airflowPodSecurityContextsIds" (list .
.Values.workers) }}"
- {{ template "airflow_logs" . }}
securityContext: {{ $containerSecurityContextPersistence | nindent
12 }}
- {{- if $containerLifecycleHooksPersistence }}
- lifecycle: {{- tpl (toYaml $containerLifecycleHooksPersistence) . |
nindent 12 }}
- {{- end }}
volumeMounts:
- name: logs
mountPath: {{ template "airflow_logs" . }}
@@ -165,9 +160,6 @@ spec:
image: {{ template "airflow_image_for_migrations" . }}
imagePullPolicy: {{ .Values.images.airflow.pullPolicy }}
securityContext: {{ $containerSecurityContextWaitForMigrations |
nindent 12 }}
- {{- if $containerLifecycleHooksWaitForMigrations }}
- lifecycle: {{- tpl (toYaml
$containerLifecycleHooksWaitForMigrations) . | nindent 12 }}
- {{- end }}
volumeMounts:
{{- include "airflow_config_mount" . | nindent 12 }}
{{- if .Values.volumeMounts }}
diff --git a/chart/values.schema.json b/chart/values.schema.json
index 395bea9b4a..dce38a205f 100644
--- a/chart/values.schema.json
+++ b/chart/values.schema.json
@@ -1974,35 +1974,6 @@
"additionalProperties": false
}
},
- "containerLifecycleHooks": {
- "description": "Container Lifecycle Hooks
definition for the worker. If not set, the values from global
`containerLifecycleHooks` will be used.",
- "type": "object",
- "$ref":
"#/definitions/io.k8s.api.core.v1.Lifecycle",
- "default": {},
- "x-docsSection": "Kubernetes",
- "examples": [
- {
- "postStart": {
- "exec": {
- "command": [
- "/bin/sh",
- "-c",
- "echo postStart handler >
/usr/share/message"
- ]
- }
- },
- "preStop": {
- "exec": {
- "command": [
- "/bin/sh",
- "-c",
- "echo preStop handler >
/usr/share/message"
- ]
- }
- }
- }
- ]
- },
"securityContexts": {
"description": "Security context definition for
the wait for migrations. If not set, the values from global `securityContexts`
will be used.",
"type": "object",
@@ -2512,35 +2483,6 @@
"additionalProperties": false
}
},
- "containerLifecycleHooks": {
- "description": "Container Lifecycle Hooks
definition for the wait for migrations. If not set, the values from global
`containerLifecycleHooks` will be used.",
- "type": "object",
- "$ref":
"#/definitions/io.k8s.api.core.v1.Lifecycle",
- "default": {},
- "x-docsSection": "Kubernetes",
- "examples": [
- {
- "postStart": {
- "exec": {
- "command": [
- "/bin/sh",
- "-c",
- "echo postStart handler >
/usr/share/message"
- ]
- }
- },
- "preStop": {
- "exec": {
- "command": [
- "/bin/sh",
- "-c",
- "echo preStop handler >
/usr/share/message"
- ]
- }
- }
- }
- ]
- },
"securityContexts": {
"description": "Security context definition for
the wait for migrations. If not set, the values from global `securityContexts`
will be used.",
"type": "object",
@@ -3012,35 +2954,6 @@
"additionalProperties": false
}
},
- "containerLifecycleHooks": {
- "description": "Container Lifecycle Hooks
definition for the wait for migrations. If not set, the values from global
`containerLifecycleHooks` will be used.",
- "type": "object",
- "$ref":
"#/definitions/io.k8s.api.core.v1.Lifecycle",
- "default": {},
- "x-docsSection": "Kubernetes",
- "examples": [
- {
- "postStart": {
- "exec": {
- "command": [
- "/bin/sh",
- "-c",
- "echo postStart handler >
/usr/share/message"
- ]
- }
- },
- "preStop": {
- "exec": {
- "command": [
- "/bin/sh",
- "-c",
- "echo preStop handler >
/usr/share/message"
- ]
- }
- }
- }
- ]
- },
"securityContexts": {
"description": "Security context definition for
the wait for migrations. If not set, the values from global `securityContexts`
will be used.",
"type": "object",
@@ -3524,35 +3437,6 @@
"additionalProperties": false
}
},
- "containerLifecycleHooks": {
- "description": "Container Lifecycle Hooks
definition for the wait for migrations. If not set, the values from global
`containerLifecycleHooks` will be used.",
- "type": "object",
- "$ref":
"#/definitions/io.k8s.api.core.v1.Lifecycle",
- "default": {},
- "x-docsSection": "Kubernetes",
- "examples": [
- {
- "postStart": {
- "exec": {
- "command": [
- "/bin/sh",
- "-c",
- "echo postStart handler >
/usr/share/message"
- ]
- }
- },
- "preStop": {
- "exec": {
- "command": [
- "/bin/sh",
- "-c",
- "echo preStop handler >
/usr/share/message"
- ]
- }
- }
- }
- ]
- },
"securityContexts": {
"description": "Security context definition for
the wait for migrations. If not set, the values from global `securityContexts`
will be used.",
"type": "object",
@@ -4837,35 +4721,6 @@
"additionalProperties": false
}
},
- "containerLifecycleHooks": {
- "description": "Container Lifecycle Hooks
definition for the wait for migrations. If not set, the values from global
`containerLifecycleHooks` will be used.",
- "type": "object",
- "$ref":
"#/definitions/io.k8s.api.core.v1.Lifecycle",
- "default": {},
- "x-docsSection": "Kubernetes",
- "examples": [
- {
- "postStart": {
- "exec": {
- "command": [
- "/bin/sh",
- "-c",
- "echo postStart handler >
/usr/share/message"
- ]
- }
- },
- "preStop": {
- "exec": {
- "command": [
- "/bin/sh",
- "-c",
- "echo preStop handler >
/usr/share/message"
- ]
- }
- }
- }
- ]
- },
"securityContexts": {
"description": "Security context definition for
the wait for migrations. If not set, the values from global `securityContexts`
will be used.",
"type": "object",
diff --git a/chart/values.yaml b/chart/values.yaml
index cdd418ee38..7b238523ab 100644
--- a/chart/values.yaml
+++ b/chart/values.yaml
@@ -726,8 +726,6 @@ workers:
# Detailed default security context for waitForMigrations for container
level
securityContexts:
container: {}
- # container level lifecycle hooks
- containerLifecycleHooks: {}
env: []
@@ -901,8 +899,6 @@ scheduler:
# Detailed default security context for waitForMigrations for container
level
securityContexts:
container: {}
- # container level lifecycle hooks
- containerLifecycleHooks: {}
env: []
@@ -1303,9 +1299,6 @@ webserver:
securityContexts:
container: {}
- # container level lifecycle hooks
- containerLifecycleHooks: {}
-
env: []
# Airflow Triggerer Config
@@ -1471,9 +1464,6 @@ triggerer:
securityContexts:
container: {}
- # container level lifecycle hooks
- containerLifecycleHooks: {}
-
env: []
# Allow KEDA autoscaling.