Skip to content

Commit

Permalink
chore: remove deprecated debug api endpoint (#209)
Browse files Browse the repository at this point in the history
* chore: remove deprecated debug api endpoint

* chore: reverted bee version and removed debug ref from gateway-proxy

* chore: bump gateway-proxy
  • Loading branch information
Иван Vandot authored Jul 8, 2024
1 parent d0e3c7b commit 623b1b6
Show file tree
Hide file tree
Showing 9 changed files with 7 additions and 167 deletions.
4 changes: 2 additions & 2 deletions charts/bee/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
apiVersion: v2
appVersion: 2.0.0
appVersion: 2.1.0
name: bee
version: 0.15.0
version: 0.16.0
kubeVersion: ">=1.19.0-0"
description: Ethereum Swarm Bee Helm chart for Kubernetes
home: https://www.ethswarm.org
Expand Down
7 changes: 1 addition & 6 deletions charts/bee/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -124,18 +124,13 @@ Return Bee password.
{{- end -}}

{{/*
Define config parameters api-addr, debug-api-addr, debug-api-enable, p2p-addr
Define config parameters api-addr, p2p-addr
*/}}
{{- define "bee.config.api_port" -}}
{{- $full_api_addr := index .Values.beeConfig "api-addr" -}}
{{- $api_port := (split ":" $full_api_addr )._1 }}
{{- printf "%s" $api_port -}}
{{- end -}}
{{- define "bee.config.debug_api_port" -}}
{{- $full_debug_api_addr := index .Values.beeConfig "debug-api-addr" -}}
{{- $debug_api_port := (split ":" $full_debug_api_addr )._1 }}
{{- printf "%s" $debug_api_port -}}
{{- end -}}
{{- define "bee.config.p2p_port" -}}
{{- $full_p2p_addr := index .Values.beeConfig "p2p-addr" -}}
{{- $p2p_port := (split ":" $full_p2p_addr )._1 }}
Expand Down
70 changes: 0 additions & 70 deletions charts/bee/templates/ingress-debug.yaml

This file was deleted.

31 changes: 0 additions & 31 deletions charts/bee/templates/service-debug.yaml

This file was deleted.

6 changes: 0 additions & 6 deletions charts/bee/templates/service-headless.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,6 @@ spec:
port: {{ int (include "bee.config.p2p_port" .) }}
protocol: TCP
targetPort: p2p
{{- if index .Values.beeConfig "debug-api-enable" }}
- name: debug
port: {{ int (include "bee.config.debug_api_port" .) }}
protocol: TCP
targetPort: debug
{{- end }}
selector:
{{- include "bee.selectorLabels" . | nindent 4 }}
type: {{ .Values.service.type }}
Expand Down
4 changes: 2 additions & 2 deletions charts/bee/templates/servicemonitor.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{{- if and .Values.serviceMonitor.enabled (index .Values.beeConfig "debug-api-enable") -}}
{{- if .Values.serviceMonitor.enabled -}}

---
apiVersion: monitoring.coreos.com/v1
Expand All @@ -18,7 +18,7 @@ metadata:
{{- end }}
spec:
endpoints:
- port: debug
- port: api
path: /metrics
{{- if .Values.serviceMonitor.scrapeInterval }}
interval: {{ .Values.serviceMonitor.scrapeInterval }}
Expand Down
20 changes: 0 additions & 20 deletions charts/bee/templates/statefulset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -191,21 +191,6 @@ spec:
name: p2p-udp
protocol: UDP
{{- if .Values.probesEnable }}
{{- if index .Values.beeConfig "debug-api-enable" }}
- containerPort: {{ int (include "bee.config.debug_api_port" .) }}
name: debug
protocol: TCP
livenessProbe:
httpGet:
path: /health
port: debug
initialDelaySeconds: 20
readinessProbe:
httpGet:
path: /readiness
port: debug
initialDelaySeconds: 20
{{- else }}
livenessProbe:
httpGet:
path: /
Expand All @@ -217,7 +202,6 @@ spec:
port: api
initialDelaySeconds: 20
{{- end }}
{{- end }}
resources:
{{- toYaml .Values.resources | nindent 12 }}
securityContext:
Expand Down Expand Up @@ -257,10 +241,6 @@ spec:
value: "8633"
- name: BEE_API_URL
value: "http://localhost:1633"
{{- if .Values.gatewayProxy.autobuy.enabled }}
- name: BEE_DEBUG_API_URL
value: "http://localhost:1635"
{{- end }}
{{- with .Values.gatewayProxy.envs }}
{{- toYaml . | nindent 12 }}
{{- end }}
Expand Down
2 changes: 1 addition & 1 deletion charts/bee/templates/tests/test-connection.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,5 @@ spec:
- name: wget
image: busybox
command: ['echo']
args: ['{{ include "bee.fullname" . }}:{{ int (include "bee.config.debug_api_port" $root) }}/addresses']
args: ['{{ include "bee.fullname" . }}:{{ int (include "bee.config.api_port" $root) }}/addresses']
restartPolicy: Never
30 changes: 1 addition & 29 deletions charts/bee/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -80,25 +80,6 @@ ingress:
tlsSecret: ""
tls: false

## If enabled and beeConfig.debug-api-enable is enabled, creates ingress for debug api
## Creates one ingress per pod
## Total number of created ingress objects is: replicaCount
## Hostname for 'per pod ingresses' is: <chart fullname>-debug-<i>, or <chart fullname>-debug-<i>.<domain> if domain is specified
## tls.secretName won't be specified if tlsSecret is "", tls must be set to true
ingressDebug:
enabled: false
## Used if cluster version is >= 1.19-0
pathType: ImplementationSpecific
# ingressClassName: ingress-nginx
annotations: {}
# kubernetes.io/ingress.class: nginx
# kubernetes.io/tls-acme: "true"
hosts:
- domain: ""
paths: []
tlsSecret: ""
tls: false

replicaCount: 1

updateStrategy:
Expand Down Expand Up @@ -156,7 +137,6 @@ persistence:
# existingClaim:

## Enable this if you're using https://github.com/coreos/prometheus-operator
## and beeConfig.debug-api-enable is enabled
serviceMonitor:
enabled: false
additionalLabels: {}
Expand Down Expand Up @@ -190,7 +170,6 @@ probesEnable: true
podLabels: {}
podAnnotations: {}
## Add this annotations if you're using https://github.com/prometheus/prometheus
## and beeConfig.debug-api-enable is enabled
# prometheus.io/scrape: "true"
# prometheus.io/port: "1635"

Expand All @@ -211,10 +190,6 @@ beeConfig:
api-addr: :1633
## P2P listen address
p2p-addr: :1634
## Debug HTTP API listen address
debug-api-addr: :1635
## Enable debug HTTP API
debug-api-enable: true
## Set the run mode - light by default
full-node: true
## ID of the Swarm network - 10 by default
Expand All @@ -232,7 +207,6 @@ password:
## You can specify all options except for usePasswordFile, existingSecret and existingSecretPasswordKey
beeEnv: []
# api_addr: :1633
# debug_api_addr: :1635
# p2p_addr: :1634


Expand Down Expand Up @@ -276,7 +250,7 @@ gatewayProxy:
enabled: false
image:
repository: ethersphere/gateway-proxy
tag: 0.4.0
tag: 0.15.0
# digest: sha256:508a6bc1d3f45acaf98b746d521ee2cb11a895d8334446d2205fe4053b9e3667
pullPolicy: IfNotPresent
## If enabled, creates ingress for HTTP
Expand All @@ -297,8 +271,6 @@ gatewayProxy:
paths: []
tlsSecret: ""
tls: false
## If enabled it will configure bee debug api endpoint BEE_DEBUG_API_URL
## that is needed for autobuy to work
## If enabled set POSTAGE_DEPTH and POSTAGE_AMOUNT
autobuy:
enabled: false
Expand Down

0 comments on commit 623b1b6

Please sign in to comment.