Skip to content

Commit 61a66a9

Browse files
authored
Merge pull request #516 from SgtCoDFish/pdb
feat(helm): Add PodDisruptionBudget option to helm chart
2 parents 750aa53 + 4b73d25 commit 61a66a9

File tree

3 files changed

+44
-2
lines changed

3 files changed

+44
-2
lines changed

deploy/charts/venafi-kubernetes-agent/README.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
The Venafi Kubernetes Agent connects your Kubernetes or Openshift cluster to the Venafi Control Plane.
44

5-
![Version: 0.1.44](https://img.shields.io/badge/Version-0.1.44-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: v0.1.44](https://img.shields.io/badge/AppVersion-v0.1.44-informational?style=flat-square)
5+
![Version: 0.1.45](https://img.shields.io/badge/Version-0.1.45-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: v0.1.45](https://img.shields.io/badge/AppVersion-v0.1.45-informational?style=flat-square)
66

77
## Additional Information
88

@@ -157,11 +157,13 @@ You should see the following events for your service account:
157157
| fullnameOverride | string | `""` | Helm default setting, use this to shorten the full install name. |
158158
| image.pullPolicy | string | `"IfNotPresent"` | Defaults to only pull if not already present |
159159
| image.repository | string | `"quay.io/jetstack/venafi-agent"` | Default to Open Source image repository |
160-
| image.tag | string | `"v0.1.43"` | Overrides the image tag whose default is the chart appVersion |
160+
| image.tag | string | `"v0.1.45"` | Overrides the image tag whose default is the chart appVersion |
161161
| imagePullSecrets | list | `[]` | Specify image pull credentials if using a private registry example: - name: my-pull-secret |
162162
| nameOverride | string | `""` | Helm default setting to override release name, usually leave blank. |
163163
| nodeSelector | object | `{}` | Embed YAML for nodeSelector settings, see https://kubernetes.io/docs/tasks/configure-pod-container/assign-pods-nodes/ |
164164
| podAnnotations | object | `{}` | Additional YAML annotations to add the the pod. |
165+
| podDisruptionBudget | object | `{"enabled":false}` | Configure a PodDisruptionBudget for the agent's Deployment. If running with multiple replicas, consider setting podDisruptionBudget.enabled to true. |
166+
| podDisruptionBudget.enabled | bool | `false` | Enable or disable the PodDisruptionBudget resource, which helps prevent downtime during voluntary disruptions such as during a Node upgrade. |
165167
| podSecurityContext | object | `{}` | Optional Pod (all containers) `SecurityContext` options, see https://kubernetes.io/docs/tasks/configure-pod-container/security-context/#set-the-security-context-for-a-pod. |
166168
| replicaCount | int | `1` | default replicas, do not scale up |
167169
| resources | object | `{"limits":{"cpu":"500m","memory":"500Mi"},"requests":{"cpu":"200m","memory":"200Mi"}}` | Set custom resourcing settings for the pod. You may not want this if you intend to use a Vertical Pod Autoscaler. |
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
{{- if .Values.podDisruptionBudget.enabled }}
2+
apiVersion: policy/v1
3+
kind: PodDisruptionBudget
4+
metadata:
5+
name: {{ include "venafi-kubernetes-agent.fullname" . }}
6+
namespace: {{ .Release.Namespace }}
7+
labels:
8+
{{- include "venafi-kubernetes-agent.labels" . | nindent 4 }}
9+
spec:
10+
selector:
11+
matchLabels:
12+
{{- include "venafi-kubernetes-agent.selectorLabels" . | nindent 6 }}
13+
14+
{{- if not (or (hasKey .Values.podDisruptionBudget "minAvailable") (hasKey .Values.podDisruptionBudget "maxUnavailable")) }}
15+
minAvailable: 1 # Default value because minAvailable and maxUnavailable are not set
16+
{{- end }}
17+
{{- if hasKey .Values.podDisruptionBudget "minAvailable" }}
18+
minAvailable: {{ .Values.podDisruptionBudget.minAvailable }}
19+
{{- end }}
20+
{{- if hasKey .Values.podDisruptionBudget "maxUnavailable" }}
21+
maxUnavailable: {{ .Values.podDisruptionBudget.maxUnavailable }}
22+
{{- end }}
23+
{{- end }}

deploy/charts/venafi-kubernetes-agent/values.yaml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,3 +101,20 @@ config:
101101
configmap:
102102
name:
103103
key:
104+
105+
# -- Configure a PodDisruptionBudget for the agent's Deployment. If running with multiple
106+
# replicas, consider setting podDisruptionBudget.enabled to true.
107+
podDisruptionBudget:
108+
# -- Enable or disable the PodDisruptionBudget resource, which helps prevent downtime
109+
# during voluntary disruptions such as during a Node upgrade.
110+
enabled: false
111+
112+
# -- Configure the minimum available pods for disruptions. Can either be set to
113+
# an integer (e.g. 1) or a percentage value (e.g. 25%).
114+
# Cannot be used if `maxUnavailable` is set.
115+
# minAvailable: 1
116+
117+
# -- Configure the maximum unavailable pods for disruptions. Can either be set to
118+
# an integer (e.g. 1) or a percentage value (e.g. 25%).
119+
# Cannot be used if `minAvailable` is set.
120+
# maxUnavailable: 1

0 commit comments

Comments
 (0)