Browse Source

first commit

master
P.H. Vos 4 years ago
commit
35754cedbc
  1. 21
      nfs-provisioner/v0.1.2-alpha2/.helmignore
  2. 5
      nfs-provisioner/v0.1.2-alpha2/Chart.yaml
  3. 15
      nfs-provisioner/v0.1.2-alpha2/README.md
  4. 9
      nfs-provisioner/v0.1.2-alpha2/app-readme.md
  5. 65
      nfs-provisioner/v0.1.2-alpha2/questions.yml
  6. 2
      nfs-provisioner/v0.1.2-alpha2/templates/NOTES.txt
  7. 15
      nfs-provisioner/v0.1.2-alpha2/templates/_helpers.tpl
  8. 24
      nfs-provisioner/v0.1.2-alpha2/templates/clusterrole.yaml
  9. 12
      nfs-provisioner/v0.1.2-alpha2/templates/clusterrolebinding.yaml
  10. 55
      nfs-provisioner/v0.1.2-alpha2/templates/daemonset-sa.yaml
  11. 23
      nfs-provisioner/v0.1.2-alpha2/templates/psp.yaml
  12. 4
      nfs-provisioner/v0.1.2-alpha2/templates/serviceaccount.yaml
  13. 16
      nfs-provisioner/v0.1.2-alpha2/templates/storageclass.yaml
  14. 23
      nfs-provisioner/v0.1.2-alpha2/values.yaml
  15. 21
      nfs-provisioner/v0.1.2-rc1/.helmignore
  16. 5
      nfs-provisioner/v0.1.2-rc1/Chart.yaml
  17. 15
      nfs-provisioner/v0.1.2-rc1/README.md
  18. 9
      nfs-provisioner/v0.1.2-rc1/app-readme.md
  19. 65
      nfs-provisioner/v0.1.2-rc1/questions.yml
  20. 2
      nfs-provisioner/v0.1.2-rc1/templates/NOTES.txt
  21. 15
      nfs-provisioner/v0.1.2-rc1/templates/_helpers.tpl
  22. 24
      nfs-provisioner/v0.1.2-rc1/templates/clusterrole.yaml
  23. 12
      nfs-provisioner/v0.1.2-rc1/templates/clusterrolebinding.yaml
  24. 55
      nfs-provisioner/v0.1.2-rc1/templates/daemonset-sa.yaml
  25. 23
      nfs-provisioner/v0.1.2-rc1/templates/psp.yaml
  26. 4
      nfs-provisioner/v0.1.2-rc1/templates/serviceaccount.yaml
  27. 16
      nfs-provisioner/v0.1.2-rc1/templates/storageclass.yaml
  28. 23
      nfs-provisioner/v0.1.2-rc1/values.yaml

21
nfs-provisioner/v0.1.2-alpha2/.helmignore

@ -0,0 +1,21 @@ @@ -0,0 +1,21 @@
# 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

5
nfs-provisioner/v0.1.2-alpha2/Chart.yaml

@ -0,0 +1,5 @@ @@ -0,0 +1,5 @@
apiVersion: v1
description: nfs-provisioner is an out-of-tree dynamic provisioner for Kubernetes.
name: nfs-provisioner
version: v0.1.2-alpha2
icon: https://wiki.amahi.org/images/a/a9/Nfs-logo.png

15
nfs-provisioner/v0.1.2-alpha2/README.md

