Skip to content

Commit

Permalink
Add nodeSelector, affinity and tolerations (#104)
Browse files Browse the repository at this point in the history
  • Loading branch information
morganchristiansson authored Jun 14, 2021
1 parent d936e61 commit acd72e0
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 2 deletions.
2 changes: 1 addition & 1 deletion stable/hostpath-provisioner/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
apiVersion: v1
appVersion: "v0.2.3"
version: 0.2.10
version: 0.2.11
name: hostpath-provisioner
description: hostpath-provisioner is an automatic provisioner creating Persistent Volumes from the hostpath.
home: https://github.com/rimusz/charts/tree/master/stable/hostpath-provisioner
Expand Down
5 changes: 4 additions & 1 deletion stable/hostpath-provisioner/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,10 +66,13 @@ The following table lists the configurable parameters of the `hostpath-provision
| `storageClass.defaultClass` | Enable as default storage class | `true` |
| `storageClass.name` | The name to assign the created StorageClass | `hostpath` |
| `provisionerName` | The name to assign the created Provisioner | `hostpath` |
| `reclaimPolicy` | Set the reclaimPolicy | `Delete` |
| `reclaimPolicy` | Set the reclaimPolicy | `Delete` |
| `rbac.create` | Enable RABC | `true` |
| `rbac.serviceAccountName` | Service account name | `default` |
| `resources` | Resource limits for hostpath-provisioner pod | `{}` |
| `nodeSelector` | Node Selector | `{}` |
| `tolerations` | Tolerations for pod assignment | `[]` |
| `affinity` | Affinity for pod assignment | `{}` |

```console
$ helm install rimusz/hostpath-provisioner --name hostpath-provisioner \
Expand Down
12 changes: 12 additions & 0 deletions stable/hostpath-provisioner/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -44,3 +44,15 @@ spec:
- name: pv-volume
hostPath:
path: {{ .Values.NodeHostPath }}
{{- with .Values.nodeSelector }}
nodeSelector:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.affinity }}
affinity:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.tolerations }}
tolerations:
{{- toYaml . | nindent 8 }}
{{- end }}
9 changes: 9 additions & 0 deletions stable/hostpath-provisioner/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,15 @@ reclaimPolicy: Delete
## Set the local HostPath to be used on the node
NodeHostPath: /mnt/hostpath

## Node selector
nodeSelector: {}

## Affinity
affinity: {}

## Tolerations
tolerations: []

rbac:
create: true
## Ignored if rbac.create is true
Expand Down

0 comments on commit acd72e0

Please sign in to comment.