diff --git a/charts/bee/Chart.yaml b/charts/bee/Chart.yaml index 1409ea6..ce4506d 100644 --- a/charts/bee/Chart.yaml +++ b/charts/bee/Chart.yaml @@ -1,7 +1,7 @@ apiVersion: v1 appVersion: latest name: bee -version: 0.2.1 +version: 0.2.2 description: Ethereum Swarm Bee Helm chart for Kubernetes home: https://swarm.ethereum.org icon: https://swarm-guide.readthedocs.io/en/latest/_images/swarm.png diff --git a/charts/bee/README.md b/charts/bee/README.md index 5105bab..b48364b 100644 --- a/charts/bee/README.md +++ b/charts/bee/README.md @@ -84,7 +84,7 @@ apps: namespace: bee description: "Ethereum Swarm Bee" chart: "ethersphere/bee" - version: "0.2.1" + version: "0.2.2" enabled: true set: replicaCount: 2 diff --git a/charts/bee/templates/ingress-debug.yaml b/charts/bee/templates/ingress-debug.yaml index 39e06b1..5c174e8 100644 --- a/charts/bee/templates/ingress-debug.yaml +++ b/charts/bee/templates/ingress-debug.yaml @@ -1,4 +1,4 @@ -{{- if .Values.ingressDebug.enabled -}} +{{- if and .Values.beeConfig.enable_debug_api .Values.ingressDebug.enabled -}} {{- $root := . -}} {{- $fullName := include "bee.fullname" $root -}} @@ -53,4 +53,4 @@ spec: {{- end }} {{- end }} -{{- end }} +{{- end -}} diff --git a/charts/bee/templates/service-debug.yaml b/charts/bee/templates/service-debug.yaml index 9f2c47f..d72f834 100644 --- a/charts/bee/templates/service-debug.yaml +++ b/charts/bee/templates/service-debug.yaml @@ -1,3 +1,5 @@ +{{- if .Values.beeConfig.enable_debug_api -}} + {{- $root := . -}} {{- range $i, $e := until (int $root.Values.replicaCount) }} @@ -23,3 +25,4 @@ spec: statefulset.kubernetes.io/pod-name: {{ include "bee.fullname" $root }}-{{ $i }} {{- end }} +{{- end -}} diff --git a/charts/bee/templates/service-headless.yaml b/charts/bee/templates/service-headless.yaml index 0affec2..62a94c1 100644 --- a/charts/bee/templates/service-headless.yaml +++ b/charts/bee/templates/service-headless.yaml @@ -16,10 +16,12 @@ spec: port: {{ int (split ":" .Values.beeConfig.p2p_addr )._1 }} protocol: TCP targetPort: p2p + {{- if .Values.beeConfig.enable_debug_api }} - name: debug port: {{ int (split ":" .Values.beeConfig.debug_api_addr )._1 }} protocol: TCP targetPort: debug + {{- end }} selector: {{- include "bee.selectorLabels" . | nindent 4 }} type: {{ .Values.service.type }} diff --git a/charts/bee/templates/statefulset.yaml b/charts/bee/templates/statefulset.yaml index 4cf6d46..27d1a15 100644 --- a/charts/bee/templates/statefulset.yaml +++ b/charts/bee/templates/statefulset.yaml @@ -54,6 +54,7 @@ spec: - containerPort: {{ int (split ":" .Values.beeConfig.p2p_addr )._1 }} name: p2p protocol: TCP + {{- if .Values.beeConfig.enable_debug_api }} - containerPort: {{ int (split ":" .Values.beeConfig.debug_api_addr )._1 }} name: debug protocol: TCP @@ -65,6 +66,16 @@ spec: httpGet: path: /readiness port: debug + {{- else }} + livenessProbe: + httpGet: + path: / + port: api + readinessProbe: + httpGet: + path: / + port: api + {{- end }} resources: {{- toYaml .Values.resources | nindent 12 }} securityContext: diff --git a/charts/bee/values.yaml b/charts/bee/values.yaml index db668c9..b8e0d5e 100644 --- a/charts/bee/values.yaml +++ b/charts/bee/values.yaml @@ -112,7 +112,7 @@ beeConfig: ## debug HTTP API listen address debug_api_addr: :6060 ## enable debug HTTP API - enable_debug_api: true + enable_debug_api: false ## ID of the Swarm network network_id: 1 ## password for decrypting keys (please change it for production deployments)