diff --git a/charts/bee/Chart.yaml b/charts/bee/Chart.yaml index b758655..e2be2f8 100644 --- a/charts/bee/Chart.yaml +++ b/charts/bee/Chart.yaml @@ -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 @@ -17,10 +17,8 @@ maintainers: email: devops@ethswarm.org - name: svetomir email: svetomir@ethswarm.org - - name: vandot - email: vandot@ethswarm.org - - name: aleksandar - email: aleksandar@ethswarm.org + - name: darkobas2 + email: darkobas@ethswarm.org sources: - https://github.com/ethersphere/bee type: application diff --git a/charts/bee/templates/_helpers.tpl b/charts/bee/templates/_helpers.tpl index a121049..b40d6c9 100644 --- a/charts/bee/templates/_helpers.tpl +++ b/charts/bee/templates/_helpers.tpl @@ -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 -}} {{/* diff --git a/charts/bee/templates/ingress-gateway-proxy.yaml b/charts/bee/templates/ingress-gateway-proxy.yaml index 93e89b5..b39c385 100644 --- a/charts/bee/templates/ingress-gateway-proxy.yaml +++ b/charts/bee/templates/ingress-gateway-proxy.yaml @@ -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 }} @@ -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 -}} diff --git a/charts/bee/values.yaml b/charts/bee/values.yaml index 6d7dddf..24f5d00 100644 --- a/charts/bee/values.yaml +++ b/charts/bee/values.yaml @@ -175,6 +175,9 @@ podAnnotations: {} nodeSelector: {} +beeSelector: + role: "bee" + affinity: {} tolerations: [] diff --git a/charts/ethexporter/Chart.yaml b/charts/ethexporter/Chart.yaml index cfd655f..b72bbef 100644 --- a/charts/ethexporter/Chart.yaml +++ b/charts/ethexporter/Chart.yaml @@ -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 @@ -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 diff --git a/charts/ethexporter/templates/config-addresses.yaml b/charts/ethexporter/templates/config-addresses.yaml index c19ad32..bbdee0b 100644 --- a/charts/ethexporter/templates/config-addresses.yaml +++ b/charts/ethexporter/templates/config-addresses.yaml @@ -1,4 +1,5 @@ -{{- if .Values.addressesTxt.enabled -}} +{{- if .Values.addressesTxt.enabled }} +{{- if not .Values.addressesTxt.existingConfigMap }} --- apiVersion: v1 kind: ConfigMap @@ -7,6 +8,7 @@ metadata: namespace: {{ .Release.Namespace }} labels: {{- include "ethexporter.labels" . | nindent 4 }} -data: +data: addresses.txt: {{ .Values.addressesTxt.addresses | quote }} -{{- end -}} \ No newline at end of file +{{- end }} +{{- end }} diff --git a/charts/ethexporter/templates/deployment.yaml b/charts/ethexporter/templates/deployment.yaml index b185b58..0d2c1d8 100644 --- a/charts/ethexporter/templates/deployment.yaml +++ b/charts/ethexporter/templates/deployment.yaml @@ -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 }} @@ -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: diff --git a/charts/ethexporter/templates/servicemonitor.yaml b/charts/ethexporter/templates/servicemonitor.yaml index 6709922..ea27a8c 100644 --- a/charts/ethexporter/templates/servicemonitor.yaml +++ b/charts/ethexporter/templates/servicemonitor.yaml @@ -21,6 +21,7 @@ spec: path: /metrics {{- if .Values.serviceMonitor.scrapeInterval }} interval: {{ .Values.serviceMonitor.scrapeInterval }} + scheme: http {{- end }} {{- if .Values.serviceMonitor.honorLabels }} honorLabels: true diff --git a/charts/ethexporter/values.yaml b/charts/ethexporter/values.yaml index 9c9563c..da43972 100644 --- a/charts/ethexporter/values.yaml +++ b/charts/ethexporter/values.yaml @@ -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 @@ -29,7 +30,7 @@ serviceAccount: name: serviceMonitor: - enabled: false + enabled: true additionalLabels: {} podSecurityContext: {} @@ -38,7 +39,7 @@ securityContext: {} service: type: ClusterIP - port: 9890 + port: 9021 ingress: enabled: false diff --git a/charts/tokenexporter/Chart.yaml b/charts/tokenexporter/Chart.yaml index faa7151..235c3bb 100644 --- a/charts/tokenexporter/Chart.yaml +++ b/charts/tokenexporter/Chart.yaml @@ -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 @@ -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 diff --git a/charts/tokenexporter/templates/config-addresses.yaml b/charts/tokenexporter/templates/config-addresses.yaml index de108aa..5b8e2d9 100644 --- a/charts/tokenexporter/templates/config-addresses.yaml +++ b/charts/tokenexporter/templates/config-addresses.yaml @@ -1,4 +1,5 @@ -{{- if .Values.addressesTxt.enabled -}} +{{- if .Values.addressesTxt.enabled }} +{{- if not .Values.addressesTxt.existingConfigMap }} --- apiVersion: v1 kind: ConfigMap @@ -7,6 +8,7 @@ metadata: namespace: {{ .Release.Namespace }} labels: {{- include "tokenexporter.labels" . | nindent 4 }} -data: +data: addresses.txt: {{ .Values.addressesTxt.addresses | quote }} -{{- end -}} \ No newline at end of file +{{- end }} +{{- end }} diff --git a/charts/tokenexporter/templates/config-tokens.yaml b/charts/tokenexporter/templates/config-tokens.yaml index e63fc2f..c2835db 100644 --- a/charts/tokenexporter/templates/config-tokens.yaml +++ b/charts/tokenexporter/templates/config-tokens.yaml @@ -8,5 +8,5 @@ metadata: labels: {{- include "tokenexporter.labels" . | nindent 4 }} data: - tokens.json: {{ .Values.tokensJson.tokens | quote }} -{{- end -}} \ No newline at end of file + tokens-list.json: {{ .Values.tokensJson.tokens | quote }} +{{- end -}} diff --git a/charts/tokenexporter/templates/deployment.yaml b/charts/tokenexporter/templates/deployment.yaml index 455e821..d2ce888 100644 --- a/charts/tokenexporter/templates/deployment.yaml +++ b/charts/tokenexporter/templates/deployment.yaml @@ -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 }} @@ -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: @@ -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 diff --git a/charts/tokenexporter/templates/servicemonitor.yaml b/charts/tokenexporter/templates/servicemonitor.yaml index 4d4fe45..34ef6c5 100644 --- a/charts/tokenexporter/templates/servicemonitor.yaml +++ b/charts/tokenexporter/templates/servicemonitor.yaml @@ -21,6 +21,7 @@ spec: path: /metrics {{- if .Values.serviceMonitor.scrapeInterval }} interval: {{ .Values.serviceMonitor.scrapeInterval }} + scheme: http {{- end }} {{- if .Values.serviceMonitor.honorLabels }} honorLabels: true diff --git a/charts/tokenexporter/values-cheques.yml b/charts/tokenexporter/values-cheques.yml new file mode 100644 index 0000000..ef40d55 --- /dev/null +++ b/charts/tokenexporter/values-cheques.yml @@ -0,0 +1,77 @@ +# Default values for tokenexporter. +# This is a YAML-formatted file. +# Declare variables to be passed into your templates. + +image: + repository: darkobas/tokenexporter + tag: latest + pullPolicy: IfNotPresent + +tokenexporter: + gethEndpoint: http://rpc-gnosis-haproxy.default.svc.godfather2.local + interval: 60 + +addressesTxt: + enabled: true + existingConfigMap: "cheque-addresses" # Name of the existing ConfigMap + #addresses: | + # bittrex:0xFBb1b73C4f0BDa4f67dcA266ce6Ef42f520fBB98 + # etherdelta:0x8d12A197cB00D4747a1fe03395095ce2A5CC6819 + +tokensJson: + enabled: true + tokens: | + [ + { + "address": "0xdbf3ea6f5bee45c02255b2c26a16f300502f68da", + "symbol": "BZZ", + "decimal": 16, + "type": "default" + } + ] + +replicaCount: 1 + +imagePullSecrets: [] +nameOverride: "" +fullnameOverride: "" + +serviceAccount: + create: false + annotations: {} + name: + +serviceMonitor: + enabled: true + additionalLabels: {} + +podSecurityContext: {} + +securityContext: {} + +service: + type: ClusterIP + port: 9021 + +ingress: + enabled: false + annotations: {} + tls: [] + +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 + # resources, such as Minikube. If you do want to specify resources, uncomment the following + # lines, adjust them as necessary, and remove the curly braces after 'resources:'. + # limits: + # cpu: 100m + # memory: 128Mi + # requests: + # cpu: 100m + # memory: 128Mi + +nodeSelector: {} + +tolerations: [] + +affinity: {} diff --git a/charts/tokenexporter/values.yaml b/charts/tokenexporter/values.yaml index 1ad2422..ecfaea4 100644 --- a/charts/tokenexporter/values.yaml +++ b/charts/tokenexporter/values.yaml @@ -3,34 +3,29 @@ # Declare variables to be passed into your templates. image: - repository: ethersphere/tokenexporter + repository: darkobas/tokenexporter tag: latest pullPolicy: IfNotPresent tokenexporter: - gethEndpoint: https://rpc.slock.it/mainnet - interval: 15 + gethEndpoint: http://rpc-gnosis-haproxy.default.svc.godfather2.local + interval: 60 addressesTxt: - enabled: false - addresses: | - bittrex:0xFBb1b73C4f0BDa4f67dcA266ce6Ef42f520fBB98 - etherdelta:0x8d12A197cB00D4747a1fe03395095ce2A5CC6819 + enabled: true + existingConfigMap: "balance-addresses" # Name of the existing ConfigMap + #addresses: | + # bittrex:0xFBb1b73C4f0BDa4f67dcA266ce6Ef42f520fBB98 + # etherdelta:0x8d12A197cB00D4747a1fe03395095ce2A5CC6819 tokensJson: - enabled: false + enabled: true tokens: | [ { - "address": "0x4E84E9e5fb0A972628Cf4568c403167EF1D40431", - "symbol": "$FFC", - "decimal": 18, - "type": "default" - }, - { - "address": "0xa024e8057eec474a9b2356833707dd0579e26ef3", - "symbol": "$FYX", - "decimal": 18, + "address": "0xdbf3ea6f5bee45c02255b2c26a16f300502f68da", + "symbol": "BZZ", + "decimal": 16, "type": "default" } ] @@ -47,7 +42,7 @@ serviceAccount: name: serviceMonitor: - enabled: false + enabled: true additionalLabels: {} podSecurityContext: {} @@ -56,7 +51,7 @@ securityContext: {} service: type: ClusterIP - port: 9891 + port: 9021 ingress: enabled: false