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: update apiVersion for PodDisruptionBudget and HorizontalPodAutoscaler #685

Merged
2 changes: 1 addition & 1 deletion charts/airflow/templates/flower/flower-pdb.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{{- if and (.Values.flower.enabled) (.Values.flower.podDisruptionBudget.enabled) }}
apiVersion: policy/v1beta1
apiVersion: {{ .Values.flower.podDisruptionBudget.apiVersion }}
kind: PodDisruptionBudget
metadata:
name: {{ include "airflow.fullname" . }}-flower
Expand Down
2 changes: 1 addition & 1 deletion charts/airflow/templates/pgbouncer/pgbouncer-pdb.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{{- if and (include "airflow.pgbouncer.should_use" .) (.Values.pgbouncer.podDisruptionBudget.enabled) }}
apiVersion: policy/v1beta1
apiVersion: {{ .Values.pgbouncer.podDisruptionBudget.apiVersion }}
kind: PodDisruptionBudget
metadata:
name: {{ include "airflow.fullname" . }}-pgbouncer
Expand Down
2 changes: 1 addition & 1 deletion charts/airflow/templates/scheduler/scheduler-pdb.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{{- if .Values.scheduler.podDisruptionBudget.enabled }}
apiVersion: policy/v1beta1
apiVersion: {{ .Values.scheduler.podDisruptionBudget.apiVersion }}
kind: PodDisruptionBudget
metadata:
name: {{ include "airflow.fullname" . }}-scheduler
Expand Down
2 changes: 1 addition & 1 deletion charts/airflow/templates/triggerer/triggerer-pdb.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{{- if and (include "airflow.triggerer.should_use" .) (.Values.triggerer.podDisruptionBudget.enabled) }}
apiVersion: policy/v1beta1
apiVersion: {{ .Values.triggerer.podDisruptionBudget.apiVersion }}
kind: PodDisruptionBudget
metadata:
name: {{ include "airflow.fullname" . }}-triggerer
Expand Down
2 changes: 1 addition & 1 deletion charts/airflow/templates/webserver/webserver-pdb.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{{- if .Values.web.podDisruptionBudget.enabled }}
apiVersion: policy/v1beta1
apiVersion: {{ .Values.web.podDisruptionBudget.apiVersion }}
kind: PodDisruptionBudget
metadata:
name: {{ include "airflow.fullname" . }}-web
Expand Down
2 changes: 1 addition & 1 deletion charts/airflow/templates/worker/worker-hpa.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{{- if and (.Values.workers.enabled) (.Values.workers.autoscaling.enabled) }}
apiVersion: autoscaling/v2beta2
apiVersion: {{ .Values.workers.autoscaling.apiVersion }}
kind: HorizontalPodAutoscaler
metadata:
name: {{ include "airflow.fullname" . }}-worker
Expand Down
2 changes: 1 addition & 1 deletion charts/airflow/templates/worker/worker-pdb.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{{- if and (.Values.workers.enabled) (.Values.workers.podDisruptionBudget.enabled) }}
apiVersion: policy/v1beta1
apiVersion: {{ .Values.workers.podDisruptionBudget.apiVersion }}
kind: PodDisruptionBudget
metadata:
name: {{ include "airflow.fullname" . }}-worker
Expand Down
42 changes: 42 additions & 0 deletions charts/airflow/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -559,6 +559,12 @@ scheduler:
##
enabled: false

## the `apiVersion` to use for PodDisruptionBudget resources
## - for Kubernetes 1.21 and later: "policy/v1"
## - for Kubernetes 1.20 and before: "policy/v1beta1"
##
apiVersion: policy/v1

## the maximum unavailable pods/percentage for the scheduler
##
maxUnavailable: ""
Expand Down Expand Up @@ -747,6 +753,12 @@ web:
##
enabled: false

## the `apiVersion` to use for PodDisruptionBudget resources
## - for Kubernetes 1.21 and later: "policy/v1"
## - for Kubernetes 1.20 and before: "policy/v1beta1"
##
apiVersion: policy/v1

## the maximum unavailable pods/percentage for the web Deployment
##
maxUnavailable: ""
Expand Down Expand Up @@ -877,6 +889,12 @@ workers:
##
enabled: false

## the `apiVersion` to use for PodDisruptionBudget resources
## - for Kubernetes 1.21 and later: "policy/v1"
## - for Kubernetes 1.20 and before: "policy/v1beta1"
##
apiVersion: policy/v1

## the maximum unavailable pods/percentage for the worker StatefulSet
##
maxUnavailable: ""
Expand Down Expand Up @@ -906,6 +924,12 @@ workers:
maxReplicas: 2
metrics: []

## the `apiVersion` to use for HorizontalPodAutoscaler resources
## - for Kubernetes 1.23 and later: "autoscaling/v2"
## - for Kubernetes 1.22 and before: "autoscaling/v2beta2"
##
apiVersion: autoscaling/v2

## configs for the celery worker Pods
##
celery:
Expand Down Expand Up @@ -1047,6 +1071,12 @@ triggerer:
##
enabled: false

## the `apiVersion` to use for PodDisruptionBudget resources
## - for Kubernetes 1.21 and later: "policy/v1"
## - for Kubernetes 1.20 and before: "policy/v1beta1"
##
apiVersion: policy/v1

## the maximum unavailable pods/percentage for the triggerer Deployment
##
maxUnavailable: ""
Expand Down Expand Up @@ -1158,6 +1188,12 @@ flower:
##
enabled: false

## the `apiVersion` to use for PodDisruptionBudget resources
## - for Kubernetes 1.21 and later: "policy/v1"
## - for Kubernetes 1.20 and before: "policy/v1beta1"
##
apiVersion: policy/v1

## the maximum unavailable pods/percentage for the flower Deployment
##
maxUnavailable: ""
Expand Down Expand Up @@ -1705,6 +1741,12 @@ pgbouncer:
##
enabled: false

## the `apiVersion` to use for PodDisruptionBudget resources
## - for Kubernetes 1.21 and later: "policy/v1"
## - for Kubernetes 1.20 and before: "policy/v1beta1"
##
apiVersion: policy/v1

## the maximum unavailable pods/percentage for the pgbouncer Deployment
##
maxUnavailable:
Expand Down