diff --git a/templates/core/core-pdb.yaml b/templates/core/core-pdb.yaml index 432de0ff9..3de79a2a4 100644 --- a/templates/core/core-pdb.yaml +++ b/templates/core/core-pdb.yaml @@ -1,4 +1,4 @@ -{{- if (gt (int .Values.core.replicas) 1) }} +{{- if and .Values.core.podDisruptionBudget (gt (int .Values.core.replicas) 1) }} apiVersion: policy/v1 kind: PodDisruptionBudget metadata: diff --git a/templates/jobservice/jobservice-pdb.yaml b/templates/jobservice/jobservice-pdb.yaml index 206e34cb9..a542d421f 100644 --- a/templates/jobservice/jobservice-pdb.yaml +++ b/templates/jobservice/jobservice-pdb.yaml @@ -1,4 +1,4 @@ -{{- if (gt (int .Values.jobservice.replicas) 1) }} +{{- if and .Values.jobservice.podDisruptionBudget (gt (int .Values.jobservice.replicas) 1) }} apiVersion: policy/v1 kind: PodDisruptionBudget metadata: diff --git a/templates/nginx/nginx-pdb.yaml b/templates/nginx/nginx-pdb.yaml index 9ebb015b1..3d73a0a46 100644 --- a/templates/nginx/nginx-pdb.yaml +++ b/templates/nginx/nginx-pdb.yaml @@ -1,4 +1,4 @@ -{{- if (gt (int .Values.nginx.replicas) 1) }} +{{- if and .Values.nginx.podDisruptionBudget (gt (int .Values.nginx.replicas) 1) }} apiVersion: policy/v1 kind: PodDisruptionBudget metadata: diff --git a/templates/portal/portal-pdb.yaml b/templates/portal/portal-pdb.yaml index 2eee93066..b20aca4da 100644 --- a/templates/portal/portal-pdb.yaml +++ b/templates/portal/portal-pdb.yaml @@ -1,4 +1,4 @@ -{{- if (gt (int .Values.portal.replicas) 1) }} +{{- if and .Values.portal.podDisruptionBudget (gt (int .Values.portal.replicas) 1) }} apiVersion: policy/v1 kind: PodDisruptionBudget metadata: diff --git a/templates/registry/registry-pdb.yaml b/templates/registry/registry-pdb.yaml index 06a74cb86..f99a8cee5 100644 --- a/templates/registry/registry-pdb.yaml +++ b/templates/registry/registry-pdb.yaml @@ -1,4 +1,4 @@ -{{- if (gt (int .Values.registry.replicas) 1) }} +{{- if and .Values.registry.podDisruptionBudget (gt (int .Values.registry.replicas) 1) }} apiVersion: policy/v1 kind: PodDisruptionBudget metadata: diff --git a/templates/trivy/trivy-pdb.yaml b/templates/trivy/trivy-pdb.yaml index f9c4ecbe2..c284ba2c5 100644 --- a/templates/trivy/trivy-pdb.yaml +++ b/templates/trivy/trivy-pdb.yaml @@ -1,4 +1,4 @@ -{{- if (gt (int .Values.trivy.replicas) 1) }} +{{- if and .Values.trivy.podDisruptionBudget (gt (int .Values.trivy.replicas) 1) }} apiVersion: policy/v1 kind: PodDisruptionBudget metadata: diff --git a/values.yaml b/values.yaml index 3780886fc..0e4fb94e7 100644 --- a/values.yaml +++ b/values.yaml @@ -415,6 +415,7 @@ nginx: nodeSelector: {} tolerations: [] affinity: {} + podDisruptionBudget: false ## Additional deployment annotations podAnnotations: {} ## Additional deployment labels @@ -440,6 +441,7 @@ portal: nodeSelector: {} tolerations: [] affinity: {} + podDisruptionBudget: false ## Additional deployment annotations podAnnotations: {} ## Additional deployment labels @@ -469,6 +471,7 @@ core: nodeSelector: {} tolerations: [] affinity: {} + podDisruptionBudget: false ## Additional deployment annotations podAnnotations: {} ## Additional deployment labels @@ -538,6 +541,7 @@ jobservice: nodeSelector: {} tolerations: [] affinity: {} + podDisruptionBudget: false ## Additional deployment annotations podAnnotations: {} ## Additional deployment labels @@ -578,6 +582,7 @@ registry: nodeSelector: {} tolerations: [] affinity: {} + podDisruptionBudget: false ## Additional deployment annotations podAnnotations: {} ## Additional deployment labels @@ -688,6 +693,7 @@ trivy: nodeSelector: {} tolerations: [] affinity: {} + podDisruptionBudget: false ## Additional deployment annotations podAnnotations: {} ## Additional deployment labels