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/*
|
||||
|
||||
@@ -0,0 +1,15 @@
|
||||
apiVersion: v2
|
||||
name: storage-class-gfs
|
||||
description: 用于创建StorageClass,后端的存储采用的是GlusterFS
|
||||
|
||||
version: 1.0.0
|
||||
|
||||
appVersion: 1.0.0
|
||||
|
||||
keywords:
|
||||
- storageClass
|
||||
- glusterfs
|
||||
- template
|
||||
- function
|
||||
- chinamobile
|
||||
|
||||
@@ -0,0 +1,27 @@
|
||||
{{/* 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 "storage-class-gfs.chart" -}}
|
||||
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 }}
|
||||
{{- end }}
|
||||
|
||||
{{/*
|
||||
Kubernetes standard labels
|
||||
*/}}
|
||||
{{- define "storage-class-gfs.standard" -}}
|
||||
cmii.type: {{ .Values.application.type }}
|
||||
cmii.app: {{ .Values.application.name }}
|
||||
helm.sh/chart: {{ include "storage-class-gfs.chart" . }}
|
||||
app.kubernetes.io/instance: {{ .Release.Name }}
|
||||
app.kubernetes.io/managed-by: {{ .Release.Service }}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Labels to use on deploy.spec.selector.matchLabels and svc.spec.selector
|
||||
*/}}
|
||||
{{- define "storage-class-gfs.labels.matchLabels" -}}
|
||||
cmii.type: {{ .Values.application.type }}
|
||||
cmii.app: {{ .Values.application.name }}
|
||||
{{- end -}}
|
||||
@@ -0,0 +1,16 @@
|
||||
{{- if .Values.enabled }}
|
||||
{{- $namespace := .Release.Namespace -}}
|
||||
{{- $applicationName := .Values.application.name -}}
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Secret
|
||||
metadata:
|
||||
name: {{ $applicationName }}
|
||||
namespace: {{ $namespace }}
|
||||
labels:
|
||||
{{- include "storage-class-gfs.standard" . | nindent 4 }}
|
||||
type: kubernetes.io/glusterfs
|
||||
data:
|
||||
key: {{ .Values.heketi.secret | b64enc }}
|
||||
---
|
||||
{{- end }}
|
||||
@@ -0,0 +1,22 @@
|
||||
{{- if .Values.enabled }}
|
||||
{{- $namespace := .Release.Namespace -}}
|
||||
{{- $applicationName := .Values.application.name -}}
|
||||
apiVersion: storage.k8s.io/v1
|
||||
kind: StorageClass
|
||||
metadata:
|
||||
name: {{ $applicationName }}
|
||||
namespace: {{ $namespace }}
|
||||
labels:
|
||||
{{- include "storage-class-gfs.standard" . | nindent 4 }}
|
||||
provisioner: kubernetes.io/glusterfs
|
||||
reclaimPolicy: {{ .Values.storageClass.reclaimPolicy }}
|
||||
allowVolumeExpansion: {{ .Values.storageClass.allowVolumeExpansion }}
|
||||
parameters:
|
||||
resturl: {{ .Values.heketi.heketiResturl }}
|
||||
restauthenabled: "true"
|
||||
restuser: "{{ .Values.heketi.restuser }}"
|
||||
secretNamespace: {{ .Values.heketi.secretNamespace | default $namespace | quote }}
|
||||
secretName: {{ $applicationName | quote }}
|
||||
volumetype: "{{ .Values.heketi.volumetype }}"
|
||||
---
|
||||
{{- end }}
|
||||
@@ -0,0 +1,16 @@
|
||||
application:
|
||||
name: heketi-glusterfs-distribute
|
||||
type: middleware-base
|
||||
|
||||
enabled: true
|
||||
|
||||
storageClass:
|
||||
reclaimPolicy: Delete
|
||||
allowVolumeExpansion: false
|
||||
|
||||
heketi:
|
||||
heketiResturl: "http://dev-gfs.ecs.io:8080"
|
||||
restuser: "admin"
|
||||
secret: "Wrj12@!Robot"
|
||||
secretNamespace: ""
|
||||
volumetype: "none"
|
||||
Reference in New Issue
Block a user