Skip to content

Commit

Permalink
BUG-851649 : Pod distribution budget added to clustering service (#695)
Browse files Browse the repository at this point in the history
Co-authored-by: vermn1 <Nihal.Verma@in.pega.com>
  • Loading branch information
vnihal72 and vermn1 authored Feb 6, 2024
1 parent 4b46c50 commit db04440
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 0 deletions.
20 changes: 20 additions & 0 deletions charts/pega/charts/hazelcast/templates/clustering-service-pdb.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{{ if and (eq (include "performDeployment" .) "true") (eq (include "isClusteringServiceEnabled" .) "true") }}
{{- if (semverCompare ">= 1.21.0-0" (trimPrefix "v" .Capabilities.KubeVersion.GitVersion)) }}
apiVersion: policy/v1
{{- else }}
apiVersion: policy/v1beta1
{{- end }}
kind: PodDisruptionBudget
metadata:
name: {{ template "clusteringServiceName" . }}-pdb
namespace: {{ .Release.Namespace }}
labels:
app: {{ template "clusteringServiceName" . }}
component: Hazelcast
spec:
maxUnavailable: 1
selector:
matchLabels:
app: {{ template "clusteringServiceName" . }}
component: Hazelcast
{{- end }}
20 changes: 20 additions & 0 deletions charts/pega/charts/hazelcast/templates/pega-hz-pdb.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{{ if and (eq (include "performDeployment" .) "true") (eq (include "isHazelcastEnabled" .) "true") }}
{{- if (semverCompare ">= 1.21.0-0" (trimPrefix "v" .Capabilities.KubeVersion.GitVersion)) }}
apiVersion: policy/v1
{{- else }}
apiVersion: policy/v1beta1
{{- end }}
kind: PodDisruptionBudget
metadata:
name: {{ template "hazelcastName" . }}-pdb
namespace: {{ .Release.Namespace }}
labels:
app: {{ template "hazelcastName" . }}
component: Hazelcast
spec:
maxUnavailable: 1
selector:
matchLabels:
app: {{ template "hazelcastName" . }}
component: Hazelcast
{{- end }}

0 comments on commit db04440

Please sign in to comment.