Added charts for storage local static provisoner.
Added charts for dynamic local pv provisioner.
Change-Id: I39225974392d54a43fadd3354a2aed7c744d5eff
Signed-off-by: Balazs Szekeres <balazs.szekeres@nokia.com>
%define COMPONENT infra-charts
%define RPM_NAME caas-%{COMPONENT}
%define RPM_MAJOR_VERSION 1.0.0
-%define RPM_MINOR_VERSION 40
+%define RPM_MINOR_VERSION 41
Name: %{RPM_NAME}
Version: %{RPM_MAJOR_VERSION}
%define COMPONENT instantiate
%define RPM_NAME caas-%{COMPONENT}
%define RPM_MAJOR_VERSION 1.0.0
-%define RPM_MINOR_VERSION 20
+%define RPM_MINOR_VERSION 21
Name: %{RPM_NAME}
Version: %{RPM_MAJOR_VERSION}
- prometheus
- sriovdp
- fluentd
+ - storage_local_static_provisioner
+ - dynamic_local_pv_provisioner
- hyperdanm
infra_chart_separated_values:
- fluentd
custom_metrics_api_port: 6443
custom_metrics_api_serviceport: 443
metrics_server_port: 443
+local_storage_path: /mnt/caas_app/
token_filename: token
tokenscsv_filename: tokens.csv
cert_path: /etc/kubernetes/ssl
--- /dev/null
+{{/*
+Copyright 2019 Nokia
+
+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.localstorage.required }}
+---
+apiVersion: apps/v1
+kind: Deployment
+metadata:
+ name: dynamic-local-pv-provisioner
+ namespace: kube-system
+ label:
+ {{ .Values.kubernetes_component_label }}: {{ .Values.localstorage.dynamiclocalpvprovisioner.name }}
+spec:
+ selector:
+ matchLabels:
+ {{ .Values.kubernetes_component_label }}: {{ .Values.localstorage.dynamiclocalpvprovisioner.name }}
+ template:
+ metadata:
+ labels:
+ {{ .Values.kubernetes_component_label }}: {{ .Values.localstorage.dynamiclocalpvprovisioner.name }}
+ spec:
+ containers:
+ - name: {{ .Values.localstorage.dynamiclocalpvprovisioner.name }}
+ image: {{ .Values.localstorage.dynamiclocalpvprovisioner.image_name }}
+ imagePullPolicy: IfNotPresent
+ command: [ "/executor", "--storagepath=/mnt/sig_storage" ]
+ volumeMounts:
+ - name: mapper
+ mountPath: /dev/mapper/nova-caas_app
+ - name: sig-storage-mount
+ mountPath: /mnt/sig_storage
+ mountPropagation: Bidirectional
+ - name: fstab
+ mountPath: /rootfs/fstab
+ env:
+ - name: NODE_NAME
+ valueFrom:
+ fieldRef:
+ fieldPath: spec.nodeName
+ securityContext:
+ privileged: true
+ capabilities:
+ add:
+ - SYS_ADMIN
+ volumes:
+ - name: mapper
+ hostPath:
+ path: /dev/mapper/nova-caas_app
+ - name: sig-storage-mount
+ hostPath:
+ path: {{ .Values.localstorage.dynamiclocalpvprovisioner.local_storage_dir }}
+ - name: fstab
+ hostPath:
+ path: /etc/fstab
+ nodeSelector:
+ nodename: caas_master1
+ serviceAccountName: dynamic-pv
+{{ end }}
--- /dev/null
+{{/*
+Copyright 2019 Nokia
+
+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.localstorage.required }}
+---
+apiVersion: v1
+kind: Service
+metadata:
+ name: local-volume-provisioner
+ namespace: kube-system
+ labels:
+ app: local-volume-provisioner
+spec:
+ type: ClusterIP
+ selector:
+ app: local-volume-provisioner
+ ports:
+ - name: metrics
+ port: 8080
+ protocol: TCP
+{{ end }}
--- /dev/null
+{{/*
+Copyright 2019 Nokia
+
+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.localstorage.required }}
+---
+apiVersion: v1
+kind: ConfigMap
+metadata:
+ name: local-provisioner-config
+ namespace: kube-system
+data:
+ storageClassMap: |
+ local-volume:
+ hostDir: {{ .Values.localstorage.storagelocalstaticprovisioner.local_storage_dir }}
+ mountDir: {{ .Values.localstorage.storagelocalstaticprovisioner.local_storage_dir }}
+ blockCleanerCommand:
+ - "/scripts/shred.sh"
+ - "2"
+ volumeMode: Filesystem
+ fsType: xfs
+---
+apiVersion: apps/v1
+kind: DaemonSet
+metadata:
+ name: local-volume-provisioner
+ namespace: kube-system
+ labels:
+ app: local-volume-provisioner
+spec:
+ selector:
+ matchLabels:
+ app: local-volume-provisioner
+ template:
+ metadata:
+ labels:
+ app: local-volume-provisioner
+ spec:
+ serviceAccountName: local-storage-admin
+ containers:
+ - image: {{ .Values.localstorage.storagelocalstaticprovisioner.image_name }}
+ imagePullPolicy: "Always"
+ name: provisioner
+ env:
+ - name: MY_NODE_NAME
+ valueFrom:
+ fieldRef:
+ fieldPath: spec.nodeName
+ volumeMounts:
+ - mountPath: /etc/provisioner/config
+ name: provisioner-config
+ readOnly: true
+ - mountPath: {{ .Values.localstorage.storagelocalstaticprovisioner.local_storage_dir }}
+ name: local-volume
+ mountPropagation: "HostToContainer"
+ volumes:
+ - name: provisioner-config
+ configMap:
+ name: local-provisioner-config
+ - name: local-volume
+ hostPath:
+ path: {{ .Values.localstorage.storagelocalstaticprovisioner.local_storage_dir }}
+{{ end }}
+
sriovdp:
required: true
image_name: {{ container_image_names | select('search', '/sriovdp') | list | last }}
+
+localstorage:
+{% if ceph_configured is defined and ceph_configured %}
+ required: false
+{% else %}
+ required: true
+{% endif %}
+ storagelocalstaticprovisioner:
+ local_storage_dir: "{{ caas.local_storage_path }}"
+ image_name: {{ container_image_names | select('search', '/storage_local_static_provisioner') | list | last }}
+ dynamiclocalpvprovisioner:
+ local_storage_dir: "{{ caas.local_storage_path }}"
+ image_name: {{ container_image_names | select('search', '/dynamic_local_pv_provisioner') | list | last }}
+ name: "pv-provisioner"