Skip to content

Commit

Permalink
feat: Added new policy to PodDisruptionBudget
Browse files Browse the repository at this point in the history
1.27
  • Loading branch information
peterabarr committed Sep 26, 2024
1 parent 9ce6742 commit 2db9c04
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 0 deletions.
1 change: 1 addition & 0 deletions charts/karpenter/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ cosign verify public.ecr.aws/karpenter/karpenter:1.0.0 \
| podAnnotations | object | `{}` | Additional annotations for the pod. |
| podDisruptionBudget.maxUnavailable | int | `1` | |
| podDisruptionBudget.name | string | `"karpenter"` | |
| podDisruptionBudget.unhealthyPodEvictionPolicy | string | `nil` | Unhealthy pod eviction policy for the PDB. |
| podLabels | object | `{}` | Additional labels for the pod. |
| podSecurityContext | object | `{"fsGroup":65532}` | SecurityContext for the pod. |
| priorityClassName | string | `"system-cluster-critical"` | PriorityClass name for the pod. |
Expand Down
5 changes: 5 additions & 0 deletions charts/karpenter/templates/poddisruptionbudget.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,11 @@ metadata:
{{- end }}
spec:
maxUnavailable: {{ .Values.podDisruptionBudget.maxUnavailable }}
{{- if (semverCompare ">= 1.27-0" .Capabilities.KubeVersion.Version) }}
{{- with .Values.podDisruptionBudget.unhealthyPodEvictionPolicy }}
unhealthyPodEvictionPolicy: {{ . }}
{{- end }}
{{- end }}
selector:
matchLabels:
{{- include "karpenter.selectorLabels" . | nindent 6 }}
1 change: 1 addition & 0 deletions charts/karpenter/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ podAnnotations: {}
podDisruptionBudget:
name: karpenter
maxUnavailable: 1
unhealthyPodEvictionPolicy:
# -- SecurityContext for the pod.
podSecurityContext:
fsGroup: 65532
Expand Down

0 comments on commit 2db9c04

Please sign in to comment.