Skip to content

Commit

Permalink
feat: add pod-disruption-budget support
Browse files Browse the repository at this point in the history
  • Loading branch information
jmsantorum committed May 1, 2024
1 parent 8e5bb96 commit 27fb45f
Show file tree
Hide file tree
Showing 9 changed files with 98 additions and 8 deletions.
10 changes: 8 additions & 2 deletions charts/unleash-edge/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,14 +1,20 @@
---
apiVersion: v2
name: unleash-edge
description: A Helm chart for deploying Unleash Edge to kubernetes
icon: https://docs.getunleash.io/img/logo.svg

type: application
version: 2.5.0

version: 2.6.0

appVersion: "v19.0.0"

maintainers:
- name: chriswk
- name: sighphyre
- name: nunogois
- name: gastonfournier

sources:
- https://github.com/Unleash/unleash-edge
- https://github.com/Unleash/helm-charts
19 changes: 19 additions & 0 deletions charts/unleash-edge/templates/pdb.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{{- if .Values.podDisruptionBudget.enabled }}
apiVersion: policy/v1
kind: PodDisruptionBudget
metadata:
name: {{ template "unleash-edge.fullname" . }}
labels:
{{- include "unleash-edge.labels" . | nindent 4 }}
spec:
{{- if .Values.podDisruptionBudget.minAvailable }}
minAvailable: {{ .Values.podDisruptionBudget.minAvailable }}
{{- else if .Values.podDisruptionBudget.maxUnavailable }}
maxUnavailable: {{ .Values.podDisruptionBudget.maxUnavailable }}
{{- else }}
minAvailable: 0
{{- end }}
selector:
matchLabels:
{{- include "unleash-edge.selectorLabels" . | nindent 6 }}
{{- end }}
5 changes: 5 additions & 0 deletions charts/unleash-edge/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -173,3 +173,8 @@ edge:
upstreamUrl: "http://unleash.unleash:4242"
logLevel: "warn"
logFormat: "json"

podDisruptionBudget:
enabled: false
minAvailable:
maxUnavailable: 1
10 changes: 8 additions & 2 deletions charts/unleash-proxy/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
apiVersion: v2
name: unleash-proxy
description: A Helm chart for Kubernetes
description: A Helm chart for deploying Unleash Proxy to kubernetes
icon: https://docs.getunleash.io/img/logo.svg

# A chart can be either an 'application' or a 'library' chart.
#
Expand All @@ -15,12 +16,17 @@ 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.6.3
version: 0.7.0

# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application. Versions are not expected to
# follow Semantic Versioning. They should reflect the version the application is using.
# It is recommended to use it with quotes.
appVersion: "v0.17.0"

maintainers:
- name: nkz-soft

sources:
- https://github.com/Unleash/unleash-proxy
- https://github.com/Unleash/helm-charts
19 changes: 19 additions & 0 deletions charts/unleash-proxy/templates/pdb.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{{- if .Values.podDisruptionBudget.enabled }}
apiVersion: policy/v1
kind: PodDisruptionBudget
metadata:
name: {{ template "unleash-proxy.fullname" . }}
labels:
{{- include "unleash-proxy.labels" . | nindent 4 }}
spec:
{{- if .Values.podDisruptionBudget.minAvailable }}
minAvailable: {{ .Values.podDisruptionBudget.minAvailable }}
{{- else if .Values.podDisruptionBudget.maxUnavailable }}
maxUnavailable: {{ .Values.podDisruptionBudget.maxUnavailable }}
{{- else }}
minAvailable: 0
{{- end }}
selector:
matchLabels:
{{- include "unleash-proxy.selectorLabels" . | nindent 6 }}
{{- end }}
5 changes: 5 additions & 0 deletions charts/unleash-proxy/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -134,3 +134,8 @@ proxy:
enabled: false
name: unleash-proxy-secret
key: clientKeys

podDisruptionBudget:
enabled: false
minAvailable:
maxUnavailable: 1
14 changes: 10 additions & 4 deletions charts/unleash/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,18 +1,24 @@
apiVersion: v2
name: unleash
description: Unleash is a open source feature flag & toggle system, that gives you a great overview over all feature toggles across all your applications and services.
icon: https://docs.getunleash.io/img/logo.svg

type: application

version: 4.1.0
appVersion: "5.9.6"

dependencies:
- name: postgresql
repository: https://charts.bitnami.com/bitnami
version: 12.1.6
condition: postgresql.enabled
description: Unleash is a open source feature flag & toggle system, that gives you a great overview over all feature toggles across all your applications and services.

maintainers:
- name: evanstucker-hates-2fa
- name: ivarconr
email: [email protected]
name: unleash

sources:
- https://github.com/Unleash/unleash
- https://github.com/Unleash/helm-charts
type: application
version: 4.0.2
19 changes: 19 additions & 0 deletions charts/unleash/templates/pdb.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{{- if .Values.podDisruptionBudget.enabled }}
apiVersion: policy/v1
kind: PodDisruptionBudget
metadata:
name: {{ template "unleash.fullname" . }}
labels:
{{- include "unleash.labels" . | nindent 4 }}
spec:
{{- if .Values.podDisruptionBudget.minAvailable }}
minAvailable: {{ .Values.podDisruptionBudget.minAvailable }}
{{- else if .Values.podDisruptionBudget.maxUnavailable }}
maxUnavailable: {{ .Values.podDisruptionBudget.maxUnavailable }}
{{- else }}
minAvailable: 0
{{- end }}
selector:
matchLabels:
{{- include "unleash.selectorLabels" . | nindent 6 }}
{{- end }}
5 changes: 5 additions & 0 deletions charts/unleash/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -302,3 +302,8 @@ cloudsql:
# memory: 256Mi
# Additional flags to pass to cloudsql
flags: []

podDisruptionBudget:
enabled: false
minAvailable:
maxUnavailable: 1

0 comments on commit 27fb45f

Please sign in to comment.