Files
charts/bitnami/haproxy/templates/pdb.yaml
T
Tomek ŚwięcickiandGitHub 5776fdbe02 [bitnami/haproxy] Update apiVersion of PDB to policy/v1 on 1.21+ cluster (via common.capabilities.policy.apiVersion) (#7368)
* Update apiVersion of PDB to policy/v1

According to https://kubernetes.io/docs/reference/using-api/deprecation-guide/ we can start using `policy/v1` in Kubernetes `1.21.

Without that you can observe such things in logs:

```
client.go:209: [debug] checking 5 resources for changes
W0901 11:28:35.264440      91 warnings.go:70] policy/v1beta1 PodDisruptionBudget is deprecated in v1.21+, unavailable in v1.25+; use policy/v1 PodDisruptionBudget
W0901 11:28:35.269403      91 warnings.go:70] policy/v1beta1 PodDisruptionBudget is deprecated in v1.21+, unavailable in v1.25+; use policy/v1 PodDisruptionBudget
W0901 11:28:35.297605      91 warnings.go:70] policy/v1beta1 PodDisruptionBudget is deprecated in v1.21+, unavailable in v1.25+; use policy/v1 PodDisruptionBudget
```

* use common.capabilities.policy.apiVersion

* bump chart version to 0.2.8
2021-09-06 10:03:25 +02:00

24 lines
925 B
YAML

{{- if .Values.pdb.create }}
apiVersion: {{ include "common.capabilities.policy.apiVersion" . }}
kind: PodDisruptionBudget
metadata:
name: {{ template "common.names.fullname" . }}
namespace: {{ .Release.Namespace | quote }}
labels: {{- include "common.labels.standard" . | nindent 4 }}
{{- if .Values.commonLabels }}
{{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }}
{{- end }}
{{- if .Values.commonAnnotations }}
annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
{{- end }}
spec:
{{- if .Values.pdb.minAvailable }}
minAvailable: {{ .Values.pdb.minAvailable }}
{{- end }}
{{- if .Values.pdb.maxUnavailable }}
maxUnavailable: {{ .Values.pdb.maxUnavailable }}
{{- end }}
selector:
matchLabels: {{ include "common.labels.matchLabels" . | nindent 6 }}
{{- end }}