Merge pull request #896 from brianbinbin/feature/zt

Feature/zt
This commit is contained in:
fengzeroz
2022-11-10 09:50:19 +08:00
committed by GitHub
5 changed files with 34 additions and 126 deletions
+2 -2
View File
@@ -15,10 +15,10 @@ 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.2
version: 1.0.3
# 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.
# It is recommended to use it with quotes.
appVersion: 2.2.3
appVersion: 2.2.8
+12 -18
View File
@@ -1,6 +1,6 @@
# neuron
![Version: 1.0.4](https://img.shields.io/badge/Version-1.0.4-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 2.2.3](https://img.shields.io/badge/AppVersion-2.2.3-informational?style=flat-square)
![Version: 1.0.3](https://img.shields.io/badge/Version-1.0.3-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 2.2.8](https://img.shields.io/badge/AppVersion-2.2.8-informational?style=flat-square)
A Helm chart for Kubernetes
@@ -24,10 +24,6 @@ helm uninstall my-neuron
| Key | Type | Default | Description |
|-----|------|---------|-------------|
| affinity | object | `{}` | |
| autoscaling.enabled | bool | `false` | |
| autoscaling.maxReplicas | int | `100` | |
| autoscaling.minReplicas | int | `1` | |
| autoscaling.targetCPUUtilizationPercentage | int | `80` | |
| clusterDomain | string | `"cluster.local"` | Kubernetes Cluster Domain |
| fullnameOverride | string | `""` | |
| hostPorts | object | `{"api":30371,"enabled":false,"web":30370}` | only for kubeedge deployment |
@@ -35,23 +31,14 @@ helm uninstall my-neuron
| image.repository | string | `"emqx/neuron"` | |
| image.tag | string | `""` | Overrides the image tag whose default is the chart appVersion. |
| imagePullSecrets | list | `[]` | |
| ingress.annotations | object | `{}` | |
| ingress.className | string | `""` | |
| ingress.enabled | bool | `false` | |
| ingress.hosts[0].host | string | `"chart-example.local"` | |
| ingress.hosts[0].paths[0].path | string | `"/"` | |
| ingress.hosts[0].paths[0].pathType | string | `"ImplementationSpecific"` | |
| ingress.tls | list | `[]` | |
| nameOverride | string | `""` | |
| nngFromExistingPVC.enabled | bool | `false` | |
| nngFromExistingPVC.existingClaim | string | `"pvc-neuron-tmp"` | |
| neuronEnv.enabled | bool | `true` | |
| neuronEnv.key.disableAuth | string | `"DISABLE_AUTH"` | |
| neuronEnv.value.disableAuth | bool | `true` | |
| nodeSelector | object | `{}` | |
| persistence.enabled | bool | `true` | |
| persistence.existingClaim | string | `"pvc-neuron-data"` | Existing PersistentVolumeClaims The value is evaluated as a template So, for example, the name can depend on .Release or .Chart |
| podAnnotations | object | `{}` | |
| readinessProbe.enabled | bool | `true` | |
| readinessProbe.initialDelaySeconds | int | `5` | |
| readinessProbe.periodSeconds | int | `5` | |
| resources | object | `{}` | |
| service.annotations | object | `{"eip.openelb.kubesphere.io/v1alpha2":"eip-pool","lb.kubesphere.io/v1alpha1":"openelb","protocol.openelb.kubesphere.io/v1alpha1":"layer2"}` | Provide any additional annotations which may be required. Evaluated as a template |
| service.enabled | bool | `true` | |
@@ -63,4 +50,11 @@ helm uninstall my-neuron
| service.ports.web.name | string | `"web"` | Neuron Dashboard port name |
| service.ports.web.port | int | `7000` | Neuron Dashboard port |
| service.type | string | `"ClusterIP"` | |
| tolerations | list | `[]` | |
| tolerations[0].effect | string | `"NoExecute"` | |
| tolerations[0].key | string | `"node.kubernetes.io/not-ready"` | |
| tolerations[0].operator | string | `"Exists"` | |
| tolerations[0].tolerationSeconds | int | `30` | |
| tolerations[1].effect | string | `"NoExecute"` | |
| tolerations[1].key | string | `"node.kubernetes.io/unreachable"` | |
| tolerations[1].operator | string | `"Exists"` | |
| tolerations[1].tolerationSeconds | int | `30` | |
+5 -11
View File
@@ -23,13 +23,6 @@ spec:
{{- else }}
emptyDir: {}
{{- end }}
- name: neuron-tmp
{{- if .Values.nngFromExistingPVC.enabled }}
persistentVolumeClaim:
claimName: {{ printf "%s" (tpl (default "" .Values.nngFromExistingPVC.existingClaim) .) }}
{{- else }}
emptyDir: {}
{{- end }}
{{- if .Values.tls.enabled }}
- name: certs
secret:
@@ -44,13 +37,16 @@ spec:
- name: neuron
image: "{{ .Values.image.repository }}:{{ .Chart.AppVersion }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
{{- if .Values.readinessProbe.enabled }}
{{- if .Values.neuronEnv.enabled }}
env:
- name: {{ .Values.neuronEnv.key.disableAuth }}
value: "{{ .Values.neuronEnv.value.disableAuth }}"
{{- end }}
readinessProbe:
httpGet:
port: {{ .Values.service.web | default 7000 }}
initialDelaySeconds: 5
periodSeconds: 5
{{- end }}
ports:
- name: web
containerPort: {{ .Values.service.ports.api.web | default 7000 }}
@@ -65,8 +61,6 @@ spec:
volumeMounts:
- name: neuron-persistence
mountPath: "/opt/neuron/persistence"
- name: neuron-tmp
mountPath: "/tmp"
{{- if .Values.tls.enabled }}
- name: certs
mountPath: "/opt/neuron/config/neuron.pem"
@@ -1,61 +0,0 @@
{{- if .Values.ingress.enabled -}}
{{- $fullName := include "neuron.fullname" . -}}
{{- $svcPort := .Values.service.port -}}
{{- if and .Values.ingress.className (not (semverCompare ">=1.18-0" .Capabilities.KubeVersion.GitVersion)) }}
{{- if not (hasKey .Values.ingress.annotations "kubernetes.io/ingress.class") }}
{{- $_ := set .Values.ingress.annotations "kubernetes.io/ingress.class" .Values.ingress.className}}
{{- end }}
{{- end }}
{{- if semverCompare ">=1.19-0" .Capabilities.KubeVersion.GitVersion -}}
apiVersion: networking.k8s.io/v1
{{- else if semverCompare ">=1.14-0" .Capabilities.KubeVersion.GitVersion -}}
apiVersion: networking.k8s.io/v1beta1
{{- else -}}
apiVersion: extensions/v1beta1
{{- end }}
kind: Ingress
metadata:
name: {{ $fullName }}
labels:
{{- include "neuron.labels" . | nindent 4 }}
{{- with .Values.ingress.annotations }}
annotations:
{{- toYaml . | nindent 4 }}
{{- end }}
spec:
{{- if and .Values.ingress.className (semverCompare ">=1.18-0" .Capabilities.KubeVersion.GitVersion) }}
ingressClassName: {{ .Values.ingress.className }}
{{- end }}
{{- if .Values.ingress.tls }}
tls:
{{- range .Values.ingress.tls }}
- hosts:
{{- range .hosts }}
- {{ . | quote }}
{{- end }}
secretName: {{ .secretName }}
{{- end }}
{{- end }}
rules:
{{- range .Values.ingress.hosts }}
- host: {{ .host | quote }}
http:
paths:
{{- range .paths }}
- path: {{ .path }}
{{- if and .pathType (semverCompare ">=1.18-0" $.Capabilities.KubeVersion.GitVersion) }}
pathType: {{ .pathType }}
{{- end }}
backend:
{{- if semverCompare ">=1.19-0" $.Capabilities.KubeVersion.GitVersion }}
service:
name: {{ $fullName }}
port:
number: {{ $svcPort }}
{{- else }}
serviceName: {{ $fullName }}
servicePort: {{ $svcPort }}
{{- end }}
{{- end }}
{{- end }}
{{- end }}
+15 -34
View File
@@ -68,23 +68,6 @@ service:
eip.openelb.kubesphere.io/v1alpha2: eip-pool
protocol.openelb.kubesphere.io/v1alpha1: layer2
ingress:
enabled: false
className: ""
annotations: {}
# kubernetes.io/ingress.class: nginx
# kubernetes.io/tls-acme: "true"
hosts:
- host: chart-example.local
paths:
- path: /
pathType: ImplementationSpecific
tls: []
# - secretName: chart-example-tls
# hosts:
# - chart-example.local
persistence:
enabled: true
# -- Existing PersistentVolumeClaims
@@ -92,12 +75,6 @@ persistence:
# So, for example, the name can depend on .Release or .Chart
existingClaim: "pvc-neuron-data"
nngFromExistingPVC:
enabled: false
## PVC must be created manually before volume will be bound. The value is evaluated as a template
##
existingClaim: "pvc-neuron-tmp"
resources: {}
# We usually recommend not to specify default resources and to leave this as a conscious
# choice for the user. This also increases chances charts run on environments with little
@@ -110,16 +87,17 @@ resources: {}
# cpu: 100m
# memory: 128Mi
autoscaling:
enabled: false
minReplicas: 1
maxReplicas: 100
targetCPUUtilizationPercentage: 80
# targetMemoryUtilizationPercentage: 80
nodeSelector: {}
tolerations: []
tolerations:
- key: "node.kubernetes.io/not-ready"
operator: "Exists"
effect: "NoExecute"
tolerationSeconds: 30
- key: "node.kubernetes.io/unreachable"
operator: "Exists"
effect: "NoExecute"
tolerationSeconds: 30
affinity: {}
@@ -171,10 +149,13 @@ tls:
-----END RSA PRIVATE KEY-----
readinessProbe:
neuronEnv:
enabled: true
initialDelaySeconds: 5
periodSeconds: 5
key:
disableAuth: DISABLE_AUTH
value:
disableAuth: true
# -- only for kubeedge deployment
hostPorts: