Skip to content

Commit

Permalink
feat: Added new policy to PodDisruptionBudget
Browse files Browse the repository at this point in the history
rebase

rebase
  • Loading branch information
peterabarr committed Oct 7, 2024
1 parent 5a7a444 commit b4c5632
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 2 deletions.
2 changes: 2 additions & 0 deletions charts/metrics-server/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,8 @@ The following table lists the configurable parameters of the _Metrics Server_ ch
| `podDisruptionBudget.enabled` | If `true`, create `PodDisruptionBudget` resource. | `{}` |
| `podDisruptionBudget.minAvailable` | Set the `PodDisruptionBudget` minimum available pods. | `nil` |
| `podDisruptionBudget.maxUnavailable` | Set the `PodDisruptionBudget` maximum unavailable pods. | `nil` |
| `podDisruptionBudget.maxUnavailable` | Set the `PodDisruptionBudget` maximum unavailable pods. | `nil` |
| `podDisruptionBudget.unhealthyPodEvictionPolicy` | Unhealthy pod eviction policy for the PDB. | `nil` |
| `defaultArgs` | Default arguments to pass to the _metrics-server_ command. | See _values.yaml_ |
| `args` | Additional arguments to pass to the _metrics-server_ command. | `[]` |
| `livenessProbe` | Liveness probe. | See _values.yaml_ |
Expand Down
10 changes: 8 additions & 2 deletions charts/metrics-server/templates/pdb.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,16 @@ metadata:
spec:
{{- if .Values.podDisruptionBudget.minAvailable }}
minAvailable: {{ .Values.podDisruptionBudget.minAvailable }}
{{- end }}
{{- end }}
{{- if .Values.podDisruptionBudget.maxUnavailable }}
maxUnavailable: {{ .Values.podDisruptionBudget.maxUnavailable }}
{{- end }}
{{- end }}
{{- if (semverCompare ">= 1.27-0" .Capabilities.KubeVersion.Version) }}
{{- with .Values.podDisruptionBudget.unhealthyPodEvictionPolicy }}
unhealthyPodEvictionPolicy: {{ . }}
{{- end }}
{{- end }}

selector:
matchLabels:
{{- include "metrics-server.selectorLabels" . | nindent 6 }}
Expand Down
1 change: 1 addition & 0 deletions charts/metrics-server/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@ podDisruptionBudget:
enabled: false
minAvailable:
maxUnavailable:
unhealthyPodEvictionPolicy:

defaultArgs:
- --cert-dir=/tmp
Expand Down

0 comments on commit b4c5632

Please sign in to comment.