Compare commits
20 Commits
nfs-subdir
...
nfs-subdir
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
4f955d1a21 | ||
|
|
5f97c83a65 | ||
|
|
1271831fbd | ||
|
|
b74a204cda | ||
|
|
7b9f0e8db2 | ||
|
|
e289a21201 | ||
|
|
5c0dd02dfb | ||
|
|
6b5f99c430 | ||
|
|
65ce8894da | ||
|
|
23c664fd54 | ||
|
|
c848d9c7ce | ||
|
|
f552bc6a79 | ||
|
|
5e1b342945 | ||
|
|
4ee25693f5 | ||
|
|
ba1654f02c | ||
|
|
09a32a7aad | ||
|
|
ae50b6da6c | ||
|
|
2cad8da61c | ||
|
|
d8db2d111e | ||
|
|
0869cb9ec6 |
12
README.md
12
README.md
@@ -3,7 +3,7 @@
|
||||
**NFS subdir external provisioner** is an automatic provisioner that use your _existing and already configured_ NFS server to support dynamic provisioning of Kubernetes Persistent Volumes via Persistent Volume Claims. Persistent volumes are provisioned as `${namespace}-${pvcName}-${pvName}`.
|
||||
|
||||
Note: This repository is migrated from https://github.com/kubernetes-incubator/external-storage/tree/master/nfs-client. As part of the migration:
|
||||
- The container image name and repository has changed to `gcr.io/k8s-staging-sig-storage` and `nfs-subdir-external-provisioner` respectively.
|
||||
- The container image name and repository has changed to `k8s.gcr.io/sig-storage` and `nfs-subdir-external-provisioner` respectively.
|
||||
- To maintain backward compatibility with earlier deployment files, the naming of NFS Client Provisioner is retained as `nfs-client-provisioner` in the deployment YAMLs.
|
||||
- One of the pending areas for development on this repository is to add automated e2e tests. If you would like to contribute, please raise an issue or reach us on the Kubernetes slack #sig-storage channel.
|
||||
|
||||
@@ -58,10 +58,9 @@ On OpenShift the service account used to bind volumes does not have the necessar
|
||||
```sh
|
||||
# Set the subject of the RBAC objects to the current namespace where the provisioner is being deployed
|
||||
$ NAMESPACE=`oc project -q`
|
||||
$ sed -i'' "s/namespace:.*/namespace: $NAMESPACE/g" ./deploy/rbac.yaml
|
||||
$ sed -i'' "s/namespace:.*/namespace: $NAMESPACE/g" ./deploy/rbac.yaml ./deploy/deployment.yaml
|
||||
$ oc create -f deploy/rbac.yaml
|
||||
$ oc create role use-scc-hostmount-anyuid --verb=use --resource=scc --resource-name=hostmount-anyuid -n $NAMESPACE
|
||||
$ oc adm policy add-role-to-user use-scc-hostmount-anyuid system:serviceaccount:$NAMESPACE:nfs-client-provisioner
|
||||
$ oc adm policy add-scc-to-user hostmount-anyuid system:serviceaccount:$NAMESPACE:nfs-client-provisioner
|
||||
```
|
||||
|
||||
**Step 4: Configure the NFS subdir external provisioner**
|
||||
@@ -207,4 +206,7 @@ The pipeline adds several labels:
|
||||
* You also need to provide the `DOCKER_IMAGE` secret specifying your Docker image name, e.g., `quay.io/[username]/nfs-subdir-external-provisioner`.
|
||||
|
||||
|
||||
|
||||
## NFS provisioner limitations/pitfalls
|
||||
* The provisioned storage is not guaranteed. You may allocate more than the NFS share's total size. The share may also not have enough storage space left to actually accommodate the request.
|
||||
* The provisioned storage limit is not enforced. The application can expand to use all the available storage regardless of the provisioned size.
|
||||
* Storage resize/expansion operations are not presently supported in any form. You will end up in an error state: `Ignoring the PVC: didn't find a plugin capable of expanding the volume; waiting for an external controller to process this PVC.`
|
||||
|
||||
@@ -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.
|
||||
name: nfs-subdir-external-provisioner
|
||||
home: https://github.com/kubernetes-sigs/nfs-subdir-external-provisioner
|
||||
version: 4.0.9
|
||||
version: 4.0.13
|
||||
kubeVersion: ">=1.9.0-0"
|
||||
sources:
|
||||
- https://github.com/kubernetes-sigs/nfs-subdir-external-provisioner
|
||||
|
||||
@@ -70,6 +70,7 @@ The following tables lists the configurable parameters of this chart and their d
|
||||
| `nfs.server` | Hostname of the NFS server (required) | null (ip or hostname) |
|
||||
| `nfs.path` | Basepath of the mount point to be used | `/nfs-storage` |
|
||||
| `nfs.mountOptions` | Mount options (e.g. 'nfsvers=3') | null |
|
||||
| `nfs.volumeName` | Volume name used inside the pods | `nfs-subdir-external-provisioner-root` |
|
||||
| `resources` | Resources required (e.g. CPU, memory) | `{}` |
|
||||
| `rbac.create` | Use Role-based Access Control | `true` |
|
||||
| `podSecurityPolicy.enabled` | Create & use Pod Security Policy resources | `false` |
|
||||
|
||||
@@ -73,6 +73,16 @@ heritage: {{ .Release.Service }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
|
||||
{{/*
|
||||
Pod template labels
|
||||
*/}}
|
||||
{{- define "nfs-subdir-external-provisioner.podLabels" -}}
|
||||
{{ include "nfs-subdir-external-provisioner.selectorLabels" . }}
|
||||
{{- with .Values.labels }}
|
||||
{{- toYaml . | nindent 0 }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
|
||||
{{/*
|
||||
Selector labels
|
||||
*/}}
|
||||
|
||||
@@ -6,6 +6,9 @@ metadata:
|
||||
{{- include "nfs-subdir-external-provisioner.labels" . | nindent 4 }}
|
||||
name: {{ template "nfs-subdir-external-provisioner.fullname" . }}-runner
|
||||
rules:
|
||||
- apiGroups: [""]
|
||||
resources: ["nodes"]
|
||||
verbs: ["get", "list", "watch"]
|
||||
- apiGroups: [""]
|
||||
resources: ["persistentvolumes"]
|
||||
verbs: ["get", "list", "watch", "create", "delete"]
|
||||
|
||||
@@ -21,7 +21,7 @@ spec:
|
||||
scheduler.alpha.kubernetes.io/tolerations: '{{ toJson .Values.tolerations }}'
|
||||
{{- end }}
|
||||
labels:
|
||||
{{- include "nfs-subdir-external-provisioner.selectorLabels" . | nindent 8 }}
|
||||
{{- include "nfs-subdir-external-provisioner.podLabels" . | nindent 8 }}
|
||||
spec:
|
||||
serviceAccountName: {{ template "nfs-subdir-external-provisioner.serviceAccountName" . }}
|
||||
{{- if .Values.nodeSelector }}
|
||||
@@ -44,7 +44,7 @@ spec:
|
||||
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
|
||||
imagePullPolicy: {{ .Values.image.pullPolicy }}
|
||||
volumeMounts:
|
||||
- name: nfs-subdir-external-provisioner-root
|
||||
- name: {{ .Values.nfs.volumeName }}
|
||||
mountPath: /persistentvolumes
|
||||
env:
|
||||
- name: PROVISIONER_NAME
|
||||
@@ -62,7 +62,7 @@ spec:
|
||||
{{ toYaml . | indent 12 }}
|
||||
{{- end }}
|
||||
volumes:
|
||||
- name: nfs-subdir-external-provisioner-root
|
||||
- name: {{ .Values.nfs.volumeName }}
|
||||
{{- if .Values.buildMode }}
|
||||
emptyDir: {}
|
||||
{{- else if .Values.nfs.mountOptions }}
|
||||
|
||||
@@ -13,6 +13,7 @@ spec:
|
||||
volumes:
|
||||
- 'secret'
|
||||
- 'nfs'
|
||||
- 'persistentVolumeClaim'
|
||||
hostNetwork: false
|
||||
hostIPC: false
|
||||
hostPID: false
|
||||
|
||||
@@ -11,6 +11,7 @@ nfs:
|
||||
server:
|
||||
path: /nfs-storage
|
||||
mountOptions:
|
||||
volumeName: nfs-subdir-external-provisioner-root
|
||||
|
||||
# For creating the StorageClass automatically:
|
||||
storageClass:
|
||||
|
||||
@@ -3,6 +3,9 @@ apiVersion: rbac.authorization.k8s.io/v1
|
||||
metadata:
|
||||
name: nfs-client-provisioner-runner
|
||||
rules:
|
||||
- apiGroups: [""]
|
||||
resources: ["nodes"]
|
||||
verbs: ["get", "list", "watch"]
|
||||
- apiGroups: [""]
|
||||
resources: ["persistentvolumes"]
|
||||
verbs: ["get", "list", "watch", "create", "delete"]
|
||||
|
||||
@@ -10,6 +10,9 @@ apiVersion: rbac.authorization.k8s.io/v1
|
||||
metadata:
|
||||
name: nfs-client-provisioner-runner
|
||||
rules:
|
||||
- apiGroups: [""]
|
||||
resources: ["nodes"]
|
||||
verbs: ["get", "list", "watch"]
|
||||
- apiGroups: [""]
|
||||
resources: ["persistentvolumes"]
|
||||
verbs: ["get", "list", "watch", "create", "delete"]
|
||||
|
||||
Reference in New Issue
Block a user