mirror of
https://github.com/emqx/neuron.git
synced 2026-10-16 20:30:39 +08:00
support create pvc automatically
Signed-off-by: bin <brian.xb.bian@gmail.com>
This commit is contained in:
@@ -15,7 +15,7 @@ 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.0.3
|
||||
version: 1.0.6
|
||||
|
||||
# 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
|
||||
|
||||
@@ -16,13 +16,16 @@ spec:
|
||||
{{- include "neuron.selectorLabels" . | nindent 8 }}
|
||||
spec:
|
||||
volumes:
|
||||
- name: neuron-persistence
|
||||
{{- if .Values.persistence.enabled }}
|
||||
{{- range $mount := .Values.neuronMounts }}
|
||||
- name: {{ $mount.name }}
|
||||
{{- if $.Values.persistence.enabled }}
|
||||
persistentVolumeClaim:
|
||||
claimName: {{ (tpl .Values.persistence.existingClaim $) | default (include "neuron.fullname" .) }}
|
||||
claimName: {{ printf "%s-%s" $.Release.Name (tpl $mount.name $) }}
|
||||
{{- else }}
|
||||
emptyDir: {}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
|
||||
{{- if .Values.tls.enabled }}
|
||||
- name: certs
|
||||
secret:
|
||||
@@ -39,8 +42,8 @@ spec:
|
||||
imagePullPolicy: {{ .Values.image.pullPolicy }}
|
||||
{{- if .Values.neuronEnv.enabled }}
|
||||
env:
|
||||
- name: {{ .Values.neuronEnv.key.disableAuth }}
|
||||
value: "{{ .Values.neuronEnv.value.disableAuth }}"
|
||||
- name: {{ .Values.neuronEnv.keys.disableAuth }}
|
||||
value: "{{ .Values.neuronEnv.values.disableAuth }}"
|
||||
{{- end }}
|
||||
readinessProbe:
|
||||
httpGet:
|
||||
@@ -49,7 +52,7 @@ spec:
|
||||
periodSeconds: 5
|
||||
ports:
|
||||
- name: web
|
||||
containerPort: {{ .Values.service.ports.api.web | default 7000 }}
|
||||
containerPort: {{ .Values.service.ports.web.port | default 7000 }}
|
||||
{{- if .Values.hostPorts.enabled }}
|
||||
hostPort: {{ .Values.hostPorts.web | default 7000 }}
|
||||
{{- end}}
|
||||
@@ -59,8 +62,10 @@ spec:
|
||||
hostPort: {{ .Values.hostPorts.api | default 7001 }}
|
||||
{{- end}}
|
||||
volumeMounts:
|
||||
- name: neuron-persistence
|
||||
mountPath: "/opt/neuron/persistence"
|
||||
{{- range $mount := .Values.neuronMounts }}
|
||||
- name: {{ $mount.name }}
|
||||
mountPath: {{ $mount.mountPath }}
|
||||
{{- end }}
|
||||
{{- if .Values.tls.enabled }}
|
||||
- name: certs
|
||||
mountPath: "/opt/neuron/config/neuron.pem"
|
||||
|
||||
@@ -0,0 +1,41 @@
|
||||
{{- if $.Values.persistence.enabled }}
|
||||
{{- $top := . -}}
|
||||
{{- range $mount := .Values.ekuiperMounts }}
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: PersistentVolumeClaim
|
||||
metadata:
|
||||
name: {{ printf "%s-%s" $.Release.Name (tpl $mount.name $) }}
|
||||
namespace: {{ $.Release.Namespace }}
|
||||
annotations:
|
||||
kubesphere.io/creator: admin
|
||||
finalizers:
|
||||
- kubernetes.io/pvc-protection
|
||||
spec:
|
||||
accessModes:
|
||||
- {{ $.Values.persistence.accessMode }}
|
||||
resources:
|
||||
requests:
|
||||
storage: {{ $mount.capacity }}
|
||||
storageClassName: {{ $.Values.persistence.storageClass }}
|
||||
{{- end }}
|
||||
{{- range $mount := .Values.neuronMounts }}
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: PersistentVolumeClaim
|
||||
metadata:
|
||||
name: {{ printf "%s-%s" $.Release.Name (tpl $mount.name $) }}
|
||||
namespace: {{ $.Release.Namespace }}
|
||||
annotations:
|
||||
kubesphere.io/creator: admin
|
||||
finalizers:
|
||||
- kubernetes.io/pvc-protection
|
||||
spec:
|
||||
accessModes:
|
||||
- {{ $.Values.persistence.accessMode }}
|
||||
resources:
|
||||
requests:
|
||||
storage: {{ $mount.capacity }}
|
||||
storageClassName: {{ $.Values.persistence.storageClass }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
@@ -62,6 +62,7 @@ service:
|
||||
# - 10.10.10.0/24
|
||||
#
|
||||
loadBalancerSourceRanges: []
|
||||
## TODO: it's just for OpenELB
|
||||
# -- Provide any additional annotations which may be required. Evaluated as a template
|
||||
annotations:
|
||||
lb.kubesphere.io/v1alpha1: openelb
|
||||
@@ -69,11 +70,16 @@ service:
|
||||
protocol.openelb.kubesphere.io/v1alpha1: layer2
|
||||
|
||||
persistence:
|
||||
enabled: true
|
||||
# -- Existing PersistentVolumeClaims
|
||||
# The value is evaluated as a template
|
||||
# So, for example, the name can depend on .Release or .Chart
|
||||
existingClaim: "pvc-neuron-data"
|
||||
enabled: false
|
||||
accessMode: ReadWriteOnce
|
||||
## TODO: not all storage class can work well, it depends on the specific storage
|
||||
storageClass: standard
|
||||
# storageClass: huawei-nfs
|
||||
|
||||
neuronMounts:
|
||||
- name: pvc-neuron-data
|
||||
capacity: 100Mi
|
||||
mountPath: "/opt/neuron/persistence"
|
||||
|
||||
resources: {}
|
||||
# We usually recommend not to specify default resources and to leave this as a conscious
|
||||
@@ -151,10 +157,10 @@ tls:
|
||||
|
||||
neuronEnv:
|
||||
enabled: true
|
||||
key:
|
||||
keys:
|
||||
disableAuth: DISABLE_AUTH
|
||||
|
||||
value:
|
||||
values:
|
||||
disableAuth: true
|
||||
|
||||
# -- only for kubeedge deployment
|
||||
|
||||
Reference in New Issue
Block a user