diff --git a/deploy/charts/neuron/Chart.yaml b/deploy/charts/neuron/Chart.yaml index d0be2cbb..f642a24f 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.1 +version: 1.0.2 # 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.0.1 +appVersion: 2.2.3 diff --git a/deploy/charts/neuron/README.md b/deploy/charts/neuron/README.md index 7691360f..47e57832 100644 --- a/deploy/charts/neuron/README.md +++ b/deploy/charts/neuron/README.md @@ -1,9 +1,10 @@ # neuron -![Version: 1.0.0](https://img.shields.io/badge/Version-1.0.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 2.0.1](https://img.shields.io/badge/AppVersion-2.0.1-informational?style=flat-square) +![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) A Helm chart for Kubernetes + ## Install the Chart - From Github @@ -28,9 +29,6 @@ helm uninstall my-neuron | autoscaling.minReplicas | int | `1` | | | autoscaling.targetCPUUtilizationPercentage | int | `80` | | | clusterDomain | string | `"cluster.local"` | Kubernetes Cluster Domain | -| containerPorts | object | `{"api":7001,"web":7000}` | Container Ports | -| containerPorts.api | int | `7001` | containerPorts.api | -| containerPorts.web | int | `7000` | containerPorts.web | | fullnameOverride | string | `""` | | | hostPorts | object | `{"api":30371,"enabled":false,"web":30370}` | only for kubeedge deployment | | image.pullPolicy | string | `"IfNotPresent"` | | @@ -45,15 +43,17 @@ helm uninstall my-neuron | ingress.hosts[0].paths[0].pathType | string | `"ImplementationSpecific"` | | | ingress.tls | list | `[]` | | | nameOverride | string | `""` | | +| nngFromExistingPVC.enabled | bool | `false` | | +| nngFromExistingPVC.existingClaim | string | `"pvc-neuron-tmp"` | | | nodeSelector | object | `{}` | | -| persistence.enabled | bool | `false` | | -| persistence.existingClaim | string | `""` | Existing PersistentVolumeClaims The value is evaluated as a template So, for example, the name can depend on .Release or .Chart | +| 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 | `{}` | Provide any additional annotations which may be required. Evaluated as a template | +| 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` | | | service.loadBalancerSourceRanges | list | `[]` | loadBalancerSourceRanges: - 10.10.10.0/24 | | service.nodePorts | object | `{"api":null,"web":null}` | Specify the nodePort(s) value for the LoadBalancer and NodePort service types. ref: https://kubernetes.io/docs/concepts/services-networking/service/#type-nodeport | diff --git a/deploy/charts/neuron/templates/deployment.yaml b/deploy/charts/neuron/templates/deployment.yaml index 420f1ad4..ab3b211c 100644 --- a/deploy/charts/neuron/templates/deployment.yaml +++ b/deploy/charts/neuron/templates/deployment.yaml @@ -23,6 +23,13 @@ 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: @@ -46,18 +53,20 @@ spec: {{- end }} ports: - name: web - containerPort: {{ .Values.containerPorts.web | default 7000 }} + containerPort: {{ .Values.service.ports.api.web | default 7000 }} {{- if .Values.hostPorts.enabled }} hostPort: {{ .Values.hostPorts.web | default 7000 }} {{- end}} - name: api - containerPort: {{ .Values.containerPorts.api | default 7001 }} + containerPort: {{ .Values.service.ports.api.port | default 7001 }} {{- if .Values.hostPorts.enabled }} hostPort: {{ .Values.hostPorts.api | default 7001 }} {{- end}} 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/svc.yaml b/deploy/charts/neuron/templates/svc.yaml index 24f783e9..c9dc4ebb 100644 --- a/deploy/charts/neuron/templates/svc.yaml +++ b/deploy/charts/neuron/templates/svc.yaml @@ -6,6 +6,12 @@ metadata: namespace: {{ .Release.Namespace }} labels: {{- include "neuron.labels" . | nindent 4 }} + {{- if eq .Values.service.type "LoadBalancer" }} + {{- with .Values.service.annotations }} + annotations: + {{- toYaml . | nindent 4 }} + {{- end }} + {{- end }} spec: type: {{ .Values.service.type }} {{- if eq .Values.service.type "LoadBalancer" }} diff --git a/deploy/charts/neuron/values.yaml b/deploy/charts/neuron/values.yaml index e5a47471..2c0ffb4b 100644 --- a/deploy/charts/neuron/values.yaml +++ b/deploy/charts/neuron/values.yaml @@ -63,7 +63,10 @@ service: # loadBalancerSourceRanges: [] # -- Provide any additional annotations which may be required. Evaluated as a template - annotations: {} + annotations: + lb.kubesphere.io/v1alpha1: openelb + eip.openelb.kubesphere.io/v1alpha2: eip-pool + protocol.openelb.kubesphere.io/v1alpha1: layer2 ingress: enabled: false @@ -83,11 +86,17 @@ ingress: persistence: - enabled: false + enabled: true # -- Existing PersistentVolumeClaims # The value is evaluated as a template # So, for example, the name can depend on .Release or .Chart - existingClaim: "" + 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 @@ -167,13 +176,6 @@ readinessProbe: initialDelaySeconds: 5 periodSeconds: 5 -# -- Container Ports -containerPorts: - # -- containerPorts.web - web: 7000 - # -- containerPorts.api - api: 7001 - # -- only for kubeedge deployment hostPorts: enabled: false