add
This commit is contained in:
@@ -0,0 +1,25 @@
|
||||
# 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
|
||||
*.orig
|
||||
*~
|
||||
# Various IDEs
|
||||
.project
|
||||
.idea/
|
||||
*.tmproj
|
||||
.vscode/
|
||||
ci/Jenkinsfile
|
||||
ci/values_override_template.yaml
|
||||
@@ -0,0 +1,30 @@
|
||||
apiVersion: v2
|
||||
name: all-persistence-volume-claims
|
||||
description: Persistent Volume Claim generator which generates all pvcs for backend applications
|
||||
|
||||
# A chart can be either an 'application' or a 'library' chart.
|
||||
#
|
||||
# Application charts are a collection of templates that can be packaged into versioned archives
|
||||
# to be deployed.
|
||||
#
|
||||
# Library charts provide useful utilities or functions for the chart developer. They're included as
|
||||
# a dependency of application charts to inject those utilities and functions into the rendering
|
||||
# pipeline. Library charts do not define any templates and therefore cannot be deployed.
|
||||
type: application
|
||||
|
||||
# This is the chart version. This version number should be incremented each time you make changes
|
||||
# to the chart and its templates, including the app version.
|
||||
# Versions are expected to follow Semantic Versioning (https://semver.org/)
|
||||
version: 1.1.0
|
||||
|
||||
# This is the version number of the application being deployed. This version number should be
|
||||
# incremented each time you make changes to the application. Versions are not expected to
|
||||
# follow Semantic Versioning. They should reflect the version the application is using.
|
||||
appVersion: 2.2.2
|
||||
|
||||
keywords:
|
||||
- uavcloud
|
||||
- pvc
|
||||
- all-persistence-volume-claims
|
||||
- function
|
||||
- chinamobile
|
||||
@@ -0,0 +1,12 @@
|
||||
|
||||
{{- if .Values.enabled }}
|
||||
[INFO] 选择创建 Persistent Volume Claims !
|
||||
|
||||
{{- range $key, $value := .Values.pvc.name_and_capacity }}
|
||||
{{- $applicationName := $key | trunc 63 }}
|
||||
{{- $capacity := $value | trunc 63 | quote }}
|
||||
|
||||
persistence volume claim with name: {{ $applicationName }} and capacity: {{ $capacity}} has been created !
|
||||
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
@@ -0,0 +1,17 @@
|
||||
{{/* vim: set filetype=mustache: */}}
|
||||
{{/*
|
||||
Create chart name and version as used by the chart label.
|
||||
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
|
||||
*/}}
|
||||
{{- define "uavcloud.pvc.chart" -}}
|
||||
{{- printf "%s-%s" $.Chart.Name $.Chart.Version | replace "+" "_" | trunc 63 }}
|
||||
{{- end }}
|
||||
|
||||
{{/*
|
||||
Kubernetes standard labels
|
||||
*/}}
|
||||
{{- define "uavcloud.pvc.labels.standard" -}}
|
||||
helm.sh/chart: {{ include "uavcloud.pvc.chart" $ }}
|
||||
app.kubernetes.io/version: {{ $.Values.global.image.tag }}
|
||||
{{- end -}}
|
||||
|
||||
@@ -0,0 +1,26 @@
|
||||
{{- if .Values.enabled }}
|
||||
{{- $namespace := .Release.Namespace -}}
|
||||
{{- range $key, $value := .Values.pvc.name_and_capacity }}
|
||||
{{- $applicationName := $key | trunc 63 }}
|
||||
{{- $capacity := $value | trunc 63 }}
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: PersistentVolumeClaim
|
||||
metadata:
|
||||
name: {{ $applicationName }}
|
||||
namespace: {{ $namespace }}
|
||||
labels:
|
||||
cmii.type: {{ $.Values.cmii.label }}
|
||||
cmii.app: {{ $applicationName }}
|
||||
{{- include "uavcloud.pvc.labels.standard" $ | nindent 4 }}
|
||||
spec:
|
||||
storageClassName: {{ $.Values.global.pvc.storageClass }}
|
||||
accessModes:
|
||||
- {{ $.Values.global.pvc.accessModes }}
|
||||
volumeMode: {{ $.Values.global.pvc.volumeMode }}
|
||||
resources:
|
||||
requests:
|
||||
storage: {{ $capacity | default $.Values.global.pvc.resources.requests.storage }}
|
||||
---
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
@@ -0,0 +1,25 @@
|
||||
cmii:
|
||||
label: middleware-base
|
||||
|
||||
enabled: true
|
||||
|
||||
global:
|
||||
image:
|
||||
tag: "3.1.0"
|
||||
pvc:
|
||||
storageClass: heketi-glusterfs-distribute
|
||||
volumeMode: Filesystem
|
||||
accessModes: "ReadWriteMany"
|
||||
resources:
|
||||
requests:
|
||||
storage: 20Gi # default capacity is 20GB, will be overwritten by super values
|
||||
|
||||
pvc:
|
||||
name_and_capacity:
|
||||
glusterfs-middleware-srs-pvc: 300Gi
|
||||
# helm-minio: 200Gi
|
||||
helm-emqxs: 20Gi
|
||||
helm-mongo: 30Gi
|
||||
helm-rabbitmq: 20Gi
|
||||
glusterfs-backend-log-pvc: 100Gi
|
||||
|
||||
Reference in New Issue
Block a user