Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add values to set init-container resources #855

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions charts/airflow/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -225,6 +225,7 @@ Parameter | Description | Default
`airflow.extraVolumeMounts` | extra VolumeMounts for the airflow Pods | `[]`
`airflow.extraVolumes` | extra Volumes for the airflow Pods | `[]`
`airflow.clusterDomain` | kubernetes cluster domain name | `cluster.local`
`airflow.initContainers.*` | airflow init-containers | `<see values.yaml>`
`airflow.localSettings.*` | airflow_local_settings.py | `<see values.yaml>`
`airflow.kubernetesPodTemplate.*` | pod_template.yaml | `<see values.yaml>`
`airflow.dbMigrations.*` | db-migrations Deployment | `<see values.yaml>`
Expand Down
6 changes: 6 additions & 0 deletions charts/airflow/templates/_helpers/pods.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,8 @@ EXAMPLE USAGE: {{ include "airflow.init_container.check_db" (dict "Release" .Rel
{{- define "airflow.init_container.check_db" }}
- name: check-db
{{- include "airflow.image" . | indent 2 }}
resources:
{{- toYaml .Values.airflow.initContainers.checkDb.resources | nindent 4 }}
envFrom:
{{- include "airflow.envFrom" . | indent 4 }}
env:
Expand Down Expand Up @@ -87,6 +89,8 @@ EXAMPLE USAGE: {{ include "airflow.init_container.wait_for_db_migrations" (dict
{{- define "airflow.init_container.wait_for_db_migrations" }}
- name: wait-for-db-migrations
{{- include "airflow.image" . | indent 2 }}
resources:
{{- toYaml .Values.airflow.initContainers.waitForDbMigrations.resources | nindent 4 }}
envFrom:
{{- include "airflow.envFrom" . | indent 4 }}
env:
Expand Down Expand Up @@ -164,6 +168,8 @@ EXAMPLE USAGE: {{ include "airflow.init_container.install_pip_packages" (dict "R
{{- define "airflow.init_container.install_pip_packages" }}
- name: install-pip-packages
{{- include "airflow.image" . | indent 2 }}
resources:
{{- toYaml .Values.airflow.initContainers.installPipPackages.resources | nindent 4 }}
envFrom:
{{- include "airflow.envFrom" . | indent 4 }}
env:
Expand Down
32 changes: 32 additions & 0 deletions charts/airflow/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -257,6 +257,38 @@ airflow:
##
clusterDomain: "cluster.local"

########################################
## CONFIGS | airflow init-containers
########################################
##
initContainers:
## configs for the "check-db" init-containers
##
checkDb:
## resource requests/limits for the "check-db" init-containers
## - spec for ResourceRequirements:
## https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.20/#resourcerequirements-v1-core
##
resources: {}

## configs for the "wait-for-db-migrations" init-containers
##
waitForDbMigrations:
## resource requests/limits for the "wait-for-db-migrations" init-containers
## - spec for ResourceRequirements:
## https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.20/#resourcerequirements-v1-core
##
resources: {}

## configs for the "install-pip-packages" init-containers
##
installPipPackages:
## resource requests/limits for the "install-pip-packages" init-containers
## - spec for ResourceRequirements:
## https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.20/#resourcerequirements-v1-core
##
resources: {}

########################################
## FILE | airflow_local_settings.py
########################################
Expand Down
Loading