From e7b75e56666854ca8d835066bb06237b35e36f2b Mon Sep 17 00:00:00 2001 From: bin Date: Tue, 8 Nov 2022 22:09:41 +0800 Subject: [PATCH 1/2] upgrade to 2.2.8 --- deploy/charts/neuron/Chart.yaml | 4 +- .../charts/neuron/templates/deployment.yaml | 16 ++--- deploy/charts/neuron/templates/ingress.yaml | 61 ------------------- deploy/charts/neuron/values.yaml | 49 +++++---------- 4 files changed, 22 insertions(+), 108 deletions(-) delete mode 100644 deploy/charts/neuron/templates/ingress.yaml diff --git a/deploy/charts/neuron/Chart.yaml b/deploy/charts/neuron/Chart.yaml index f642a24f..3d6c8fdf 100644 --- a/deploy/charts/neuron/Chart.yaml +++ b/deploy/charts/neuron/Chart.yaml @@ -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 diff --git a/deploy/charts/neuron/templates/deployment.yaml b/deploy/charts/neuron/templates/deployment.yaml index ab3b211c..9c0c3a0d 100644 --- a/deploy/charts/neuron/templates/deployment.yaml +++ b/deploy/charts/neuron/templates/deployment.yaml @@ -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" diff --git a/deploy/charts/neuron/templates/ingress.yaml b/deploy/charts/neuron/templates/ingress.yaml deleted file mode 100644 index a0984fe7..00000000 --- a/deploy/charts/neuron/templates/ingress.yaml +++ /dev/null @@ -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 }} diff --git a/deploy/charts/neuron/values.yaml b/deploy/charts/neuron/values.yaml index 2c0ffb4b..30fccecd 100644 --- a/deploy/charts/neuron/values.yaml +++ b/deploy/charts/neuron/values.yaml @@ -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: From 699dec8aa698b14b3bd43c07ea0a5932f41213f9 Mon Sep 17 00:00:00 2001 From: bin Date: Tue, 8 Nov 2022 22:14:04 +0800 Subject: [PATCH 2/2] upgrade to 2.2.8 --- deploy/charts/neuron/README.md | 30 ++++++++++++------------------ 1 file changed, 12 insertions(+), 18 deletions(-) diff --git a/deploy/charts/neuron/README.md b/deploy/charts/neuron/README.md index 47e57832..20dcabf3 100644 --- a/deploy/charts/neuron/README.md +++ b/deploy/charts/neuron/README.md @@ -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 | `[]` | | \ No newline at end of file +| 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` | | \ No newline at end of file