Merge pull request #267 from justdan96/master

Use a PDB if the Enabled in the values.yaml
This commit is contained in:
Kubernetes Prow Robot 2023-03-13 13:26:49 -07:00 committed by GitHub
commit c2a2d5d544
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 68 additions and 38 deletions

View File

@ -3,7 +3,7 @@ appVersion: 4.0.2
description: nfs-subdir-external-provisioner is an automatic provisioner that used your *already configured* NFS server, automatically creating Persistent Volumes. description: nfs-subdir-external-provisioner is an automatic provisioner that used your *already configured* NFS server, automatically creating Persistent Volumes.
name: nfs-subdir-external-provisioner name: nfs-subdir-external-provisioner
home: https://github.com/kubernetes-sigs/nfs-subdir-external-provisioner home: https://github.com/kubernetes-sigs/nfs-subdir-external-provisioner
version: 4.0.17 version: 4.0.18
kubeVersion: ">=1.9.0-0" kubeVersion: ">=1.9.0-0"
sources: sources:
- https://github.com/kubernetes-sigs/nfs-subdir-external-provisioner - https://github.com/kubernetes-sigs/nfs-subdir-external-provisioner

View File

@ -49,7 +49,7 @@ The command removes all the Kubernetes components associated with the chart and
The following tables lists the configurable parameters of this chart and their default values. The following tables lists the configurable parameters of this chart and their default values.
| Parameter | Description | Default | | Parameter | Description | Default |
| ----------------------------------- | ----------------------------------------------------------------------------------------------------- | ------------------------------------------------------------- | | ------------------------------------ | ----------------------------------------------------------------------------------------------------- | ------------------------------------------------------------- |
| `replicaCount` | Number of provisioner instances to deployed | `1` | | `replicaCount` | Number of provisioner instances to deployed | `1` |
| `strategyType` | Specifies the strategy used to replace old Pods by new ones | `Recreate` | | `strategyType` | Specifies the strategy used to replace old Pods by new ones | `Recreate` |
| `image.repository` | Provisioner image | `registry.k8s.io/sig-storage/nfs-subdir-external-provisioner` | | `image.repository` | Provisioner image | `registry.k8s.io/sig-storage/nfs-subdir-external-provisioner` |
@ -85,6 +85,8 @@ The following tables lists the configurable parameters of this chart and their d
| `affinity` | Affinity settings | `{}` | | `affinity` | Affinity settings | `{}` |
| `tolerations` | List of node taints to tolerate | `[]` | | `tolerations` | List of node taints to tolerate | `[]` |
| `labels` | Additional labels for any resource created | `{}` | | `labels` | Additional labels for any resource created | `{}` |
| `podDisruptionBudget.enabled` | Create and use Pod Disruption Budget | `false` |
| `podDisruptionBudget.maxUnavailable` | Set maximum unavailable pods in the Pod Disruption Budget | `1` |
## Install Multiple Provisioners ## Install Multiple Provisioners

View File

@ -61,6 +61,17 @@ Return the appropriate apiVersion for podSecurityPolicy.
{{- end -}} {{- end -}}
{{- end -}} {{- end -}}
{{/*
Return the appropriate apiVersion for podDisruptionBudget.
*/}}
{{- define "podDisruptionBudget.apiVersion" -}}
{{- if semverCompare ">=1.21-0" .Capabilities.KubeVersion.GitVersion -}}
{{- print "policy/v1" -}}
{{- else -}}
{{- print "policy/v1beta1" -}}
{{- end -}}
{{- end -}}
{{/* {{/*
Common labels Common labels
*/}} */}}

View File

@ -0,0 +1,13 @@
{{- if .Values.podDisruptionBudget.enabled }}
apiVersion: {{ template "podDisruptionBudget.apiVersion" . }}
kind: PodDisruptionBudget
metadata:
labels:
{{- include "nfs-subdir-external-provisioner.labels" . | nindent 4 }}
name: {{ template "nfs-subdir-external-provisioner.fullname" . }}
spec:
maxUnavailable: {{ .Values.podDisruptionBudget.maxUnavailable | default 1 }}
selector:
matchLabels:
{{- include "nfs-subdir-external-provisioner.selectorLabels" . | nindent 6 }}
{{- end }}

View File

@ -108,3 +108,7 @@ affinity: {}
# Additional labels for any resource created # Additional labels for any resource created
labels: {} labels: {}
podDisruptionBudget:
enabled: false
maxUnavailable: 1