Skip to content

Commit

Permalink
Merge pull request #213 from ethersphere/bee-updates
Browse files Browse the repository at this point in the history
updates
  • Loading branch information
darkobas2 authored Oct 3, 2024
2 parents 121eb69 + 58222ec commit 8ae2682
Show file tree
Hide file tree
Showing 16 changed files with 200 additions and 71 deletions.
8 changes: 3 additions & 5 deletions charts/bee/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
apiVersion: v2
appVersion: 2.1.0
name: bee
version: 0.16.3
version: 0.16.4
kubeVersion: ">=1.19.0-0"
description: Ethereum Swarm Bee Helm chart for Kubernetes
home: https://www.ethswarm.org
Expand All @@ -17,10 +17,8 @@ maintainers:
email: [email protected]
- name: svetomir
email: [email protected]
- name: vandot
email: [email protected]
- name: aleksandar
email: [email protected]
- name: darkobas2
email: [email protected]
sources:
- https://github.com/ethersphere/bee
type: application
1 change: 1 addition & 0 deletions charts/bee/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ Selector labels.
{{- define "bee.selectorLabels" -}}
app.kubernetes.io/name: {{ include "bee.name" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
role: {{ .Values.beeSelector.role }}
{{- end -}}

{{/*
Expand Down
76 changes: 56 additions & 20 deletions charts/bee/templates/ingress-gateway-proxy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,11 @@
{{- $root := . -}}
{{- $fullName := include "bee.fullname" $root -}}

# PER POD INGRESS
{{- range $i, $e := until (int $root.Values.replicaCount) }}
---
{{- if semverCompare ">=1.19-0" $root.Capabilities.KubeVersion.Version }}
apiVersion: networking.k8s.io/v1
{{- else -}}
apiVersion: networking.k8s.io/v1beta1
{{- end }}
kind: Ingress
metadata:
name: gateway-proxy-{{ $fullName }}-{{ $i }}
name: proxy-{{ $root.Release.Name }}
namespace: {{ $root.Release.Namespace }}
labels:
{{- include "bee.labels" $root | nindent 4 }}
Expand All @@ -27,44 +21,86 @@ spec:
{{- range $root.Values.gatewayProxy.ingress.hosts }}
- hosts:
{{- if .domain }}
- gateway-proxy-{{ $fullName }}-{{ $i }}.{{ .domain }}
- {{ $root.Release.Name }}.{{ .domain }}
{{- else }}
- gateway-proxy-{{ $fullName }}-{{ $i }}
- {{ $fullName }}
{{- end }}
{{- if .tlsSecret }}
secretName: {{ .tlsSecret }}
{{- end }}
{{- end }}
{{- end }}
{{- if semverCompare ">=1.18-0" $root.Capabilities.KubeVersion.Version }}
ingressClassName: {{ $root.Values.gatewayProxy.ingress.ingressClassName }}
rules:
{{- range $root.Values.gatewayProxy.ingress.hosts }}
{{- if .domain }}
- host: {{ $root.Release.Name }}.{{ .domain }}
{{- else }}
- host: {{ $fullName }}
{{- end }}
http:
paths:
{{- range .paths }}
- path: {{ . }}
pathType: {{ $root.Values.gatewayProxy.ingress.pathType }}
backend:
service:
name: gateway-proxy-{{ $fullName }}
port:
name: gateway-proxy
{{- end }}
{{- end }}


{{- range $i, $e := until (int $root.Values.replicaCount) }}
# PER POD INGRESS
---
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: proxy-{{ $root.Release.Name }}-{{ $i }}
namespace: {{ $root.Release.Namespace }}
labels:
{{- include "bee.labels" $root | nindent 4 }}
{{- with $root.Values.gatewayProxy.ingress.annotations }}
annotations:
{{- toYaml . | nindent 4 }}
{{- end }}
spec:
{{- if $root.Values.gatewayProxy.ingress.tls }}
tls:
{{- range $root.Values.gatewayProxy.ingress.hosts }}
- hosts:
{{- if .domain }}
- {{ $root.Release.Name }}-{{ $i }}.{{ .domain }}
{{- else }}
- {{ $fullName }}-{{ $i }}
{{- end }}
{{- if .tlsSecret }}
secretName: {{ .tlsSecret }}
{{- end }}
{{- end }}
{{- end }}
ingressClassName: {{ $root.Values.gatewayProxy.ingress.ingressClassName }}
rules:
{{- range $root.Values.gatewayProxy.ingress.hosts }}
{{- if .domain }}
- host: gateway-proxy-{{ $fullName }}-{{ $i }}.{{ .domain }}
- host: {{ $root.Release.Name }}-{{ $i }}.{{ .domain }}
{{- else }}
- host: gateway-proxy-{{ $fullName }}-{{ $i }}
- host: {{ $fullName }}-{{ $i }}
{{- end }}
http:
paths:
{{- range .paths }}
- path: {{ . }}
{{- if semverCompare ">=1.18-0" $root.Capabilities.KubeVersion.Version }}
pathType: {{ $root.Values.gatewayProxy.ingress.pathType }}
{{- end }}
backend:
{{- if semverCompare ">=1.19-0" $root.Capabilities.KubeVersion.Version }}
service:
name: gateway-proxy-{{ $fullName }}-{{ $i }}
port:
name: gateway-proxy
{{- else }}
serviceName: gateway-proxy-{{ $fullName }}-{{ $i }}
servicePort: gateway-proxy
{{- end }}
{{- end }}
{{- end }}
{{- end }}

{{- end -}}
{{- end -}}
3 changes: 3 additions & 0 deletions charts/bee/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,9 @@ podAnnotations: {}

nodeSelector: {}

beeSelector:
role: "bee"

affinity: {}

tolerations: []
Expand Down
6 changes: 3 additions & 3 deletions charts/ethexporter/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
apiVersion: v2
appVersion: latest
name: ethexporter
version: 0.1.5
version: 0.2.0
description: ETHexporter Helm chart for Kubernetes
home: https://www.ethswarm.org
icon: https://docs.ethswarm.org/img/swarm-logo-2.svg
Expand All @@ -11,8 +11,8 @@ keywords:
- prometheus
- exporter
maintainers:
- name: vandot
email: vandot@ethswarm.org
- name: darkobas2
email: darkobas@ethswarm.org
sources:
- https://github.com/ethersphere/ethexporter
type: application
8 changes: 5 additions & 3 deletions charts/ethexporter/templates/config-addresses.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{{- if .Values.addressesTxt.enabled -}}
{{- if .Values.addressesTxt.enabled }}
{{- if not .Values.addressesTxt.existingConfigMap }}
---
apiVersion: v1
kind: ConfigMap
Expand All @@ -7,6 +8,7 @@ metadata:
namespace: {{ .Release.Namespace }}
labels:
{{- include "ethexporter.labels" . | nindent 4 }}
data:
data:
addresses.txt: {{ .Values.addressesTxt.addresses | quote }}
{{- end -}}
{{- end }}
{{- end }}
8 changes: 7 additions & 1 deletion charts/ethexporter/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ spec:
value: "{{ .Values.ethexporter.gethEndpoint }}"
- name: INTERVAL
value: "{{ .Values.ethexporter.interval }}"
- name: PORT
value: "{{ .Values.service.port }}"
ports:
- name: metrics
containerPort: {{ int .Values.service.port }}
Expand All @@ -51,7 +53,11 @@ spec:
volumes:
- name: addresses
configMap:
name: {{ include "ethexporter.fullname" . }}-addresses
name: {{- if .Values.addressesTxt.existingConfigMap }}
{{ .Values.addressesTxt.existingConfigMap }}
{{- else -}}
{{ template "ethexporter.fullname" . }}-addresses
{{- end }}
{{- end }}
{{- with .Values.nodeSelector }}
nodeSelector:
Expand Down
1 change: 1 addition & 0 deletions charts/ethexporter/templates/servicemonitor.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ spec:
path: /metrics
{{- if .Values.serviceMonitor.scrapeInterval }}
interval: {{ .Values.serviceMonitor.scrapeInterval }}
scheme: http
{{- end }}
{{- if .Values.serviceMonitor.honorLabels }}
honorLabels: true
Expand Down
19 changes: 10 additions & 9 deletions charts/ethexporter/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,20 @@
# Declare variables to be passed into your templates.

image:
repository: ethersphere/ethexporter
repository: darkobas/ethexporter
tag: latest
pullPolicy: IfNotPresent

ethexporter:
gethEndpoint: https://rpc.slock.it/mainnet
interval: 15
gethEndpoint: http://rpc-gnosis-haproxy.default.svc.godfather2.local
interval: 60

addressesTxt:
enabled: false
addresses: |
etherdelta:0x8d12A197cB00D4747a1fe03395095ce2A5CC6819
bittrex:0xFBb1b73C4f0BDa4f67dcA266ce6Ef42f520fBB98
enabled: true
existingConfigMap: "balance-addresses"
#addresses: |
# etherdelta:0x8d12A197cB00D4747a1fe03395095ce2A5CC6819
# bittrex:0xFBb1b73C4f0BDa4f67dcA266ce6Ef42f520fBB98

replicaCount: 1

Expand All @@ -29,7 +30,7 @@ serviceAccount:
name:

serviceMonitor:
enabled: false
enabled: true
additionalLabels: {}

podSecurityContext: {}
Expand All @@ -38,7 +39,7 @@ securityContext: {}

service:
type: ClusterIP
port: 9890
port: 9021

ingress:
enabled: false
Expand Down
6 changes: 3 additions & 3 deletions charts/tokenexporter/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
apiVersion: v2
appVersion: latest
name: tokenexporter
version: 0.1.6
version: 0.2.0
description: Tokenexporter Helm chart for Kubernetes
home: https://www.ethswarm.org
icon: https://docs.ethswarm.org/img/swarm-logo-2.svg
Expand All @@ -12,8 +12,8 @@ keywords:
- prometheus
- exporter
maintainers:
- name: vandot
email: vandot@ethswarm.org
- name: darkobas2
email: darkobas@ethswarm.org
sources:
- https://github.com/ethersphere/tokenexporter
type: application
8 changes: 5 additions & 3 deletions charts/tokenexporter/templates/config-addresses.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{{- if .Values.addressesTxt.enabled -}}
{{- if .Values.addressesTxt.enabled }}
{{- if not .Values.addressesTxt.existingConfigMap }}
---
apiVersion: v1
kind: ConfigMap
Expand All @@ -7,6 +8,7 @@ metadata:
namespace: {{ .Release.Namespace }}
labels:
{{- include "tokenexporter.labels" . | nindent 4 }}
data:
data:
addresses.txt: {{ .Values.addressesTxt.addresses | quote }}
{{- end -}}
{{- end }}
{{- end }}
4 changes: 2 additions & 2 deletions charts/tokenexporter/templates/config-tokens.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,5 @@ metadata:
labels:
{{- include "tokenexporter.labels" . | nindent 4 }}
data:
tokens.json: {{ .Values.tokensJson.tokens | quote }}
{{- end -}}
tokens-list.json: {{ .Values.tokensJson.tokens | quote }}
{{- end -}}
12 changes: 9 additions & 3 deletions charts/tokenexporter/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ spec:
value: "{{ .Values.tokenexporter.gethEndpoint }}"
- name: INTERVAL
value: "{{ .Values.tokenexporter.interval }}"
- name: PORT
value: "{{ .Values.service.port }}"
ports:
- name: metrics
containerPort: {{ int .Values.service.port }}
Expand All @@ -48,8 +50,8 @@ spec:
{{- end }}
{{- if .Values.tokensJson.enabled }}
- name: tokens
mountPath: /app/tokens.json
subPath: tokens.json
mountPath: /app/tokens-list.json
subPath: tokens-list.json
{{- end }}
{{- end }}
command:
Expand All @@ -59,7 +61,11 @@ spec:
{{- if .Values.addressesTxt.enabled }}
- name: addresses
configMap:
name: {{ include "tokenexporter.fullname" . }}-addresses
name: {{- if .Values.addressesTxt.existingConfigMap }}
{{ .Values.addressesTxt.existingConfigMap }}
{{- else -}}
{{ template "tokenexporter.fullname" . }}-addresses
{{- end }}
{{- end }}
{{- if .Values.tokensJson.enabled }}
- name: tokens
Expand Down
1 change: 1 addition & 0 deletions charts/tokenexporter/templates/servicemonitor.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ spec:
path: /metrics
{{- if .Values.serviceMonitor.scrapeInterval }}
interval: {{ .Values.serviceMonitor.scrapeInterval }}
scheme: http
{{- end }}
{{- if .Values.serviceMonitor.honorLabels }}
honorLabels: true
Expand Down
Loading

0 comments on commit 8ae2682

Please sign in to comment.