@ -0,0 +1,15 @@ @@ -0,0 +1,15 @@
## Prerequisites
- Kubernetes 1.5+ with Beta APIs enabled
- PV provisioner support in the underlying infrastructure
## Uninstalling the Chart
If you have chart using this storageClass as dynamic provisioner, please backup the data and remove all the relevant chart before uninstall the nfs chart.
Lastly click `Delete` from the Catalog page will removes all the Kubernetes components associated with the nfs chart and deletes the release.
---
Please see [this example](https://github.com/kubernetes-incubator/external-storage/tree/master/nfs)
for more information.

9
nfs-provisioner/v0.1.2-alpha2/app-readme.md

@ -0,0 +1,9 @@ @@ -0,0 +1,9 @@
# nfs-provisioner(Beta)
nfs-provisioner is an out-of-tree dynamic provisioner for Kubernetes. You can use it to quickly & easily deploy shared storage that works almost anywhere.
Or it can help you write your own out-of-tree dynamic provisioner by serving as an example implementation of the requirements detailed in the proposal.
## Introduction
It works just like in-tree dynamic provisioners: a `StorageClass` object can specify an instance of nfs-provisioner to be its `provisioner` like it specifies in-tree provisioners such as GCE or AWS. Then, the instance of nfs-provisioner will watch for `PersistentVolumeClaims` that ask for the `StorageClass` and automatically create NFS-backed `PersistentVolumes` for them. For more information on how dynamic provisioning works, see [the docs](http://kubernetes.io/docs/user-guide/persistent-volumes/) or [this blog post](http://blog.kubernetes.io/2016/10/dynamic-provisioning-and-storage-in-kubernetes.html).

65
nfs-provisioner/v0.1.2-alpha2/questions.yml

@ -0,0 +1,65 @@ @@ -0,0 +1,65 @@
categories:
- storage
questions:
- variable: defaultImage
default: "true"
description: "Use default Docker image"
label: Use Default Image
type: enum
group: "Container Images"
options:
- "true"
- "false"
show_subquestion_if: false
subquestions:
- variable: image.repository
default: "quay.io/kubernetes_incubator/nfs-provisioner"
description: "Docker image name"
type: string
label: NFS Image Name
- variable: image.tag
default: "v1.0.9"
description: "NFS image tag"
type: string
label: Image Tag
- variable: persistence.defaultClass
default: "true"
description: "set as default Storage Class"
type: enum
options:
- "true"
- "false"
required: true
label: Set NFS to Default StorageClass
group: "NFS Settings"
- variable: persistence.hostPath
default: "/srv"
description: "for GKE uses /home/kubernetes/nfs/ instead, custom nfs host path read and write permission are required, default to /srv"
type: string
label: NFS Host Path
required: true
group: "NFS Settings"
- variable: nfs.hostPort
default: "2049"
required: true
description: "specify the host port used for nfs-provisioner server"
type: int
label: NFS Host Port
group: "NFS Settings"
- variable: DefaultNfsParam
default: false
description: "Show advanced NFS parameters. These setting should be changed unless you nknow what you are doing."
label: Show advanced NFS parameters
type: enum
group: "Advanced parameters"
options:
- true
- false
show_subquestion_if: true
subquestions:
- variable: parameters.mountOptions.apiVersion
default: "4.1"
required: false
description: "specify the protocol version."
type: string
label: NFS protocol version

2
nfs-provisioner/v0.1.2-alpha2/templates/NOTES.txt

@ -0,0 +1,2 @@ @@ -0,0 +1,2 @@
1. Get the storageClass URL by running these commands:
kubeclt get storageClass

15
nfs-provisioner/v0.1.2-alpha2/templates/_helpers.tpl

@ -0,0 +1,15 @@ @@ -0,0 +1,15 @@
{{/* vim: set filetype=mustache: */}}
{{/*
Expand the name of the chart.
*/}}
{{- define "nfs.name" -}}
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}}
{{- end -}}
{{/*
Create a default fully qualified app name.
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
*/}}
{{- define "nfs.fullname" -}}
{{- printf "%s" .Release.Name | trunc 63 | trimSuffix "-" -}}
{{- end -}}

24
nfs-provisioner/v0.1.2-alpha2/templates/clusterrole.yaml

@ -0,0 +1,24 @@ @@ -0,0 +1,24 @@
kind: ClusterRole
apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: {{ template "nfs.fullname" . }}-runner
rules:
- apiGroups: [""]
resources: ["persistentvolumes"]
verbs: ["get", "list", "watch", "create", "delete"]
- apiGroups: [""]
resources: ["persistentvolumeclaims"]
verbs: ["get", "list", "watch", "update"]
- apiGroups: ["storage.k8s.io"]
resources: ["storageclasses"]
verbs: ["get", "list", "watch"]
- apiGroups: [""]
resources: ["events"]
verbs: ["list", "watch", "create", "update", "patch"]
- apiGroups: [""]
resources: ["services", "endpoints"]
verbs: ["get"]
- apiGroups: ["extensions"]
resources: ["podsecuritypolicies"]
resourceNames: [{{ template "nfs.fullname" . }}]
verbs: ["use"]

12
nfs-provisioner/v0.1.2-alpha2/templates/clusterrolebinding.yaml

@ -0,0 +1,12 @@ @@ -0,0 +1,12 @@
kind: ClusterRoleBinding
apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: run-{{ template "nfs.fullname" . }}
subjects:
- kind: ServiceAccount
name: {{ template "nfs.fullname" . }}
namespace: {{ .Release.Namespace }}
roleRef:
kind: ClusterRole
name: {{ template "nfs.fullname" . }}-runner
apiGroup: rbac.authorization.k8s.io

55
nfs-provisioner/v0.1.2-alpha2/templates/daemonset-sa.yaml

