NFS: Add NFS Chart
This PS adds a basic NFS chart for development use. Change-Id: I11191474e72bbe0d70d542682ed4ad7c3c3dc224 Implements: blueprint nfs-chart
This commit is contained in:
parent
e5304b45e0
commit
958f5caf99
24
nfs-provisioner/Chart.yaml
Normal file
24
nfs-provisioner/Chart.yaml
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
# Copyright 2017 The Openstack-Helm Authors.
|
||||||
|
#
|
||||||
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
# you may not use this file except in compliance with the License.
|
||||||
|
# You may obtain a copy of the License at
|
||||||
|
#
|
||||||
|
# http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
#
|
||||||
|
# Unless required by applicable law or agreed to in writing, software
|
||||||
|
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
# See the License for the specific language governing permissions and
|
||||||
|
# limitations under the License.
|
||||||
|
|
||||||
|
apiVersion: v1
|
||||||
|
description: OpenStack-Helm NFS
|
||||||
|
name: nfs-provisioner
|
||||||
|
version: 0.1.0
|
||||||
|
home: https://github.com/kubernetes-incubator/external-storage
|
||||||
|
sources:
|
||||||
|
- https://github.com/kubernetes-incubator/external-storage
|
||||||
|
- https://git.openstack.org/cgit/openstack/openstack-helm
|
||||||
|
maintainers:
|
||||||
|
- name: OpenStack-Helm Authors
|
19
nfs-provisioner/requirements.yaml
Normal file
19
nfs-provisioner/requirements.yaml
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
|
||||||
|
# Copyright 2017 The Openstack-Helm Authors.
|
||||||
|
#
|
||||||
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
# you may not use this file except in compliance with the License.
|
||||||
|
# You may obtain a copy of the License at
|
||||||
|
#
|
||||||
|
# http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
#
|
||||||
|
# Unless required by applicable law or agreed to in writing, software
|
||||||
|
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
# See the License for the specific language governing permissions and
|
||||||
|
# limitations under the License.
|
||||||
|
|
||||||
|
dependencies:
|
||||||
|
- name: helm-toolkit
|
||||||
|
repository: http://localhost:8879/charts
|
||||||
|
version: 0.1.0
|
78
nfs-provisioner/templates/deployment.yaml
Normal file
78
nfs-provisioner/templates/deployment.yaml
Normal file
@ -0,0 +1,78 @@
|
|||||||
|
{{/*
|
||||||
|
Copyright 2017 The Openstack-Helm Authors.
|
||||||
|
|
||||||
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
you may not use this file except in compliance with the License.
|
||||||
|
You may obtain a copy of the License at
|
||||||
|
|
||||||
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
Unless required by applicable law or agreed to in writing, software
|
||||||
|
distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
See the License for the specific language governing permissions and
|
||||||
|
limitations under the License.
|
||||||
|
*/}}
|
||||||
|
|
||||||
|
{{- if .Values.manifests.deployment }}
|
||||||
|
{{- $envAll := . }}
|
||||||
|
---
|
||||||
|
kind: Deployment
|
||||||
|
apiVersion: apps/v1beta1
|
||||||
|
metadata:
|
||||||
|
name: nfs-provisioner
|
||||||
|
spec:
|
||||||
|
replicas: {{ .Values.pod.replicas.server }}
|
||||||
|
strategy:
|
||||||
|
type: Recreate
|
||||||
|
template:
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
{{ tuple $envAll "nfs" "provisioner" | include "helm-toolkit.snippets.kubernetes_metadata_labels" | indent 8 }}
|
||||||
|
spec:
|
||||||
|
affinity:
|
||||||
|
{{ tuple $envAll "nfs" "provisioner" | include "helm-toolkit.snippets.kubernetes_pod_anti_affinity" | indent 8 }}
|
||||||
|
nodeSelector:
|
||||||
|
{{ .Values.labels.node_selector_key }}: {{ .Values.labels.node_selector_value }}
|
||||||
|
containers:
|
||||||
|
- name: nfs-provisioner
|
||||||
|
image: {{ .Values.images.nfs_provisioner }}
|
||||||
|
imagePullPolicy: {{ .Values.images.pull_policy }}
|
||||||
|
{{ tuple $envAll $envAll.Values.pod.resources.server | include "helm-toolkit.snippets.kubernetes_resources" | indent 10 }}
|
||||||
|
securityContext:
|
||||||
|
capabilities:
|
||||||
|
add:
|
||||||
|
- DAC_READ_SEARCH
|
||||||
|
- SYS_RESOURCE
|
||||||
|
ports:
|
||||||
|
- name: nfs
|
||||||
|
containerPort: 2049
|
||||||
|
- name: mountd
|
||||||
|
containerPort: 20048
|
||||||
|
- name: rpcbind
|
||||||
|
containerPort: 111
|
||||||
|
- name: rpcbind-udp
|
||||||
|
containerPort: 111
|
||||||
|
protocol: UDP
|
||||||
|
env:
|
||||||
|
- name: POD_IP
|
||||||
|
valueFrom:
|
||||||
|
fieldRef:
|
||||||
|
fieldPath: status.podIP
|
||||||
|
- name: SERVICE_NAME
|
||||||
|
value: {{ tuple "nfs" "internal" . | include "helm-toolkit.endpoints.hostname_short_endpoint_lookup" }}
|
||||||
|
- name: POD_NAMESPACE
|
||||||
|
valueFrom:
|
||||||
|
fieldRef:
|
||||||
|
fieldPath: metadata.namespace
|
||||||
|
args:
|
||||||
|
- "-provisioner={{ .Values.storageclass.provisioner }}"
|
||||||
|
- "-grace-period=10"
|
||||||
|
volumeMounts:
|
||||||
|
- name: export-volume
|
||||||
|
mountPath: /export
|
||||||
|
volumes:
|
||||||
|
- name: export-volume
|
||||||
|
hostPath:
|
||||||
|
path: {{ .Values.storage.host.host_path }}
|
||||||
|
{{- end }}
|
39
nfs-provisioner/templates/service.yaml
Normal file
39
nfs-provisioner/templates/service.yaml
Normal file
@ -0,0 +1,39 @@
|
|||||||
|
{{/*
|
||||||
|
Copyright 2017 The Openstack-Helm Authors.
|
||||||
|
|
||||||
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
you may not use this file except in compliance with the License.
|
||||||
|
You may obtain a copy of the License at
|
||||||
|
|
||||||
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
Unless required by applicable law or agreed to in writing, software
|
||||||
|
distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
See the License for the specific language governing permissions and
|
||||||
|
limitations under the License.
|
||||||
|
*/}}
|
||||||
|
|
||||||
|
{{- if .Values.manifests.service }}
|
||||||
|
{{- $envAll := . }}
|
||||||
|
---
|
||||||
|
kind: Service
|
||||||
|
apiVersion: v1
|
||||||
|
metadata:
|
||||||
|
name: {{ tuple "nfs" "internal" . | include "helm-toolkit.endpoints.hostname_short_endpoint_lookup" }}
|
||||||
|
labels:
|
||||||
|
{{ tuple $envAll "nfs" "provisioner" | include "helm-toolkit.snippets.kubernetes_metadata_labels" | indent 4 }}
|
||||||
|
spec:
|
||||||
|
ports:
|
||||||
|
- name: nfs
|
||||||
|
port: 2049
|
||||||
|
- name: mountd
|
||||||
|
port: 20048
|
||||||
|
- name: rpcbind
|
||||||
|
port: 111
|
||||||
|
- name: rpcbind-udp
|
||||||
|
port: 111
|
||||||
|
protocol: UDP
|
||||||
|
selector:
|
||||||
|
{{ tuple $envAll "nfs" "provisioner" | include "helm-toolkit.snippets.kubernetes_metadata_labels" | indent 4 }}
|
||||||
|
{{- end }}
|
25
nfs-provisioner/templates/storage_class.yaml
Normal file
25
nfs-provisioner/templates/storage_class.yaml
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
{{/*
|
||||||
|
Copyright 2017 The Openstack-Helm Authors.
|
||||||
|
|
||||||
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
you may not use this file except in compliance with the License.
|
||||||
|
You may obtain a copy of the License at
|
||||||
|
|
||||||
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
Unless required by applicable law or agreed to in writing, software
|
||||||
|
distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
See the License for the specific language governing permissions and
|
||||||
|
limitations under the License.
|
||||||
|
*/}}
|
||||||
|
|
||||||
|
{{- if .Values.manifests.storage_class }}
|
||||||
|
{{- $envAll := . }}
|
||||||
|
---
|
||||||
|
kind: StorageClass
|
||||||
|
apiVersion: storage.k8s.io/v1
|
||||||
|
metadata:
|
||||||
|
name: {{ .Values.storageclass.name }}
|
||||||
|
provisioner: {{ .Values.storageclass.provisioner }}
|
||||||
|
{{- end }}
|
71
nfs-provisioner/values.yaml
Normal file
71
nfs-provisioner/values.yaml
Normal file
@ -0,0 +1,71 @@
|
|||||||
|
# Copyright 2017 The Openstack-Helm Authors.
|
||||||
|
#
|
||||||
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
# you may not use this file except in compliance with the License.
|
||||||
|
# You may obtain a copy of the License at
|
||||||
|
#
|
||||||
|
# http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
#
|
||||||
|
# Unless required by applicable law or agreed to in writing, software
|
||||||
|
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
# See the License for the specific language governing permissions and
|
||||||
|
# limitations under the License.
|
||||||
|
|
||||||
|
# Default values for NFS.
|
||||||
|
# This is a YAML-formatted file.
|
||||||
|
# Declare variables to be passed into your templates.
|
||||||
|
|
||||||
|
pod:
|
||||||
|
affinity:
|
||||||
|
anti:
|
||||||
|
type:
|
||||||
|
default: preferredDuringSchedulingIgnoredDuringExecution
|
||||||
|
topologyKey:
|
||||||
|
default: kubernetes.io/hostname
|
||||||
|
replicas:
|
||||||
|
#only 1 replica currently supported
|
||||||
|
server: 1
|
||||||
|
resources:
|
||||||
|
enabled: false
|
||||||
|
server:
|
||||||
|
requests:
|
||||||
|
memory: "128Mi"
|
||||||
|
cpu: "100m"
|
||||||
|
limits:
|
||||||
|
memory: "1024Mi"
|
||||||
|
cpu: "2000m"
|
||||||
|
|
||||||
|
images:
|
||||||
|
nfs_provisioner: quay.io/kubernetes_incubator/nfs-provisioner:v1.0.7
|
||||||
|
pull_policy: IfNotPresent
|
||||||
|
|
||||||
|
storage:
|
||||||
|
host:
|
||||||
|
host_path: /var/lib/openstack-helm/nfs
|
||||||
|
|
||||||
|
labels:
|
||||||
|
node_selector_key: openstack-control-plane
|
||||||
|
node_selector_value: enabled
|
||||||
|
|
||||||
|
storageclass:
|
||||||
|
provisioner: example.com/nfs
|
||||||
|
name: general
|
||||||
|
|
||||||
|
endpoints:
|
||||||
|
cluster_domain_suffix: cluster.local
|
||||||
|
nfs:
|
||||||
|
hosts:
|
||||||
|
default: nfs-provisioner
|
||||||
|
host_fqdn_override:
|
||||||
|
default: null
|
||||||
|
path: null
|
||||||
|
scheme: null
|
||||||
|
port:
|
||||||
|
nfs:
|
||||||
|
default: null
|
||||||
|
|
||||||
|
manifests:
|
||||||
|
deployment: true
|
||||||
|
service: true
|
||||||
|
storage_class: true
|
Loading…
Reference in New Issue
Block a user