Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for pod disruption budget #114

Closed
wants to merge 5 commits into from
Closed
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion stable/app/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,4 @@ type: application
# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
# Versions are expected to follow Semantic Versioning (https://semver.org/)
version: 0.5.4
version: 0.5.5
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since it's a new feature, shouldn't we bump "minor"?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Previous additions also bumped the patch version.
I am okay with either.
Will bump to 0.6.0

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah !

3 changes: 3 additions & 0 deletions stable/app/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,9 @@ The following table lists the configurable parameters of the Siren chart and the
| telegraf.containerPort | int | `8125` | |
| telegraf.protocol | string | `UDP` | |
| telegraf.config | string | `""` | telegraf config file content |
| pdb.enabled | bool | `false` | Whether to enable pod disruption budget on the release |
| pdb.minAvailable | int | `0` | minimum number of pods that should be available according to PDB |
| pdb.maxUnavailable | int | `` | maximum number of pods that can be unavailable according to PDB |

---

Expand Down
16 changes: 16 additions & 0 deletions stable/app/templates/pdb.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{{- if .Values.pdb.enabled -}}
apiVersion: policy/v1
kind: PodDisruptionBudget
metadata:
name: {{ include "app.fullname" . }}-pdb
labels:
{{- include "app.labels" . | nindent 4 }}
spec:
{{- if .Values.pdb.maxUnavailable }}
maxUnavailable: {{ .Values.pdb.maxUnavailable }}
{{- end }}
minAvailable: {{ .Values.pdb.minAvailable | default 0 }}
selector:
matchLabels:
{{- include "app.selectorLabels" . | nindent 6 }}
{{- end }}
5 changes: 5 additions & 0 deletions stable/app/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -165,3 +165,8 @@ autoscaling:
maxReplicas: 2
targetMemory: 80
targetCPU: 80

pdb:
enabled: false
# minAvailable: 0
# maxUnavailable: 1
Loading