@ -0,0 +1,55 @@ @@ -0,0 +1,55 @@
kind: DaemonSet
apiVersion: extensions/v1beta1
metadata:
name: {{ template "nfs.fullname" . }}
labels:
app: {{ template "nfs.name" . }}
chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
spec:
template:
metadata:
labels:
app: {{ template "nfs.name" . }}
release: {{ .Release.Name }}
spec:
serviceAccount: {{ template "nfs.fullname" . }}
containers:
- name: nfs-provisioner
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
ports:
- name: nfs
containerPort: 2049
hostPort: {{ .Values.nfs.hostPort }}
- name: mountd
containerPort: 20048
- name: rpcbind
containerPort: 111
- name: rpcbind-udp
containerPort: 111
protocol: UDP
securityContext:
capabilities:
add:
- DAC_READ_SEARCH
- SYS_RESOURCE
args:
- "-provisioner=local.net/{{ template "nfs.fullname" . }}"
env:
- name: POD_IP
valueFrom:
fieldRef:
fieldPath: status.podIP
- name: NODE_NAME
valueFrom:
fieldRef:
fieldPath: status.hostIP
volumeMounts:
- name: export-volume
mountPath: /export
volumes:
- name: export-volume
hostPath:
path: {{ .Values.persistence.hostPath }}

23
nfs-provisioner/v0.1.2-alpha2/templates/psp.yaml

@ -0,0 +1,23 @@ @@ -0,0 +1,23 @@
apiVersion: extensions/v1beta1
kind: PodSecurityPolicy
metadata:
name: {{ template "nfs.fullname" . }}
spec:
fsGroup:
rule: RunAsAny
allowedCapabilities:
- DAC_READ_SEARCH
- SYS_RESOURCE
runAsUser:
rule: RunAsAny
seLinux:
rule: RunAsAny
supplementalGroups:
rule: RunAsAny
volumes:
- configMap
- downwardAPI
- emptyDir
- persistentVolumeClaim
- secret
- hostPath

4
nfs-provisioner/v0.1.2-alpha2/templates/serviceaccount.yaml

@ -0,0 +1,4 @@ @@ -0,0 +1,4 @@
apiVersion: v1
kind: ServiceAccount
metadata:
name: {{ template "nfs.fullname" . }}

16
nfs-provisioner/v0.1.2-alpha2/templates/storageclass.yaml

@ -0,0 +1,16 @@ @@ -0,0 +1,16 @@
kind: StorageClass
apiVersion: storage.k8s.io/v1
metadata:
name: {{ template "nfs.fullname" . }}
{{- if .Values.persistence.defaultClass }}
annotations:
storageclass.beta.kubernetes.io/is-default-class: "true"
{{- else }}
annotations:
storageclass.beta.kubernetes.io/is-default-class: "false"
{{- end }}
labels:
kubernetes.io/cluster-service: "true"
provisioner: local.net/{{ template "nfs.fullname" . }}
parameters:
mountOptions: "vers={{ .Values.parameters.mountOptions.apiVersion }}"

23
nfs-provisioner/v0.1.2-alpha2/values.yaml

@ -0,0 +1,23 @@ @@ -0,0 +1,23 @@
# Default values for nfs.
# This is a YAML-formatted file.
# Declare variables to be passed into your templates.
image:
repository: quay.io/kubernetes_incubator/nfs-provisioner
tag: v1.0.9
pullPolicy: IfNotPresent
nfs:
hostPort: 2049
persistence:
# Set the NFS provisioner to be the default storage class.
defaultClass: true
hostPath: /srv
# Toggle RBAC on and off
rbac:
enabled: true
parameters:
mountOptions:
apiVersion: 4.1

21
nfs-provisioner/v0.1.2-rc1/.helmignore

@ -0,0 +1,21 @@ @@ -0,0 +1,21 @@
# 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

5
nfs-provisioner/v0.1.2-rc1/Chart.yaml

@ -0,0 +1,5 @@ @@ -0,0 +1,5 @@
apiVersion: v1
description: nfs-provisioner is an out-of-tree dynamic provisioner for Kubernetes.
name: nfs-provisioner
version: v0.1.2-rc1
icon: https://wiki.amahi.org/images/a/a9/Nfs-logo.png

15
nfs-provisioner/v0.1.2-rc1/README.md

