Files
charts/bitnami/redis/templates/pdb.yaml
Tomek Święcicki fc6852fb12 [bitnami/redis] Update apiVersion of PDB to policy/v1 on 1.21+ cluster (via common.capabilities.policy.apiVersion) (#7370)
* [bitnami/redis] 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 this change you can observe such things in logs:

```
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 to 15.3.1
2021-09-03 09:54:40 +02:00

24 lines
926 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 }}