-
Notifications
You must be signed in to change notification settings - Fork 246
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #80 from mayankshah1607/mayank/helm-fix
helm: Update charts, initialize repository and add docs
- Loading branch information
Showing
24 changed files
with
416 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
# Installation with Helm 3 | ||
|
||
Follow this guide to install the NFS Driver for Kubernetes. | ||
|
||
## Prerequisites | ||
|
||
- [Install Helm 3](https://helm.sh/docs/intro/quickstart/#install-helm) | ||
|
||
## Install via `helm install` | ||
|
||
``` | ||
$ cd charts/latest | ||
$ helm install csi-driver-nfs ./csi-driver-nfs -n kube-system | ||
``` | ||
## Install via Helm repository | ||
|
||
``` | ||
$ helm repo add csi-driver-nfs https://raw.githubusercontent.com/kubernetes-csi/csi-driver-nfs/master/charts | ||
$ helm install --name csi-driver-nfs csi-driver-nfs/csi-driver-nfs --namespace kube-system | ||
``` | ||
|
||
### Search for available versions | ||
|
||
``` | ||
$ helm search repo -l csi-driver-nfs | ||
``` | ||
|
||
### Install a specific verison | ||
|
||
``` | ||
https://raw.githubusercontent.com/kubernetes-csi/csi-driver-nfs/master/charts --version v2.0.0 | ||
``` | ||
|
||
## Chart configuration | ||
|
||
The following table lists the configurable parameters of the latest NFS CSI Driver chart and their default values. | ||
|
||
| Parameter | Description | Default | | ||
|---------------------------------------------------|------------------------------------------------------------|-------------------------------------------------------------------| | ||
| `image.nfs.repository` | csi-driver-nfs docker image | mcr.microsoft.com/k8s/csi/nfs-csi | | ||
| `image.nfs.tag` | csi-driver-nfs docker image tag | latest | | ||
| `image.nfs.pullPolicy` | csi-driver-nfs image pull policy | IfNotPresent | | ||
| `image.csiProvisioner.repository` | csi-provisioner docker image | mcr.microsoft.com/oss/kubernetes-csi/csi-provisioner | | ||
| `image.csiProvisioner.tag` | csi-provisioner docker image tag | v1.4.0 | | ||
| `image.csiProvisioner.pullPolicy` | csi-provisioner image pull policy | IfNotPresent | | ||
| `image.livenessProbe.repository` | liveness-probe docker image | mcr.microsoft.com/oss/kubernetes-csi/livenessprobe | | ||
| `image.livenessProbe.tag` | liveness-probe docker image tag | v1.1.0 | | ||
| `image.livenessProbe.pullPolicy` | liveness-probe image pull policy | IfNotPresent | | ||
| `image.nodeDriverRegistrar.repository` | csi-node-driver-registrar docker image | mcr.microsoft.com/oss/kubernetes-csi/csi-node-driver-registrar | | ||
| `image.nodeDriverRegistrar.tag` | csi-node-driver-registrar docker image tag | v1.2.0 | | ||
| `image.nodeDriverRegistrar.pullPolicy` | csi-node-driver-registrar image pull policy | IfNotPresent | | ||
| `serviceAccount.create` | whether create service account of csi-nfs-controller | true | | ||
| `rbac.create` | whether create rbac of csi-nfs-controller | true | | ||
| `controller.replicas` | the replicas of csi-nfs-controller | 2 | | ||
|
||
## Troubleshooting | ||
|
||
If there are some errors when using helm to install, follow the steps to debug: | ||
|
||
1. Add `--wait -v=5 --debug` in `helm install` command. | ||
2. Then the error pods can be located. | ||
3. Use `kubectl describe` to acquire more info. | ||
4. Check the related resource of the pod, such as serviceaacount, rbac, etc. |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
apiVersion: v1 | ||
entries: | ||
csi-driver-nfs: | ||
- apiVersion: v1 | ||
appVersion: v2.0.0 | ||
created: "2020-11-13T16:06:53.1675609+05:30" | ||
description: CSI NFS Driver for Kubernetes | ||
digest: 0a2a89ad91485b277e53bdf41a58c07dbc0f8910cb63494411e46bf17c4a7196 | ||
name: csi-driver-nfs | ||
urls: | ||
- https://raw.githubusercontent.com/kubernetes-csi/csi-driver-nfs/master/charts/v2.0.0/csi-driver-nfs-v2.0.0.tgz | ||
version: v2.0.0 | ||
- apiVersion: v1 | ||
appVersion: latest | ||
created: "2020-11-13T16:06:53.1671254+05:30" | ||
description: CSI NFS Driver for Kubernetes | ||
digest: 0e85c143ff5bc783089d2439e6b533949916657d50e9267d10b8add3dff027eb | ||
name: csi-driver-nfs | ||
urls: | ||
- https://raw.githubusercontent.com/kubernetes-csi/csi-driver-nfs/master/charts/latest/csi-driver-nfs-latest.tgz | ||
version: latest | ||
generated: "2020-11-13T16:06:53.1665574+05:30" |
Binary file not shown.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
apiVersion: v1 | ||
appVersion: latest | ||
description: CSI NFS Driver for Kubernetes | ||
name: csi-driver-nfs | ||
version: latest |
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
image: | ||
nfs: | ||
repository: gcr.io/k8s-staging-sig-storage/nfsplugin | ||
tag: amd64-linux-canary | ||
pullPolicy: IfNotPresent | ||
csiProvisioner: | ||
repository: k8s.gcr.io/sig-storage/csi-provisioner | ||
tag: v2.0.4 | ||
pullPolicy: IfNotPresent | ||
livenessProbe: | ||
repository: k8s.gcr.io/sig-storage/livenessprobe | ||
tag: v2.1.0 | ||
pullPolicy: IfNotPresent | ||
nodeDriverRegistrar: | ||
repository: k8s.gcr.io/sig-storage/csi-node-driver-registrar | ||
tag: v2.0.1 | ||
pullPolicy: IfNotPresent | ||
serviceAccount: | ||
create: true | ||
rbac: | ||
create: true | ||
controller: | ||
replicas: 2 |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
# Patterns to ignore when building packages. | ||
# This supports shell glob matching, relative path matching, and | ||
# negation (prefixed with !). Only one pattern per line. | ||
.DS_Store | ||
# Common VCS dirs | ||
.git/ | ||
.gitignore | ||
.bzr/ | ||
.bzrignore | ||
.hg/ | ||
.hgignore | ||
.svn/ | ||
# Common backup files | ||
*.swp | ||
*.bak | ||
*.tmp | ||
*~ | ||
# Various IDEs | ||
.project | ||
.idea/ | ||
*.tmproj | ||
.vscode/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
apiVersion: v1 | ||
appVersion: v2.0.0 | ||
description: CSI NFS Driver for Kubernetes | ||
name: csi-driver-nfs | ||
version: v2.0.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
The CSI NFS Driver is getting deployed to your cluster. | ||
|
||
To check CSI NFS Driver pods status, please run: | ||
|
||
kubectl --namespace={{ .Release.Namespace }} get pods --selector="release={{ .Release.Name }}" --watch |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
{{/* vim: set filetype=mustache: */}} | ||
|
||
{{/* labels for helm resources */}} | ||
{{- define "nfs.labels" -}} | ||
labels: | ||
heritage: "{{ .Release.Service }}" | ||
release: "{{ .Release.Name }}" | ||
revision: "{{ .Release.Revision }}" | ||
chart: "{{ .Chart.Name }}" | ||
chartVersion: "{{ .Chart.Version }}" | ||
{{- end -}} |
110 changes: 110 additions & 0 deletions
110
charts/v2.0.0/csi-driver-nfs/templates/csi-nfs-controller.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,110 @@ | ||
--- | ||
kind: Deployment | ||
apiVersion: apps/v1 | ||
metadata: | ||
name: csi-nfs-controller | ||
namespace: {{ .Release.Namespace }} | ||
{{ include "nfs.labels" . | indent 2 }} | ||
spec: | ||
replicas: {{ .Values.controller.replicas }} | ||
selector: | ||
matchLabels: | ||
app: csi-nfs-controller | ||
template: | ||
metadata: | ||
{{ include "nfs.labels" . | indent 6 }} | ||
app: csi-nfs-controller | ||
spec: | ||
serviceAccountName: csi-nfs-controller-sa | ||
nodeSelector: | ||
kubernetes.io/os: linux | ||
priorityClassName: system-cluster-critical | ||
tolerations: | ||
- key: "node-role.kubernetes.io/master" | ||
operator: "Equal" | ||
value: "true" | ||
effect: "NoSchedule" | ||
containers: | ||
- name: csi-provisioner | ||
image: "{{ .Values.image.csiProvisioner.repository }}:{{ .Values.image.csiProvisioner.tag }}" | ||
args: | ||
- "-v=5" | ||
- "--csi-address=$(ADDRESS)" | ||
- "--leader-election" | ||
env: | ||
- name: ADDRESS | ||
value: /csi/csi.sock | ||
imagePullPolicy: {{ .Values.image.csiProvisioner.pullPolicy }} | ||
volumeMounts: | ||
- mountPath: /csi | ||
name: socket-dir | ||
resources: | ||
limits: | ||
cpu: 100m | ||
memory: 100Mi | ||
requests: | ||
cpu: 10m | ||
memory: 20Mi | ||
- name: liveness-probe | ||
image: "{{ .Values.image.livenessProbe.repository }}:{{ .Values.image.livenessProbe.tag }}" | ||
args: | ||
- --csi-address=/csi/csi.sock | ||
- --probe-timeout=3s | ||
- --health-port=29642 | ||
- --v=5 | ||
imagePullPolicy: {{ .Values.image.livenessProbe.pullPolicy }} | ||
volumeMounts: | ||
- name: socket-dir | ||
mountPath: /csi | ||
resources: | ||
limits: | ||
cpu: 100m | ||
memory: 100Mi | ||
requests: | ||
cpu: 10m | ||
memory: 20Mi | ||
- name: nfs | ||
image: "{{ .Values.image.nfs.repository }}:{{ .Values.image.nfs.tag }}" | ||
securityContext: | ||
privileged: true | ||
capabilities: | ||
add: ["SYS_ADMIN"] | ||
allowPrivilegeEscalation: true | ||
imagePullPolicy: {{ .Values.image.nfs.pullPolicy }} | ||
args: | ||
- "-v=5" | ||
- "--nodeid=$(NODE_ID)" | ||
- "--endpoint=$(CSI_ENDPOINT)" | ||
env: | ||
- name: NODE_ID | ||
valueFrom: | ||
fieldRef: | ||
fieldPath: spec.nodeName | ||
- name: CSI_ENDPOINT | ||
value: unix:///csi/csi.sock | ||
volumeMounts: | ||
- name: plugin-dir | ||
mountPath: /plugin | ||
- name: pods-mount-dir | ||
mountPath: /var/lib/kubelet/pods | ||
mountPropagation: "Bidirectional" | ||
- mountPath: /csi | ||
name: socket-dir | ||
resources: | ||
limits: | ||
cpu: 200m | ||
memory: 200Mi | ||
requests: | ||
cpu: 10m | ||
memory: 20Mi | ||
volumes: | ||
- name: plugin-dir | ||
hostPath: | ||
path: /var/lib/kubelet/plugins/csi-nfsplugin | ||
type: DirectoryOrCreate | ||
- name: pods-mount-dir | ||
hostPath: | ||
path: /var/lib/kubelet/pods | ||
type: Directory | ||
- name: socket-dir | ||
emptyDir: {} |
9 changes: 9 additions & 0 deletions
9
charts/v2.0.0/csi-driver-nfs/templates/csi-nfs-driverinfo.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
apiVersion: storage.k8s.io/v1beta1 | ||
kind: CSIDriver | ||
metadata: | ||
name: nfs.csi.k8s.io | ||
spec: | ||
attachRequired: false | ||
volumeLifecycleModes: | ||
- Persistent | ||
podInfoOnMount: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,79 @@ | ||
# This YAML file contains driver-registrar & csi driver nodeplugin API objects | ||
# that are necessary to run CSI nodeplugin for nfs | ||
kind: DaemonSet | ||
apiVersion: apps/v1 | ||
metadata: | ||
name: csi-nfs-node | ||
namespace: {{ .Release.Namespace }} | ||
{{ include "nfs.labels" . | indent 2 }} | ||
spec: | ||
selector: | ||
matchLabels: | ||
app: csi-nfs-node | ||
template: | ||
metadata: | ||
{{ include "nfs.labels" . | indent 6 }} | ||
app: csi-nfs-node | ||
spec: | ||
hostNetwork: true # original nfs connection would be broken without hostNetwork setting | ||
dnsPolicy: ClusterFirstWithHostNet | ||
containers: | ||
- name: node-driver-registrar | ||
image: "{{ .Values.image.nodeDriverRegistrar.repository }}:{{ .Values.image.nodeDriverRegistrar.tag }}" | ||
lifecycle: | ||
preStop: | ||
exec: | ||
command: ["/bin/sh", "-c", "rm -rf /registration/csi-nfsplugin /registration/csi-nfsplugin-reg.sock"] | ||
args: | ||
- --v=5 | ||
- --csi-address=/plugin/csi.sock | ||
- --kubelet-registration-path=/var/lib/kubelet/plugins/csi-nfsplugin/csi.sock | ||
env: | ||
- name: KUBE_NODE_NAME | ||
valueFrom: | ||
fieldRef: | ||
fieldPath: spec.nodeName | ||
imagePullPolicy: {{ .Values.image.nodeDriverRegistrar.pullPolicy }} | ||
volumeMounts: | ||
- name: plugin-dir | ||
mountPath: /plugin | ||
- name: registration-dir | ||
mountPath: /registration | ||
- name: nfs | ||
securityContext: | ||
privileged: true | ||
capabilities: | ||
add: ["SYS_ADMIN"] | ||
allowPrivilegeEscalation: true | ||
image: "{{ .Values.image.nfs.repository }}:{{ .Values.image.nfs.tag }}" | ||
args : | ||
- "-v=5" | ||
- "--nodeid=$(NODE_ID)" | ||
- "--endpoint=$(CSI_ENDPOINT)" | ||
env: | ||
- name: NODE_ID | ||
valueFrom: | ||
fieldRef: | ||
fieldPath: spec.nodeName | ||
- name: CSI_ENDPOINT | ||
value: unix://plugin/csi.sock | ||
imagePullPolicy: "IfNotPresent" | ||
volumeMounts: | ||
- name: plugin-dir | ||
mountPath: /plugin | ||
- name: pods-mount-dir | ||
mountPath: /var/lib/kubelet/pods | ||
mountPropagation: "Bidirectional" | ||
volumes: | ||
- name: plugin-dir | ||
hostPath: | ||
path: /var/lib/kubelet/plugins/csi-nfsplugin | ||
type: DirectoryOrCreate | ||
- name: pods-mount-dir | ||
hostPath: | ||
path: /var/lib/kubelet/pods | ||
type: Directory | ||
- hostPath: | ||
path: /var/lib/kubelet/plugins_registry | ||
type: Directory | ||
name: registration-dir |
Oops, something went wrong.