@ -0,0 +1,15 @@ @@ -0,0 +1,15 @@
## Prerequisites
- Kubernetes 1.5+ with Beta APIs enabled
- PV provisioner support in the underlying infrastructure
## Uninstalling the Chart
If you have chart using this storageClass as dynamic provisioner, please backup the data and remove all the relevant chart before uninstall the nfs chart.
Lastly click `Delete` from the Catalog page will removes all the Kubernetes components associated with the nfs chart and deletes the release.
---
Please see [this example](https://github.com/kubernetes-incubator/external-storage/tree/master/nfs)
for more information.

9
nfs-provisioner/v0.1.2-rc1/app-readme.md

@ -0,0 +1,9 @@ @@ -0,0 +1,9 @@
# nfs-provisioner(Beta)
nfs-provisioner is an out-of-tree dynamic provisioner for Kubernetes. You can use it to quickly & easily deploy shared storage that works almost anywhere.
Or it can help you write your own out-of-tree dynamic provisioner by serving as an example implementation of the requirements detailed in the proposal.
## Introduction
It works just like in-tree dynamic provisioners: a `StorageClass` object can specify an instance of nfs-provisioner to be its `provisioner` like it specifies in-tree provisioners such as GCE or AWS. Then, the instance of nfs-provisioner will watch for `PersistentVolumeClaims` that ask for the `StorageClass` and automatically create NFS-backed `PersistentVolumes` for them. For more information on how dynamic provisioning works, see [the docs](http://kubernetes.io/docs/user-guide/persistent-volumes/) or [this blog post](http://blog.kubernetes.io/2016/10/dynamic-provisioning-and-storage-in-kubernetes.html).

65
nfs-provisioner/v0.1.2-rc1/questions.yml

@ -0,0 +1,65 @@ @@ -0,0 +1,65 @@
categories:
- storage
questions:
- variable: defaultImage
default: "true"
description: "Use default Docker image"
label: Use Default Image
type: enum
group: "Container Images"
options:
- "true"
- "false"
show_subquestion_if: false
subquestions:
- variable: image.repository
default: "quay.io/kubernetes_incubator/nfs-provisioner"
description: "Docker image name"
type: string
label: NFS Image Name
- variable: image.tag
default: "v1.0.9"
description: "NFS image tag"
type: string
label: Image Tag
- variable: persistence.defaultClass
default: "true"
description: "set as default Storage Class"
type: enum
options:
- "true"
- "false"
required: true
label: Set NFS to Default StorageClass
group: "NFS Settings"
- variable: persistence.hostPath
default: "/srv"
description: "for GKE uses /home/kubernetes/nfs/ instead, custom nfs host path read and write permission are required, default to /srv"
type: string
label: NFS Host Path
required: true
group: "NFS Settings"
- variable: nfs.hostPort
default: "2049"
required: true
description: "specify the host port used for nfs-provisioner server"
type: int
label: NFS Host Port
group: "NFS Settings"
- variable: DefaultNfsParam
default: false
description: "Show advanced NFS parameters. These setting should be changed unless you nknow what you are doing."
label: Show advanced NFS parameters
type: enum
group: "Advanced parameters"
options:
- true
- false
show_subquestion_if: true
subquestions:
- variable: parameters.mountOptions.apiVersion
default: "4.1"
required: false
description: "specify the protocol version."
type: string
label: NFS protocol version

2
nfs-provisioner/v0.1.2-rc1/templates/NOTES.txt

@ -0,0 +1,2 @@ @@ -0,0 +1,2 @@
1. Get the storageClass URL by running these commands:
kubeclt get storageClass

15
nfs-provisioner/v0.1.2-rc1/templates/_helpers.tpl

@ -0,0 +1,15 @@ @@ -0,0 +1,15 @@
{{/* vim: set filetype=mustache: */}}
{{/*
Expand the name of the chart.
*/}}
{{- define "nfs.name" -}}
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}}
{{- end -}}
{{/*
Create a default fully qualified app name.
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
*/}}
{{- define "nfs.fullname" -}}
{{- printf "%s" .Release.Name | trunc 63 | trimSuffix "-" -}}
{{- end -}}

24
nfs-provisioner/v0.1.2-rc1/templates/clusterrole.yaml

@ -0,0 +1,24 @@ @@ -0,0 +1,24 @@
kind: ClusterRole
apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: {{ template "nfs.fullname" . }}-runner
rules:
- apiGroups: [""]
resources: ["persistentvolumes"]
verbs: ["get", "list", "watch", "create", "delete"]
- apiGroups: [""]
resources: ["persistentvolumeclaims"]
verbs: ["get", "list", "watch", "update"]
- apiGroups: ["storage.k8s.io"]
resources: ["storageclasses"]
verbs: ["get", "list", "watch"]
- apiGroups: [""]
resources: ["events"]
verbs: ["list", "watch", "create", "update", "patch"]
- apiGroups: [""]
resources: ["services", "endpoints"]
verbs: ["get"]
- apiGroups: ["extensions"]
resources: ["podsecuritypolicies"]
resourceNames: [{{ template "nfs.fullname" . }}]
verbs: ["use"]

