Skip to content

Commit

Permalink
[bitnami/kubernetes-event-exporter] Add PDB
Browse files Browse the repository at this point in the history
Signed-off-by: Tommy Li <[email protected]>
  • Loading branch information
tommyzli committed May 20, 2024
1 parent ebacbf2 commit 74496e4
Show file tree
Hide file tree
Showing 5 changed files with 43 additions and 4 deletions.
6 changes: 3 additions & 3 deletions bitnami/kubernetes-event-exporter/Chart.lock
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
dependencies:
- name: common
repository: oci://registry-1.docker.io/bitnamicharts
version: 2.19.2
digest: sha256:e670e1075bfafffe040fae1158f1fa1f592585f394b48704ba137d2d083b1571
generated: "2024-05-08T02:10:54.943170819Z"
version: 2.19.3
digest: sha256:de997835d9ce9a9deefc2d70d8c62b11aa1d1a76ece9e86a83736ab9f930bf4d
generated: "2024-05-20T14:22:59.920848-07:00"
2 changes: 1 addition & 1 deletion bitnami/kubernetes-event-exporter/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,4 @@ maintainers:
name: kubernetes-event-exporter
sources:
- https://github.com/bitnami/charts/tree/main/bitnami/kubernetes-event-exporter
version: 3.0.6
version: 3.1.0
3 changes: 3 additions & 0 deletions bitnami/kubernetes-event-exporter/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,9 @@ As an alternative, use one of the preset configurations for pod affinity, pod an
| `podSecurityContext.sysctls` | Set kernel settings using the sysctl interface | `[]` |
| `podSecurityContext.supplementalGroups` | Set filesystem extra groups | `[]` |
| `podSecurityContext.fsGroup` | Group ID for the container | `1001` |
| `pdb.create` | Create a pdb | `false` |
| `pdb.minAvailable` | Minimum number / percentage of pods that should remain scheduled | `1` |
| `pdb.maxUnavailable` | Maximum number / percentage of pods that may be made unavailable | `""` |
| `containerSecurityContext.enabled` | Enabled containers' Security Context | `true` |
| `containerSecurityContext.seLinuxOptions` | Set SELinux options in container | `{}` |
| `containerSecurityContext.runAsUser` | Set containers' Security Context runAsUser | `1001` |
Expand Down
27 changes: 27 additions & 0 deletions bitnami/kubernetes-event-exporter/templates/pdb.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
{{- /*
Copyright Broadcom, Inc. All Rights Reserved.
SPDX-License-Identifier: APACHE-2.0
*/}}

{{- $replicaCount := int .Values.replicaCount }}
{{- if and .Values.pdb.create (gt $replicaCount 1) }}
apiVersion: {{ include "common.capabilities.policy.apiVersion" . }}
kind: PodDisruptionBudget
metadata:
name: {{ include "common.names.fullname" . }}
namespace: {{ .Release.Namespace | quote }}
{{- if .Values.commonAnnotations }}
annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
{{- end }}
labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }}
spec:
{{- if .Values.pdb.minAvailable }}
minAvailable: {{ .Values.pdb.minAvailable }}
{{- end }}
{{- if .Values.pdb.maxUnavailable }}
maxUnavailable: {{ .Values.pdb.maxUnavailable }}
{{- end }}
{{- $podLabels := include "common.tplvalues.merge" ( dict "values" ( list .Values.podLabels .Values.commonLabels ) "context" . ) }}
selector:
matchLabels: {{- include "common.labels.matchLabels" ( dict "customLabels" $podLabels "context" $ ) | nindent 6 }}
{{- end }}
9 changes: 9 additions & 0 deletions bitnami/kubernetes-event-exporter/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,15 @@ podSecurityContext:
sysctls: []
supplementalGroups: []
fsGroup: 1001
## Pod disruption budget
## @param pdb.create Create a pdb
## @param pdb.minAvailable Minimum number / percentage of pods that should remain scheduled
## @param pdb.maxUnavailable Maximum number / percentage of pods that may be made unavailable
##
pdb:
create: false
minAvailable: 1
maxUnavailable: ""
## @param containerSecurityContext.enabled Enabled containers' Security Context
## @param containerSecurityContext.seLinuxOptions [object,nullable] Set SELinux options in container
## @param containerSecurityContext.runAsUser Set containers' Security Context runAsUser
Expand Down

0 comments on commit 74496e4

Please sign in to comment.