Skip to content

Commit

Permalink
chore(chart): updating helm chart to configure LeaseTime, GraceTime a…
Browse files Browse the repository at this point in the history
…nd nfsServerAlpineImage (#35)

* Updating helm chart to use nfsServerAlpineImage for nfs-server-alpine image name
* Updating helm chart to set LeaseTime and GraceTime value in storageclass
* updating app version to 0.4.0
* Update deploy/helm/charts/README.md

Signed-off-by: mayank <[email protected]>
  • Loading branch information
mynktl authored Jun 16, 2021
1 parent 489da0d commit 5c3c0af
Show file tree
Hide file tree
Showing 6 changed files with 42 additions and 4 deletions.
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,12 @@ metadata:
value: "kernel"
- name: BackendStorageClass
value: "openebs-hostpath"
# LeaseTime defines the renewal period(in seconds) for client state
#- name: LeaseTime
# value: 30
# GraceTime defines the recovery period(in seconds) to reclaim locks
#- name: GraceTime
# value: 30
provisioner: openebs.io/nfsrwx
reclaimPolicy: Delete
```
Expand Down
4 changes: 2 additions & 2 deletions deploy/helm/charts/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ description: Helm chart for OpenEBS Dynamic NFS PV. For instructions to install
type: application
# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
version: 0.3.2
version: 0.4.0
# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application.
appVersion: 0.3.0
appVersion: 0.4.0
icon: https://raw.githubusercontent.com/cncf/artwork/master/projects/openebs/icon/color/openebs-icon-color.png
home: http://www.openebs.io/
keywords:
Expand Down
7 changes: 7 additions & 0 deletions deploy/helm/charts/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -121,14 +121,21 @@ helm install openebs-nfs openebs-nfs/nfs-provisioner --namespace openebs --creat
| `nfsProvisioner.image.pullPolicy` | Image pull policy for NFS Provisioner image | `IfNotPresent` |
| `nfsProvisioner.annotations` | Annotations for NFS Provisioner metadata | `""` |
| `nfsProvisioner.nodeSelector` | Nodeselector for NFS Provisioner pod | `""` |
| `nfsProvisioner.nfsServerAlpineImage.registry` | Registry for nfs-server-alpine | `""` |
| `nfsProvisioner.nfsServerAlpineImage.repository` | Image repository for nfs-server-alpine | `openebs/nfs-server-alpine` |
| `nfsProvisioner.nfsServerAlpineImage.tag` | Image tag for nfs-server-alpine | `""` |
| `nfsProvisioner.resources` | Resource request and limit for the container | `true` |
| `nfsProvisioner.securityContext` | Security context for container | `""` |
| `nfsProvisioner.tolerations` | NFS Provisioner pod toleration values | `""` |
| `nfsStorageClass.backendStorageClass` | StorageClass to be used to provision the backend volume. If not specified, the default StorageClass is used. | `""` |
| `nfsStorageClass.isDefaultClass` | Make 'openebs-kernel-nfs' the default StorageClass | `"false"` |
| `nfsStorageClass.reclaimPolicy` | ReclaimPolicy for NFS PVs | `"Delete"` |
| `nfsStorageClass.leaseTime` | Renewal period(in seconds) for NFS client state | `90` |
| `nfsStorageClass.graceTime` | Recovery period(in seconds) to reclaim locks for NFS client | `90` |
| `rbac.create` | Enable RBAC Resources | `true` |
| `rbac.pspEnabled` | Create pod security policy resources | `false` |


Specify each parameter using the `--set key=value[,key=value]` argument to `helm install`.

Alternatively, a YAML file that specifies the values for the parameters can be provided while installing the chart. For example,
Expand Down
8 changes: 6 additions & 2 deletions deploy/helm/charts/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,12 @@ spec:
value: "{{ .Values.nfsServer.useClusterIP }}"
- name: OPENEBS_IO_INSTALLER_TYPE
value: "charts-helm"
# LEADER_ELECTION_ENABLED is used to enable/disable leader election. By default
# leader election is enabled.
# OPENEBS_IO_NFS_SERVER_IMG defines the nfs-server-alpine image name to be used
# while creating nfs volume
- name: OPENEBS_IO_NFS_SERVER_IMG
value: "{{ .Values.nfsProvisioner.nfsServerAlpineImage.registry }}{{ .Values.nfsProvisioner.nfsServerAlpineImage.repository }}:{{ default .Chart.AppVersion .Values.nfsProvisioner.nfsServerAlpineImage.tag }}"
# LEADER_ELECTION_ENABLED is used to enable/disable leader election. By default
# leader election is enabled.
- name: LEADER_ELECTION_ENABLED
value: "{{ .Values.nfsProvisioner.enableLeaderElection }}"
# Process name used for matching is limited to the 15 characters
Expand Down
8 changes: 8 additions & 0 deletions deploy/helm/charts/templates/kernel-nfs-storageclass.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,14 @@ metadata:
- name: CustomServerConfig
value: {{ .Values.nfsStorageClass.customServerConfig }}
{{- end }}
{{- if .Values.nfsStorageClass.leaseTime }}
- name: LeaseTime
value: {{ .Values.nfsStorageClass.leaseTime }}
{{- end }}
{{- if .Values.nfsStorageClass.graceTime }}
- name: GraceTime
value: {{ .Values.nfsStorageClass.graceTime }}
{{- end }}
{{- if .Values.nfsStorageClass.isDefaultClass }}
storageclass.kubernetes.io/is-default-class: "true"
{{- end }}
Expand Down
13 changes: 13 additions & 0 deletions deploy/helm/charts/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,13 @@ nfsProvisioner:
tag:
pullPolicy: IfNotPresent
enableLeaderElection: "true"
# Specify image name of nfs-server-alpine used for creating nfs server deployment
# If not mentioned, default value openebs/nfs-server-alpine:tag will be used where
# the tag will be the same as a provisioner-nfs image tag
nfsServerAlpineImage:
registry:
repository: openebs/nfs-server-alpine
tag:
resources:
# We usually recommend not to specify default resources and to leave this as a conscious
# choice for the user. This also increases chances charts run on environments with little
Expand Down Expand Up @@ -72,6 +79,12 @@ nfsStorageClass:
# vulnerability.
# USING THIS IS NOT RECOMMENDED
customServerConfig: ""
# leaseTime defines the renewal period(in seconds) for client state
leaseTime:
# graceTime defines the recovery period(in seconds) to reclaim locks
# setting graceTime and leaseTime lower will reduce the io pause time during nfs server restart
graceTime:


nfsServer:
useClusterIP: "true"
Expand Down

0 comments on commit 5c3c0af

Please sign in to comment.