12
nfs-provisioner/v0.1.2-rc1/templates/clusterrolebinding.yaml

@ -0,0 +1,12 @@ @@ -0,0 +1,12 @@
kind: ClusterRoleBinding
apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: run-{{ template "nfs.fullname" . }}
subjects:
- kind: ServiceAccount
name: {{ template "nfs.fullname" . }}
namespace: {{ .Release.Namespace }}
roleRef:
kind: ClusterRole
name: {{ template "nfs.fullname" . }}-runner
apiGroup: rbac.authorization.k8s.io

55
nfs-provisioner/v0.1.2-rc1/templates/daemonset-sa.yaml

@ -0,0 +1,55 @@ @@ -0,0 +1,55 @@
kind: DaemonSet
apiVersion: extensions/v1beta1
metadata:
name: {{ template "nfs.fullname" . }}
labels:
app: {{ template "nfs.name" . }}
chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
spec:
template:
metadata:
labels:
app: {{ template "nfs.name" . }}
release: {{ .Release.Name }}
spec:
serviceAccount: {{ template "nfs.fullname" . }}
containers:
- name: nfs-provisioner
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
ports:
- name: nfs
containerPort: 2049
hostPort: {{ .Values.nfs.hostPort }}
- name: mountd
containerPort: 20048
- name: rpcbind
containerPort: 111
- name: rpcbind-udp
containerPort: 111
protocol: UDP
securityContext:
capabilities:
add:
- DAC_READ_SEARCH
- SYS_RESOURCE
args:
- "-provisioner=local.net/{{ template "nfs.fullname" . }}"
env:
- name: POD_IP
valueFrom:
fieldRef:
fieldPath: status.podIP
- name: NODE_NAME
valueFrom:
fieldRef:
fieldPath: status.hostIP
volumeMounts:
- name: export-volume
mountPath: /export
volumes:
- name: export-volume
hostPath:
path: {{ .Values.persistence.hostPath }}

23
nfs-provisioner/v0.1.2-rc1/templates/psp.yaml

@ -0,0 +1,23 @@ @@ -0,0 +1,23 @@
apiVersion: extensions/v1beta1
kind: PodSecurityPolicy
metadata:
name: {{ template "nfs.fullname" . }}
spec:
fsGroup:
rule: RunAsAny
allowedCapabilities:
- DAC_READ_SEARCH
- SYS_RESOURCE
runAsUser:
rule: RunAsAny
seLinux:
rule: RunAsAny
supplementalGroups:
rule: RunAsAny
volumes:
- configMap
- downwardAPI
- emptyDir
- persistentVolumeClaim
- secret
- hostPath

4
nfs-provisioner/v0.1.2-rc1/templates/serviceaccount.yaml

@ -0,0 +1,4 @@ @@ -0,0 +1,4 @@
apiVersion: v1
kind: ServiceAccount
metadata:
name: {{ template "nfs.fullname" . }}

16
nfs-provisioner/v0.1.2-rc1/templates/storageclass.yaml

@ -0,0 +1,16 @@ @@ -0,0 +1,16 @@
kind: StorageClass
apiVersion: storage.k8s.io/v1
metadata:
name: {{ template "nfs.fullname" . }}
{{- if .Values.persistence.defaultClass }}
annotations:
storageclass.beta.kubernetes.io/is-default-class: "true"
{{- else }}
annotations:
storageclass.beta.kubernetes.io/is-default-class: "false"
{{- end }}
labels:
kubernetes.io/cluster-service: "true"
provisioner: local.net/{{ template "nfs.fullname" . }}
parameters:
mountOptions: "vers={{ .Values.parameters.mountOptions.apiVersion }}"

23
nfs-provisioner/v0.1.2-rc1/values.yaml

@ -0,0 +1,23 @@ @@ -0,0 +1,23 @@
# Default values for nfs.
# This is a YAML-formatted file.
# Declare variables to be passed into your templates.
image:
repository: quay.io/kubernetes_incubator/nfs-provisioner
tag: v1.0.9
pullPolicy: IfNotPresent
nfs:
hostPort: 2049
persistence:
# Set the NFS provisioner to be the default storage class.
defaultClass: true
hostPath: /srv
# Toggle RBAC on and off
rbac:
enabled: true
parameters:
mountOptions:
apiVersion: 4.1
Loading…
Cancel
Save