├── .github └── workflows │ ├── lint-test.yaml │ └── release.yaml ├── .gitignore ├── README.md └── charts ├── bee-localchain ├── .helmignore ├── Chart.yaml ├── README.md ├── templates │ ├── NOTES.txt │ ├── _helpers.tpl │ ├── deployment.yaml │ ├── hpa.yaml │ ├── ingress.yaml │ ├── service.yaml │ └── serviceaccount.yaml └── values.yaml ├── bee ├── .helmignore ├── Chart.yaml ├── README.md ├── ci │ └── ct-values.yaml ├── templates │ ├── NOTES.txt │ ├── _helpers.tpl │ ├── config.yaml │ ├── ingress-gateway-proxy.yaml │ ├── ingress-swarm-proxy.yaml │ ├── ingress.yaml │ ├── secret-db-config.yaml │ ├── secret-libp2pkeys.yaml │ ├── secret-password.yaml │ ├── secret-swarmkeys.yaml │ ├── service-api.yaml │ ├── service-gateway-proxy.yaml │ ├── service-headless.yaml │ ├── service-p2p.yaml │ ├── service-swarm-proxy.yaml │ ├── serviceaccount.yaml │ ├── servicemonitor.yaml │ ├── statefulset.yaml │ └── tests │ │ └── test-connection.yaml └── values.yaml ├── beekeeper ├── .helmignore ├── Chart.yaml ├── README.md ├── files │ ├── beekeeper-local.yaml │ ├── config.yaml │ ├── helm-cluster.yaml │ ├── infra-test.yaml │ ├── light-node.yaml │ ├── local.yaml │ ├── testnet-giant.yaml │ └── testnet.yaml ├── templates │ ├── NOTES.txt │ ├── _helpers.tpl │ ├── clusterrole.yaml │ ├── config.yaml │ ├── cronjob.yaml │ ├── job.yaml │ ├── role.yaml │ ├── serviceaccount.yaml │ └── tests │ │ └── test-connection.yaml └── values.yaml ├── beeport-proxy ├── Chart.yaml ├── templates │ ├── deployment.yaml │ └── service.yaml └── values.yaml ├── beeport-ui ├── Chart.yaml ├── charts │ └── common │ │ ├── .helmignore │ │ ├── Chart.yaml │ │ └── templates │ │ ├── _configmap.yaml │ │ ├── _container.yaml │ │ ├── _customFileConfigmap.yaml │ │ ├── _envFromRef.yaml │ │ ├── _fileSecret.yaml │ │ ├── _helpers.tpl │ │ ├── _podSpec.yaml │ │ ├── _pvc.yaml │ │ ├── _sealedFileSecret.yaml │ │ ├── _sealedSecret.yaml │ │ ├── _volumeMountsRef.yaml │ │ └── _volumesRef.yaml ├── templates │ ├── NOTES.txt │ ├── _helpers.tpl │ ├── configmap.yaml │ ├── deployment.yaml │ ├── ingress.yaml │ ├── sealedSecret.yaml │ └── service.yaml ├── tests │ ├── configmap_test.yaml │ ├── deployment_test.yaml │ ├── ingress_domain_test.yaml │ ├── ingress_path_test.yaml │ ├── ingress_port_test.yaml │ └── sealed_secret_test.yaml ├── values.schema.json └── values.yaml ├── bzz-token-service ├── .helmignore ├── Chart.yaml ├── README.md ├── templates │ ├── NOTES.txt │ ├── _helpers.tpl │ ├── config.yaml │ ├── deployment.yaml │ ├── hpa.yaml │ ├── ingress.yaml │ ├── service.yaml │ └── serviceaccount.yaml └── values.yaml ├── eks-local-disk-provisioner ├── .helmignore ├── Chart.yaml ├── README.md ├── templates │ ├── NOTES.txt │ ├── _helpers.tpl │ ├── daemonset.yaml │ └── serviceaccount.yaml └── values.yaml ├── etherproxy ├── .helmignore ├── Chart.yaml ├── README.md ├── templates │ ├── NOTES.txt │ ├── _helpers.tpl │ ├── config.yaml │ ├── deployment.yaml │ ├── hpa.yaml │ ├── ingress.yaml │ ├── service.yaml │ └── serviceaccount.yaml └── values.yaml ├── ethexporter ├── .helmignore ├── Chart.yaml ├── README.md ├── ci │ └── ct-values.yaml ├── templates │ ├── NOTES.txt │ ├── _helpers.tpl │ ├── config-addresses.yaml │ ├── deployment.yaml │ ├── ingress.yaml │ ├── service.yaml │ ├── serviceaccount.yaml │ ├── servicemonitor.yaml │ └── tests │ │ └── test-connection.yaml └── values.yaml ├── ethproxy ├── .helmignore ├── Chart.yaml ├── README.md ├── templates │ ├── NOTES.txt │ ├── _helpers.tpl │ ├── config.yaml │ ├── deployment.yaml │ ├── hpa.yaml │ ├── ingress.yaml │ ├── service.yaml │ └── serviceaccount.yaml └── values.yaml ├── geth-swap ├── .helmignore ├── Chart.yaml ├── templates │ ├── _helpers.tpl │ ├── genesis.configmap.yaml │ ├── ingress.yaml │ ├── service-ether-proxy.yaml │ ├── service.yaml │ ├── serviceaccount.yaml │ ├── setupcontracts.yaml │ ├── statefulset.yaml │ └── tests │ │ └── test-connection.yaml └── values.yaml ├── nethermind ├── .helmignore ├── Chart.yaml ├── LICENSE ├── templates │ ├── NOTES.txt │ ├── _helpers.tpl │ ├── configmap.yaml │ ├── secret.yaml │ ├── service.yaml │ ├── serviceaccount.yaml │ ├── servicemonitor.yaml │ ├── statefulset.yaml │ └── tests │ │ └── test-connection.yaml └── values.yaml ├── onboarding-faucet ├── .helmignore ├── Chart.yaml ├── README.md ├── templates │ ├── NOTES.txt │ ├── _helpers.tpl │ ├── config.yaml │ ├── deployment.yaml │ ├── hpa.yaml │ ├── ingress.yaml │ ├── secret.yaml │ ├── service.yaml │ ├── serviceaccount.yaml │ └── servicemonitor.yaml └── values.yaml └── tokenexporter ├── .helmignore ├── Chart.yaml ├── README.md ├── ci └── ct-values.yaml ├── templates ├── NOTES.txt ├── _helpers.tpl ├── config-addresses.yaml ├── config-tokens.yaml ├── deployment.yaml ├── ingress.yaml ├── service.yaml ├── serviceaccount.yaml ├── servicemonitor.yaml └── tests │ └── test-connection.yaml ├── values-cheques.yml └── values.yaml /.github/workflows/lint-test.yaml: -------------------------------------------------------------------------------- 1 | name: Lint and Test 2 | 3 | on: pull_request 4 | 5 | jobs: 6 | lint-test: 7 | runs-on: ubuntu-latest 8 | steps: 9 | - name: Checkout 10 | uses: actions/checkout@v4 11 | with: 12 | fetch-depth: 0 13 | 14 | - name: Set up chart-testing 15 | uses: helm/chart-testing-action@v2.6.1 16 | 17 | - name: Run chart-testing (list-changed) 18 | id: list-changed 19 | run: | 20 | changed=$(ct list-changed --target-branch ${{ github.event.repository.default_branch }}) 21 | if [[ -n "$changed" ]]; then 22 | echo "changed=true" >> $GITHUB_ENV 23 | fi 24 | 25 | - name: Run chart-testing (lint) 26 | run: ct lint --check-version-increment false 27 | 28 | - name: Create kind cluster 29 | uses: helm/kind-action@v1.10.0 30 | if: env.changed == 'true' 31 | 32 | - name: Run chart-testing (install) 33 | run: ct install 34 | -------------------------------------------------------------------------------- /.github/workflows/release.yaml: -------------------------------------------------------------------------------- 1 | name: Release 2 | 3 | on: 4 | push: 5 | branches: 6 | - master 7 | 8 | jobs: 9 | release: 10 | runs-on: ubuntu-latest 11 | steps: 12 | - name: Checkout 13 | uses: actions/checkout@v4 14 | with: 15 | fetch-depth: 0 16 | 17 | - name: Configure Git 18 | run: | 19 | git config user.name "$GITHUB_ACTOR" 20 | git config user.email "$GITHUB_ACTOR@users.noreply.github.com" 21 | 22 | - name: Install Helm 23 | uses: azure/setup-helm@v4 24 | with: 25 | version: v3.6.3 26 | 27 | - name: Run chart-releaser 28 | uses: helm/chart-releaser-action@v1.6.0 29 | env: 30 | CR_TOKEN: "${{ secrets.CR_TOKEN }}" 31 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Helm chart automated files 2 | /charts/*/requirements.lock 3 | .idea 4 | .DS_Store 5 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Ethersphere Helm Charts 2 | 3 | [![Release](https://github.com/ethersphere/helm/workflows/Release/badge.svg)](https://github.com/ethersphere/helm/actions?query=workflow%3ARelease) 4 | [![Artifact HUB](https://img.shields.io/endpoint?url=https://artifacthub.io/badge/repository/ethersphere)](https://artifacthub.io/packages/search?repo=ethersphere) 5 | 6 | This repo contains Ethersphere Helm Charts: 7 | * [bee](https://github.com/ethersphere/helm/tree/master/charts/bee) 8 | * [beekeeper](https://github.com/ethersphere/helm/tree/master/charts/beekeeper) 9 | * [eks-local-disk-provisioner](https://github.com/ethersphere/helm/tree/master/charts/eks-local-disk-provisioner) 10 | * [geth-swap](https://github.com/ethersphere/helm/tree/master/charts/geth-swap) 11 | * [bee-localchain](https://github.com/ethersphere/helm/tree/master/charts/bee-localchain) 12 | * [tokenexporter](https://github.com/ethersphere/helm/tree/master/charts/tokenexporter) 13 | * [ethexporter](https://github.com/ethersphere/helm/tree/master/charts/ethexporter) 14 | * [nethermind](https://github.com/ethersphere/helm/tree/master/charts/nethermind) 15 | * [bzz-token-service](https://github.com/ethersphere/helm/tree/master/charts/bzz-token-service) 16 | 17 | The code is provided as-is with no warranties. 18 | 19 | ## Usage 20 | 21 | [Helm](https://helm.sh) must be installed to use the charts. 22 | Please refer to Helm's [documentation](https://helm.sh/docs/) to get started. 23 | 24 | Once Helm is set up properly, add the repo as follows: 25 | 26 | ```bash 27 | helm repo add ethersphere https://ethersphere.github.io/helm 28 | ``` 29 | 30 | Now You can run `helm search ethersphere` to see the charts. 31 | 32 | Note that new versions might become available and you'll have to fetch these by doing `helm repo update`. 33 | -------------------------------------------------------------------------------- /charts/bee-localchain/.helmignore: -------------------------------------------------------------------------------- 1 | # Patterns to ignore when building packages. 2 | # This supports shell glob matching, relative path matching, and 3 | # negation (prefixed with !). Only one pattern per line. 4 | .DS_Store 5 | # Common VCS dirs 6 | .git/ 7 | .gitignore 8 | .bzr/ 9 | .bzrignore 10 | .hg/ 11 | .hgignore 12 | .svn/ 13 | # Common backup files 14 | *.swp 15 | *.bak 16 | *.tmp 17 | *.orig 18 | *~ 19 | # Various IDEs 20 | .project 21 | .idea/ 22 | *.tmproj 23 | .vscode/ 24 | -------------------------------------------------------------------------------- /charts/bee-localchain/Chart.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v2 2 | appVersion: latest 3 | name: bee-localchain 4 | version: 0.1.1 5 | description: Bee localchain Helm chart for Kubernetes 6 | home: https://www.ethswarm.org 7 | icon: https://docs.ethswarm.org/img/swarm-logo-2.svg 8 | keywords: 9 | - blockchain 10 | - ethereum 11 | - bee 12 | maintainers: 13 | - name: vandot 14 | email: vandot@ethswarm.org 15 | sources: 16 | - https://github.com/ethersphere/bee-localchain 17 | type: application 18 | -------------------------------------------------------------------------------- /charts/bee-localchain/README.md: -------------------------------------------------------------------------------- 1 | # Bee localchain Helm Chart 2 | 3 | [Bee localchain](https://github.com/ethersphere/bee-localchain) is a lightweight single node blockchain, based on hardhat, used for Bee development environments. 4 | 5 | ## Prerequisites 6 | 7 | Make sure you have Helm [installed](https://helm.sh/docs/intro/install/) installed. 8 | 9 | ## Get Repo Info 10 | 11 | ```bash 12 | helm repo add ethersphere https://ethersphere.github.io/helm 13 | helm repo update 14 | ``` 15 | 16 | _See [helm repo](https://helm.sh/docs/helm/helm_repo/) for command documentation._ 17 | 18 | ## QuickStart 19 | 20 | ```bash 21 | $ helm install --generate-name ethersphere/bee-localchain 22 | ``` 23 | 24 | ## Introduction 25 | 26 | This chart deploys a [Bee localchain](https://github.com/ethersphere/bee-localchain) onto a Kubernetes cluster using the Helm package manager. 27 | 28 | ## Prerequisites 29 | 30 | * Kubernetes 1.15 31 | * Helm 3.0 32 | 33 | ## Installing the Chart 34 | 35 | To install the chart with the release name `my-release`: 36 | 37 | ```bash 38 | $ helm install my-release ethersphere/bee-localchain 39 | ``` 40 | 41 | The command deploys Bee localchain on the Kubernetes cluster in the default configuration. The [configuration](#configuration) section lists the parameters that can be configured during installation. 42 | 43 | ## Uninstalling the Chart 44 | 45 | To uninstall/delete the `my-release` deployment: 46 | 47 | ```bash 48 | $ helm delete my-release 49 | ``` 50 | 51 | The command removes all the Kubernetes components associated with the chart and deletes the release. 52 | 53 | ## Configuration 54 | 55 | The default configuration values for this chart are listed in **values.yaml**. 56 | 57 | ## Helmsman Usage 58 | 59 | ### Prerequisites 60 | 61 | * Kubernetes 1.15 62 | * Helm 3.0 63 | * Helmsman 3.0 64 | 65 | ### Installing 66 | 67 | Create bee-localchain.yaml file as shown bellow: 68 | 69 | ```yaml 70 | namespaces: 71 | bee-localchain: 72 | 73 | helmRepos: 74 | ethersphere: "https://ethersphere.github.io/helm" 75 | 76 | apps: 77 | bee-localchain: 78 | name: bee-localchain 79 | namespace: bee-localchain 80 | description: "Bee localchain" 81 | chart: "ethersphere/bee-localchain" 82 | version: "0.1.0" 83 | enabled: true 84 | wait: true 85 | timeout: 120 86 | 87 | ``` 88 | 89 | Execute following command: 90 | ```bash 91 | $ helmsman -apply -f bee-localchain.yaml 92 | ``` 93 | 94 | ### Uninstalling 95 | 96 | Execute following command: 97 | ```bash 98 | $ helmsman -destroy -f bee-localchain.yaml 99 | ``` 100 | -------------------------------------------------------------------------------- /charts/bee-localchain/templates/NOTES.txt: -------------------------------------------------------------------------------- 1 | 1. Get the application URL by running these commands: 2 | {{- if .Values.ingress.enabled }} 3 | {{- range $host := .Values.ingress.hosts }} 4 | {{- range .paths }} 5 | http{{ if $.Values.ingress.tls }}s{{ end }}://{{ $host.host }}{{ . }} 6 | {{- end }} 7 | {{- end }} 8 | {{- else if contains "NodePort" .Values.service.type }} 9 | export NODE_PORT=$(kubectl get --namespace {{ .Release.Namespace }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ include "bee-localchain.fullname" . }}) 10 | export NODE_IP=$(kubectl get nodes --namespace {{ .Release.Namespace }} -o jsonpath="{.items[0].status.addresses[0].address}") 11 | echo http://$NODE_IP:$NODE_PORT 12 | {{- else if contains "LoadBalancer" .Values.service.type }} 13 | NOTE: It may take a few minutes for the LoadBalancer IP to be available. 14 | You can watch the status of by running 'kubectl get --namespace {{ .Release.Namespace }} svc -w {{ include "bee-localchain.fullname" . }}' 15 | export SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ include "bee-localchain.fullname" . }} --template "{{"{{ range (index .status.loadBalancer.ingress 0) }}{{.}}{{ end }}"}}") 16 | echo http://$SERVICE_IP:{{ .Values.service.port }} 17 | {{- else if contains "ClusterIP" .Values.service.type }} 18 | export POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l "app.kubernetes.io/name={{ include "bee-localchain.name" . }},app.kubernetes.io/instance={{ .Release.Name }}" -o jsonpath="{.items[0].metadata.name}") 19 | echo "Use http://127.0.0.1:8545 to access your application" 20 | kubectl --namespace {{ .Release.Namespace }} port-forward $POD_NAME 8545:8545 21 | {{- end }} 22 | -------------------------------------------------------------------------------- /charts/bee-localchain/templates/_helpers.tpl: -------------------------------------------------------------------------------- 1 | {{/* vim: set filetype=mustache: */}} 2 | {{/* 3 | Expand the name of the chart. 4 | */}} 5 | {{- define "bee-localchain.name" -}} 6 | {{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" }} 7 | {{- end }} 8 | 9 | {{/* 10 | Create a default fully qualified app name. 11 | We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). 12 | If release name contains chart name it will be used as a full name. 13 | */}} 14 | {{- define "bee-localchain.fullname" -}} 15 | {{- if .Values.fullnameOverride }} 16 | {{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" }} 17 | {{- else }} 18 | {{- $name := default .Chart.Name .Values.nameOverride }} 19 | {{- if contains $name .Release.Name }} 20 | {{- .Release.Name | trunc 63 | trimSuffix "-" }} 21 | {{- else }} 22 | {{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" }} 23 | {{- end }} 24 | {{- end }} 25 | {{- end }} 26 | 27 | {{/* 28 | Create chart name and version as used by the chart label. 29 | */}} 30 | {{- define "bee-localchain.chart" -}} 31 | {{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }} 32 | {{- end }} 33 | 34 | {{/* 35 | Common labels 36 | */}} 37 | {{- define "bee-localchain.labels" -}} 38 | helm.sh/chart: {{ include "bee-localchain.chart" . }} 39 | {{ include "bee-localchain.selectorLabels" . }} 40 | {{- if .Chart.AppVersion }} 41 | app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} 42 | {{- end }} 43 | app.kubernetes.io/managed-by: {{ .Release.Service }} 44 | {{- end }} 45 | 46 | {{/* 47 | Selector labels 48 | */}} 49 | {{- define "bee-localchain.selectorLabels" -}} 50 | app.kubernetes.io/name: {{ include "bee-localchain.name" . }} 51 | app.kubernetes.io/instance: {{ .Release.Name }} 52 | {{- end }} 53 | 54 | {{/* 55 | Create the name of the service account to use 56 | */}} 57 | {{- define "bee-localchain.serviceAccountName" -}} 58 | {{- if .Values.serviceAccount.create }} 59 | {{- default (include "bee-localchain.fullname" .) .Values.serviceAccount.name }} 60 | {{- else }} 61 | {{- default "default" .Values.serviceAccount.name }} 62 | {{- end }} 63 | {{- end }} 64 | -------------------------------------------------------------------------------- /charts/bee-localchain/templates/deployment.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: apps/v1 2 | kind: Deployment 3 | metadata: 4 | name: {{ include "bee-localchain.fullname" . }} 5 | labels: 6 | {{- include "bee-localchain.labels" . | nindent 4 }} 7 | spec: 8 | {{- if not .Values.autoscaling.enabled }} 9 | replicas: {{ .Values.replicaCount }} 10 | {{- end }} 11 | strategy: 12 | {{- toYaml .Values.strategy | nindent 4 }} 13 | selector: 14 | matchLabels: 15 | {{- include "bee-localchain.selectorLabels" . | nindent 6 }} 16 | template: 17 | metadata: 18 | {{- with .Values.podAnnotations }} 19 | annotations: 20 | {{- toYaml . | nindent 8 }} 21 | {{- end }} 22 | labels: 23 | {{- include "bee-localchain.selectorLabels" . | nindent 8 }} 24 | spec: 25 | {{- with .Values.imagePullSecrets }} 26 | imagePullSecrets: 27 | {{- toYaml . | nindent 8 }} 28 | {{- end }} 29 | serviceAccountName: {{ include "bee-localchain.serviceAccountName" . }} 30 | securityContext: 31 | {{- toYaml .Values.podSecurityContext | nindent 8 }} 32 | containers: 33 | - name: {{ .Chart.Name }} 34 | securityContext: 35 | {{- toYaml .Values.securityContext | nindent 12 }} 36 | image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}" 37 | imagePullPolicy: {{ .Values.image.pullPolicy }} 38 | ports: 39 | - name: rpc 40 | containerPort: 8545 41 | protocol: TCP 42 | livenessProbe: 43 | httpGet: 44 | path: / 45 | port: rpc 46 | readinessProbe: 47 | httpGet: 48 | path: / 49 | port: rpc 50 | resources: 51 | {{- toYaml .Values.resources | nindent 12 }} 52 | {{- with .Values.nodeSelector }} 53 | nodeSelector: 54 | {{- toYaml . | nindent 8 }} 55 | {{- end }} 56 | {{- with .Values.affinity }} 57 | affinity: 58 | {{- toYaml . | nindent 8 }} 59 | {{- end }} 60 | {{- with .Values.tolerations }} 61 | tolerations: 62 | {{- toYaml . | nindent 8 }} 63 | {{- end }} 64 | -------------------------------------------------------------------------------- /charts/bee-localchain/templates/hpa.yaml: -------------------------------------------------------------------------------- 1 | {{- if .Values.autoscaling.enabled }} 2 | apiVersion: autoscaling/v2beta1 3 | kind: HorizontalPodAutoscaler 4 | metadata: 5 | name: {{ include "bee-localchain.fullname" . }} 6 | labels: 7 | {{- include "bee-localchain.labels" . | nindent 4 }} 8 | spec: 9 | scaleTargetRef: 10 | apiVersion: apps/v1 11 | kind: Deployment 12 | name: {{ include "bee-localchain.fullname" . }} 13 | minReplicas: {{ .Values.autoscaling.minReplicas }} 14 | maxReplicas: {{ .Values.autoscaling.maxReplicas }} 15 | metrics: 16 | {{- if .Values.autoscaling.targetCPUUtilizationPercentage }} 17 | - type: Resource 18 | resource: 19 | name: cpu 20 | targetAverageUtilization: {{ .Values.autoscaling.targetCPUUtilizationPercentage }} 21 | {{- end }} 22 | {{- if .Values.autoscaling.targetMemoryUtilizationPercentage }} 23 | - type: Resource 24 | resource: 25 | name: memory 26 | targetAverageUtilization: {{ .Values.autoscaling.targetMemoryUtilizationPercentage }} 27 | {{- end }} 28 | {{- end }} 29 | -------------------------------------------------------------------------------- /charts/bee-localchain/templates/ingress.yaml: -------------------------------------------------------------------------------- 1 | {{- if .Values.ingress.enabled -}} 2 | {{- $fullName := include "bee-localchain.fullname" . -}} 3 | {{- $svcPort := .Values.service.port -}} 4 | {{- if semverCompare ">=1.19-0" .Capabilities.KubeVersion.Version -}} 5 | apiVersion: networking.k8s.io/v1 6 | {{- else -}} 7 | apiVersion: extensions/v1beta1 8 | {{- end }} 9 | kind: Ingress 10 | metadata: 11 | name: {{ $fullName }} 12 | labels: 13 | {{- include "bee-localchain.labels" . | nindent 4 }} 14 | {{- with .Values.ingress.annotations }} 15 | annotations: 16 | {{- toYaml . | nindent 4 }} 17 | {{- end }} 18 | spec: 19 | ingressClassName: {{ .Values.ingress.class }} 20 | {{- if .Values.ingress.tls }} 21 | tls: 22 | {{- range .Values.ingress.tls }} 23 | - hosts: 24 | {{- range .hosts }} 25 | - {{ . | quote }} 26 | {{- end }} 27 | secretName: {{ .secretName }} 28 | {{- end }} 29 | {{- end }} 30 | rules: 31 | {{- range .Values.ingress.hosts }} 32 | - host: {{ .host | quote }} 33 | http: 34 | paths: 35 | {{- range .paths }} 36 | - path: {{ . }} 37 | pathType: ImplementationSpecific 38 | backend: 39 | service: 40 | name: {{ $fullName }} 41 | port: 42 | number: {{ $svcPort }} 43 | {{- end }} 44 | {{- end }} 45 | {{- end }} 46 | -------------------------------------------------------------------------------- /charts/bee-localchain/templates/service.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | kind: Service 3 | metadata: 4 | name: {{ include "bee-localchain.fullname" . }} 5 | labels: 6 | {{- include "bee-localchain.labels" . | nindent 4 }} 7 | spec: 8 | type: {{ .Values.service.type }} 9 | ports: 10 | - port: {{ .Values.service.port }} 11 | targetPort: rpc 12 | protocol: TCP 13 | name: rpc 14 | selector: 15 | {{- include "bee-localchain.selectorLabels" . | nindent 4 }} 16 | -------------------------------------------------------------------------------- /charts/bee-localchain/templates/serviceaccount.yaml: -------------------------------------------------------------------------------- 1 | {{- if .Values.serviceAccount.create -}} 2 | apiVersion: v1 3 | kind: ServiceAccount 4 | metadata: 5 | name: {{ include "bee-localchain.serviceAccountName" . }} 6 | labels: 7 | {{- include "bee-localchain.labels" . | nindent 4 }} 8 | {{- with .Values.serviceAccount.annotations }} 9 | annotations: 10 | {{- toYaml . | nindent 4 }} 11 | {{- end }} 12 | {{- end }} 13 | -------------------------------------------------------------------------------- /charts/bee-localchain/values.yaml: -------------------------------------------------------------------------------- 1 | # Default values for bee-localchain. 2 | # This is a YAML-formatted file. 3 | # Declare variables to be passed into your templates. 4 | 5 | replicaCount: 1 6 | 7 | image: 8 | repository: ethersphere/bee-localchain 9 | pullPolicy: IfNotPresent 10 | # Overrides the image tag whose default is the chart version. 11 | tag: latest 12 | 13 | imagePullSecrets: [] 14 | nameOverride: "" 15 | fullnameOverride: "" 16 | 17 | serviceAccount: 18 | # Specifies whether a service account should be created 19 | create: true 20 | # Annotations to add to the service account 21 | annotations: {} 22 | # The name of the service account to use. 23 | # If not set and create is true, a name is generated using the fullname template 24 | name: "" 25 | 26 | podAnnotations: {} 27 | 28 | podSecurityContext: {} 29 | # fsGroup: 2000 30 | 31 | securityContext: {} 32 | # capabilities: 33 | # drop: 34 | # - ALL 35 | # readOnlyRootFilesystem: true 36 | # runAsNonRoot: true 37 | # runAsUser: 1000 38 | 39 | service: 40 | type: ClusterIP 41 | port: 8545 42 | 43 | ingress: 44 | enabled: false 45 | annotations: {} 46 | # kubernetes.io/ingress.class: nginx 47 | # kubernetes.io/tls-acme: "true" 48 | class: "" 49 | hosts: 50 | - host: chart-example.local 51 | paths: [] 52 | tls: [] 53 | # - secretName: chart-example-tls 54 | # hosts: 55 | # - chart-example.local 56 | 57 | resources: {} 58 | # If you do want to specify resources, uncomment the following lines, 59 | # adjust them as necessary, and remove the curly braces after 'resources:'. 60 | # limits: 61 | # cpu: 300m 62 | # ephemeral-storage: 2Gi 63 | # memory: 512Mi 64 | # requests: 65 | # cpu: 300m 66 | # ephemeral-storage: 512Mi 67 | # memory: 512Mi 68 | 69 | autoscaling: 70 | enabled: false 71 | minReplicas: 1 72 | maxReplicas: 100 73 | targetCPUUtilizationPercentage: 80 74 | # targetMemoryUtilizationPercentage: 80 75 | 76 | nodeSelector: {} 77 | 78 | tolerations: [] 79 | 80 | affinity: {} 81 | 82 | strategy: 83 | type: Recreate 84 | -------------------------------------------------------------------------------- /charts/bee/.helmignore: -------------------------------------------------------------------------------- 1 | # Patterns to ignore when building packages. 2 | # This supports shell glob matching, relative path matching, and 3 | # negation (prefixed with !). Only one pattern per line. 4 | .DS_Store 5 | # Common VCS dirs 6 | .git/ 7 | .gitignore 8 | .bzr/ 9 | .bzrignore 10 | .hg/ 11 | .hgignore 12 | .svn/ 13 | # Common backup files 14 | *.swp 15 | *.bak 16 | *.tmp 17 | *~ 18 | # Various IDEs 19 | .project 20 | .idea/ 21 | *.tmproj 22 | .vscode/ 23 | -------------------------------------------------------------------------------- /charts/bee/Chart.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v2 2 | appVersion: 2.5.0 3 | name: bee 4 | version: 0.16.8 5 | kubeVersion: ">=1.19.0-0" 6 | description: Ethereum Swarm Bee Helm chart for Kubernetes 7 | home: https://www.ethswarm.org 8 | icon: https://docs.ethswarm.org/img/swarm-logo-2.svg 9 | keywords: 10 | - blockchain 11 | - ethereum 12 | - storage 13 | - swarm 14 | - web3 15 | maintainers: 16 | - name: devops 17 | email: devops@ethswarm.org 18 | - name: svetomir 19 | email: svetomir@ethswarm.org 20 | - name: darkobas2 21 | email: darkobas@ethswarm.org 22 | sources: 23 | - https://github.com/ethersphere/bee 24 | type: application 25 | -------------------------------------------------------------------------------- /charts/bee/ci/ct-values.yaml: -------------------------------------------------------------------------------- 1 | probesEnable: false 2 | 3 | beeConfig: 4 | blockchain-rpc-endpoint: https://rpc.gnosischain.com/ 5 | -------------------------------------------------------------------------------- /charts/bee/templates/NOTES.txt: -------------------------------------------------------------------------------- 1 | 1. Get the application URL by running these commands: 2 | {{- if .Values.ingress.enabled }} 3 | {{- range $host := .Values.ingress.hosts }} 4 | {{- range .paths }} 5 | http{{ if $.Values.ingress.tls }}s{{ end }}://{{ $host.host }}{{ . }} 6 | {{- end }} 7 | {{- end }} 8 | {{- else if contains "NodePort" .Values.service.type }} 9 | export NODE_PORT=$(kubectl get --namespace {{ .Release.Namespace }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ include "bee.fullname" . }}) 10 | export NODE_IP=$(kubectl get nodes --namespace {{ .Release.Namespace }} -o jsonpath="{.items[0].status.addresses[0].address}") 11 | echo http://$NODE_IP:$NODE_PORT 12 | {{- else if contains "LoadBalancer" .Values.service.type }} 13 | NOTE: It may take a few minutes for the LoadBalancer IP to be available. 14 | You can watch the status of by running 'kubectl get --namespace {{ .Release.Namespace }} svc -w {{ include "bee.fullname" . }}' 15 | export SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ include "bee.fullname" . }} --template "{{"{{ range (index .status.loadBalancer.ingress 0) }}{{.}}{{ end }}"}}") 16 | echo http://$SERVICE_IP:{{ .Values.service.port }} 17 | {{- else if contains "ClusterIP" .Values.service.type }} 18 | export POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l "app.kubernetes.io/name={{ include "bee.name" . }},app.kubernetes.io/instance={{ .Release.Name }}" -o jsonpath="{.items[0].metadata.name}") 19 | echo "Visit http://127.0.0.1:1633 to use your application" 20 | kubectl --namespace {{ .Release.Namespace }} port-forward $POD_NAME 1633:1633 21 | {{- end }} 22 | -------------------------------------------------------------------------------- /charts/bee/templates/config.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | apiVersion: v1 3 | kind: ConfigMap 4 | metadata: 5 | name: {{ template "bee.fullname" . }} 6 | namespace: {{ .Release.Namespace }} 7 | labels: 8 | {{- include "bee.labels" . | nindent 4 }} 9 | data: 10 | .bee.yaml: |+ 11 | {{- range $k, $v := .Values.beeConfig }} 12 | {{ $k | replace "_" "-" }}: {{ $v }} 13 | {{- end }} 14 | password-file: /home/bee/.secret/password 15 | -------------------------------------------------------------------------------- /charts/bee/templates/secret-db-config.yaml: -------------------------------------------------------------------------------- 1 | {{- $secretName := include "bee.databaseSecretName" . -}} 2 | apiVersion: v1 3 | kind: Secret 4 | metadata: 5 | name: {{ $secretName }} 6 | labels: 7 | {{- include "bee.labels" . | nindent 4 }} 8 | type: Opaque 9 | stringData: 10 | {{ include "bee.databaseSecretKey" . }}: |- 11 | { 12 | "port": {{ .Values.swarmProxy.database.port | quote }}, 13 | "user": {{ .Values.swarmProxy.database.user | quote }}, 14 | "host": {{ .Values.swarmProxy.database.host | quote }}, 15 | "password": {{ .Values.swarmProxy.database.password | quote }}, 16 | "database": {{ .Values.swarmProxy.database.name | quote }} 17 | } 18 | -------------------------------------------------------------------------------- /charts/bee/templates/secret-libp2pkeys.yaml: -------------------------------------------------------------------------------- 1 | {{- if and .Values.libp2pSettings.enabled (not .Values.libp2pSettings.existingSecret) -}} 2 | --- 3 | apiVersion: v1 4 | kind: Secret 5 | metadata: 6 | name: {{ template "bee.fullname" . }}-libp2p 7 | namespace: {{ .Release.Namespace }} 8 | labels: 9 | {{- include "bee.labels" . | nindent 4 }} 10 | type: Opaque 11 | stringData: 12 | libp2pKeys: |- 13 | {{- range $key, $val := .Values.libp2pSettings.libp2pKeys }} 14 | {{ $key }}: {{ $val }} 15 | {{- end }} 16 | 17 | {{- end -}} 18 | -------------------------------------------------------------------------------- /charts/bee/templates/secret-password.yaml: -------------------------------------------------------------------------------- 1 | {{- if not .Values.existingSecret -}} 2 | --- 3 | apiVersion: v1 4 | kind: Secret 5 | metadata: 6 | name: {{ template "bee.fullname" . }}-password 7 | namespace: {{ .Release.Namespace }} 8 | labels: 9 | {{- include "bee.labels" . | nindent 4 }} 10 | type: Opaque 11 | data: 12 | password: {{ include "bee.password" . | b64enc | quote }} 13 | 14 | {{- end -}} 15 | -------------------------------------------------------------------------------- /charts/bee/templates/secret-swarmkeys.yaml: -------------------------------------------------------------------------------- 1 | {{- if and .Values.swarmSettings.enabled (not .Values.swarmSettings.existingSecret) -}} 2 | --- 3 | apiVersion: v1 4 | kind: Secret 5 | metadata: 6 | name: {{ template "bee.fullname" . }}-swarm 7 | namespace: {{ .Release.Namespace }} 8 | labels: 9 | {{- include "bee.labels" . | nindent 4 }} 10 | type: Opaque 11 | stringData: 12 | swarmKeys: |- 13 | {{- range $key, $val := .Values.swarmSettings.swarmKeys }} 14 | {{ $key }}: {{ $val }} 15 | {{- end }} 16 | {{- end -}} 17 | -------------------------------------------------------------------------------- /charts/bee/templates/service-api.yaml: -------------------------------------------------------------------------------- 1 | {{- $root := . -}} 2 | {{- $fullName := include "bee.fullname" $root -}} 3 | {{- $svcPort := $root.Values.service.port -}} 4 | 5 | # MAIN SERVICE 6 | --- 7 | apiVersion: v1 8 | kind: Service 9 | metadata: 10 | name: {{ $fullName }} 11 | namespace: {{ .Release.Namespace }} 12 | labels: 13 | {{- include "bee.labels" $root | nindent 4 }} 14 | spec: 15 | ports: 16 | - name: api 17 | port: {{ $svcPort }} 18 | protocol: TCP 19 | targetPort: api 20 | selector: 21 | {{- include "bee.selectorLabels" $root | nindent 4 }} 22 | type: {{ $root.Values.service.type }} 23 | 24 | # PER POD SERVICE 25 | {{- range $i, $e := until (int $root.Values.replicaCount) }} 26 | --- 27 | apiVersion: v1 28 | kind: Service 29 | metadata: 30 | name: {{ $fullName }}-{{ $i }} 31 | namespace: {{ $root.Release.Namespace }} 32 | labels: 33 | {{- include "bee.labels" $root | nindent 4 }} 34 | pod: {{ $fullName }}-{{ $i }} 35 | app: {{ include "bee.name" $root }} 36 | release: {{ $root.Release.Name }} 37 | endpoint: api 38 | spec: 39 | type: ClusterIP 40 | ports: 41 | - name: api 42 | port: {{ int (include "bee.config.api_port" $root) }} 43 | protocol: TCP 44 | targetPort: api 45 | selector: 46 | {{- include "bee.selectorLabels" $root | nindent 4 }} 47 | statefulset.kubernetes.io/pod-name: {{ $fullName }}-{{ $i }} 48 | {{- end }} 49 | -------------------------------------------------------------------------------- /charts/bee/templates/service-gateway-proxy.yaml: -------------------------------------------------------------------------------- 1 | {{- if .Values.gatewayProxy.enabled -}} 2 | 3 | {{- $root := . -}} 4 | 5 | --- 6 | apiVersion: v1 7 | kind: Service 8 | metadata: 9 | name: gateway-proxy-{{ include "bee.fullname" $root }} 10 | namespace: {{ $root.Release.Namespace }} 11 | labels: 12 | {{- include "bee.labels" $root | nindent 4 }} 13 | pod: {{ include "bee.fullname" $root }} 14 | endpoint: gateway-proxy 15 | app: {{ include "bee.name" $root }} 16 | release: {{ $root.Release.Name }} 17 | spec: 18 | type: ClusterIP 19 | ports: 20 | - name: gateway-proxy 21 | port: 8633 22 | protocol: TCP 23 | targetPort: gateway-proxy 24 | selector: 25 | app.kubernetes.io/instance: {{ include "bee.fullname" $root }} 26 | 27 | {{- range $i, $e := until (int $root.Values.replicaCount) }} 28 | 29 | --- 30 | apiVersion: v1 31 | kind: Service 32 | metadata: 33 | name: gateway-proxy-{{ include "bee.fullname" $root }}-{{ $i }} 34 | namespace: {{ $root.Release.Namespace }} 35 | labels: 36 | {{- include "bee.labels" $root | nindent 4 }} 37 | pod: {{ include "bee.fullname" $root }}-{{ $i }} 38 | endpoint: gateway-proxy 39 | app: {{ include "bee.name" $root }} 40 | release: {{ $root.Release.Name }} 41 | spec: 42 | type: ClusterIP 43 | ports: 44 | - name: gateway-proxy 45 | port: 8633 46 | protocol: TCP 47 | targetPort: gateway-proxy 48 | selector: 49 | statefulset.kubernetes.io/pod-name: {{ include "bee.fullname" $root }}-{{ $i }} 50 | 51 | {{- end }} 52 | {{- end -}} 53 | -------------------------------------------------------------------------------- /charts/bee/templates/service-headless.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | apiVersion: v1 3 | kind: Service 4 | metadata: 5 | name: {{ include "bee.fullname" . }}-headless 6 | namespace: {{ .Release.Namespace }} 7 | labels: 8 | {{- include "bee.labels" . | nindent 4 }} 9 | spec: 10 | clusterIP: None 11 | ports: 12 | - name: api 13 | port: {{ int (include "bee.config.api_port" .) }} 14 | protocol: TCP 15 | targetPort: api 16 | - name: p2p-udp 17 | port: {{ int (include "bee.config.p2p_port" .) }} 18 | protocol: UDP 19 | targetPort: p2p 20 | - name: p2p-tcp 21 | port: {{ int (include "bee.config.p2p_port" .) }} 22 | protocol: TCP 23 | targetPort: p2p 24 | selector: 25 | {{- include "bee.selectorLabels" . | nindent 4 }} 26 | type: {{ .Values.service.type }} 27 | 28 | # PER POD P2P HEADLESS 29 | {{- $root := . -}} 30 | {{- range $i, $e := until (int $root.Values.replicaCount) }} 31 | --- 32 | apiVersion: v1 33 | kind: Service 34 | metadata: 35 | name: {{ include "bee.fullname" $root }}-{{ $i }}-headless 36 | namespace: {{ $root.Release.Namespace }} 37 | labels: 38 | {{- include "bee.labels" $root | nindent 4 }} 39 | pod: {{ include "bee.fullname" $root }}-{{ $i }} 40 | endpoint: p2p 41 | spec: 42 | type: ClusterIP 43 | clusterIP: None 44 | ports: 45 | - name: p2p-tcp 46 | port: {{ int (include "bee.config.p2p_port" $root) }} 47 | protocol: TCP 48 | targetPort: p2p 49 | - name: p2p-udp 50 | port: {{ int (include "bee.config.p2p_port" $root) }} 51 | protocol: UDP 52 | targetPort: p2p 53 | selector: 54 | {{- include "bee.selectorLabels" $root | nindent 4 }} 55 | statefulset.kubernetes.io/pod-name: {{ include "bee.fullname" $root }}-{{ $i }} 56 | 57 | {{- end }} 58 | -------------------------------------------------------------------------------- /charts/bee/templates/service-p2p.yaml: -------------------------------------------------------------------------------- 1 | {{- $root := . -}} 2 | 3 | {{- range $i, $e := until (int $root.Values.replicaCount) }} 4 | 5 | --- 6 | apiVersion: v1 7 | kind: Service 8 | metadata: 9 | name: {{ include "bee.fullname" $root }}-{{ $i }}-p2p 10 | namespace: {{ $root.Release.Namespace }} 11 | labels: 12 | {{- include "bee.labels" $root | nindent 4 }} 13 | pod: {{ include "bee.fullname" $root }}-{{ $i }} 14 | endpoint: p2p 15 | spec: 16 | type: NodePort 17 | externalTrafficPolicy: Local 18 | ports: 19 | - name: p2p-tcp 20 | port: {{ int (include "bee.config.p2p_port" $root) }} 21 | protocol: TCP 22 | targetPort: p2p-tcp 23 | {{- if $root.Values.p2pFixedPort.enabled }} 24 | nodePort: {{ add $root.Values.p2pFixedPort.nodePortStart $i }} 25 | {{- end }} 26 | - name: p2p-udp 27 | port: {{ int (include "bee.config.p2p_port" $root) }} 28 | protocol: UDP 29 | targetPort: p2p-udp 30 | {{- if $root.Values.p2pFixedPort.enabled }} 31 | nodePort: {{ add $root.Values.p2pFixedPort.nodePortStart $i }} 32 | {{- end }} 33 | selector: 34 | {{- include "bee.selectorLabels" $root | nindent 4 }} 35 | statefulset.kubernetes.io/pod-name: {{ include "bee.fullname" $root }}-{{ $i }} 36 | 37 | {{- end }} 38 | -------------------------------------------------------------------------------- /charts/bee/templates/service-swarm-proxy.yaml: -------------------------------------------------------------------------------- 1 | {{- if .Values.swarmProxy.enabled -}} 2 | 3 | {{- $root := . -}} 4 | 5 | --- 6 | apiVersion: v1 7 | kind: Service 8 | metadata: 9 | name: swarm-proxy-{{ include "bee.fullname" $root }} 10 | namespace: {{ $root.Release.Namespace }} 11 | labels: 12 | {{- include "bee.labels" $root | nindent 4 }} 13 | pod: {{ include "bee.fullname" $root }} 14 | endpoint: swarm-proxy 15 | app: {{ include "bee.name" $root }} 16 | release: {{ $root.Release.Name }} 17 | spec: 18 | type: ClusterIP 19 | ports: 20 | - name: swarm-proxy 21 | port: 8633 22 | protocol: TCP 23 | targetPort: swarm-proxy 24 | selector: 25 | app.kubernetes.io/instance: {{ include "bee.fullname" $root }} 26 | 27 | {{- range $i, $e := until (int $root.Values.replicaCount) }} 28 | 29 | --- 30 | apiVersion: v1 31 | kind: Service 32 | metadata: 33 | name: swarm-proxy-{{ include "bee.fullname" $root }}-{{ $i }} 34 | namespace: {{ $root.Release.Namespace }} 35 | labels: 36 | {{- include "bee.labels" $root | nindent 4 }} 37 | pod: {{ include "bee.fullname" $root }}-{{ $i }} 38 | endpoint: swarm-proxy 39 | app: {{ include "bee.name" $root }} 40 | release: {{ $root.Release.Name }} 41 | spec: 42 | type: ClusterIP 43 | ports: 44 | - name: swarm-proxy 45 | port: 8633 46 | protocol: TCP 47 | targetPort: swarm-proxy 48 | selector: 49 | statefulset.kubernetes.io/pod-name: {{ include "bee.fullname" $root }}-{{ $i }} 50 | 51 | {{- end }} 52 | {{- end -}} 53 | -------------------------------------------------------------------------------- /charts/bee/templates/serviceaccount.yaml: -------------------------------------------------------------------------------- 1 | {{- if .Values.serviceAccount.create -}} 2 | 3 | --- 4 | apiVersion: v1 5 | kind: ServiceAccount 6 | metadata: 7 | name: {{ include "bee.serviceAccountName" . }} 8 | namespace: {{ .Release.Namespace }} 9 | labels: 10 | {{ include "bee.labels" . | nindent 4 }} 11 | 12 | {{- end -}} 13 | -------------------------------------------------------------------------------- /charts/bee/templates/servicemonitor.yaml: -------------------------------------------------------------------------------- 1 | {{- if .Values.serviceMonitor.enabled }} 2 | 3 | --- 4 | apiVersion: monitoring.coreos.com/v1 5 | kind: ServiceMonitor 6 | metadata: 7 | name: {{ include "bee.fullname" . }} 8 | {{- if .Values.serviceMonitor.namespace }} 9 | namespace: {{ .Values.serviceMonitor.namespace }} 10 | {{- end }} 11 | labels: 12 | app: {{ include "bee.name" . }} 13 | chart: {{ .Chart.Name }} 14 | release: {{ .Release.Name }} 15 | heritage: {{ .Release.Service }} 16 | {{- if .Values.serviceMonitor.additionalLabels }} 17 | {{ toYaml .Values.serviceMonitor.additionalLabels | indent 4 }} 18 | {{- end }} 19 | spec: 20 | endpoints: 21 | - port: api 22 | path: /metrics 23 | {{- if .Values.serviceMonitor.scrapeInterval }} 24 | interval: {{ .Values.serviceMonitor.scrapeInterval }} 25 | {{- end }} 26 | {{- if .Values.serviceMonitor.honorLabels }} 27 | honorLabels: true 28 | {{- end }} 29 | {{- if .Values.serviceMonitor.relabelings }} 30 | relabelings: 31 | {{ toYaml .Values.serviceMonitor.relabelings | indent 6 }} 32 | {{- end }} 33 | {{- if and .Values.serviceMonitor.enabled .Values.gatewayProxy.enabled }} 34 | - port: gateway-proxy 35 | path: /metrics 36 | {{- if .Values.serviceMonitor.scrapeInterval }} 37 | interval: {{ .Values.serviceMonitor.scrapeInterval }} 38 | {{- end }} 39 | {{- if .Values.serviceMonitor.honorLabels }} 40 | honorLabels: true 41 | {{- end }} 42 | {{- if .Values.serviceMonitor.relabelings }} 43 | relabelings: 44 | {{ toYaml .Values.serviceMonitor.relabelings | indent 6 }} 45 | {{- end }} 46 | {{- end }} 47 | {{- if and .Values.serviceMonitor.enabled .Values.swarmProxy.enabled }} 48 | - port: swarm-proxy 49 | path: /metrics 50 | {{- if .Values.serviceMonitor.scrapeInterval }} 51 | interval: {{ .Values.serviceMonitor.scrapeInterval }} 52 | {{- end }} 53 | {{- if .Values.serviceMonitor.honorLabels }} 54 | honorLabels: true 55 | {{- end }} 56 | {{- if .Values.serviceMonitor.relabelings }} 57 | relabelings: 58 | {{ toYaml .Values.serviceMonitor.relabelings | indent 6 }} 59 | {{- end }} 60 | {{- end }} 61 | 62 | namespaceSelector: 63 | matchNames: 64 | - {{ .Release.Namespace }} 65 | selector: 66 | matchLabels: 67 | app: {{ include "bee.name" . }} 68 | release: {{ .Release.Name }} 69 | fallbackScrapeProtocol: "PrometheusText0.0.4" 70 | 71 | {{- end }} 72 | -------------------------------------------------------------------------------- /charts/bee/templates/tests/test-connection.yaml: -------------------------------------------------------------------------------- 1 | {{- $root := . -}} 2 | 3 | apiVersion: v1 4 | kind: Pod 5 | metadata: 6 | name: "{{ include "bee.fullname" . }}-test-connection" 7 | labels: 8 | {{ include "bee.labels" . | nindent 4 }} 9 | annotations: 10 | "helm.sh/hook": test-success 11 | spec: 12 | containers: 13 | - name: wget 14 | image: busybox 15 | command: ['echo'] 16 | args: ['{{ include "bee.fullname" . }}:{{ int (include "bee.config.api_port" $root) }}/addresses'] 17 | restartPolicy: Never 18 | -------------------------------------------------------------------------------- /charts/beekeeper/.helmignore: -------------------------------------------------------------------------------- 1 | # Patterns to ignore when building packages. 2 | # This supports shell glob matching, relative path matching, and 3 | # negation (prefixed with !). Only one pattern per line. 4 | .DS_Store 5 | # Common VCS dirs 6 | .git/ 7 | .gitignore 8 | .bzr/ 9 | .bzrignore 10 | .hg/ 11 | .hgignore 12 | .svn/ 13 | # Common backup files 14 | *.swp 15 | *.bak 16 | *.tmp 17 | *.orig 18 | *~ 19 | # Various IDEs 20 | .project 21 | .idea/ 22 | *.tmproj 23 | .vscode/ 24 | -------------------------------------------------------------------------------- /charts/beekeeper/Chart.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v2 2 | appVersion: latest 3 | name: beekeeper 4 | version: 0.4.11 5 | description: Ethereum Swarm Beekeeper Helm chart for Kubernetes 6 | home: https://www.ethswarm.org 7 | icon: https://docs.ethswarm.org/img/swarm-logo-2.svg 8 | keywords: 9 | - blockchain 10 | - ethereum 11 | - storage 12 | - swarm 13 | - web3 14 | maintainers: 15 | - name: darkobas2 16 | email: darkobas@ethswarm.org 17 | sources: 18 | - https://github.com/ethersphere/beekeeper 19 | type: application 20 | -------------------------------------------------------------------------------- /charts/beekeeper/README.md: -------------------------------------------------------------------------------- 1 | # Beekeeper Helm Chart 2 | 3 | [Ethereum Swarm Beekeeper](https://github.com/ethersphere/beekeeper) is tool used for testing of [Ethereum Swarm Bee](https://github.com/ethersphere/bee). 4 | 5 | ## Prerequisites 6 | 7 | Make sure you have Helm [installed](https://helm.sh/docs/intro/install/) installed. 8 | 9 | ## Get Repo Info 10 | 11 | ```bash 12 | helm repo add ethersphere https://ethersphere.github.io/helm 13 | helm repo update 14 | ``` 15 | 16 | _See [helm repo](https://helm.sh/docs/helm/helm_repo/) for command documentation._ 17 | 18 | ## QuickStart 19 | 20 | ```bash 21 | $ helm install --generate-name ethersphere/beekeeper 22 | ``` 23 | 24 | ## Introduction 25 | 26 | This chart deploys a [Ethereum Swarm Beekeeper](https://github.com/ethersphere/beekeeper) onto a Kubernetes cluster using the Helm package manager. 27 | 28 | ## Prerequisites 29 | 30 | * Kubernetes 1.15 31 | * Helm 3.0 32 | 33 | ## Installing the Chart 34 | 35 | To install the chart with the release name `my-release`: 36 | 37 | ```bash 38 | $ helm install --name my-release ethersphere/beekeeper 39 | ``` 40 | 41 | The command deploys Bee on the Kubernetes cluster in the default configuration. The [configuration](#configuration) section lists the parameters that can be configured during installation. 42 | 43 | ## Uninstalling the Chart 44 | 45 | To uninstall/delete the `my-release` deployment: 46 | 47 | ```bash 48 | $ helm delete my-release 49 | ``` 50 | 51 | The command removes all the Kubernetes components associated with the chart and deletes the release. 52 | 53 | ## Configuration 54 | 55 | The default configuration values for this chart are listed in **values.yaml**. 56 | 57 | ## Helmsman Usage 58 | 59 | ### Prerequisites 60 | 61 | * Kubernetes 1.15 62 | * Helm 3.0 63 | * Helmsman 3.0 64 | 65 | ### Installing 66 | 67 | Create beekeeper.yaml file as shown bellow: 68 | 69 | ```yaml 70 | namespaces: 71 | beekeeper: 72 | 73 | helmRepos: 74 | ethersphere: "https://ethersphere.github.io/helm" 75 | 76 | apps: 77 | beekeeper: 78 | name: beekeeper 79 | namespace: beekeeper 80 | description: "Ethereum Swarm Beekeeper" 81 | chart: "ethersphere/beekeeper" 82 | version: "0.3.7" 83 | enabled: true 84 | wait: true 85 | timeout: 120 86 | 87 | ``` 88 | 89 | Execute following command: 90 | ```bash 91 | $ helmsman -apply -f beekeeper.yaml 92 | ``` 93 | 94 | ### Uninstalling 95 | 96 | Execute following command: 97 | ```bash 98 | $ helmsman -destroy -f beekeeper.yaml 99 | ``` 100 | -------------------------------------------------------------------------------- /charts/beekeeper/files/beekeeper-local.yaml: -------------------------------------------------------------------------------- 1 | enable-k8s: true 2 | in-cluster: false 3 | geth-url: http://geth-swap.localhost 4 | bzz-token-address: 0x6aab14fe9cccd64a502d23842d916eb5321c26e7 5 | eth-account: 0x62cab2b3b55f341f10348720ca18063cdb779ad5 6 | kubeconfig: "~/.kube/config" 7 | # config-dir: "" 8 | -------------------------------------------------------------------------------- /charts/beekeeper/files/helm-cluster.yaml: -------------------------------------------------------------------------------- 1 | # cluster installed with helm chart 2 | clusters: 3 | helm: 4 | _inherit: "" 5 | name: bee 6 | namespace: beekeeper 7 | disable-namespace: false 8 | api-domain: dai.internal 9 | api-insecure-tls: true 10 | api-scheme: https 11 | debug-api-domain: dai.internal 12 | debug-api-insecure-tls: true 13 | debug-api-scheme: https 14 | node-groups: 15 | bee: 16 | bee-config: default 17 | config: default 18 | count: 5 19 | mode: node 20 | -------------------------------------------------------------------------------- /charts/beekeeper/files/light-node.yaml: -------------------------------------------------------------------------------- 1 | # bee config for light nodes 2 | bee-configs: 3 | light-node: 4 | _inherit: default 5 | full-node: false 6 | 7 | # node groups for light nodes 8 | node-groups: 9 | light-node: 10 | _inherit: default 11 | image: ethersphere/bee:latest 12 | image-pull-policy: Always 13 | persistence-enabled: false 14 | -------------------------------------------------------------------------------- /charts/beekeeper/templates/NOTES.txt: -------------------------------------------------------------------------------- 1 | Beekeeper -------------------------------------------------------------------------------- /charts/beekeeper/templates/_helpers.tpl: -------------------------------------------------------------------------------- 1 | {{/* vim: set filetype=mustache: */}} 2 | {{/* 3 | Expand the name of the chart. 4 | */}} 5 | {{- define "beekeeper.name" -}} 6 | {{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}} 7 | {{- end -}} 8 | 9 | {{/* 10 | Create a default fully qualified app name. 11 | We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). 12 | If release name contains chart name it will be used as a full name. 13 | */}} 14 | {{- define "beekeeper.fullname" -}} 15 | {{- if .Values.fullnameOverride -}} 16 | {{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}} 17 | {{- else -}} 18 | {{- $name := default .Chart.Name .Values.nameOverride -}} 19 | {{- if contains $name .Release.Name -}} 20 | {{- .Release.Name | trunc 63 | trimSuffix "-" -}} 21 | {{- else -}} 22 | {{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}} 23 | {{- end -}} 24 | {{- end -}} 25 | {{- end -}} 26 | 27 | {{/* 28 | Create chart name and version as used by the chart label. 29 | */}} 30 | {{- define "beekeeper.chart" -}} 31 | {{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}} 32 | {{- end -}} 33 | 34 | {{/* 35 | Common labels 36 | */}} 37 | {{- define "beekeeper.labels" -}} 38 | helm.sh/chart: {{ include "beekeeper.chart" . }} 39 | {{ include "beekeeper.selectorLabels" . }} 40 | {{- if .Chart.AppVersion }} 41 | app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} 42 | {{- end }} 43 | app.kubernetes.io/managed-by: {{ .Release.Service }} 44 | {{- end -}} 45 | 46 | {{/* 47 | Selector labels 48 | */}} 49 | {{- define "beekeeper.selectorLabels" -}} 50 | app.kubernetes.io/name: {{ include "beekeeper.name" . }} 51 | app.kubernetes.io/instance: {{ .Release.Name }} 52 | {{- end -}} 53 | 54 | {{/* 55 | Create the name of the service account to use 56 | */}} 57 | {{- define "beekeeper.serviceAccountName" -}} 58 | {{- if .Values.serviceAccount.create -}} 59 | {{ default (include "beekeeper.fullname" .) .Values.serviceAccount.name }} 60 | {{- else -}} 61 | {{ default "default" .Values.serviceAccount.name }} 62 | {{- end -}} 63 | {{- end -}} 64 | -------------------------------------------------------------------------------- /charts/beekeeper/templates/clusterrole.yaml: -------------------------------------------------------------------------------- 1 | {{- if and .Values.serviceAccount.create .Values.serviceAccount.createClusterRole -}} 2 | --- 3 | kind: ClusterRole 4 | apiVersion: rbac.authorization.k8s.io/v1 5 | metadata: 6 | name: {{ include "beekeeper.serviceAccountName" . }} 7 | labels: 8 | {{ include "beekeeper.labels" . | nindent 4 }} 9 | rules: 10 | - apiGroups: [""] 11 | resources: 12 | - services 13 | - events 14 | - namespaces 15 | verbs: ["*"] 16 | - apiGroups: [""] 17 | resources: ["endpoints"] 18 | verbs: ["create", "get", "list", "watch"] 19 | - apiGroups: ["batch"] 20 | resources: ["jobs"] 21 | verbs: ["get", "list", "watch", "create", "update", "delete"] 22 | - apiGroups: [""] 23 | resources: ["secrets"] 24 | verbs: ["get", "list", "watch"] 25 | - apiGroups: [""] 26 | resources: ["persistentvolumeclaims"] 27 | verbs: ["get", "list", "watch"] 28 | - apiGroups: [""] 29 | resources: ["pods"] 30 | verbs: ["get", "list", "watch", "delete"] 31 | - apiGroups: ["apps"] 32 | resources: ["statefulsets"] 33 | verbs: ["*"] 34 | - apiGroups: [""] 35 | resources: ["configmaps"] 36 | verbs: ["get", "list", "watch"] 37 | - apiGroups: [""] 38 | resources: ["nodes"] 39 | verbs: ["get", "list", "watch"] 40 | - apiGroups: [""] 41 | resources: ["persistentvolumes"] 42 | verbs: ["get", "list", "watch"] 43 | - apiGroups: [""] 44 | resources: ["secrets"] 45 | verbs: ["get", "create", "list", "watch"] 46 | - apiGroups: ["networking.k8s.io"] 47 | resources: ["ingresses","ingressroutes"] 48 | verbs: ["get", "list", "watch"] 49 | - apiGroups: ["traefik.containo.us"] 50 | resources: ["ingresses","ingressroutes"] 51 | verbs: ["get", "list", "watch"] 52 | 53 | --- 54 | kind: ClusterRoleBinding 55 | apiVersion: rbac.authorization.k8s.io/v1 56 | metadata: 57 | name: {{ include "beekeeper.serviceAccountName" . }} 58 | labels: 59 | {{ include "beekeeper.labels" . | nindent 4 }} 60 | subjects: 61 | - kind: ServiceAccount 62 | name: {{ include "beekeeper.serviceAccountName" . }} 63 | namespace: {{ .Release.Namespace }} 64 | roleRef: 65 | kind: ClusterRole 66 | name: {{ include "beekeeper.serviceAccountName" . }} 67 | apiGroup: rbac.authorization.k8s.io 68 | {{- end -}} 69 | -------------------------------------------------------------------------------- /charts/beekeeper/templates/config.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | apiVersion: v1 3 | kind: ConfigMap 4 | metadata: 5 | name: {{ template "beekeeper.fullname" . }} 6 | namespace: {{ .Release.Namespace }} 7 | labels: 8 | {{- include "beekeeper.labels" . | nindent 4 }} 9 | data: 10 | {{- $path := printf "%s/**.yaml" .Values.config.dirPath }} 11 | {{- (.Files.Glob $path).AsConfig | nindent 2 }} 12 | -------------------------------------------------------------------------------- /charts/beekeeper/templates/cronjob.yaml: -------------------------------------------------------------------------------- 1 | {{- if not .Values.config.singleRun -}} 2 | --- 3 | {{- if semverCompare ">=1.25-0" .Capabilities.KubeVersion.Version }} 4 | apiVersion: batch/v1 5 | {{- else }} 6 | apiVersion: batch/v1beta1 7 | {{- end }} 8 | kind: CronJob 9 | metadata: 10 | name: {{ include "beekeeper.fullname" . }}-cronjob 11 | labels: 12 | {{- include "beekeeper.labels" . | nindent 4 }} 13 | spec: 14 | schedule: "{{ .Values.config.schedule }}" 15 | successfulJobsHistoryLimit: {{ .Values.config.successfulJobsHistoryLimit }} 16 | failedJobsHistoryLimit: {{ .Values.config.failedJobsHistoryLimit }} 17 | concurrencyPolicy: "{{ .Values.config.concurrencyPolicy }}" 18 | jobTemplate: 19 | metadata: 20 | labels: 21 | {{- include "beekeeper.selectorLabels" . | nindent 8 }} 22 | spec: 23 | parallelism: {{ .Values.config.parallelism }} 24 | template: 25 | {{- with .Values.additionalPodLabels }} 26 | metadata: 27 | labels: 28 | {{- toYaml . | nindent 12 }} 29 | {{- end }} 30 | spec: 31 | {{- with .Values.imagePullSecrets }} 32 | imagePullSecrets: 33 | {{- toYaml . | nindent 8 }} 34 | {{- end }} 35 | serviceAccountName: {{ include "beekeeper.serviceAccountName" . }} 36 | containers: 37 | - name: {{ .Chart.Name }} 38 | image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}" 39 | imagePullPolicy: {{ .Values.image.pullPolicy }} 40 | env: 41 | - name: BEEKEEPER_ENABLE_K8S 42 | value: "true" 43 | - name: BEEKEEPER_IN_CLUSTER 44 | value: "true" 45 | - name: BEEKEEPER_CONFIG_GIT_REPO 46 | value: "{{ .Values.config.CONFIG_GIT_REPO }}" 47 | - name: BEEKEEPER_CONFIG_GIT_DIR 48 | value: "{{ .Values.config.CONFIG_GIT_DIR }}" 49 | - name: BEEKEEPER_CONFIG_GIT_BRANCH 50 | value: "{{ .Values.config.CONFIG_GIT_BRANCH }}" 51 | - name: BEEKEEPER_GETH_URL 52 | value: "{{ .Values.config.GETH_URL }}" 53 | - name: BEEKEEPER_BZZ_TOKEN_ADDRESS 54 | value: "{{ .Values.config.BZZ_TOKEN_ADDRESS }}" 55 | - name: BEEKEEPER_ETH_ACCOUNT 56 | value: "{{ .Values.config.ETH_ACCOUNT }}" 57 | command: 58 | {{- range .Values.config.command }} 59 | - {{ . }} 60 | {{- end }} 61 | resources: 62 | {{- toYaml .Values.resources | nindent 16 }} 63 | volumeMounts: 64 | - name: config 65 | mountPath: /home/beekeeper/.beekeeper 66 | readOnly: true 67 | restartPolicy: Never 68 | {{- with .Values.nodeSelector }} 69 | nodeSelector: 70 | {{- toYaml . | nindent 12 }} 71 | {{- end }} 72 | volumes: 73 | - name: config 74 | configMap: 75 | name: {{ include "beekeeper.fullname" . }} 76 | {{- end -}} 77 | -------------------------------------------------------------------------------- /charts/beekeeper/templates/role.yaml: -------------------------------------------------------------------------------- 1 | {{- if and .Values.serviceAccount.create .Values.serviceAccount.createRole -}} 2 | --- 3 | kind: Role 4 | apiVersion: rbac.authorization.k8s.io/v1 5 | metadata: 6 | namespace: {{ .Release.Namespace }} 7 | name: {{ include "beekeeper.serviceAccountName" . }} 8 | labels: 9 | {{ include "beekeeper.labels" . | nindent 4 }} 10 | rules: 11 | - apiGroups: [""] 12 | resources: 13 | - services 14 | - events 15 | - namespaces 16 | verbs: ["*"] 17 | - apiGroups: [""] 18 | resources: ["endpoints"] 19 | verbs: ["create", "get", "list", "watch", "update"] 20 | - apiGroups: ["batch"] 21 | resources: ["jobs"] 22 | verbs: ["get", "list", "watch", "create", "update", "delete"] 23 | - apiGroups: [""] 24 | resources: ["configmaps"] 25 | verbs: ["get", "list", "watch", "create", "update", "delete"] 26 | - apiGroups: [""] 27 | resources: ["secrets"] 28 | verbs: ["get", "list", "watch", "create", "update", "delete"] 29 | - apiGroups: [""] 30 | resources: ["serviceaccounts"] 31 | verbs: ["get", "list", "watch", "create", "update", "delete"] 32 | - apiGroups: ["networking.k8s.io"] 33 | resources: ["ingresses"] 34 | verbs: ["get", "list", "watch", "create", "update", "delete"] 35 | - apiGroups: [""] 36 | resources: ["persistentvolumeclaims"] 37 | verbs: ["get", "list", "watch", "create", "update", "delete"] 38 | - apiGroups: [""] 39 | resources: ["pods"] 40 | verbs: ["get", "list", "watch", "update", "delete"] 41 | - apiGroups: ["apps"] 42 | resources: ["statefulsets"] 43 | verbs: ["*"] 44 | - apiGroups: ["apps"] 45 | resources: ["statefulsets/scale"] 46 | verbs: ["*"] 47 | --- 48 | kind: RoleBinding 49 | apiVersion: rbac.authorization.k8s.io/v1 50 | metadata: 51 | namespace: {{ .Release.Namespace }} 52 | name: {{ include "beekeeper.serviceAccountName" . }} 53 | labels: 54 | {{ include "beekeeper.labels" . | nindent 4 }} 55 | subjects: 56 | - kind: ServiceAccount 57 | name: {{ include "beekeeper.serviceAccountName" . }} 58 | roleRef: 59 | kind: Role 60 | name: {{ include "beekeeper.serviceAccountName" . }} 61 | apiGroup: rbac.authorization.k8s.io 62 | {{- end -}} -------------------------------------------------------------------------------- /charts/beekeeper/templates/serviceaccount.yaml: -------------------------------------------------------------------------------- 1 | {{- if .Values.serviceAccount.create -}} 2 | --- 3 | apiVersion: v1 4 | kind: ServiceAccount 5 | metadata: 6 | namespace: {{ .Release.Namespace }} 7 | name: {{ include "beekeeper.serviceAccountName" . }} 8 | labels: 9 | {{ include "beekeeper.labels" . | nindent 4 }} 10 | {{- end -}} -------------------------------------------------------------------------------- /charts/beekeeper/templates/tests/test-connection.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | kind: Pod 3 | metadata: 4 | name: "{{ include "beekeeper.fullname" . }}-dummy-test" 5 | labels: 6 | {{ include "beekeeper.labels" . | nindent 4 }} 7 | annotations: 8 | "helm.sh/hook": test-success 9 | spec: 10 | containers: 11 | - name: dummy 12 | image: busybox 13 | command: ['echo'] 14 | args: ['dummy'] 15 | restartPolicy: Never 16 | -------------------------------------------------------------------------------- /charts/beekeeper/values.yaml: -------------------------------------------------------------------------------- 1 | image: 2 | repository: ethersphere/beekeeper 3 | tag: latest 4 | pullPolicy: IfNotPresent 5 | 6 | imagePullSecrets: [] 7 | additionalPodLabels: {} 8 | nameOverride: "" 9 | fullnameOverride: "" 10 | 11 | serviceAccount: 12 | ## Specifies whether a service account should be created 13 | create: false 14 | ## Name of the service account to use 15 | ## if not set and create is true, a name is generated using the fullname template 16 | name: 17 | ## create role or/and cluster role for the service account 18 | createRole: false 19 | createClusterRole: false 20 | 21 | ## Define resource requests and limits to allocate CPU and memory effectively. 22 | ## Example: 23 | # resources: 24 | # limits: 25 | # cpu: "1" # Maximum CPU usage (e.g., 1 core) 26 | # memory: "1Gi" # Maximum memory usage (e.g., 1 GiB) 27 | # requests: 28 | # cpu: "100m" # Minimum guaranteed CPU usage (e.g., 100 millicores) 29 | # memory: "128Mi" # Minimum guaranteed memory usage (e.g., 128 MiB) 30 | resources: {} 31 | 32 | nodeSelector: {} 33 | 34 | config: 35 | command: ["beekeeper", "check"] 36 | parallelism: 1 37 | dirPath: "files" 38 | # environment variables 39 | CONFIG_GIT_REPO: "" 40 | CONFIG_GIT_DIR: "" 41 | CONFIG_GIT_BRANCH: main 42 | GETH_URL: http://geth-swap.geth-swap.staging.internal 43 | BZZ_TOKEN_ADDRESS: "0x6aab14fe9cccd64a502d23842d916eb5321c26e7" 44 | ETH_ACCOUNT: "0x62cab2b3b55f341f10348720ca18063cdb779ad5" 45 | # if singleRun is enabled cron job settings will be omitted 46 | # job 47 | singleRun: false 48 | backoffLimit: 0 49 | # cron job 50 | schedule: "*/1 * * * *" 51 | successfulJobsHistoryLimit: 3 52 | failedJobsHistoryLimit: 3 53 | concurrencyPolicy: Forbid 54 | # if it is enabled it will create init container that will wait 55 | # for cluster to be up and operational 56 | initPing: 57 | enabled: false 58 | clusterName: "" 59 | -------------------------------------------------------------------------------- /charts/beeport-proxy/Chart.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v2 2 | name: beeport-proxy 3 | description: A Helm chart for beeport proxy 4 | version: 0.1.1 5 | appVersion: "1.0.0" 6 | home: https://www.ethswarm.org 7 | icon: https://docs.ethswarm.org/img/swarm-logo-2.svg 8 | keywords: 9 | - blockchain 10 | - swarm 11 | maintainers: 12 | - name: darkobas 13 | email: darkobas@ethswarm.org 14 | sources: 15 | - https://github.com/ethersphere/beeport 16 | -------------------------------------------------------------------------------- /charts/beeport-proxy/templates/deployment.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: apps/v1 2 | kind: Deployment 3 | metadata: 4 | name: {{ .Release.Name }} 5 | labels: 6 | app: beeport-proxy 7 | spec: 8 | replicas: 1 9 | selector: 10 | matchLabels: 11 | app: beeport-proxy 12 | template: 13 | metadata: 14 | labels: 15 | app: beeport-proxy 16 | spec: 17 | containers: 18 | - name: beeport-proxy 19 | image: {{ .Values.image.repository }}:{{ .Values.image.tag }} 20 | ports: 21 | - containerPort: 8080 22 | env: 23 | - name: CORS_ORIGIN 24 | value: {{ .Values.env.corsOrigin }} 25 | - name: PORT 26 | value: {{ .Values.env.port | quote }} 27 | - name: PROXY_TARGET 28 | value: {{ .Values.env.proxyTarget }} 29 | -------------------------------------------------------------------------------- /charts/beeport-proxy/templates/service.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | kind: Service 3 | metadata: 4 | name: {{ .Release.Name }} 5 | spec: 6 | type: ClusterIP 7 | selector: 8 | app: beeport-proxy 9 | ports: 10 | - port: 8080 11 | targetPort: 8080 12 | -------------------------------------------------------------------------------- /charts/beeport-proxy/values.yaml: -------------------------------------------------------------------------------- 1 | image: 2 | repository: ethersphere/beeport-proxy 3 | tag: 0.0.2 4 | 5 | env: 6 | corsOrigin: "app.ethswarm.org" 7 | port: "8080" 8 | proxyTarget: "http://bee-9:1633" 9 | -------------------------------------------------------------------------------- /charts/beeport-ui/Chart.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v2 2 | dependencies: 3 | - name: common 4 | repository: file://charts/common 5 | version: 0.7.0 6 | description: Chart to build and deploy beeport-ui 7 | name: beeport-ui 8 | type: application 9 | version: 0.73.3 10 | home: https://www.ethswarm.org 11 | icon: https://docs.ethswarm.org/img/swarm-logo-2.svg 12 | keywords: 13 | - blockchain 14 | - swarm 15 | maintainers: 16 | - name: darkobas 17 | email: darkobas@ethswarm.org 18 | sources: 19 | - https://github.com/ethersphere/beeport 20 | -------------------------------------------------------------------------------- /charts/beeport-ui/charts/common/.helmignore: -------------------------------------------------------------------------------- 1 | # Patterns to ignore when building packages. 2 | # This supports shell glob matching, relative path matching, and 3 | # negation (prefixed with !). Only one pattern per line. 4 | .DS_Store 5 | # Common VCS dirs 6 | .git/ 7 | .gitignore 8 | .bzr/ 9 | .bzrignore 10 | .hg/ 11 | .hgignore 12 | .svn/ 13 | # Common backup files 14 | *.swp 15 | *.bak 16 | *.tmp 17 | *.orig 18 | *~ 19 | # Various IDEs 20 | .project 21 | .idea/ 22 | *.tmproj 23 | .vscode/ 24 | -------------------------------------------------------------------------------- /charts/beeport-ui/charts/common/Chart.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v2 2 | description: A Helm chart for Kubernetes 3 | name: common 4 | type: library 5 | version: 0.7.0 6 | -------------------------------------------------------------------------------- /charts/beeport-ui/charts/common/templates/_configmap.yaml: -------------------------------------------------------------------------------- 1 | {{- define "common.configmap.tpl" -}} 2 | {{- if .Values.vars }} 3 | --- 4 | apiVersion: v1 5 | kind: ConfigMap 6 | metadata: 7 | name: {{ template "common.robustName" .Release.Name }} 8 | namespace: {{ .Release.Namespace }} 9 | labels: 10 | {{- include "helm-chart.labels" . | nindent 4 }} 11 | data: 12 | {{- range $key, $val := .Values.vars }} 13 | {{ $key }}: {{ $val | quote }} 14 | {{- end }} 15 | {{- end }} 16 | {{- end -}} 17 | -------------------------------------------------------------------------------- /charts/beeport-ui/charts/common/templates/_container.yaml: -------------------------------------------------------------------------------- 1 | {{- define "common.container.tpl" -}} 2 | name: {{ template "robustName" .Release.Name }} 3 | securityContext: 4 | {{- toYaml .Values.securityContext | nindent 2 }} 5 | image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}" 6 | imagePullPolicy: {{ .Values.image.pullPolicy }} 7 | {{- if .Values.command }} 8 | command: 9 | - {{ .Values.shell }} 10 | - -c 11 | - {{ .Values.command | quote }} 12 | {{- end }} 13 | ports: 14 | {{- if not .Values.ports }} 15 | - name: http 16 | containerPort: {{ .Values.containerPort }} 17 | protocol: TCP 18 | {{- else }} 19 | {{- range .Values.ports }} 20 | - name: {{ .name }} 21 | containerPort: {{ .containerPort }} 22 | protocol: TCP 23 | {{- end }} 24 | {{- end }} 25 | {{- if .Values.probe.enabled }} 26 | readinessProbe: 27 | httpGet: 28 | path: {{ .Values.probe.path }} 29 | port: {{ .Values.containerPort }} 30 | scheme: HTTP 31 | {{- with .Values.probe.settings }} 32 | {{- toYaml . | nindent 2 }} 33 | {{- end }} 34 | {{- end }} 35 | {{- if .Values.livenessProbe.enabled }} 36 | livenessProbe: 37 | httpGet: 38 | path: {{ .Values.livenessProbe.path }} 39 | port: {{ .Values.containerPort }} 40 | scheme: HTTP 41 | {{- with .Values.livenessProbe.settings }} 42 | {{- toYaml . | nindent 2 }} 43 | {{- end }} 44 | {{- end }} 45 | {{- if not .Values.resources.ignore }} 46 | resources: 47 | {{- if .Values.resources.ignoreLimits }} 48 | requests: 49 | {{- toYaml .Values.resources.requests | nindent 4 }} 50 | {{- else }} 51 | {{- toYaml .Values.resources | nindent 2 }} 52 | {{- end }} 53 | {{- end }} 54 | {{- end }} -------------------------------------------------------------------------------- /charts/beeport-ui/charts/common/templates/_customFileConfigmap.yaml: -------------------------------------------------------------------------------- 1 | {{- define "common.customFileConfigmap.tpl" -}} 2 | {{- range .Values.volumes }} 3 | {{- if .fileName }} 4 | --- 5 | apiVersion: v1 6 | kind: ConfigMap 7 | metadata: 8 | name: {{ template "common.robustName" (printf "%s-%s" $.Release.Name .name) }} 9 | namespace: {{ $.Release.Namespace }} 10 | data: 11 | {{ .fileName }}: | 12 | {{- .fileContent | nindent 4 }} 13 | 14 | {{- end }} 15 | {{- end }} 16 | {{- end -}} 17 | -------------------------------------------------------------------------------- /charts/beeport-ui/charts/common/templates/_envFromRef.yaml: -------------------------------------------------------------------------------- 1 | {{- define "common.envFromRef.tpl" -}} 2 | {{- if or (or (or (or (or (.Values.vars) (.Values.secretEnabled)) .Values.sealedSecrets) .Values.secretName) .Values.existingConfigMaps) .Values.existingSecrets -}} 3 | envFrom: 4 | {{- if .Values.vars }} 5 | - configMapRef: 6 | name: {{ template "common.robustName" .Release.Name }} 7 | {{- end }} 8 | {{- range .Values.existingSecrets }} 9 | - secretRef: 10 | name: {{ .name }} 11 | optional: {{ .optional | default false }} 12 | {{- end }} 13 | {{- range .Values.existingConfigMaps }} 14 | - configMapRef: 15 | name: {{ .name }} 16 | optional: {{ .optional | default false }} 17 | {{- end }} 18 | {{- if .Values.secretEnabled }} 19 | - secretRef: 20 | name: {{ include "common.robustName" $.Release.Name }} 21 | {{- end }} 22 | {{- if .Values.secretName }} 23 | - secretRef: 24 | name: {{ .Values.secretName }} 25 | {{- end }} 26 | {{- if .Values.sealedSecrets }} 27 | - secretRef: 28 | name: {{ template "common.robustName" .Release.Name }} 29 | {{- end }} 30 | {{- end }} 31 | {{- end }} -------------------------------------------------------------------------------- /charts/beeport-ui/charts/common/templates/_fileSecret.yaml: -------------------------------------------------------------------------------- 1 | {{- define "common.fileSecret.tpl" -}} 2 | {{- range .Values.fileSecrets }} 3 | --- 4 | kind: Secret 5 | apiVersion: v1 6 | type: Opaque 7 | metadata: 8 | name: {{ printf "%s-%s" $.Release.Name .name }} 9 | namespace: {{ $.Release.Namespace }} 10 | data: 11 | {{- range $key, $val := .secrets }} 12 | {{ $key }}: {{ $val | b64enc }} 13 | {{- end }} 14 | {{- end }} 15 | {{- end -}} 16 | -------------------------------------------------------------------------------- /charts/beeport-ui/charts/common/templates/_helpers.tpl: -------------------------------------------------------------------------------- 1 | {{/* vim: set filetype=mustache: */}} 2 | 3 | {{/* 4 | Create robustName that can be used as Kubernetes resource name, and as subdomain as well 5 | \w – Latin letters, digits, underscore '_' . 6 | \W – all but \w . 7 | */}} 8 | {{- define "common.robustName" -}} 9 | {{ regexReplaceAll "\\W+" . "-" | replace "_" "-" | lower | trunc 63 | trimSuffix "-" }} 10 | {{- end }} 11 | -------------------------------------------------------------------------------- /charts/beeport-ui/charts/common/templates/_podSpec.yaml: -------------------------------------------------------------------------------- 1 | {{- define "common.podSpec.tpl" -}} 2 | {{- with .Values.imagePullSecrets }} 3 | imagePullSecrets: 4 | {{- range . }} 5 | - name: {{ . }} 6 | {{- end }} 7 | {{- end }} 8 | securityContext: 9 | {{- toYaml .Values.podSecurityContext | nindent 2 }} 10 | {{- if .Values.serviceAccount }} 11 | serviceAccountName: {{ .Values.serviceAccount }} 12 | {{- end }} 13 | initContainers: 14 | {{- range .Values.initContainers }} 15 | - name: {{ .name }} 16 | image: "{{ .image }}:{{ .tag }}" 17 | imagePullPolicy: {{ .imagePullPolicy | default "IfNotPresent" }} 18 | {{- include "common.envFromRef.tpl" $ | nindent 4 }} 19 | {{- if .command }} 20 | command: 21 | - {{ $.Values.shell }} 22 | - -c 23 | - {{ .command | quote}} 24 | {{- end }} 25 | volumeMounts: 26 | {{- range $.Values.volumes }} 27 | {{- if (or (hasPrefix "shared-" .name) (hasPrefix "init-" .name))}} 28 | - mountPath: {{ .path }} 29 | name: {{ .name }} 30 | {{- end }} 31 | {{- end }} 32 | {{- if .securityContext }} 33 | securityContext: 34 | {{- toYaml .securityContext | nindent 6 }} 35 | {{- end}} 36 | {{- end }} 37 | containers: 38 | {{- $containerTpl := include "common.container.tpl" . | fromYaml }} 39 | {{- $container := mergeOverwrite $containerTpl .Values.container }} 40 | - {{ toYaml $container | nindent 4 }} 41 | {{- include "common.envFromRef.tpl" . | nindent 4 }} 42 | {{- include "common.volumeMountsRef.tpl" . | nindent 4 }} 43 | {{- if .Values.sidecar }} 44 | - name: {{ template "robustName" .Release.Name }}-sidecar 45 | securityContext: 46 | {{- toYaml .Values.securityContext | nindent 6 }} 47 | image: {{ .Values.sidecar.repository }}:{{ .Values.sidecar.tag }} 48 | {{- if .Values.sidecar.command }} 49 | command: 50 | - {{ .Values.sidecar.shell }} 51 | - -c 52 | - {{ .Values.sidecar.command | quote }} 53 | {{- end }} 54 | {{- include "common.envFromRef.tpl" . | nindent 4 }} 55 | {{- include "common.volumeMountsRef.tpl" . | nindent 4 }} 56 | {{- end }} 57 | {{- include "common.volumesRef.tpl" . }} 58 | {{- with .Values.nodeSelector }} 59 | nodeSelector: 60 | {{- toYaml . | nindent 2 }} 61 | {{- end }} 62 | {{- if or .Values.spreadAcrossNodes .Values.affinity }} 63 | affinity: 64 | {{- if .Values.spreadAcrossNodes }} 65 | podAntiAffinity: 66 | requiredDuringSchedulingIgnoredDuringExecution: 67 | - labelSelector: 68 | matchExpressions: 69 | - key: "app.kubernetes.io/instance" 70 | operator: In 71 | values: 72 | - {{ template "robustName" .Release.Name }} 73 | topologyKey: "kubernetes.io/hostname" 74 | {{- end }} 75 | {{- if .Values.affinity }} 76 | {{- toYaml .Values.affinity | nindent 2 }} 77 | {{- end }} 78 | {{- end }} 79 | {{- with .Values.tolerations }} 80 | tolerations: 81 | {{- toYaml . | nindent 2 }} 82 | {{- end }} 83 | {{- end }} -------------------------------------------------------------------------------- /charts/beeport-ui/charts/common/templates/_pvc.yaml: -------------------------------------------------------------------------------- 1 | {{- define "common.pvc.tpl" -}} 2 | {{- range .Values.volumes }} 3 | {{- if not (or .existingClaim .hostPath .fileName .emptyDir .existingConfigMap) }} 4 | {{- $robustName := include "common.robustName" $.Release.Name }} 5 | --- 6 | apiVersion: v1 7 | kind: PersistentVolumeClaim 8 | metadata: 9 | name: {{ printf "%s-%s" $robustName .name }} 10 | namespace: {{ $.Release.Namespace }} 11 | {{- if .pvcAnnotations }} 12 | annotations: 13 | {{- toYaml .pvcAnnotations | nindent 4 }} 14 | {{- end }} 15 | spec: 16 | accessModes: 17 | - {{ .accessMode | default "ReadWriteOnce" }} 18 | {{- if .storageClass }} 19 | storageClassName: {{ .storageClass }} 20 | {{- end }} 21 | resources: 22 | requests: 23 | storage: {{ .size | default "1Gi" }} 24 | {{- end }} 25 | {{- end }} 26 | {{- end -}} -------------------------------------------------------------------------------- /charts/beeport-ui/charts/common/templates/_sealedFileSecret.yaml: -------------------------------------------------------------------------------- 1 | {{- define "common.sealedFileSecret.tpl" -}} 2 | {{- range .Values.sealedFileSecrets }} 3 | {{- $robustName := include "common.robustName" $.Release.Name }} 4 | --- 5 | apiVersion: bitnami.com/v1alpha1 6 | kind: SealedSecret 7 | metadata: 8 | name: {{ printf "%s-%s" $robustName .name }} 9 | namespace: {{ $.Release.Namespace }} 10 | annotations: 11 | sealedsecrets.bitnami.com/cluster-wide: "true" 12 | spec: 13 | encryptedData: 14 | {{- range $f := .filesToMount }} 15 | {{ $f.name }}: |- 16 | {{- $f.source | nindent 6 }} 17 | {{- /* 18 | {{- $.Files.Get $f.sourcePath | nindent 6 }} 19 | */}} 20 | {{- end }} 21 | template: 22 | metadata: 23 | name: {{ printf "%s-%s" $.Release.Name .name }} 24 | namespace: {{ $.Release.Namespace }} 25 | {{- end }} 26 | {{- end -}} 27 | -------------------------------------------------------------------------------- /charts/beeport-ui/charts/common/templates/_sealedSecret.yaml: -------------------------------------------------------------------------------- 1 | {{- define "common.sealedSecret.tpl" -}} 2 | {{- if .Values.sealedSecrets }} 3 | apiVersion: bitnami.com/v1alpha1 4 | kind: SealedSecret 5 | metadata: 6 | name: {{ template "common.robustName" .Release.Name }} 7 | namespace: {{ .Release.Namespace }} 8 | labels: 9 | {{- include "helm-chart.labels" . | nindent 4 }} 10 | annotations: 11 | sealedsecrets.bitnami.com/cluster-wide: "true" 12 | spec: 13 | encryptedData: 14 | {{- range $key, $val := .Values.sealedSecrets }} 15 | {{ $key }}: {{ $val | quote }} 16 | {{- end }} 17 | template: 18 | metadata: 19 | name: {{ template "common.robustName" .Release.Name }} 20 | namespace: {{ .Release.Namespace }} 21 | {{- end }} 22 | {{- end -}} 23 | -------------------------------------------------------------------------------- /charts/beeport-ui/charts/common/templates/_volumeMountsRef.yaml: -------------------------------------------------------------------------------- 1 | {{- define "common.volumeMountsRef.tpl" -}} 2 | {{- if or (or (or (.Values.volumes) (.Values.sealedFileSecrets)) .Values.fileSecrets) .Values.existingFileSecrets -}} 3 | volumeMounts: 4 | {{- range .Values.volumes }} 5 | {{- if not (hasPrefix "init-" .name) }} 6 | - name: {{ .name }} 7 | mountPath: {{ .path }} 8 | {{- if .subPath }} 9 | subPath: {{ .subPath }} 10 | {{- end }} 11 | {{- end }} 12 | {{- end }} 13 | {{- range .Values.sealedFileSecrets }} 14 | - name: {{ .name }} 15 | mountPath: {{ .path }} 16 | {{- if .subPath}} 17 | subPath: {{ .subPath }} 18 | {{- end }} 19 | readOnly: true 20 | {{- end }} 21 | {{- range .Values.fileSecrets }} 22 | - name: {{ .name }} 23 | mountPath: {{ .path }} 24 | {{- if .subPath}} 25 | subPath: {{ .subPath }} 26 | {{- end }} 27 | readOnly: true 28 | {{- end }} 29 | {{- range .Values.existingFileSecrets }} 30 | - name: {{ .name }} 31 | mountPath: {{ .path }} 32 | {{- if .subPath}} 33 | subPath: {{ .subPath }} 34 | {{- end }} 35 | readOnly: true 36 | {{- end }} 37 | {{- end }} 38 | {{- end }} 39 | 40 | -------------------------------------------------------------------------------- /charts/beeport-ui/charts/common/templates/_volumesRef.yaml: -------------------------------------------------------------------------------- 1 | {{- define "common.volumesRef.tpl" }} 2 | {{- if or (or (or (.Values.volumes) (.Values.sealedFileSecrets)) .Values.fileSecrets) .Values.existingFileSecrets }} 3 | volumes: 4 | {{- range .Values.volumes }} 5 | - name: {{ .name }} 6 | {{- if .emptyDir }} 7 | emptyDir: {} 8 | {{- else if .existingConfigMap }} 9 | configMap: 10 | name: {{ .existingConfigMap }} 11 | {{- else if .existingSecret }} 12 | secret: 13 | secretName: {{ .existingSecret }} 14 | {{- else if .fileName }} 15 | configMap: 16 | name: {{ template "common.robustName" (printf "%s-%s" $.Release.Name .name) }} 17 | {{- else if .hostPath }} 18 | hostPath: 19 | path: {{ .hostPath.path }} 20 | {{- if .hostPath.type }} 21 | type: {{ .hostPath.type }} 22 | {{- end }} 23 | {{- else }} 24 | persistentVolumeClaim: 25 | {{- if .existingClaim }} 26 | claimName: {{ .existingClaim }} 27 | {{ else }} 28 | claimName: {{ printf "%s-%s" $.Release.Name .name }} 29 | {{- end }} 30 | {{- end }} 31 | {{- end }} 32 | {{- range .Values.sealedFileSecrets }} 33 | - name: {{ .name }} 34 | secret: 35 | secretName: {{ printf "%s-%s" $.Release.Name .name }} 36 | {{- end }} 37 | {{- range .Values.fileSecrets }} 38 | - name: {{ .name }} 39 | secret: 40 | secretName: {{ printf "%s-%s" $.Release.Name .name }} 41 | {{- end }} 42 | {{- range .Values.existingFileSecrets }} 43 | - name: {{ .name }} 44 | secret: 45 | secretName: {{ .name }} 46 | {{- end }} 47 | {{- end }} 48 | {{- end }} 49 | -------------------------------------------------------------------------------- /charts/beeport-ui/templates/NOTES.txt: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /charts/beeport-ui/templates/_helpers.tpl: -------------------------------------------------------------------------------- 1 | {{/* vim: set filetype=mustache: */}} 2 | {{/* 3 | Expand the name of the chart. 4 | */}} 5 | {{- define "helm-chart.name" -}} 6 | {{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" }} 7 | {{- end }} 8 | 9 | {{/* 10 | Create a default fully qualified app name. 11 | We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). 12 | If release name contains chart name it will be used as a full name. 13 | */}} 14 | {{- define "helm-chart.fullname" -}} 15 | {{- if .Values.fullnameOverride }} 16 | {{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" }} 17 | {{- else }} 18 | {{- $name := default .Chart.Name .Values.nameOverride }} 19 | {{- if contains $name .Release.Name }} 20 | {{- .Release.Name | trunc 63 | trimSuffix "-" }} 21 | {{- else }} 22 | {{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" }} 23 | {{- end }} 24 | {{- end }} 25 | {{- end }} 26 | 27 | {{/* 28 | Create chart name and version as used by the chart label. 29 | */}} 30 | {{- define "helm-chart.chart" -}} 31 | {{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }} 32 | {{- end }} 33 | 34 | {{/* 35 | Common labels 36 | */}} 37 | {{- define "helm-chart.labels" -}} 38 | helm.sh/chart: {{ include "helm-chart.chart" . }} 39 | {{ include "helm-chart.selectorLabels" . }} 40 | {{- if .Chart.AppVersion }} 41 | app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} 42 | {{- end }} 43 | app.kubernetes.io/managed-by: {{ .Release.Service }} 44 | {{- end }} 45 | 46 | {{/* 47 | Selector labels 48 | */}} 49 | {{- define "helm-chart.selectorLabels" -}} 50 | app.kubernetes.io/name: {{ include "helm-chart.name" . }} 51 | app.kubernetes.io/instance: {{ template "robustName" .Release.Name }} 52 | {{- end }} 53 | 54 | {{/* 55 | Create the name of the service account to use 56 | */}} 57 | {{- define "helm-chart.serviceAccountName" -}} 58 | {{- if .Values.serviceAccount.create }} 59 | {{- default (include "helm-chart.fullname" .) .Values.serviceAccount.name }} 60 | {{- else }} 61 | {{- default "default" .Values.serviceAccount.name }} 62 | {{- end }} 63 | {{- end }} 64 | 65 | {{/* 66 | Create robustName that can be used as Kubernetes resource name, and as subdomain as well 67 | \w – Latin letters, digits, underscore '_' . 68 | \W – all but \w . 69 | */}} 70 | {{- define "robustName" -}} 71 | {{ regexReplaceAll "\\W+" . "-" | replace "_" "-" | lower | trunc 63 | trimSuffix "-" }} 72 | {{- end }} 73 | -------------------------------------------------------------------------------- /charts/beeport-ui/templates/ingress.yaml: -------------------------------------------------------------------------------- 1 | {{/* OneChart ingress snippet */}} 2 | {{- define "onechart.ingress" }} 3 | {{- $robustName := include "robustName" .root.Release.Name -}} 4 | {{- $resourceName := $robustName -}} 5 | {{- if .longName }} 6 | {{- $resourceName = printf "%s-%s" $robustName (include "robustName" .ingress.host) -}} 7 | {{- end }} 8 | --- 9 | apiVersion: networking.k8s.io/v1 10 | kind: Ingress 11 | metadata: 12 | name: {{ $resourceName }} 13 | namespace: {{ .root.Release.Namespace }} 14 | labels: 15 | {{- include "helm-chart.labels" .root | nindent 4 }} 16 | {{- if or (or .root.Values.gitSha .ingress.annotations) .root.Values.gitRepository }} 17 | annotations: 18 | {{- if .ingress.annotations }} 19 | {{- toYaml .ingress.annotations | nindent 4 }} 20 | {{- end }} 21 | {{- end }} 22 | spec: 23 | {{- if .ingress.ingressClassName }} 24 | ingressClassName: {{ .ingress.ingressClassName }} 25 | {{- end }} 26 | {{- if default false .ingress.tlsEnabled }} 27 | tls: 28 | - hosts: 29 | - {{ .ingress.host | quote }} 30 | secretName: {{ printf "tls-%s" $resourceName }} 31 | {{- end }} 32 | rules: 33 | - host: {{ .ingress.host | quote }} 34 | http: 35 | paths: 36 | {{- if .ingress.paths }} 37 | {{- range .ingress.paths }} 38 | - path: {{ .path | default "/" | quote }} 39 | pathType: {{ .pathType | default "ImplementationSpecific" | quote }} 40 | backend: 41 | service: 42 | name: {{ .service | default $robustName }} 43 | port: 44 | number: {{ .port | default $.root.Values.service.port }} 45 | {{- end }} 46 | {{- else }} 47 | - path: {{ .ingress.path | default "/" | quote }} 48 | pathType: "ImplementationSpecific" 49 | backend: 50 | service: 51 | name: {{ $robustName }} 52 | port: 53 | number: {{ .root.Values.service.port }} 54 | {{- end }} 55 | {{- end }} 56 | 57 | {{- with .Values.ingress }} 58 | {{- template "onechart.ingress" (dict "root" $ "ingress" .) }} 59 | {{- end }} 60 | 61 | {{- range .Values.ingresses }} 62 | {{- template "onechart.ingress" (dict "root" $ "ingress" . "longName" true) }} 63 | {{- end }} 64 | -------------------------------------------------------------------------------- /charts/beeport-ui/templates/sealedSecret.yaml: -------------------------------------------------------------------------------- 1 | {{- include "common.sealedSecret.tpl" . -}} 2 | -------------------------------------------------------------------------------- /charts/beeport-ui/templates/service.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | apiVersion: v1 3 | kind: Service 4 | metadata: 5 | name: {{ template "robustName" .Release.Name }} 6 | namespace: {{ .Release.Namespace }} 7 | labels: 8 | {{- include "helm-chart.labels" . | nindent 4 }} 9 | {{- if or .Values.gitRepository .Values.gitSha }} 10 | annotations: 11 | {{- if .Values.gitRepository }} 12 | gimlet.io/git-repository: {{ .Values.gitRepository }} 13 | {{- end }} 14 | {{- if .Values.gitSha }} 15 | gimlet.io/git-sha: {{ .Values.gitSha }} 16 | {{- end }} 17 | {{- end }} 18 | spec: 19 | type: {{ .Values.service.type }} 20 | ports: 21 | - port: {{ .Values.service.port }} 22 | targetPort: http 23 | protocol: TCP 24 | name: http 25 | selector: 26 | {{- include "helm-chart.selectorLabels" . | nindent 4 }} 27 | 28 | {{- if .Values.externalService }} 29 | --- 30 | apiVersion: v1 31 | kind: Service 32 | metadata: 33 | name: {{ .Values.externalService.serviceName | default (printf "%s-external" (include "robustName" .Release.Name)) }} 34 | namespace: {{ .Release.Namespace }} 35 | labels: 36 | {{- include "helm-chart.labels" . | nindent 4 }} 37 | spec: 38 | type: ExternalName 39 | externalName: {{ .Values.externalService.name }} 40 | ports: 41 | - port: {{ .Values.externalService.port }} 42 | {{- if .Values.externalService.targetPort }} 43 | targetPort: {{ .Values.externalService.targetPort }} 44 | {{- end }} 45 | protocol: {{ .Values.externalService.protocol | default "TCP" }} 46 | name: "http" 47 | {{- end }} 48 | -------------------------------------------------------------------------------- /charts/beeport-ui/tests/configmap_test.yaml: -------------------------------------------------------------------------------- 1 | suite: test deployment 2 | templates: 3 | - configmap.yaml 4 | tests: 5 | - it: Should put vars in ConfigMap 6 | set: 7 | vars: 8 | var1: value1 9 | var2: value2 10 | asserts: 11 | - equal: 12 | path: data 13 | value: 14 | var1: value1 15 | var2: value2 16 | -------------------------------------------------------------------------------- /charts/beeport-ui/tests/deployment_test.yaml: -------------------------------------------------------------------------------- 1 | suite: test deployment 2 | templates: 3 | - deployment.yaml 4 | tests: 5 | - it: Should set image, tag and command 6 | set: 7 | gitCloneUrl: https:/github.com/mycompany/myrepo.git 8 | buildImage: nginx:x.y.z 9 | asserts: 10 | - equal: 11 | path: spec.template.spec.initContainers[0].image 12 | value: nginx:x.y.z 13 | -------------------------------------------------------------------------------- /charts/beeport-ui/tests/ingress_path_test.yaml: -------------------------------------------------------------------------------- 1 | suite: test ingress 2 | templates: 3 | - ingress.yaml 4 | tests: 5 | - it: Should default 6 | set: 7 | ingress: 8 | host: chart-example.local 9 | asserts: 10 | - equal: 11 | path: spec.rules[0].http.paths[0].path 12 | value: "/" 13 | - it: Should use path 14 | set: 15 | ingress: 16 | host: chart-example.local 17 | path: "/mypath" 18 | asserts: 19 | - equal: 20 | path: spec.rules[0].http.paths[0].path 21 | value: "/mypath" 22 | -------------------------------------------------------------------------------- /charts/beeport-ui/tests/ingress_port_test.yaml: -------------------------------------------------------------------------------- 1 | suite: test deployment 2 | templates: 3 | - ingress.yaml 4 | tests: 5 | - it: Should use service port 6 | set: 7 | ingress: 8 | host: chart-example.local 9 | asserts: 10 | - template: ingress.yaml 11 | documentIndex: 0 12 | equal: 13 | path: spec.rules[0].http.paths[0].backend.service.port.number 14 | value: 80 15 | -------------------------------------------------------------------------------- /charts/beeport-ui/tests/sealed_secret_test.yaml: -------------------------------------------------------------------------------- 1 | suite: test deployment 2 | templates: 3 | - sealedSecret.yaml 4 | tests: 5 | - it: Should put sealed secrets in SealedSecret 6 | set: 7 | sealedSecrets: 8 | var1: value1 9 | var2: value2 10 | asserts: 11 | - equal: 12 | path: spec.encryptedData 13 | value: 14 | var1: value1 15 | var2: value2 16 | -------------------------------------------------------------------------------- /charts/beeport-ui/values.yaml: -------------------------------------------------------------------------------- 1 | # Default values for static-site. 2 | # This is a YAML-formatted file. 3 | # Declare variables to be passed into your templates. 4 | 5 | replicaCount: 1 6 | 7 | image: 8 | repository: nginx 9 | tag: latest 10 | pullPolicy: IfNotPresent 11 | 12 | imagePullSecrets: [] 13 | nameOverride: "" 14 | fullnameOverride: "" 15 | 16 | podAnnotations: {} 17 | 18 | podSecurityContext: {} 19 | # fsGroup: 2000 20 | 21 | securityContext: 22 | # capabilities: 23 | # drop: 24 | # - ALL 25 | # readOnlyRootFilesystem: true 26 | # runAsNonRoot: true 27 | runAsUser: 0 28 | 29 | service: 30 | type: ClusterIP 31 | port: 8080 32 | 33 | ingress: 34 | # className: "" 35 | annotations: {} 36 | # kubernetes.io/ingress.class: nginx 37 | # kubernetes.io/tls-acme: "true" 38 | host: "app.ethswarm.org" 39 | tlsEnabled: false 40 | 41 | resources: 42 | requests: 43 | cpu: 200m 44 | memory: 200Mi 45 | limits: 46 | cpu: 200m 47 | memory: 200Mi 48 | 49 | nodeSelector: {} 50 | 51 | tolerations: [] 52 | 53 | affinity: {} 54 | 55 | # values to build and deploy static sites 56 | gitCloneUrl: https://github.com/ethersphere/beeport.git 57 | buildImage: "node:lts" 58 | builtAssets: out/ 59 | buildScript: | 60 | export DEFAULT_BEE_API_URL="https://app.ethswarm.org" && 61 | export NEXT_PUBLIC_DEFAULT_BEE_API_URL=https://app.ethswarm.org && 62 | npm install && npm run build 63 | -------------------------------------------------------------------------------- /charts/bzz-token-service/.helmignore: -------------------------------------------------------------------------------- 1 | # Patterns to ignore when building packages. 2 | # This supports shell glob matching, relative path matching, and 3 | # negation (prefixed with !). Only one pattern per line. 4 | .DS_Store 5 | # Common VCS dirs 6 | .git/ 7 | .gitignore 8 | .bzr/ 9 | .bzrignore 10 | .hg/ 11 | .hgignore 12 | .svn/ 13 | # Common backup files 14 | *.swp 15 | *.bak 16 | *.tmp 17 | *.orig 18 | *~ 19 | # Various IDEs 20 | .project 21 | .idea/ 22 | *.tmproj 23 | .vscode/ 24 | -------------------------------------------------------------------------------- /charts/bzz-token-service/Chart.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v2 2 | appVersion: latest 3 | name: bzz-token-service 4 | version: 0.1.1 5 | description: BZZ Token Service Helm chart for Kubernetes 6 | home: https://www.ethswarm.org 7 | icon: https://docs.ethswarm.org/img/swarm-logo-2.svg 8 | keywords: 9 | - blockchain 10 | - ethereum 11 | - bzz 12 | maintainers: 13 | - name: vandot 14 | email: vandot@ethswarm.org 15 | sources: 16 | - https://github.com/ethersphere/bzz-token-service 17 | type: application 18 | -------------------------------------------------------------------------------- /charts/bzz-token-service/README.md: -------------------------------------------------------------------------------- 1 | # BZZ Token Service Helm Chart 2 | 3 | [BZZ Token Service](https://github.com/ethersphere/bzz-token-service) is a lightweight Prometheus proxy that will output Ethereum wallet balances from a list of addresses you specify. 4 | 5 | ## Prerequisites 6 | 7 | Make sure you have Helm [installed](https://helm.sh/docs/intro/install/) installed. 8 | 9 | ## Get Repo Info 10 | 11 | ```bash 12 | helm repo add ethersphere https://ethersphere.github.io/helm 13 | helm repo update 14 | ``` 15 | 16 | _See [helm repo](https://helm.sh/docs/helm/helm_repo/) for command documentation._ 17 | 18 | ## QuickStart 19 | 20 | ```bash 21 | $ helm install --generate-name ethersphere/bzz-token-service 22 | ``` 23 | 24 | ## Introduction 25 | 26 | This chart deploys a [BZZ Token Service](https://github.com/ethersphere/bzz-token-service) onto a Kubernetes cluster using the Helm package manager. 27 | 28 | ## Prerequisites 29 | 30 | * Kubernetes 1.15 31 | * Helm 3.0 32 | 33 | ## Installing the Chart 34 | 35 | To install the chart with the release name `my-release`: 36 | 37 | ```bash 38 | $ helm install my-release ethersphere/bzz-token-service 39 | ``` 40 | 41 | The command deploys BZZ Token Service on the Kubernetes cluster in the default configuration. The [configuration](#configuration) section lists the parameters that can be configured during installation. 42 | 43 | ## Uninstalling the Chart 44 | 45 | To uninstall/delete the `my-release` deployment: 46 | 47 | ```bash 48 | $ helm delete my-release 49 | ``` 50 | 51 | The command removes all the Kubernetes components associated with the chart and deletes the release. 52 | 53 | ## Configuration 54 | 55 | The default configuration values for this chart are listed in **values.yaml**. 56 | 57 | ## Helmsman Usage 58 | 59 | ### Prerequisites 60 | 61 | * Kubernetes 1.15 62 | * Helm 3.0 63 | * Helmsman 3.0 64 | 65 | ### Installing 66 | 67 | Create bzz-token-service.yaml file as shown bellow: 68 | 69 | ```yaml 70 | namespaces: 71 | bzz-token-service: 72 | 73 | helmRepos: 74 | ethersphere: "https://ethersphere.github.io/helm" 75 | 76 | apps: 77 | bzz-token-service: 78 | name: bzz-token-service 79 | namespace: bzz-token-service 80 | description: "BZZ Token Service" 81 | chart: "ethersphere/bzz-token-service" 82 | version: "0.1.0" 83 | enabled: true 84 | wait: true 85 | timeout: 120 86 | 87 | ``` 88 | 89 | Execute following command: 90 | ```bash 91 | $ helmsman -apply -f bzz-token-service.yaml 92 | ``` 93 | 94 | ### Uninstalling 95 | 96 | Execute following command: 97 | ```bash 98 | $ helmsman -destroy -f bzz-token-service.yaml 99 | ``` 100 | -------------------------------------------------------------------------------- /charts/bzz-token-service/templates/NOTES.txt: -------------------------------------------------------------------------------- 1 | 1. Get the application URL by running these commands: 2 | {{- if .Values.ingress.enabled }} 3 | {{- range $host := .Values.ingress.hosts }} 4 | {{- range .paths }} 5 | http{{ if $.Values.ingress.tls }}s{{ end }}://{{ $host.host }}{{ . }} 6 | {{- end }} 7 | {{- end }} 8 | {{- else if contains "NodePort" .Values.service.type }} 9 | export NODE_PORT=$(kubectl get --namespace {{ .Release.Namespace }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ include "bzz-token-service.fullname" . }}) 10 | export NODE_IP=$(kubectl get nodes --namespace {{ .Release.Namespace }} -o jsonpath="{.items[0].status.addresses[0].address}") 11 | echo http://$NODE_IP:$NODE_PORT 12 | {{- else if contains "LoadBalancer" .Values.service.type }} 13 | NOTE: It may take a few minutes for the LoadBalancer IP to be available. 14 | You can watch the status of by running 'kubectl get --namespace {{ .Release.Namespace }} svc -w {{ include "bzz-token-service.fullname" . }}' 15 | export SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ include "bzz-token-service.fullname" . }} --template "{{"{{ range (index .status.loadBalancer.ingress 0) }}{{.}}{{ end }}"}}") 16 | echo http://$SERVICE_IP:{{ .Values.service.port }} 17 | {{- else if contains "ClusterIP" .Values.service.type }} 18 | export POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l "app.kubernetes.io/name={{ include "bzz-token-service.name" . }},app.kubernetes.io/instance={{ .Release.Name }}" -o jsonpath="{.items[0].metadata.name}") 19 | echo "Visit http://127.0.0.1:8080 to use your application" 20 | kubectl --namespace {{ .Release.Namespace }} port-forward $POD_NAME 8080:{{ .Values.config.PROXY_API_PORT }} 21 | {{- end }} 22 | -------------------------------------------------------------------------------- /charts/bzz-token-service/templates/_helpers.tpl: -------------------------------------------------------------------------------- 1 | {{/* vim: set filetype=mustache: */}} 2 | {{/* 3 | Expand the name of the chart. 4 | */}} 5 | {{- define "bzz-token-service.name" -}} 6 | {{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" }} 7 | {{- end }} 8 | 9 | {{/* 10 | Create a default fully qualified app name. 11 | We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). 12 | If release name contains chart name it will be used as a full name. 13 | */}} 14 | {{- define "bzz-token-service.fullname" -}} 15 | {{- if .Values.fullnameOverride }} 16 | {{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" }} 17 | {{- else }} 18 | {{- $name := default .Chart.Name .Values.nameOverride }} 19 | {{- if contains $name .Release.Name }} 20 | {{- .Release.Name | trunc 63 | trimSuffix "-" }} 21 | {{- else }} 22 | {{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" }} 23 | {{- end }} 24 | {{- end }} 25 | {{- end }} 26 | 27 | {{/* 28 | Create chart name and version as used by the chart label. 29 | */}} 30 | {{- define "bzz-token-service.chart" -}} 31 | {{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }} 32 | {{- end }} 33 | 34 | {{/* 35 | Common labels 36 | */}} 37 | {{- define "bzz-token-service.labels" -}} 38 | helm.sh/chart: {{ include "bzz-token-service.chart" . }} 39 | {{ include "bzz-token-service.selectorLabels" . }} 40 | {{- if .Chart.AppVersion }} 41 | app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} 42 | {{- end }} 43 | app.kubernetes.io/managed-by: {{ .Release.Service }} 44 | {{- end }} 45 | 46 | {{/* 47 | Selector labels 48 | */}} 49 | {{- define "bzz-token-service.selectorLabels" -}} 50 | app.kubernetes.io/name: {{ include "bzz-token-service.name" . }} 51 | app.kubernetes.io/instance: {{ .Release.Name }} 52 | {{- end }} 53 | 54 | {{/* 55 | Create the name of the service account to use 56 | */}} 57 | {{- define "bzz-token-service.serviceAccountName" -}} 58 | {{- if .Values.serviceAccount.create }} 59 | {{- default (include "bzz-token-service.fullname" .) .Values.serviceAccount.name }} 60 | {{- else }} 61 | {{- default "default" .Values.serviceAccount.name }} 62 | {{- end }} 63 | {{- end }} 64 | -------------------------------------------------------------------------------- /charts/bzz-token-service/templates/config.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | kind: ConfigMap 3 | metadata: 4 | name: {{ include "bzz-token-service.fullname" . }} 5 | labels: 6 | {{- include "bzz-token-service.labels" . | nindent 4 }} 7 | data: 8 | TOKEN_SERVICE_PORT: {{ .Values.config.TOKEN_SERVICE_PORT | quote }} 9 | TOKEN_CONTRACT_ADDRESS: {{ .Values.config.TOKEN_CONTRACT_ADDRESS | quote }} 10 | INFURA_MAINNET_KEY: {{ .Values.config.INFURA_MAINNET_KEY | quote }} 11 | -------------------------------------------------------------------------------- /charts/bzz-token-service/templates/deployment.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: apps/v1 2 | kind: Deployment 3 | metadata: 4 | name: {{ include "bzz-token-service.fullname" . }} 5 | labels: 6 | {{- include "bzz-token-service.labels" . | nindent 4 }} 7 | spec: 8 | {{- if not .Values.autoscaling.enabled }} 9 | replicas: {{ .Values.replicaCount }} 10 | {{- end }} 11 | strategy: 12 | {{- toYaml .Values.strategy | nindent 4 }} 13 | selector: 14 | matchLabels: 15 | {{- include "bzz-token-service.selectorLabels" . | nindent 6 }} 16 | template: 17 | metadata: 18 | {{- with .Values.podAnnotations }} 19 | annotations: 20 | {{- toYaml . | nindent 8 }} 21 | {{- end }} 22 | labels: 23 | {{- include "bzz-token-service.selectorLabels" . | nindent 8 }} 24 | spec: 25 | {{- with .Values.imagePullSecrets }} 26 | imagePullSecrets: 27 | {{- toYaml . | nindent 8 }} 28 | {{- end }} 29 | serviceAccountName: {{ include "bzz-token-service.serviceAccountName" . }} 30 | securityContext: 31 | {{- toYaml .Values.podSecurityContext | nindent 8 }} 32 | containers: 33 | - name: {{ .Chart.Name }} 34 | securityContext: 35 | {{- toYaml .Values.securityContext | nindent 12 }} 36 | image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}" 37 | imagePullPolicy: {{ .Values.image.pullPolicy }} 38 | envFrom: 39 | - configMapRef: 40 | name: {{ include "bzz-token-service.fullname" . }} 41 | ports: 42 | - name: api 43 | containerPort: {{ .Values.config.TOKEN_SERVICE_PORT }} 44 | protocol: TCP 45 | livenessProbe: 46 | httpGet: 47 | path: /health 48 | port: api 49 | readinessProbe: 50 | httpGet: 51 | path: /readiness 52 | port: api 53 | resources: 54 | {{- toYaml .Values.resources | nindent 12 }} 55 | {{- with .Values.nodeSelector }} 56 | nodeSelector: 57 | {{- toYaml . | nindent 8 }} 58 | {{- end }} 59 | {{- with .Values.affinity }} 60 | affinity: 61 | {{- toYaml . | nindent 8 }} 62 | {{- end }} 63 | {{- with .Values.tolerations }} 64 | tolerations: 65 | {{- toYaml . | nindent 8 }} 66 | {{- end }} 67 | -------------------------------------------------------------------------------- /charts/bzz-token-service/templates/hpa.yaml: -------------------------------------------------------------------------------- 1 | {{- if .Values.autoscaling.enabled }} 2 | apiVersion: autoscaling/v2beta1 3 | kind: HorizontalPodAutoscaler 4 | metadata: 5 | name: {{ include "bzz-token-service.fullname" . }} 6 | labels: 7 | {{- include "bzz-token-service.labels" . | nindent 4 }} 8 | spec: 9 | scaleTargetRef: 10 | apiVersion: apps/v1 11 | kind: Deployment 12 | name: {{ include "bzz-token-service.fullname" . }} 13 | minReplicas: {{ .Values.autoscaling.minReplicas }} 14 | maxReplicas: {{ .Values.autoscaling.maxReplicas }} 15 | metrics: 16 | {{- if .Values.autoscaling.targetCPUUtilizationPercentage }} 17 | - type: Resource 18 | resource: 19 | name: cpu 20 | targetAverageUtilization: {{ .Values.autoscaling.targetCPUUtilizationPercentage }} 21 | {{- end }} 22 | {{- if .Values.autoscaling.targetMemoryUtilizationPercentage }} 23 | - type: Resource 24 | resource: 25 | name: memory 26 | targetAverageUtilization: {{ .Values.autoscaling.targetMemoryUtilizationPercentage }} 27 | {{- end }} 28 | {{- end }} 29 | -------------------------------------------------------------------------------- /charts/bzz-token-service/templates/ingress.yaml: -------------------------------------------------------------------------------- 1 | {{- if .Values.ingress.enabled -}} 2 | {{- $fullName := include "bzz-token-service.fullname" . -}} 3 | {{- $svcPort := .Values.service.port -}} 4 | {{- if semverCompare ">=1.19-0" .Capabilities.KubeVersion.Version -}} 5 | apiVersion: networking.k8s.io/v1 6 | {{- else -}} 7 | apiVersion: extensions/v1beta1 8 | {{- end }} 9 | kind: Ingress 10 | metadata: 11 | name: {{ $fullName }} 12 | labels: 13 | {{- include "bzz-token-service.labels" . | nindent 4 }} 14 | {{- with .Values.ingress.annotations }} 15 | annotations: 16 | {{- toYaml . | nindent 4 }} 17 | {{- end }} 18 | spec: 19 | ingressClassName: {{ .Values.ingress.class }} 20 | {{- if .Values.ingress.tls }} 21 | tls: 22 | {{- range .Values.ingress.tls }} 23 | - hosts: 24 | {{- range .hosts }} 25 | - {{ . | quote }} 26 | {{- end }} 27 | secretName: {{ .secretName }} 28 | {{- end }} 29 | {{- end }} 30 | rules: 31 | {{- range .Values.ingress.hosts }} 32 | - host: {{ .host | quote }} 33 | http: 34 | paths: 35 | {{- range .paths }} 36 | - path: {{ . }} 37 | pathType: ImplementationSpecific 38 | backend: 39 | service: 40 | name: {{ $fullName }} 41 | port: 42 | number: {{ $svcPort }} 43 | {{- end }} 44 | {{- end }} 45 | {{- end }} 46 | -------------------------------------------------------------------------------- /charts/bzz-token-service/templates/service.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | kind: Service 3 | metadata: 4 | name: {{ include "bzz-token-service.fullname" . }} 5 | labels: 6 | {{- include "bzz-token-service.labels" . | nindent 4 }} 7 | spec: 8 | type: {{ .Values.service.type }} 9 | ports: 10 | - port: {{ .Values.service.port }} 11 | targetPort: api 12 | protocol: TCP 13 | name: api 14 | selector: 15 | {{- include "bzz-token-service.selectorLabels" . | nindent 4 }} 16 | -------------------------------------------------------------------------------- /charts/bzz-token-service/templates/serviceaccount.yaml: -------------------------------------------------------------------------------- 1 | {{- if .Values.serviceAccount.create -}} 2 | apiVersion: v1 3 | kind: ServiceAccount 4 | metadata: 5 | name: {{ include "bzz-token-service.serviceAccountName" . }} 6 | labels: 7 | {{- include "bzz-token-service.labels" . | nindent 4 }} 8 | {{- with .Values.serviceAccount.annotations }} 9 | annotations: 10 | {{- toYaml . | nindent 4 }} 11 | {{- end }} 12 | {{- end }} 13 | -------------------------------------------------------------------------------- /charts/bzz-token-service/values.yaml: -------------------------------------------------------------------------------- 1 | # Default values for bzz-token-service. 2 | # This is a YAML-formatted file. 3 | # Declare variables to be passed into your templates. 4 | 5 | replicaCount: 1 6 | 7 | image: 8 | repository: ethersphere/bzz-token-service 9 | pullPolicy: IfNotPresent 10 | # Overrides the image tag whose default is the chart version. 11 | tag: latest 12 | 13 | imagePullSecrets: [] 14 | nameOverride: "" 15 | fullnameOverride: "" 16 | 17 | serviceAccount: 18 | # Specifies whether a service account should be created 19 | create: true 20 | # Annotations to add to the service account 21 | annotations: {} 22 | # The name of the service account to use. 23 | # If not set and create is true, a name is generated using the fullname template 24 | name: "" 25 | 26 | podAnnotations: {} 27 | 28 | podSecurityContext: {} 29 | # fsGroup: 2000 30 | 31 | securityContext: {} 32 | # capabilities: 33 | # drop: 34 | # - ALL 35 | # readOnlyRootFilesystem: true 36 | # runAsNonRoot: true 37 | # runAsUser: 1000 38 | 39 | service: 40 | type: ClusterIP 41 | port: 8765 42 | 43 | ingress: 44 | enabled: false 45 | annotations: {} 46 | # kubernetes.io/ingress.class: nginx 47 | # kubernetes.io/tls-acme: "true" 48 | class: "" 49 | hosts: 50 | - host: chart-example.local 51 | paths: [] 52 | tls: [] 53 | # - secretName: chart-example-tls 54 | # hosts: 55 | # - chart-example.local 56 | 57 | resources: {} 58 | # If you do want to specify resources, uncomment the following lines, 59 | # adjust them as necessary, and remove the curly braces after 'resources:'. 60 | # limits: 61 | # cpu: 300m 62 | # ephemeral-storage: 2Gi 63 | # memory: 512Mi 64 | # requests: 65 | # cpu: 300m 66 | # ephemeral-storage: 512Mi 67 | # memory: 512Mi 68 | 69 | autoscaling: 70 | enabled: false 71 | minReplicas: 1 72 | maxReplicas: 100 73 | targetCPUUtilizationPercentage: 80 74 | # targetMemoryUtilizationPercentage: 80 75 | 76 | nodeSelector: {} 77 | 78 | tolerations: [] 79 | 80 | affinity: {} 81 | 82 | strategy: 83 | type: Recreate 84 | 85 | # environment variables 86 | config: 87 | TOKEN_SERVICE_PORT: "8765" 88 | TOKEN_CONTRACT_ADDRESS: "0x19062190b1925b5b6689d7073fdfc8c2976ef8cb" 89 | INFURA_MAINNET_KEY: "" 90 | -------------------------------------------------------------------------------- /charts/eks-local-disk-provisioner/.helmignore: -------------------------------------------------------------------------------- 1 | # Patterns to ignore when building packages. 2 | # This supports shell glob matching, relative path matching, and 3 | # negation (prefixed with !). Only one pattern per line. 4 | .DS_Store 5 | # Common VCS dirs 6 | .git/ 7 | .gitignore 8 | .bzr/ 9 | .bzrignore 10 | .hg/ 11 | .hgignore 12 | .svn/ 13 | # Common backup files 14 | *.swp 15 | *.bak 16 | *.tmp 17 | *.orig 18 | *~ 19 | # Various IDEs 20 | .project 21 | .idea/ 22 | *.tmproj 23 | .vscode/ 24 | -------------------------------------------------------------------------------- /charts/eks-local-disk-provisioner/Chart.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v2 2 | appVersion: 0.1.0 3 | name: eks-local-disk-provisioner 4 | version: 0.1.4 5 | description: AWS eks-local-disk-provisioner Helm chart for Kubernetes 6 | home: https://www.ethswarm.org 7 | icon: https://docs.ethswarm.org/img/swarm-logo-2.svg 8 | keywords: 9 | - aws 10 | - kubernetes 11 | - eks 12 | - local disk provisioner 13 | - local persistent volume 14 | - sig-storage-local-static-provisioner 15 | maintainers: 16 | - name: svetomir 17 | email: svetomir@ethereum.org 18 | sources: 19 | - https://github.com/ethersphere/eks-local-disk-provisioner 20 | type: application 21 | -------------------------------------------------------------------------------- /charts/eks-local-disk-provisioner/templates/NOTES.txt: -------------------------------------------------------------------------------- 1 | eks-local-disk-provisioner installed 2 | -------------------------------------------------------------------------------- /charts/eks-local-disk-provisioner/templates/_helpers.tpl: -------------------------------------------------------------------------------- 1 | {{/* vim: set filetype=mustache: */}} 2 | {{/* 3 | Expand the name of the chart. 4 | */}} 5 | {{- define "eks-local-disk-provisioner.name" -}} 6 | {{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}} 7 | {{- end -}} 8 | 9 | {{/* 10 | Create a default fully qualified app name. 11 | We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). 12 | If release name contains chart name it will be used as a full name. 13 | */}} 14 | {{- define "eks-local-disk-provisioner.fullname" -}} 15 | {{- if .Values.fullnameOverride -}} 16 | {{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}} 17 | {{- else -}} 18 | {{- $name := default .Chart.Name .Values.nameOverride -}} 19 | {{- if contains $name .Release.Name -}} 20 | {{- .Release.Name | trunc 63 | trimSuffix "-" -}} 21 | {{- else -}} 22 | {{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}} 23 | {{- end -}} 24 | {{- end -}} 25 | {{- end -}} 26 | 27 | {{/* 28 | Create chart name and version as used by the chart label. 29 | */}} 30 | {{- define "eks-local-disk-provisioner.chart" -}} 31 | {{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}} 32 | {{- end -}} 33 | 34 | {{/* 35 | Common labels 36 | */}} 37 | {{- define "eks-local-disk-provisioner.labels" -}} 38 | helm.sh/chart: {{ include "eks-local-disk-provisioner.chart" . }} 39 | {{ include "eks-local-disk-provisioner.selectorLabels" . }} 40 | {{- if .Chart.AppVersion }} 41 | app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} 42 | {{- end }} 43 | app.kubernetes.io/managed-by: {{ .Release.Service }} 44 | {{- end -}} 45 | 46 | {{/* 47 | Selector labels 48 | */}} 49 | {{- define "eks-local-disk-provisioner.selectorLabels" -}} 50 | app.kubernetes.io/name: {{ include "eks-local-disk-provisioner.name" . }} 51 | app.kubernetes.io/instance: {{ .Release.Name }} 52 | {{- end -}} 53 | 54 | {{/* 55 | Create the name of the service account to use 56 | */}} 57 | {{- define "eks-local-disk-provisioner.serviceAccountName" -}} 58 | {{- if .Values.serviceAccount.create -}} 59 | {{ default (include "eks-local-disk-provisioner.fullname" .) .Values.serviceAccount.name }} 60 | {{- else -}} 61 | {{ default "default" .Values.serviceAccount.name }} 62 | {{- end -}} 63 | {{- end -}} 64 | -------------------------------------------------------------------------------- /charts/eks-local-disk-provisioner/templates/daemonset.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: apps/v1 2 | kind: DaemonSet 3 | metadata: 4 | name: {{ include "eks-local-disk-provisioner.fullname" . }} 5 | labels: 6 | {{- include "eks-local-disk-provisioner.labels" . | nindent 4 }} 7 | namespace: {{ .Values.namespace }} 8 | spec: 9 | selector: 10 | matchLabels: 11 | {{- include "eks-local-disk-provisioner.selectorLabels" . | nindent 6 }} 12 | template: 13 | metadata: 14 | labels: 15 | {{- include "eks-local-disk-provisioner.selectorLabels" . | nindent 8 }} 16 | {{- if .Values.podAnnotations }} 17 | annotations: 18 | {{ toYaml .Values.podAnnotations | indent 8 }} 19 | {{- end }} 20 | spec: 21 | {{- with .Values.imagePullSecrets }} 22 | imagePullSecrets: 23 | {{- toYaml . | nindent 8 }} 24 | {{- end }} 25 | automountServiceAccountToken: {{ .Values.automountServiceAccountToken }} 26 | priorityClassName: {{ .Values.priorityClassName }} 27 | serviceAccountName: {{ include "eks-local-disk-provisioner.serviceAccountName" . }} 28 | {{- with .Values.affinity }} 29 | affinity: 30 | {{- toYaml . | nindent 8 }} 31 | {{- end }} 32 | {{- with .Values.nodeSelector }} 33 | nodeSelector: 34 | {{- toYaml . | nindent 8 }} 35 | {{- end }} 36 | {{- with .Values.tolerations }} 37 | tolerations: 38 | {{- toYaml . | nindent 8 }} 39 | {{- end }} 40 | containers: 41 | - name: {{ .Chart.Name }} 42 | image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}" 43 | imagePullPolicy: {{ .Values.image.pullPolicy }} 44 | env: 45 | - name: PARTED_SCRIPT 46 | value: "{{ .Values.provisionerConfig.parted_script }}" 47 | resources: 48 | {{- toYaml .Values.resources | nindent 12 }} 49 | securityContext: 50 | {{- toYaml .Values.securityContext | nindent 12 }} 51 | terminationMessagePath: {{ .Values.terminationMessagePath }} 52 | volumeMounts: 53 | - name: host-dev 54 | mountPath: /dev 55 | mountPropagation: "Bidirectional" 56 | - name: host-disks 57 | mountPath: /mnt/disks 58 | mountPropagation: "Bidirectional" 59 | - name: host-etc-fstab 60 | mountPath: /etc/fstab 61 | subPath: fstab 62 | mountPropagation: "Bidirectional" 63 | volumes: 64 | - name: host-dev 65 | hostPath: 66 | path: /dev 67 | - name: host-disks 68 | hostPath: 69 | path: /mnt/disks 70 | - name: host-etc-fstab 71 | hostPath: 72 | path: /etc 73 | -------------------------------------------------------------------------------- /charts/eks-local-disk-provisioner/templates/serviceaccount.yaml: -------------------------------------------------------------------------------- 1 | {{- if .Values.serviceAccount.create -}} 2 | apiVersion: v1 3 | kind: ServiceAccount 4 | metadata: 5 | name: {{ include "eks-local-disk-provisioner.serviceAccountName" . }} 6 | labels: 7 | {{- include "eks-local-disk-provisioner.labels" . | nindent 4 }} 8 | {{- end -}} 9 | -------------------------------------------------------------------------------- /charts/eks-local-disk-provisioner/values.yaml: -------------------------------------------------------------------------------- 1 | # Default values for eks-local-disk-provisioner. 2 | # This is a YAML-formatted file. 3 | # Declare variables to be passed into your templates. 4 | 5 | image: 6 | repository: ethersphere/eks-local-disk-provisioner 7 | tag: latest 8 | pullPolicy: IfNotPresent 9 | 10 | imagePullSecrets: [] 11 | nameOverride: "" 12 | fullnameOverride: "" 13 | 14 | namespace: kube-system 15 | 16 | serviceAccount: 17 | # Specifies whether a service account should be created 18 | create: false 19 | # The name of the service account to use. 20 | # If not set and create is true, a name is generated using the fullname template 21 | name: 22 | 23 | automountServiceAccountToken: false 24 | priorityClassName: system-node-critical 25 | 26 | securityContext: 27 | privileged: true 28 | 29 | resources: {} 30 | # If you do want to specify resources, uncomment the following lines, 31 | # adjust them as necessary, and remove the curly braces after 'resources:'. 32 | # limits: 33 | # cpu: 100m 34 | # memory: 128Mi 35 | # requests: 36 | # cpu: 100m 37 | # memory: 128Mi 38 | 39 | podAnnotations: {} 40 | 41 | nodeSelector: {} 42 | 43 | affinity: {} 44 | 45 | tolerations: [] 46 | 47 | provisionerConfig: 48 | # Parted script for disk partitioning. For more info, see: https://www.gnu.org/software/parted/ 49 | # Variable will be passed to the command 'parted --script ' for every NVME SSD disk. 50 | # Example: "mklabel gpt mkpart logical 0% 50% mkpart logical 50% 100%" 51 | parted_script: "" 52 | 53 | terminationMessagePath: "/dev/termination-log" 54 | -------------------------------------------------------------------------------- /charts/etherproxy/.helmignore: -------------------------------------------------------------------------------- 1 | # Patterns to ignore when building packages. 2 | # This supports shell glob matching, relative path matching, and 3 | # negation (prefixed with !). Only one pattern per line. 4 | .DS_Store 5 | # Common VCS dirs 6 | .git/ 7 | .gitignore 8 | .bzr/ 9 | .bzrignore 10 | .hg/ 11 | .hgignore 12 | .svn/ 13 | # Common backup files 14 | *.swp 15 | *.bak 16 | *.tmp 17 | *.orig 18 | *~ 19 | # Various IDEs 20 | .project 21 | .idea/ 22 | *.tmproj 23 | .vscode/ 24 | -------------------------------------------------------------------------------- /charts/etherproxy/Chart.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v2 2 | appVersion: latest 3 | name: etherproxy 4 | version: 0.1.0 5 | description: EtherProxy Helm chart for Kubernetes 6 | home: https://www.ethswarm.org 7 | icon: https://docs.ethswarm.org/img/swarm-logo-2.svg 8 | keywords: 9 | - blockchain 10 | - ethereum 11 | - proxy 12 | maintainers: 13 | - name: vandot 14 | email: vandot@ethswarm.org 15 | sources: 16 | - https://github.com/ethersphere/etherproxy 17 | type: application 18 | -------------------------------------------------------------------------------- /charts/etherproxy/README.md: -------------------------------------------------------------------------------- 1 | # EtherProxy Helm Chart 2 | 3 | [EtherProxy](https://github.com/ethersphere/etherproxy) is a lightweight Prometheus proxy that will output Ethereum wallet balances from a list of addresses you specify. 4 | 5 | ## Prerequisites 6 | 7 | Make sure you have Helm [installed](https://helm.sh/docs/intro/install/) installed. 8 | 9 | ## Get Repo Info 10 | 11 | ```bash 12 | helm repo add ethersphere https://ethersphere.github.io/helm 13 | helm repo update 14 | ``` 15 | 16 | _See [helm repo](https://helm.sh/docs/helm/helm_repo/) for command documentation._ 17 | 18 | ## QuickStart 19 | 20 | ```bash 21 | $ helm install --generate-name ethersphere/etherproxy 22 | ``` 23 | 24 | ## Introduction 25 | 26 | This chart deploys a [EtherProxy](https://github.com/ethersphere/etherproxy) onto a Kubernetes cluster using the Helm package manager. 27 | 28 | ## Prerequisites 29 | 30 | * Kubernetes 1.15 31 | * Helm 3.0 32 | 33 | ## Installing the Chart 34 | 35 | To install the chart with the release name `my-release`: 36 | 37 | ```bash 38 | $ helm install my-release ethersphere/etherproxy 39 | ``` 40 | 41 | The command deploys EtherProxy on the Kubernetes cluster in the default configuration. The [configuration](#configuration) section lists the parameters that can be configured during installation. 42 | 43 | ## Uninstalling the Chart 44 | 45 | To uninstall/delete the `my-release` deployment: 46 | 47 | ```bash 48 | $ helm delete my-release 49 | ``` 50 | 51 | The command removes all the Kubernetes components associated with the chart and deletes the release. 52 | 53 | ## Configuration 54 | 55 | The default configuration values for this chart are listed in **values.yaml**. 56 | 57 | ## Helmsman Usage 58 | 59 | ### Prerequisites 60 | 61 | * Kubernetes 1.15 62 | * Helm 3.0 63 | * Helmsman 3.0 64 | 65 | ### Installing 66 | 67 | Create etherproxy.yaml file as shown bellow: 68 | 69 | ```yaml 70 | namespaces: 71 | etherproxy: 72 | 73 | helmRepos: 74 | ethersphere: "https://ethersphere.github.io/helm" 75 | 76 | apps: 77 | etherproxy: 78 | name: etherproxy 79 | namespace: etherproxy 80 | description: "EtherProxy" 81 | chart: "ethersphere/etherproxy" 82 | version: "0.1.0" 83 | enabled: true 84 | wait: true 85 | timeout: 120 86 | 87 | ``` 88 | 89 | Execute following command: 90 | ```bash 91 | $ helmsman -apply -f etherproxy.yaml 92 | ``` 93 | 94 | ### Uninstalling 95 | 96 | Execute following command: 97 | ```bash 98 | $ helmsman -destroy -f etherproxy.yaml 99 | ``` 100 | -------------------------------------------------------------------------------- /charts/etherproxy/templates/NOTES.txt: -------------------------------------------------------------------------------- 1 | 1. Get the application URL by running these commands: 2 | {{- if .Values.ingress.enabled }} 3 | {{- range $host := .Values.ingress.hosts }} 4 | {{- range .paths }} 5 | http{{ if $.Values.ingress.tls }}s{{ end }}://{{ $host.host }}{{ . }} 6 | {{- end }} 7 | {{- end }} 8 | {{- else if contains "NodePort" .Values.service.type }} 9 | export NODE_PORT=$(kubectl get --namespace {{ .Release.Namespace }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ include "etherproxy.fullname" . }}) 10 | export NODE_IP=$(kubectl get nodes --namespace {{ .Release.Namespace }} -o jsonpath="{.items[0].status.addresses[0].address}") 11 | echo http://$NODE_IP:$NODE_PORT 12 | {{- else if contains "LoadBalancer" .Values.service.type }} 13 | NOTE: It may take a few minutes for the LoadBalancer IP to be available. 14 | You can watch the status of by running 'kubectl get --namespace {{ .Release.Namespace }} svc -w {{ include "etherproxy.fullname" . }}' 15 | export SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ include "etherproxy.fullname" . }} --template "{{"{{ range (index .status.loadBalancer.ingress 0) }}{{.}}{{ end }}"}}") 16 | echo http://$SERVICE_IP:{{ .Values.service.port }} 17 | {{- else if contains "ClusterIP" .Values.service.type }} 18 | export POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l "app.kubernetes.io/name={{ include "etherproxy.name" . }},app.kubernetes.io/instance={{ .Release.Name }}" -o jsonpath="{.items[0].metadata.name}") 19 | echo "Visit http://127.0.0.1:8080 to use your application" 20 | kubectl --namespace {{ .Release.Namespace }} port-forward $POD_NAME 8080:{{ .Values.service.port }} 21 | {{- end }} 22 | -------------------------------------------------------------------------------- /charts/etherproxy/templates/_helpers.tpl: -------------------------------------------------------------------------------- 1 | {{/* vim: set filetype=mustache: */}} 2 | {{/* 3 | Expand the name of the chart. 4 | */}} 5 | {{- define "etherproxy.name" -}} 6 | {{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" }} 7 | {{- end }} 8 | 9 | {{/* 10 | Create a default fully qualified app name. 11 | We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). 12 | If release name contains chart name it will be used as a full name. 13 | */}} 14 | {{- define "etherproxy.fullname" -}} 15 | {{- if .Values.fullnameOverride }} 16 | {{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" }} 17 | {{- else }} 18 | {{- $name := default .Chart.Name .Values.nameOverride }} 19 | {{- if contains $name .Release.Name }} 20 | {{- .Release.Name | trunc 63 | trimSuffix "-" }} 21 | {{- else }} 22 | {{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" }} 23 | {{- end }} 24 | {{- end }} 25 | {{- end }} 26 | 27 | {{/* 28 | Create chart name and version as used by the chart label. 29 | */}} 30 | {{- define "etherproxy.chart" -}} 31 | {{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }} 32 | {{- end }} 33 | 34 | {{/* 35 | Common labels 36 | */}} 37 | {{- define "etherproxy.labels" -}} 38 | helm.sh/chart: {{ include "etherproxy.chart" . }} 39 | {{ include "etherproxy.selectorLabels" . }} 40 | {{- if .Chart.AppVersion }} 41 | app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} 42 | {{- end }} 43 | app.kubernetes.io/managed-by: {{ .Release.Service }} 44 | {{- end }} 45 | 46 | {{/* 47 | Selector labels 48 | */}} 49 | {{- define "etherproxy.selectorLabels" -}} 50 | app.kubernetes.io/name: {{ include "etherproxy.name" . }} 51 | app.kubernetes.io/instance: {{ .Release.Name }} 52 | {{- end }} 53 | 54 | {{/* 55 | Create the name of the service account to use 56 | */}} 57 | {{- define "etherproxy.serviceAccountName" -}} 58 | {{- if .Values.serviceAccount.create }} 59 | {{- default (include "etherproxy.fullname" .) .Values.serviceAccount.name }} 60 | {{- else }} 61 | {{- default "default" .Values.serviceAccount.name }} 62 | {{- end }} 63 | {{- end }} 64 | -------------------------------------------------------------------------------- /charts/etherproxy/templates/config.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | kind: ConfigMap 3 | metadata: 4 | name: {{ include "etherproxy.fullname" . }} 5 | labels: 6 | {{- include "etherproxy.labels" . | nindent 4 }} 7 | data: 8 | ETHERPROXY_PORT: {{ .Values.service.port | quote }} 9 | ETHERPROXY_TARGET: {{ .Values.config.ETHERPROXY_TARGET | quote }} 10 | ETHERPROXY_EXPIRY: {{ .Values.config.ETHERPROXY_EXPIRY | quote }} 11 | -------------------------------------------------------------------------------- /charts/etherproxy/templates/deployment.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: apps/v1 2 | kind: Deployment 3 | metadata: 4 | name: {{ include "etherproxy.fullname" . }} 5 | labels: 6 | {{- include "etherproxy.labels" . | nindent 4 }} 7 | spec: 8 | {{- if not .Values.autoscaling.enabled }} 9 | replicas: {{ .Values.replicaCount }} 10 | {{- end }} 11 | strategy: 12 | {{- toYaml .Values.strategy | nindent 4 }} 13 | selector: 14 | matchLabels: 15 | {{- include "etherproxy.selectorLabels" . | nindent 6 }} 16 | template: 17 | metadata: 18 | {{- with .Values.podAnnotations }} 19 | annotations: 20 | {{- toYaml . | nindent 8 }} 21 | {{- end }} 22 | labels: 23 | {{- include "etherproxy.selectorLabels" . | nindent 8 }} 24 | spec: 25 | {{- with .Values.imagePullSecrets }} 26 | imagePullSecrets: 27 | {{- toYaml . | nindent 8 }} 28 | {{- end }} 29 | serviceAccountName: {{ include "etherproxy.serviceAccountName" . }} 30 | securityContext: 31 | {{- toYaml .Values.podSecurityContext | nindent 8 }} 32 | containers: 33 | - name: {{ .Chart.Name }} 34 | securityContext: 35 | {{- toYaml .Values.securityContext | nindent 12 }} 36 | image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}" 37 | imagePullPolicy: {{ .Values.image.pullPolicy }} 38 | envFrom: 39 | - configMapRef: 40 | name: {{ include "etherproxy.fullname" . }} 41 | ports: 42 | - name: http 43 | containerPort: {{ .Values.service.port }} 44 | protocol: TCP 45 | livenessProbe: 46 | httpGet: 47 | path: /health 48 | port: http 49 | readinessProbe: 50 | httpGet: 51 | path: /readiness 52 | port: http 53 | resources: 54 | {{- toYaml .Values.resources | nindent 12 }} 55 | {{- with .Values.nodeSelector }} 56 | nodeSelector: 57 | {{- toYaml . | nindent 8 }} 58 | {{- end }} 59 | {{- with .Values.affinity }} 60 | affinity: 61 | {{- toYaml . | nindent 8 }} 62 | {{- end }} 63 | {{- with .Values.tolerations }} 64 | tolerations: 65 | {{- toYaml . | nindent 8 }} 66 | {{- end }} 67 | -------------------------------------------------------------------------------- /charts/etherproxy/templates/hpa.yaml: -------------------------------------------------------------------------------- 1 | {{- if .Values.autoscaling.enabled }} 2 | apiVersion: autoscaling/v1 3 | kind: HorizontalPodAutoscaler 4 | metadata: 5 | name: {{ include "etherproxy.fullname" . }} 6 | labels: 7 | {{- include "etherproxy.labels" . | nindent 4 }} 8 | spec: 9 | scaleTargetRef: 10 | apiVersion: apps/v1 11 | kind: Deployment 12 | name: {{ include "etherproxy.fullname" . }} 13 | minReplicas: {{ .Values.autoscaling.minReplicas }} 14 | maxReplicas: {{ .Values.autoscaling.maxReplicas }} 15 | metrics: 16 | {{- if .Values.autoscaling.targetCPUUtilizationPercentage }} 17 | - type: Resource 18 | resource: 19 | name: cpu 20 | targetAverageUtilization: {{ .Values.autoscaling.targetCPUUtilizationPercentage }} 21 | {{- end }} 22 | {{- if .Values.autoscaling.targetMemoryUtilizationPercentage }} 23 | - type: Resource 24 | resource: 25 | name: memory 26 | targetAverageUtilization: {{ .Values.autoscaling.targetMemoryUtilizationPercentage }} 27 | {{- end }} 28 | {{- end }} 29 | -------------------------------------------------------------------------------- /charts/etherproxy/templates/ingress.yaml: -------------------------------------------------------------------------------- 1 | {{- if .Values.ingress.enabled -}} 2 | {{- $fullName := include "etherproxy.fullname" . -}} 3 | {{- $svcPort := .Values.service.portAPI -}} 4 | {{- if semverCompare ">=1.19-0" .Capabilities.KubeVersion.Version -}} 5 | apiVersion: networking.k8s.io/v1 6 | {{- else -}} 7 | apiVersion: extensions/v1beta1 8 | {{- end }} 9 | kind: Ingress 10 | metadata: 11 | name: {{ $fullName }} 12 | labels: 13 | {{- include "etherproxy.labels" . | nindent 4 }} 14 | {{- with .Values.ingress.annotations }} 15 | annotations: 16 | {{- toYaml . | nindent 4 }} 17 | {{- end }} 18 | spec: 19 | ingressClassName: {{ .Values.ingress.class }} 20 | {{- if .Values.ingress.tls }} 21 | tls: 22 | {{- range .Values.ingress.tls }} 23 | - hosts: 24 | {{- range .hosts }} 25 | - {{ . | quote }} 26 | {{- end }} 27 | secretName: {{ .secretName }} 28 | {{- end }} 29 | {{- end }} 30 | rules: 31 | {{- range .Values.ingress.hosts }} 32 | - host: {{ .host | quote }} 33 | http: 34 | paths: 35 | {{- range .paths }} 36 | - path: {{ . }} 37 | pathType: ImplementationSpecific 38 | backend: 39 | service: 40 | name: {{ $fullName }} 41 | port: 42 | number: {{ $svcPort }} 43 | {{- end }} 44 | {{- end }} 45 | {{- end }} 46 | -------------------------------------------------------------------------------- /charts/etherproxy/templates/service.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | kind: Service 3 | metadata: 4 | name: {{ include "etherproxy.fullname" . }} 5 | labels: 6 | {{- include "etherproxy.labels" . | nindent 4 }} 7 | spec: 8 | type: {{ .Values.service.type }} 9 | ports: 10 | - port: {{ .Values.service.port }} 11 | targetPort: http 12 | protocol: TCP 13 | name: http 14 | selector: 15 | {{- include "etherproxy.selectorLabels" . | nindent 4 }} 16 | -------------------------------------------------------------------------------- /charts/etherproxy/templates/serviceaccount.yaml: -------------------------------------------------------------------------------- 1 | {{- if .Values.serviceAccount.create -}} 2 | apiVersion: v1 3 | kind: ServiceAccount 4 | metadata: 5 | name: {{ include "etherproxy.serviceAccountName" . }} 6 | labels: 7 | {{- include "etherproxy.labels" . | nindent 4 }} 8 | {{- with .Values.serviceAccount.annotations }} 9 | annotations: 10 | {{- toYaml . | nindent 4 }} 11 | {{- end }} 12 | {{- end }} 13 | -------------------------------------------------------------------------------- /charts/etherproxy/values.yaml: -------------------------------------------------------------------------------- 1 | # Default values for etherproxy. 2 | # This is a YAML-formatted file. 3 | # Declare variables to be passed into your templates. 4 | 5 | replicaCount: 1 6 | 7 | image: 8 | repository: ethersphere/etherproxy 9 | pullPolicy: IfNotPresent 10 | # Overrides the image tag whose default is the chart version. 11 | tag: 1.0.0 12 | 13 | imagePullSecrets: [] 14 | nameOverride: "" 15 | fullnameOverride: "" 16 | 17 | serviceAccount: 18 | # Specifies whether a service account should be created 19 | create: false 20 | # Annotations to add to the service account 21 | annotations: {} 22 | # The name of the service account to use. 23 | # If not set and create is true, a name is generated using the fullname template 24 | name: "" 25 | 26 | podAnnotations: {} 27 | 28 | podSecurityContext: {} 29 | # fsGroup: 2000 30 | 31 | securityContext: {} 32 | # capabilities: 33 | # drop: 34 | # - ALL 35 | # readOnlyRootFilesystem: true 36 | # runAsNonRoot: true 37 | # runAsUser: 1000 38 | 39 | service: 40 | type: ClusterIP 41 | port: 9000 42 | 43 | ingress: 44 | enabled: false 45 | annotations: {} 46 | # kubernetes.io/ingress.class: nginx 47 | # kubernetes.io/tls-acme: "true" 48 | class: "" 49 | hosts: 50 | - host: chart-example.local 51 | paths: [] 52 | tls: [] 53 | # - secretName: chart-example-tls 54 | # hosts: 55 | # - chart-example.local 56 | 57 | resources: {} 58 | # If you do want to specify resources, uncomment the following lines, 59 | # adjust them as necessary, and remove the curly braces after 'resources:'. 60 | # limits: 61 | # cpu: 300m 62 | # ephemeral-storage: 2Gi 63 | # memory: 512Mi 64 | # requests: 65 | # cpu: 300m 66 | # ephemeral-storage: 512Mi 67 | # memory: 512Mi 68 | 69 | autoscaling: 70 | enabled: false 71 | minReplicas: 1 72 | maxReplicas: 100 73 | targetCPUUtilizationPercentage: 80 74 | # targetMemoryUtilizationPercentage: 80 75 | 76 | nodeSelector: {} 77 | 78 | tolerations: [] 79 | 80 | affinity: {} 81 | 82 | strategy: 83 | type: Recreate 84 | 85 | # environment variables 86 | config: 87 | ETHERPROXY_TARGET: "https://rpc.gnosischain.com/" 88 | ETHERPROXY_EXPIRY: "2000" 89 | -------------------------------------------------------------------------------- /charts/ethexporter/.helmignore: -------------------------------------------------------------------------------- 1 | # Patterns to ignore when building packages. 2 | # This supports shell glob matching, relative path matching, and 3 | # negation (prefixed with !). Only one pattern per line. 4 | .DS_Store 5 | # Common VCS dirs 6 | .git/ 7 | .gitignore 8 | .bzr/ 9 | .bzrignore 10 | .hg/ 11 | .hgignore 12 | .svn/ 13 | # Common backup files 14 | *.swp 15 | *.bak 16 | *.tmp 17 | *.orig 18 | *~ 19 | # Various IDEs 20 | .project 21 | .idea/ 22 | *.tmproj 23 | .vscode/ 24 | -------------------------------------------------------------------------------- /charts/ethexporter/Chart.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v2 2 | appVersion: latest 3 | name: ethexporter 4 | version: 0.2.1 5 | description: ETHexporter Helm chart for Kubernetes 6 | home: https://www.ethswarm.org 7 | icon: https://docs.ethswarm.org/img/swarm-logo-2.svg 8 | keywords: 9 | - blockchain 10 | - ethereum 11 | - prometheus 12 | - exporter 13 | maintainers: 14 | - name: darkobas2 15 | email: darkobas@ethswarm.org 16 | sources: 17 | - https://github.com/ethersphere/ethexporter 18 | type: application 19 | -------------------------------------------------------------------------------- /charts/ethexporter/README.md: -------------------------------------------------------------------------------- 1 | # ETHexporter Helm Chart 2 | 3 | [ETHexporter](https://github.com/ethersphere/ethexporter) is a lightweight Prometheus exporter that will output Ethereum wallet balances from a list of addresses you specify. 4 | 5 | ## QuickStart 6 | 7 | ```bash 8 | $ helm install --generate-name ethersphere/ethexporter 9 | ``` 10 | 11 | ## Introduction 12 | 13 | This chart deploys a [ETHexporter](https://github.com/ethersphere/ethexporter) onto a Kubernetes cluster using the Helm package manager. 14 | 15 | ## Prerequisites 16 | 17 | * Kubernetes 1.15 18 | * Helm 3.0 19 | 20 | ## Installing the Chart 21 | 22 | To install the chart with the release name `my-release`: 23 | 24 | ```bash 25 | $ helm install my-release ethersphere/ethexporter 26 | ``` 27 | 28 | The command deploys ETHexporter on the Kubernetes cluster in the default configuration. The [configuration](#configuration) section lists the parameters that can be configured during installation. 29 | 30 | ## Uninstalling the Chart 31 | 32 | To uninstall/delete the `my-release` deployment: 33 | 34 | ```bash 35 | $ helm delete my-release 36 | ``` 37 | 38 | The command removes all the Kubernetes components associated with the chart and deletes the release. 39 | 40 | ## Configuration 41 | 42 | The default configuration values for this chart are listed in **values.yaml**. 43 | 44 | ## Helmsman Usage 45 | 46 | ### Prerequisites 47 | 48 | * Kubernetes 1.15 49 | * Helm 3.0 50 | * Helmsman 3.0 51 | 52 | ### Installing 53 | 54 | Create ethexporter.yaml file as shown bellow: 55 | 56 | ```yaml 57 | namespaces: 58 | ethexporter: 59 | 60 | helmRepos: 61 | ethersphere: "https://ethersphere.github.io/helm" 62 | 63 | apps: 64 | ethexporter: 65 | name: ethexporter 66 | namespace: ethexporter 67 | description: "ETHexporter" 68 | chart: "ethersphere/ethexporter" 69 | version: "0.1.0" 70 | enabled: true 71 | wait: true 72 | timeout: 120 73 | 74 | ``` 75 | 76 | Execute following command: 77 | ```bash 78 | $ helmsman -apply -f ethexporter.yaml 79 | ``` 80 | 81 | ### Uninstalling 82 | 83 | Execute following command: 84 | ```bash 85 | $ helmsman -destroy -f ethexporter.yaml 86 | ``` 87 | -------------------------------------------------------------------------------- /charts/ethexporter/ci/ct-values.yaml: -------------------------------------------------------------------------------- 1 | serviceMonitor: 2 | enabled: false 3 | 4 | addressesTxt: 5 | enabled: true 6 | addresses: | 7 | bittrex:0xFBb1b73C4f0BDa4f67dcA266ce6Ef42f520fBB98:github 8 | etherdelta:0x8d12A197cB00D4747a1fe03395095ce2A5CC6819:github 9 | 10 | ethexporter: 11 | gethEndpoint: https://xdai.fairdatasociety.org 12 | -------------------------------------------------------------------------------- /charts/ethexporter/templates/NOTES.txt: -------------------------------------------------------------------------------- 1 | ETHexporter -------------------------------------------------------------------------------- /charts/ethexporter/templates/_helpers.tpl: -------------------------------------------------------------------------------- 1 | {{/* vim: set filetype=mustache: */}} 2 | {{/* 3 | Expand the name of the chart. 4 | */}} 5 | {{- define "ethexporter.name" -}} 6 | {{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}} 7 | {{- end -}} 8 | 9 | {{/* 10 | Create a default fully qualified app name. 11 | We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). 12 | If release name contains chart name it will be used as a full name. 13 | */}} 14 | {{- define "ethexporter.fullname" -}} 15 | {{- if .Values.fullnameOverride -}} 16 | {{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}} 17 | {{- else -}} 18 | {{- $name := default .Chart.Name .Values.nameOverride -}} 19 | {{- if contains $name .Release.Name -}} 20 | {{- .Release.Name | trunc 63 | trimSuffix "-" -}} 21 | {{- else -}} 22 | {{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}} 23 | {{- end -}} 24 | {{- end -}} 25 | {{- end -}} 26 | 27 | {{/* 28 | Create chart name and version as used by the chart label. 29 | */}} 30 | {{- define "ethexporter.chart" -}} 31 | {{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}} 32 | {{- end -}} 33 | 34 | {{/* 35 | Common labels 36 | */}} 37 | {{- define "ethexporter.labels" -}} 38 | helm.sh/chart: {{ include "ethexporter.chart" . }} 39 | {{ include "ethexporter.selectorLabels" . }} 40 | {{- if .Chart.AppVersion }} 41 | app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} 42 | {{- end }} 43 | app.kubernetes.io/managed-by: {{ .Release.Service }} 44 | {{- end -}} 45 | 46 | {{/* 47 | Selector labels 48 | */}} 49 | {{- define "ethexporter.selectorLabels" -}} 50 | app.kubernetes.io/name: {{ include "ethexporter.name" . }} 51 | app.kubernetes.io/instance: {{ .Release.Name }} 52 | {{- end -}} 53 | 54 | {{/* 55 | Create the name of the service account to use 56 | */}} 57 | {{- define "ethexporter.serviceAccountName" -}} 58 | {{- if .Values.serviceAccount.create -}} 59 | {{ default (include "ethexporter.fullname" .) .Values.serviceAccount.name }} 60 | {{- else -}} 61 | {{ default "default" .Values.serviceAccount.name }} 62 | {{- end -}} 63 | {{- end -}} 64 | -------------------------------------------------------------------------------- /charts/ethexporter/templates/config-addresses.yaml: -------------------------------------------------------------------------------- 1 | {{- if .Values.addressesTxt.enabled }} 2 | {{- if .Values.addressesTxt.addresses }} 3 | --- 4 | apiVersion: v1 5 | kind: ConfigMap 6 | metadata: 7 | name: {{ template "ethexporter.fullname" . }}-addresses 8 | namespace: {{ .Release.Namespace }} 9 | labels: 10 | {{- include "ethexporter.labels" . | nindent 4 }} 11 | data: 12 | addresses.txt: | 13 | {{ .Values.addressesTxt.addresses | indent 4 }} 14 | {{- end }} 15 | {{- end }} 16 | -------------------------------------------------------------------------------- /charts/ethexporter/templates/deployment.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | apiVersion: apps/v1 3 | kind: Deployment 4 | metadata: 5 | name: {{ include "ethexporter.fullname" . }} 6 | labels: 7 | {{- include "ethexporter.labels" . | nindent 4 }} 8 | spec: 9 | replicas: {{ .Values.replicaCount }} 10 | selector: 11 | matchLabels: 12 | {{- include "ethexporter.selectorLabels" . | nindent 6 }} 13 | template: 14 | metadata: 15 | labels: 16 | {{- include "ethexporter.selectorLabels" . | nindent 8 }} 17 | spec: 18 | {{- with .Values.imagePullSecrets }} 19 | imagePullSecrets: 20 | {{- toYaml . | nindent 8 }} 21 | {{- end }} 22 | serviceAccountName: {{ include "ethexporter.serviceAccountName" . }} 23 | securityContext: 24 | {{- toYaml .Values.podSecurityContext | nindent 8 }} 25 | containers: 26 | - name: ethexporter 27 | securityContext: 28 | {{- toYaml .Values.securityContext | nindent 12 }} 29 | image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}" 30 | imagePullPolicy: {{ .Values.image.pullPolicy }} 31 | env: 32 | - name: GETH 33 | value: "{{ .Values.ethexporter.gethEndpoint }}" 34 | - name: INTERVAL 35 | value: "{{ .Values.ethexporter.interval }}" 36 | - name: PORT 37 | value: "{{ .Values.service.port }}" 38 | ports: 39 | - name: metrics 40 | containerPort: {{ int .Values.service.port }} 41 | protocol: TCP 42 | resources: 43 | {{- toYaml .Values.resources | nindent 12 }} 44 | {{- if .Values.addressesTxt.enabled }} 45 | volumeMounts: 46 | - name: addresses-volume 47 | mountPath: /app/addresses.txt 48 | subPath: addresses.txt 49 | {{- end }} 50 | command: 51 | - ethexporter 52 | {{- if .Values.addressesTxt.enabled }} 53 | volumes: 54 | - name: addresses-volume 55 | configMap: 56 | {{- if not .Values.addressesTxt.addresses }} 57 | name: {{ .Values.addressesTxt.existingConfigMap }} 58 | {{- else }} 59 | name: {{ include "ethexporter.fullname" . }}-addresses 60 | items: 61 | - key: addresses.txt 62 | path: addresses.txt 63 | {{- end }} 64 | {{- end }} 65 | {{- with .Values.nodeSelector }} 66 | nodeSelector: 67 | {{- toYaml . | nindent 8 }} 68 | {{- end }} 69 | {{- with .Values.affinity }} 70 | affinity: 71 | {{- toYaml . | nindent 8 }} 72 | {{- end }} 73 | {{- with .Values.tolerations }} 74 | tolerations: 75 | {{- toYaml . | nindent 8 }} 76 | {{- end }} 77 | -------------------------------------------------------------------------------- /charts/ethexporter/templates/ingress.yaml: -------------------------------------------------------------------------------- 1 | {{- if .Values.ingress.enabled -}} 2 | {{- $fullName := include "ethexporter.fullname" . -}} 3 | {{- $svcPort := .Values.service.port -}} 4 | --- 5 | {{- if semverCompare ">=1.14-0" .Capabilities.KubeVersion.GitVersion -}} 6 | apiVersion: networking.k8s.io/v1beta1 7 | {{- else -}} 8 | apiVersion: extensions/v1beta1 9 | {{- end }} 10 | kind: Ingress 11 | metadata: 12 | name: {{ $fullName }} 13 | labels: 14 | {{- include "ethexporter.labels" . | nindent 4 }} 15 | {{- with .Values.ingress.annotations }} 16 | annotations: 17 | {{- toYaml . | nindent 4 }} 18 | {{- end }} 19 | spec: 20 | {{- if .Values.ingress.tls }} 21 | tls: 22 | {{- range .Values.ingress.tls }} 23 | - hosts: 24 | {{- range .hosts }} 25 | - {{ . | quote }} 26 | {{- end }} 27 | secretName: {{ .secretName }} 28 | {{- end }} 29 | {{- end }} 30 | rules: 31 | {{- range .Values.ingress.hosts }} 32 | - host: {{ .host | quote }} 33 | http: 34 | paths: 35 | {{- range .paths }} 36 | - path: {{ . }} 37 | backend: 38 | serviceName: {{ $fullName }} 39 | servicePort: {{ $svcPort }} 40 | {{- end }} 41 | {{- end }} 42 | {{- end }} 43 | -------------------------------------------------------------------------------- /charts/ethexporter/templates/service.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | apiVersion: v1 3 | kind: Service 4 | metadata: 5 | name: {{ include "ethexporter.fullname" . }} 6 | labels: 7 | {{- include "ethexporter.labels" . | nindent 4 }} 8 | spec: 9 | type: {{ .Values.service.type }} 10 | ports: 11 | - port: {{ .Values.service.port }} 12 | targetPort: metrics 13 | protocol: TCP 14 | name: metrics 15 | selector: 16 | {{- include "ethexporter.selectorLabels" . | nindent 4 }} -------------------------------------------------------------------------------- /charts/ethexporter/templates/serviceaccount.yaml: -------------------------------------------------------------------------------- 1 | {{- if .Values.serviceAccount.create -}} 2 | --- 3 | apiVersion: v1 4 | kind: ServiceAccount 5 | metadata: 6 | namespace: {{ .Release.Namespace }} 7 | name: {{ include "ethexporter.serviceAccountName" . }} 8 | labels: 9 | {{- include "ethexporter.labels" . | nindent 4 }} 10 | {{- with .Values.serviceAccount.annotations }} 11 | annotations: 12 | {{- toYaml . | nindent 4 }} 13 | {{- end }} 14 | {{- end -}} 15 | -------------------------------------------------------------------------------- /charts/ethexporter/templates/servicemonitor.yaml: -------------------------------------------------------------------------------- 1 | {{- if .Values.serviceMonitor.enabled -}} 2 | --- 3 | apiVersion: monitoring.coreos.com/v1 4 | kind: ServiceMonitor 5 | metadata: 6 | name: {{ include "ethexporter.fullname" . }} 7 | {{- if .Values.serviceMonitor.namespace }} 8 | namespace: {{ .Values.serviceMonitor.namespace }} 9 | {{- end }} 10 | labels: 11 | app: {{ include "ethexporter.name" . }} 12 | chart: {{ .Chart.Name }} 13 | release: {{ .Release.Name }} 14 | heritage: {{ .Release.Service }} 15 | {{- if .Values.serviceMonitor.additionalLabels }} 16 | {{ toYaml .Values.serviceMonitor.additionalLabels | indent 4 }} 17 | {{- end }} 18 | spec: 19 | endpoints: 20 | - port: metrics 21 | path: /metrics 22 | {{- if .Values.serviceMonitor.scrapeInterval }} 23 | interval: {{ .Values.serviceMonitor.scrapeInterval }} 24 | scheme: http 25 | {{- end }} 26 | {{- if .Values.serviceMonitor.honorLabels }} 27 | honorLabels: true 28 | {{- end }} 29 | {{- if .Values.serviceMonitor.relabelings }} 30 | relabelings: 31 | {{ toYaml .Values.serviceMonitor.relabelings | indent 6 }} 32 | {{- end }} 33 | namespaceSelector: 34 | matchNames: 35 | - {{ .Release.Namespace }} 36 | selector: 37 | matchLabels: 38 | app.kubernetes.io/name: {{ include "ethexporter.name" . }} 39 | app.kubernetes.io/instance: {{ .Release.Name }} 40 | {{- end -}} 41 | -------------------------------------------------------------------------------- /charts/ethexporter/templates/tests/test-connection.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | kind: Pod 3 | metadata: 4 | name: "{{ include "ethexporter.fullname" . }}-dummy-test" 5 | labels: 6 | {{ include "ethexporter.labels" . | nindent 4 }} 7 | annotations: 8 | "helm.sh/hook": test-success 9 | spec: 10 | containers: 11 | - name: dummy 12 | image: busybox 13 | command: ['echo'] 14 | args: ['dummy'] 15 | restartPolicy: Never 16 | -------------------------------------------------------------------------------- /charts/ethexporter/values.yaml: -------------------------------------------------------------------------------- 1 | # Default values for ethexporter. 2 | # This is a YAML-formatted file. 3 | # Declare variables to be passed into your templates. 4 | 5 | image: 6 | repository: darkobas/ethexporter 7 | tag: latest 8 | pullPolicy: IfNotPresent 9 | 10 | ethexporter: 11 | gethEndpoint: http://rpc-gnosis-haproxy.default.svc.godfather2.local 12 | interval: 60 13 | 14 | addressesTxt: 15 | enabled: true 16 | existingConfigMap: "balance-addresses" 17 | # addresses: | 18 | # etherdelta:0x8d12A197cB00D4747a1fe03395095ce2A5CC6819 19 | # bittrex:0xFBb1b73C4f0BDa4f67dcA266ce6Ef42f520fBB98 20 | 21 | replicaCount: 1 22 | 23 | imagePullSecrets: [] 24 | nameOverride: "" 25 | fullnameOverride: "" 26 | 27 | serviceAccount: 28 | create: false 29 | annotations: {} 30 | name: 31 | 32 | serviceMonitor: 33 | enabled: true 34 | additionalLabels: {} 35 | 36 | podSecurityContext: {} 37 | 38 | securityContext: {} 39 | 40 | service: 41 | type: ClusterIP 42 | port: 9021 43 | 44 | ingress: 45 | enabled: false 46 | annotations: {} 47 | tls: [] 48 | 49 | resources: {} 50 | # We usually recommend not to specify default resources and to leave this as a conscious 51 | # choice for the user. This also increases chances charts run on environments with little 52 | # resources, such as Minikube. If you do want to specify resources, uncomment the following 53 | # lines, adjust them as necessary, and remove the curly braces after 'resources:'. 54 | # limits: 55 | # cpu: 100m 56 | # memory: 128Mi 57 | # requests: 58 | # cpu: 100m 59 | # memory: 128Mi 60 | 61 | nodeSelector: {} 62 | 63 | tolerations: [] 64 | 65 | affinity: {} 66 | -------------------------------------------------------------------------------- /charts/ethproxy/.helmignore: -------------------------------------------------------------------------------- 1 | # Patterns to ignore when building packages. 2 | # This supports shell glob matching, relative path matching, and 3 | # negation (prefixed with !). Only one pattern per line. 4 | .DS_Store 5 | # Common VCS dirs 6 | .git/ 7 | .gitignore 8 | .bzr/ 9 | .bzrignore 10 | .hg/ 11 | .hgignore 12 | .svn/ 13 | # Common backup files 14 | *.swp 15 | *.bak 16 | *.tmp 17 | *.orig 18 | *~ 19 | # Various IDEs 20 | .project 21 | .idea/ 22 | *.tmproj 23 | .vscode/ 24 | -------------------------------------------------------------------------------- /charts/ethproxy/Chart.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v2 2 | appVersion: latest 3 | name: ethproxy 4 | version: 0.1.3 5 | description: ETHproxy Helm chart for Kubernetes 6 | home: https://www.ethswarm.org 7 | icon: https://docs.ethswarm.org/img/swarm-logo-2.svg 8 | keywords: 9 | - blockchain 10 | - ethereum 11 | - prometheus 12 | - proxy 13 | maintainers: 14 | - name: vandot 15 | email: vandot@ethswarm.org 16 | sources: 17 | - https://github.com/ethersphere/ethproxy 18 | type: application 19 | -------------------------------------------------------------------------------- /charts/ethproxy/README.md: -------------------------------------------------------------------------------- 1 | # ETHproxy Helm Chart 2 | 3 | [ETHproxy](https://github.com/ethersphere/ethproxy) is a lightweight Prometheus proxy that will output Ethereum wallet balances from a list of addresses you specify. 4 | 5 | ## Prerequisites 6 | 7 | Make sure you have Helm [installed](https://helm.sh/docs/intro/install/) installed. 8 | 9 | ## Get Repo Info 10 | 11 | ```bash 12 | helm repo add ethersphere https://ethersphere.github.io/helm 13 | helm repo update 14 | ``` 15 | 16 | _See [helm repo](https://helm.sh/docs/helm/helm_repo/) for command documentation._ 17 | 18 | ## QuickStart 19 | 20 | ```bash 21 | $ helm install --generate-name ethersphere/ethproxy 22 | ``` 23 | 24 | ## Introduction 25 | 26 | This chart deploys a [ETHproxy](https://github.com/ethersphere/ethproxy) onto a Kubernetes cluster using the Helm package manager. 27 | 28 | ## Prerequisites 29 | 30 | * Kubernetes 1.15 31 | * Helm 3.0 32 | 33 | ## Installing the Chart 34 | 35 | To install the chart with the release name `my-release`: 36 | 37 | ```bash 38 | $ helm install my-release ethersphere/ethproxy 39 | ``` 40 | 41 | The command deploys ETHproxy on the Kubernetes cluster in the default configuration. The [configuration](#configuration) section lists the parameters that can be configured during installation. 42 | 43 | ## Uninstalling the Chart 44 | 45 | To uninstall/delete the `my-release` deployment: 46 | 47 | ```bash 48 | $ helm delete my-release 49 | ``` 50 | 51 | The command removes all the Kubernetes components associated with the chart and deletes the release. 52 | 53 | ## Configuration 54 | 55 | The default configuration values for this chart are listed in **values.yaml**. 56 | 57 | ## Helmsman Usage 58 | 59 | ### Prerequisites 60 | 61 | * Kubernetes 1.15 62 | * Helm 3.0 63 | * Helmsman 3.0 64 | 65 | ### Installing 66 | 67 | Create ethproxy.yaml file as shown bellow: 68 | 69 | ```yaml 70 | namespaces: 71 | ethproxy: 72 | 73 | helmRepos: 74 | ethersphere: "https://ethersphere.github.io/helm" 75 | 76 | apps: 77 | ethproxy: 78 | name: ethproxy 79 | namespace: ethproxy 80 | description: "ETHproxy" 81 | chart: "ethersphere/ethproxy" 82 | version: "0.1.0" 83 | enabled: true 84 | wait: true 85 | timeout: 120 86 | 87 | ``` 88 | 89 | Execute following command: 90 | ```bash 91 | $ helmsman -apply -f ethproxy.yaml 92 | ``` 93 | 94 | ### Uninstalling 95 | 96 | Execute following command: 97 | ```bash 98 | $ helmsman -destroy -f ethproxy.yaml 99 | ``` 100 | -------------------------------------------------------------------------------- /charts/ethproxy/templates/NOTES.txt: -------------------------------------------------------------------------------- 1 | 1. Get the application URL by running these commands: 2 | {{- if .Values.ingress.enabled }} 3 | {{- range $host := .Values.ingress.hosts }} 4 | {{- range .paths }} 5 | http{{ if $.Values.ingress.tls }}s{{ end }}://{{ $host.host }}{{ . }} 6 | {{- end }} 7 | {{- end }} 8 | {{- else if contains "NodePort" .Values.service.type }} 9 | export NODE_PORT=$(kubectl get --namespace {{ .Release.Namespace }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ include "ethproxy.fullname" . }}) 10 | export NODE_IP=$(kubectl get nodes --namespace {{ .Release.Namespace }} -o jsonpath="{.items[0].status.addresses[0].address}") 11 | echo http://$NODE_IP:$NODE_PORT 12 | {{- else if contains "LoadBalancer" .Values.service.type }} 13 | NOTE: It may take a few minutes for the LoadBalancer IP to be available. 14 | You can watch the status of by running 'kubectl get --namespace {{ .Release.Namespace }} svc -w {{ include "ethproxy.fullname" . }}' 15 | export SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ include "ethproxy.fullname" . }} --template "{{"{{ range (index .status.loadBalancer.ingress 0) }}{{.}}{{ end }}"}}") 16 | echo http://$SERVICE_IP:{{ .Values.service.port }} 17 | {{- else if contains "ClusterIP" .Values.service.type }} 18 | export POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l "app.kubernetes.io/name={{ include "ethproxy.name" . }},app.kubernetes.io/instance={{ .Release.Name }}" -o jsonpath="{.items[0].metadata.name}") 19 | echo "Visit http://127.0.0.1:8080 to use your application" 20 | kubectl --namespace {{ .Release.Namespace }} port-forward $POD_NAME 8080:{{ .Values.config.PROXY_API_PORT }} 21 | {{- end }} 22 | -------------------------------------------------------------------------------- /charts/ethproxy/templates/_helpers.tpl: -------------------------------------------------------------------------------- 1 | {{/* vim: set filetype=mustache: */}} 2 | {{/* 3 | Expand the name of the chart. 4 | */}} 5 | {{- define "ethproxy.name" -}} 6 | {{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" }} 7 | {{- end }} 8 | 9 | {{/* 10 | Create a default fully qualified app name. 11 | We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). 12 | If release name contains chart name it will be used as a full name. 13 | */}} 14 | {{- define "ethproxy.fullname" -}} 15 | {{- if .Values.fullnameOverride }} 16 | {{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" }} 17 | {{- else }} 18 | {{- $name := default .Chart.Name .Values.nameOverride }} 19 | {{- if contains $name .Release.Name }} 20 | {{- .Release.Name | trunc 63 | trimSuffix "-" }} 21 | {{- else }} 22 | {{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" }} 23 | {{- end }} 24 | {{- end }} 25 | {{- end }} 26 | 27 | {{/* 28 | Create chart name and version as used by the chart label. 29 | */}} 30 | {{- define "ethproxy.chart" -}} 31 | {{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }} 32 | {{- end }} 33 | 34 | {{/* 35 | Common labels 36 | */}} 37 | {{- define "ethproxy.labels" -}} 38 | helm.sh/chart: {{ include "ethproxy.chart" . }} 39 | {{ include "ethproxy.selectorLabels" . }} 40 | {{- if .Chart.AppVersion }} 41 | app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} 42 | {{- end }} 43 | app.kubernetes.io/managed-by: {{ .Release.Service }} 44 | {{- end }} 45 | 46 | {{/* 47 | Selector labels 48 | */}} 49 | {{- define "ethproxy.selectorLabels" -}} 50 | app.kubernetes.io/name: {{ include "ethproxy.name" . }} 51 | app.kubernetes.io/instance: {{ .Release.Name }} 52 | {{- end }} 53 | 54 | {{/* 55 | Create the name of the service account to use 56 | */}} 57 | {{- define "ethproxy.serviceAccountName" -}} 58 | {{- if .Values.serviceAccount.create }} 59 | {{- default (include "ethproxy.fullname" .) .Values.serviceAccount.name }} 60 | {{- else }} 61 | {{- default "default" .Values.serviceAccount.name }} 62 | {{- end }} 63 | {{- end }} 64 | -------------------------------------------------------------------------------- /charts/ethproxy/templates/config.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | kind: ConfigMap 3 | metadata: 4 | name: {{ include "ethproxy.fullname" . }} 5 | labels: 6 | {{- include "ethproxy.labels" . | nindent 4 }} 7 | data: 8 | PROXY_API_PORT: {{ .Values.config.PROXY_API_PORT | quote }} 9 | PROXY_BACKEND_ENDPOINT: {{ .Values.config.PROXY_BACKEND_ENDPOINT | quote }} 10 | PROXY_WS_PORT: {{ .Values.config.PROXY_WS_PORT | quote }} 11 | -------------------------------------------------------------------------------- /charts/ethproxy/templates/deployment.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: apps/v1 2 | kind: Deployment 3 | metadata: 4 | name: {{ include "ethproxy.fullname" . }} 5 | labels: 6 | {{- include "ethproxy.labels" . | nindent 4 }} 7 | spec: 8 | {{- if not .Values.autoscaling.enabled }} 9 | replicas: {{ .Values.replicaCount }} 10 | {{- end }} 11 | strategy: 12 | {{- toYaml .Values.strategy | nindent 4 }} 13 | selector: 14 | matchLabels: 15 | {{- include "ethproxy.selectorLabels" . | nindent 6 }} 16 | template: 17 | metadata: 18 | {{- with .Values.podAnnotations }} 19 | annotations: 20 | {{- toYaml . | nindent 8 }} 21 | {{- end }} 22 | labels: 23 | {{- include "ethproxy.selectorLabels" . | nindent 8 }} 24 | spec: 25 | {{- with .Values.imagePullSecrets }} 26 | imagePullSecrets: 27 | {{- toYaml . | nindent 8 }} 28 | {{- end }} 29 | serviceAccountName: {{ include "ethproxy.serviceAccountName" . }} 30 | securityContext: 31 | {{- toYaml .Values.podSecurityContext | nindent 8 }} 32 | containers: 33 | - name: {{ .Chart.Name }} 34 | securityContext: 35 | {{- toYaml .Values.securityContext | nindent 12 }} 36 | image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}" 37 | imagePullPolicy: {{ .Values.image.pullPolicy }} 38 | envFrom: 39 | - configMapRef: 40 | name: {{ include "ethproxy.fullname" . }} 41 | ports: 42 | - name: api 43 | containerPort: {{ .Values.config.PROXY_API_PORT }} 44 | protocol: TCP 45 | - name: ws 46 | containerPort: {{ .Values.config.PROXY_WS_PORT }} 47 | protocol: TCP 48 | livenessProbe: 49 | httpGet: 50 | path: /health 51 | port: api 52 | readinessProbe: 53 | httpGet: 54 | path: /readiness 55 | port: api 56 | resources: 57 | {{- toYaml .Values.resources | nindent 12 }} 58 | {{- with .Values.nodeSelector }} 59 | nodeSelector: 60 | {{- toYaml . | nindent 8 }} 61 | {{- end }} 62 | {{- with .Values.affinity }} 63 | affinity: 64 | {{- toYaml . | nindent 8 }} 65 | {{- end }} 66 | {{- with .Values.tolerations }} 67 | tolerations: 68 | {{- toYaml . | nindent 8 }} 69 | {{- end }} 70 | -------------------------------------------------------------------------------- /charts/ethproxy/templates/hpa.yaml: -------------------------------------------------------------------------------- 1 | {{- if .Values.autoscaling.enabled }} 2 | apiVersion: autoscaling/v2beta1 3 | kind: HorizontalPodAutoscaler 4 | metadata: 5 | name: {{ include "ethproxy.fullname" . }} 6 | labels: 7 | {{- include "ethproxy.labels" . | nindent 4 }} 8 | spec: 9 | scaleTargetRef: 10 | apiVersion: apps/v1 11 | kind: Deployment 12 | name: {{ include "ethproxy.fullname" . }} 13 | minReplicas: {{ .Values.autoscaling.minReplicas }} 14 | maxReplicas: {{ .Values.autoscaling.maxReplicas }} 15 | metrics: 16 | {{- if .Values.autoscaling.targetCPUUtilizationPercentage }} 17 | - type: Resource 18 | resource: 19 | name: cpu 20 | targetAverageUtilization: {{ .Values.autoscaling.targetCPUUtilizationPercentage }} 21 | {{- end }} 22 | {{- if .Values.autoscaling.targetMemoryUtilizationPercentage }} 23 | - type: Resource 24 | resource: 25 | name: memory 26 | targetAverageUtilization: {{ .Values.autoscaling.targetMemoryUtilizationPercentage }} 27 | {{- end }} 28 | {{- end }} 29 | -------------------------------------------------------------------------------- /charts/ethproxy/templates/ingress.yaml: -------------------------------------------------------------------------------- 1 | {{- if .Values.ingress.enabled -}} 2 | {{- $fullName := include "ethproxy.fullname" . -}} 3 | {{- $svcPort := .Values.service.portAPI -}} 4 | {{- if semverCompare ">=1.19-0" .Capabilities.KubeVersion.Version -}} 5 | apiVersion: networking.k8s.io/v1 6 | {{- else -}} 7 | apiVersion: extensions/v1beta1 8 | {{- end }} 9 | kind: Ingress 10 | metadata: 11 | name: {{ $fullName }} 12 | labels: 13 | {{- include "ethproxy.labels" . | nindent 4 }} 14 | {{- with .Values.ingress.annotations }} 15 | annotations: 16 | {{- toYaml . | nindent 4 }} 17 | {{- end }} 18 | spec: 19 | ingressClassName: {{ .Values.ingress.class }} 20 | {{- if .Values.ingress.tls }} 21 | tls: 22 | {{- range .Values.ingress.tls }} 23 | - hosts: 24 | {{- range .hosts }} 25 | - {{ . | quote }} 26 | {{- end }} 27 | secretName: {{ .secretName }} 28 | {{- end }} 29 | {{- end }} 30 | rules: 31 | {{- range .Values.ingress.hosts }} 32 | - host: {{ .host | quote }} 33 | http: 34 | paths: 35 | {{- range .paths }} 36 | - path: {{ . }} 37 | pathType: ImplementationSpecific 38 | backend: 39 | service: 40 | name: {{ $fullName }} 41 | port: 42 | number: {{ $svcPort }} 43 | {{- end }} 44 | {{- end }} 45 | {{- end }} 46 | -------------------------------------------------------------------------------- /charts/ethproxy/templates/service.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | kind: Service 3 | metadata: 4 | name: {{ include "ethproxy.fullname" . }} 5 | labels: 6 | {{- include "ethproxy.labels" . | nindent 4 }} 7 | spec: 8 | type: {{ .Values.service.type }} 9 | ports: 10 | - port: {{ .Values.service.portAPI }} 11 | targetPort: api 12 | protocol: TCP 13 | name: api 14 | - port: {{ .Values.service.portWS }} 15 | targetPort: ws 16 | protocol: TCP 17 | name: ws 18 | selector: 19 | {{- include "ethproxy.selectorLabels" . | nindent 4 }} 20 | -------------------------------------------------------------------------------- /charts/ethproxy/templates/serviceaccount.yaml: -------------------------------------------------------------------------------- 1 | {{- if .Values.serviceAccount.create -}} 2 | apiVersion: v1 3 | kind: ServiceAccount 4 | metadata: 5 | name: {{ include "ethproxy.serviceAccountName" . }} 6 | labels: 7 | {{- include "ethproxy.labels" . | nindent 4 }} 8 | {{- with .Values.serviceAccount.annotations }} 9 | annotations: 10 | {{- toYaml . | nindent 4 }} 11 | {{- end }} 12 | {{- end }} 13 | -------------------------------------------------------------------------------- /charts/ethproxy/values.yaml: -------------------------------------------------------------------------------- 1 | # Default values for ethproxy. 2 | # This is a YAML-formatted file. 3 | # Declare variables to be passed into your templates. 4 | 5 | replicaCount: 1 6 | 7 | image: 8 | repository: ethersphere/ethproxy 9 | pullPolicy: IfNotPresent 10 | # Overrides the image tag whose default is the chart version. 11 | tag: latest 12 | 13 | imagePullSecrets: [] 14 | nameOverride: "" 15 | fullnameOverride: "" 16 | 17 | serviceAccount: 18 | # Specifies whether a service account should be created 19 | create: true 20 | # Annotations to add to the service account 21 | annotations: {} 22 | # The name of the service account to use. 23 | # If not set and create is true, a name is generated using the fullname template 24 | name: "" 25 | 26 | podAnnotations: {} 27 | 28 | podSecurityContext: {} 29 | # fsGroup: 2000 30 | 31 | securityContext: {} 32 | # capabilities: 33 | # drop: 34 | # - ALL 35 | # readOnlyRootFilesystem: true 36 | # runAsNonRoot: true 37 | # runAsUser: 1000 38 | 39 | service: 40 | type: ClusterIP 41 | portAPI: 80 42 | portWS: 8546 43 | 44 | ingress: 45 | enabled: false 46 | annotations: {} 47 | # kubernetes.io/ingress.class: nginx 48 | # kubernetes.io/tls-acme: "true" 49 | class: "" 50 | hosts: 51 | - host: chart-example.local 52 | paths: [] 53 | tls: [] 54 | # - secretName: chart-example-tls 55 | # hosts: 56 | # - chart-example.local 57 | 58 | resources: {} 59 | # If you do want to specify resources, uncomment the following lines, 60 | # adjust them as necessary, and remove the curly braces after 'resources:'. 61 | # limits: 62 | # cpu: 300m 63 | # ephemeral-storage: 2Gi 64 | # memory: 512Mi 65 | # requests: 66 | # cpu: 300m 67 | # ephemeral-storage: 512Mi 68 | # memory: 512Mi 69 | 70 | autoscaling: 71 | enabled: false 72 | minReplicas: 1 73 | maxReplicas: 100 74 | targetCPUUtilizationPercentage: 80 75 | # targetMemoryUtilizationPercentage: 80 76 | 77 | nodeSelector: {} 78 | 79 | tolerations: [] 80 | 81 | affinity: {} 82 | 83 | strategy: 84 | type: Recreate 85 | 86 | # environment variables 87 | config: 88 | PROXY_API_PORT: "6100" 89 | PROXY_BACKEND_ENDPOINT: "ws://geth-swap:8546" 90 | PROXY_WS_PORT: "6000" 91 | -------------------------------------------------------------------------------- /charts/geth-swap/.helmignore: -------------------------------------------------------------------------------- 1 | # Patterns to ignore when building packages. 2 | # This supports shell glob matching, relative path matching, and 3 | # negation (prefixed with !). Only one pattern per line. 4 | .DS_Store 5 | # Common VCS dirs 6 | .git/ 7 | .gitignore 8 | .bzr/ 9 | .bzrignore 10 | .hg/ 11 | .hgignore 12 | .svn/ 13 | # Common backup files 14 | *.swp 15 | *.bak 16 | *.tmp 17 | *.orig 18 | *~ 19 | # Various IDEs 20 | .project 21 | .idea/ 22 | *.tmproj 23 | .vscode/ 24 | -------------------------------------------------------------------------------- /charts/geth-swap/Chart.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v2 2 | name: geth-swap 3 | description: A Helm chart for Kubernetes 4 | home: https://www.ethswarm.org 5 | icon: https://docs.ethswarm.org/img/swarm-logo-2.svg 6 | 7 | maintainers: 8 | - name: ralph-pichler 9 | email: ralph@ethswarm.org 10 | 11 | # A chart can be either an 'application' or a 'library' chart. 12 | # 13 | # Application charts are a collection of templates that can be packaged into versioned archives 14 | # to be deployed. 15 | # 16 | # Library charts provide useful utilities or functions for the chart developer. They're included as 17 | # a dependency of application charts to inject those utilities and functions into the rendering 18 | # pipeline. Library charts do not define any templates and therefore cannot be deployed. 19 | type: application 20 | 21 | # This is the chart version. This version number should be incremented each time you make changes 22 | # to the chart and its templates, including the app version. 23 | version: 0.5.0 24 | 25 | # This is the version number of the application being deployed. This version number should be 26 | # incremented each time you make changes to the application. 27 | appVersion: 1.16.0 28 | -------------------------------------------------------------------------------- /charts/geth-swap/templates/genesis.configmap.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | kind: ConfigMap 3 | metadata: 4 | name: {{ include "geth-swap.fullname" . }}-config 5 | data: 6 | networkid: {{ .Values.geth.genesis.networkid | quote }} 7 | validatorKey: {{ .Values.geth.genesis.validatorKey | quote }} 8 | genesis.json: |- 9 | { 10 | "config": { 11 | "chainId": {{ .Values.geth.genesis.networkid }}, 12 | "homesteadBlock": 0, 13 | "eip150Block": 0, 14 | "eip150Hash": "0x0000000000000000000000000000000000000000000000000000000000000000", 15 | "eip155Block": 0, 16 | "eip158Block": 0, 17 | "byzantiumBlock": 0, 18 | "constantinopleBlock": 0, 19 | "petersburgBlock": 0, 20 | "istanbulBlock": 0, 21 | "berlinBlock": 0, 22 | "londonBlock": 0, 23 | "clique": { 24 | "period": {{ .Values.geth.genesis.clique.period }}, 25 | "epoch": {{ .Values.geth.genesis.clique.epoch }} 26 | } 27 | }, 28 | "nonce": "0x0", 29 | "timestamp": "0x5e4bc3a6", 30 | "extraData": "0x0000000000000000000000000000000000000000000000000000000000000000{{ .Values.geth.genesis.validatorAddress }}0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", 31 | "gasLimit": {{ .Values.geth.genesis.gasLimit | quote }}, 32 | "difficulty": "0x1", 33 | "mixHash": "0x0000000000000000000000000000000000000000000000000000000000000000", 34 | "coinbase": "0x0000000000000000000000000000000000000000", 35 | "alloc": { 36 | {{- range $i := until 256 }} 37 | {{ $i | printf "%040x" | quote }}: { 38 | "balance": "0x1" 39 | }, 40 | {{- end}} 41 | {{- range $i, $account := .Values.geth.genesis.accounts }} 42 | {{if $i}},{{end}}{{ $account.addr | quote }}: { 43 | "balance": {{ $account.wei | quote }} 44 | } 45 | {{- end }} 46 | }, 47 | "number": "0x0", 48 | "gasUsed": "0x0", 49 | "parentHash": "0x0000000000000000000000000000000000000000000000000000000000000000" 50 | } -------------------------------------------------------------------------------- /charts/geth-swap/templates/ingress.yaml: -------------------------------------------------------------------------------- 1 | {{- if .Values.ingress.enabled -}} 2 | {{- $fullName := include "geth-swap.fullname" . -}} 3 | {{- $svcPort := .Values.service.port -}} 4 | {{- if eq .Values.ingress.class "traefik" -}} 5 | {{- $namespace := .Release.Namespace -}} 6 | apiVersion: traefik.containo.us/v1alpha1 7 | kind: IngressRoute 8 | metadata: 9 | name: {{ $fullName }} 10 | namespace: {{ $namespace }} 11 | spec: 12 | routes: 13 | {{- range .Values.ingress.hosts }} 14 | {{- $ingressHost := $fullName -}} 15 | {{- if .domain }} 16 | {{- $ingressHost = printf "%s.%s" $fullName .domain -}} 17 | {{- end }} 18 | {{- range .paths }} 19 | - kind: Rule 20 | match: Host({{ $ingressHost | quote }}) && PathPrefix({{ . | quote }}) 21 | services: 22 | - kind: Service 23 | name: {{ $fullName }} 24 | namespace: {{ $namespace }} 25 | port: {{ $svcPort }} 26 | {{- end }} 27 | {{- end }} 28 | {{- else -}} 29 | {{- if semverCompare ">=1.19-0" .Capabilities.KubeVersion.Version -}} 30 | apiVersion: networking.k8s.io/v1 31 | {{- else -}} 32 | apiVersion: extensions/v1beta1 33 | {{- end }} 34 | kind: Ingress 35 | metadata: 36 | name: {{ $fullName }} 37 | labels: 38 | {{- include "geth-swap.labels" . | nindent 4 }} 39 | {{- with .Values.ingress.annotations }} 40 | annotations: 41 | {{- toYaml . | nindent 4 }} 42 | {{- end }} 43 | spec: 44 | ingressClassName: {{ .Values.ingress.class }} 45 | {{- if .Values.ingress.tls }} 46 | tls: 47 | {{- range .Values.ingress.tls }} 48 | - hosts: 49 | {{- range .hosts }} 50 | - {{ . | quote }} 51 | {{- end }} 52 | secretName: {{ .secretName }} 53 | {{- end }} 54 | {{- end }} 55 | rules: 56 | {{- range .Values.ingress.hosts }} 57 | - host: {{ .host | quote }} 58 | http: 59 | paths: 60 | {{- range .paths }} 61 | - path: {{ . }} 62 | pathType: ImplementationSpecific 63 | backend: 64 | service: 65 | name: {{ $fullName }} 66 | port: 67 | number: {{ $svcPort }} 68 | {{- end }} 69 | {{- end }} 70 | {{- end }} 71 | {{- end }} 72 | -------------------------------------------------------------------------------- /charts/geth-swap/templates/service-ether-proxy.yaml: -------------------------------------------------------------------------------- 1 | {{- if .Values.etherProxy.enabled -}} 2 | apiVersion: v1 3 | kind: Service 4 | metadata: 5 | name: ether-proxy-{{ include "geth-swap.fullname" . }} 6 | labels: 7 | {{- include "geth-swap.labels" . | nindent 4 }} 8 | spec: 9 | type: {{ .Values.etherProxy.service.type }} 10 | ports: 11 | - port: {{ .Values.etherProxy.service.port }} 12 | targetPort: ether-proxy 13 | protocol: TCP 14 | name: ether-proxy 15 | selector: 16 | {{- include "geth-swap.selectorLabels" . | nindent 4 }} 17 | {{- end -}} 18 | -------------------------------------------------------------------------------- /charts/geth-swap/templates/service.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | kind: Service 3 | metadata: 4 | name: {{ include "geth-swap.fullname" . }} 5 | labels: 6 | {{- include "geth-swap.labels" . | nindent 4 }} 7 | spec: 8 | type: {{ .Values.service.type }} 9 | ports: 10 | - port: {{ .Values.service.port }} 11 | targetPort: rpc 12 | protocol: TCP 13 | name: rpc 14 | - port: {{ .Values.service.wsport }} 15 | targetPort: ws 16 | protocol: TCP 17 | name: ws 18 | selector: 19 | {{- include "geth-swap.selectorLabels" . | nindent 4 }} 20 | -------------------------------------------------------------------------------- /charts/geth-swap/templates/serviceaccount.yaml: -------------------------------------------------------------------------------- 1 | {{- if .Values.serviceAccount.create -}} 2 | apiVersion: v1 3 | kind: ServiceAccount 4 | metadata: 5 | name: {{ include "geth-swap.serviceAccountName" . }} 6 | labels: 7 | {{- include "geth-swap.labels" . | nindent 4 }} 8 | {{- with .Values.serviceAccount.annotations }} 9 | annotations: 10 | {{- toYaml . | nindent 4 }} 11 | {{- end }} 12 | {{- end -}} 13 | -------------------------------------------------------------------------------- /charts/geth-swap/templates/setupcontracts.yaml: -------------------------------------------------------------------------------- 1 | {{- if .Values.gethSetup -}} 2 | apiVersion: batch/v1 3 | kind: Job 4 | metadata: 5 | name: {{ include "geth-swap.fullname" . }}-setupcontracts 6 | labels: 7 | {{- include "geth-swap.labels" . | nindent 4 }} 8 | spec: 9 | template: 10 | spec: 11 | {{- with .Values.imagePullSecrets }} 12 | imagePullSecrets: 13 | {{- toYaml . | nindent 8 }} 14 | {{- end }} 15 | containers: 16 | - name: setup 17 | image: "{{ .Values.imageSetupContract.repository }}:{{ .Values.imageSetupContract.tag }}" 18 | imagePullPolicy: {{ .Values.imageSetupContract.pullPolicy }} 19 | env: 20 | - name: BACKEND 21 | value: "http://{{ include "geth-swap.fullname" . }}:8545" 22 | - name: BZZACCOUNTS 23 | value: {{ .Values.swap.bzzaccounts | join " " }} 24 | {{ if .Values.swap.gas }} 25 | - name: GAS 26 | value: {{ .Values.swap.gas | quote }} 27 | {{ end }} 28 | command: 29 | - sh 30 | - -ac 31 | - /app/docker/deploy-contracts.sh 32 | restartPolicy: Never 33 | {{- end -}} 34 | -------------------------------------------------------------------------------- /charts/geth-swap/templates/tests/test-connection.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | kind: Pod 3 | metadata: 4 | name: "{{ include "geth-swap.fullname" . }}-test-connection" 5 | labels: 6 | {{- include "geth-swap.labels" . | nindent 4 }} 7 | annotations: 8 | "helm.sh/hook": test-success 9 | spec: 10 | containers: 11 | - name: wget 12 | image: busybox 13 | command: ['wget'] 14 | args: ['{{ include "geth-swap.fullname" . }}:{{ .Values.service.port }}'] 15 | restartPolicy: Never 16 | -------------------------------------------------------------------------------- /charts/nethermind/.helmignore: -------------------------------------------------------------------------------- 1 | # Patterns to ignore when building packages. 2 | # This supports shell glob matching, relative path matching, and 3 | # negation (prefixed with !). Only one pattern per line. 4 | .DS_Store 5 | # Common VCS dirs 6 | .git/ 7 | .gitignore 8 | .bzr/ 9 | .bzrignore 10 | .hg/ 11 | .hgignore 12 | .svn/ 13 | # Common backup files 14 | *.swp 15 | *.bak 16 | *.tmp 17 | *.orig 18 | *~ 19 | # Various IDEs 20 | .project 21 | .idea/ 22 | *.tmproj 23 | .vscode/ 24 | examples/ 25 | -------------------------------------------------------------------------------- /charts/nethermind/Chart.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v2 2 | name: nethermind 3 | description: A Helm chart for Ethereum Nethermind client 4 | type: application 5 | version: 0.2.1 6 | icon: https://github.com/NethermindEth/nethermind/raw/master/Nethermind.png 7 | keywords: 8 | - ethereum 9 | 10 | home: https://nethermind.io/ 11 | sources: 12 | - https://github.com/NethermindEth/nethermind 13 | maintainers: 14 | - name: vandot 15 | email: vandot@ethswarm.org 16 | 17 | appVersion: latest 18 | -------------------------------------------------------------------------------- /charts/nethermind/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright 2021 Swarm Foundation 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 4 | 5 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 6 | 7 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -------------------------------------------------------------------------------- /charts/nethermind/templates/NOTES.txt: -------------------------------------------------------------------------------- 1 | 1. Get the application URL by running these commands: 2 | {{- if contains "NodePort" .Values.service.type }} 3 | export NODE_PORT=$(kubectl get --namespace {{ .Release.Namespace }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ include "nethermind.fullname" . }}) 4 | export NODE_IP=$(kubectl get nodes --namespace {{ .Release.Namespace }} -o jsonpath="{.items[0].status.addresses[0].address}") 5 | echo http://$NODE_IP:$NODE_PORT 6 | {{- else if contains "LoadBalancer" .Values.service.type }} 7 | NOTE: It may take a few minutes for the LoadBalancer IP to be available. 8 | You can watch the status of by running 'kubectl get --namespace {{ .Release.Namespace }} svc -w {{ include "nethermind.fullname" . }}' 9 | export SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ include "nethermind.fullname" . }} --template "{{"{{ range (index .status.loadBalancer.ingress 0) }}{{.}}{{ end }}"}}") 10 | echo http://$SERVICE_IP:{{ .Values.service.port }} 11 | {{- else if contains "ClusterIP" .Values.service.type }} 12 | export POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l "app.kubernetes.io/name={{ include "nethermind.name" . }},app.kubernetes.io/instance={{ .Release.Name }}" -o jsonpath="{.items[0].metadata.name}") 13 | echo "Visit http://127.0.0.1:8080 to use your application" 14 | kubectl --namespace {{ .Release.Namespace }} port-forward $POD_NAME 8080:80 15 | {{- end }} 16 | -------------------------------------------------------------------------------- /charts/nethermind/templates/_helpers.tpl: -------------------------------------------------------------------------------- 1 | {{/* vim: set filetype=mustache: */}} 2 | {{/* 3 | Expand the name of the chart. 4 | */}} 5 | {{- define "nethermind.name" -}} 6 | {{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" }} 7 | {{- end }} 8 | 9 | {{/* 10 | Create a default fully qualified app name. 11 | We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). 12 | If release name contains chart name it will be used as a full name. 13 | */}} 14 | {{- define "nethermind.fullname" -}} 15 | {{- if .Values.fullnameOverride }} 16 | {{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" }} 17 | {{- else }} 18 | {{- $name := default .Chart.Name .Values.nameOverride }} 19 | {{- if contains $name .Release.Name }} 20 | {{- .Release.Name | trunc 63 | trimSuffix "-" }} 21 | {{- else }} 22 | {{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" }} 23 | {{- end }} 24 | {{- end }} 25 | {{- end }} 26 | 27 | {{/* 28 | Create chart name and version as used by the chart label. 29 | */}} 30 | {{- define "nethermind.chart" -}} 31 | {{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }} 32 | {{- end }} 33 | 34 | {{/* 35 | Common labels 36 | */}} 37 | {{- define "nethermind.labels" -}} 38 | helm.sh/chart: {{ include "nethermind.chart" . }} 39 | {{ include "nethermind.selectorLabels" . }} 40 | {{- if .Chart.AppVersion }} 41 | app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} 42 | {{- end }} 43 | app.kubernetes.io/managed-by: {{ .Release.Service }} 44 | {{- end }} 45 | 46 | {{/* 47 | Selector labels 48 | */}} 49 | {{- define "nethermind.selectorLabels" -}} 50 | app.kubernetes.io/name: {{ include "nethermind.name" . }} 51 | app.kubernetes.io/instance: {{ .Release.Name }} 52 | {{- end }} 53 | 54 | {{/* 55 | Create the name of the service account to use 56 | */}} 57 | {{- define "nethermind.serviceAccountName" -}} 58 | {{- if .Values.serviceAccount.create }} 59 | {{- default (include "nethermind.fullname" .) .Values.serviceAccount.name }} 60 | {{- else }} 61 | {{- default "default" .Values.serviceAccount.name }} 62 | {{- end }} 63 | {{- end }} 64 | 65 | 66 | {{/* 67 | Return the proper Storage Class 68 | */}} 69 | {{- define "nethermind.storageClass" -}} 70 | {{- if .Values.global -}} 71 | {{- if .Values.global.storageClass -}} 72 | {{- if (eq "-" .Values.global.storageClass) -}} 73 | {{- printf "storageClassName: \"\"" -}} 74 | {{- else }} 75 | {{- printf "storageClassName: %s" .Values.global.storageClass -}} 76 | {{- end -}} 77 | {{- else -}} 78 | {{- if .Values.persistence.storageClass -}} 79 | {{- if (eq "-" .Values.persistence.storageClass) -}} 80 | {{- printf "storageClassName: \"\"" -}} 81 | {{- else }} 82 | {{- printf "storageClassName: %s" .Values.persistence.storageClass -}} 83 | {{- end -}} 84 | {{- end -}} 85 | {{- end -}} 86 | {{- else -}} 87 | {{- if .Values.persistence.storageClass -}} 88 | {{- if (eq "-" .Values.persistence.storageClass) -}} 89 | {{- printf "storageClassName: \"\"" -}} 90 | {{- else }} 91 | {{- printf "storageClassName: %s" .Values.persistence.storageClass -}} 92 | {{- end -}} 93 | {{- end -}} 94 | {{- end -}} 95 | {{- end -}} 96 | -------------------------------------------------------------------------------- /charts/nethermind/templates/configmap.yaml: -------------------------------------------------------------------------------- 1 | {{- if .Values.config -}} 2 | apiVersion: v1 3 | kind: ConfigMap 4 | metadata: 5 | name: {{ include "nethermind.fullname" . }}-configmap 6 | data: 7 | custom.cfg: | 8 | {{ .Values.config | indent 4 }} 9 | {{- end -}} 10 | -------------------------------------------------------------------------------- /charts/nethermind/templates/secret.yaml: -------------------------------------------------------------------------------- 1 | {{- if .Values.jwt -}} 2 | apiVersion: v1 3 | kind: Secret 4 | metadata: 5 | name: {{ include "nethermind.fullname" . }}-env 6 | labels: 7 | {{- include "nethermind.labels" . | nindent 4 }} 8 | data: 9 | {{- range $key, $value := .Values.secretEnv }} 10 | {{ $key }}: {{ $value | b64enc }} 11 | {{- end }} 12 | --- 13 | apiVersion: v1 14 | kind: Secret 15 | metadata: 16 | name: {{ include "nethermind.fullname" . }}-jwt 17 | type: Opaque 18 | data: 19 | jwt: {{ .Values.jwt | b64enc }} 20 | {{- end -}} -------------------------------------------------------------------------------- /charts/nethermind/templates/service.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | kind: Service 3 | metadata: 4 | name: {{ include "nethermind.fullname" . }} 5 | labels: 6 | {{- include "nethermind.labels" . | nindent 4 }} 7 | spec: 8 | type: {{ .Values.service.type }} 9 | ports: 10 | - port: {{ .Values.service.http }} 11 | targetPort: http 12 | protocol: TCP 13 | name: http 14 | - port: {{ .Values.service.engine }} 15 | targetPort: engine 16 | protocol: TCP 17 | name: engine 18 | - port: {{ .Values.service.prometheus }} 19 | targetPort: prometheus 20 | protocol: TCP 21 | name: prometheus 22 | selector: 23 | {{- include "nethermind.selectorLabels" . | nindent 4 }} 24 | 25 | --- 26 | 27 | apiVersion: v1 28 | kind: Service 29 | metadata: 30 | name: {{ include "nethermind.fullname" . }}-p2p 31 | labels: 32 | {{- include "nethermind.labels" . | nindent 4 }} 33 | spec: 34 | type: {{ .Values.serviceP2P.type }} 35 | ports: 36 | - port: {{ .Values.serviceP2P.listener }} 37 | targetPort: listener 38 | protocol: TCP 39 | name: listener 40 | nodePort: {{ .Values.serviceP2P.listener }} 41 | - port: {{ .Values.serviceP2P.discovery }} 42 | targetPort: discovery 43 | protocol: UDP 44 | name: discovery 45 | nodePort: {{ .Values.serviceP2P.discovery }} 46 | selector: 47 | {{- include "nethermind.selectorLabels" . | nindent 4 }} 48 | -------------------------------------------------------------------------------- /charts/nethermind/templates/serviceaccount.yaml: -------------------------------------------------------------------------------- 1 | {{- if .Values.serviceAccount.create -}} 2 | apiVersion: v1 3 | kind: ServiceAccount 4 | metadata: 5 | name: {{ include "nethermind.serviceAccountName" . }} 6 | labels: 7 | {{- include "nethermind.labels" . | nindent 4 }} 8 | {{- with .Values.serviceAccount.annotations }} 9 | annotations: 10 | {{- toYaml . | nindent 4 }} 11 | {{- end }} 12 | {{- end }} 13 | -------------------------------------------------------------------------------- /charts/nethermind/templates/servicemonitor.yaml: -------------------------------------------------------------------------------- 1 | {{ if .Values.prometheus }} 2 | 3 | apiVersion: monitoring.coreos.com/v1 4 | kind: ServiceMonitor 5 | metadata: 6 | name: {{ include "nethermind.fullname" . }}-metrics 7 | spec: 8 | endpoints: 9 | - interval: 5s 10 | path: /metrics 11 | port: prometheus 12 | metricRelabelings: 13 | - sourceLabels: [__name__] 14 | targetLabel: __name__ 15 | replacement: nethermind_$1 16 | namespaceSelector: 17 | matchNames: 18 | - {{ .Release.Namespace}} 19 | selector: 20 | matchLabels: 21 | {{- include "nethermind.selectorLabels" . | nindent 6 }} 22 | 23 | {{ end }} 24 | -------------------------------------------------------------------------------- /charts/nethermind/templates/tests/test-connection.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | kind: Pod 3 | metadata: 4 | name: "{{ include "nethermind.fullname" . }}-test-connection" 5 | labels: 6 | {{- include "nethermind.labels" . | nindent 4 }} 7 | annotations: 8 | "helm.sh/hook": test-success 9 | spec: 10 | containers: 11 | - name: wget 12 | image: busybox 13 | command: ['wget'] 14 | args: ['{{ include "nethermind.fullname" . }}:{{ .Values.service.http }}'] 15 | restartPolicy: Never 16 | -------------------------------------------------------------------------------- /charts/nethermind/values.yaml: -------------------------------------------------------------------------------- 1 | # Default values for nethermind. 2 | # This is a YAML-formatted file. 3 | # Declare variables to be passed into your templates. 4 | 5 | replicaCount: 1 6 | 7 | image: 8 | repository: nethermind/nethermind 9 | pullPolicy: IfNotPresent 10 | # Overrides the image tag whose default is the chart appVersion. 11 | tag: "1.14.6" 12 | args: [ 13 | "--config", 14 | "mainnet"] 15 | 16 | imagePullSecrets: [] 17 | nameOverride: "" 18 | fullnameOverride: "" 19 | 20 | volumes: 21 | data: 22 | mountPath: /nethermind/nethermind_db 23 | jwt: 24 | mountPath: /nethermind/secrets 25 | config: 26 | mountPath: /nethermind/configs/custom.cfg 27 | 28 | persistence: 29 | enabled: true 30 | annotations: {} 31 | accessModes: 32 | - ReadWriteOnce 33 | size: 20Gi # For mainnet must increase 34 | 35 | ## A manually managed Persistent Volume and Claim 36 | ## If defined, PVC must be created manually before volume will be bound 37 | ## The value is evaluated as a template, so, for example, the name can depend on .Release or .Chart 38 | ## 39 | # existingClaim: 40 | 41 | ## An existing directory in the node 42 | ## If defined, host directory must be created manually before volume will be bound 43 | ## See https://kubernetes.io/docs/concepts/storage/volumes/#hostpath 44 | ## 45 | # hostPath: 46 | # path: /nethermind/nethermind_db 47 | # type: Directory 48 | 49 | serviceAccount: 50 | # Specifies whether a service account should be created 51 | create: true 52 | # Annotations to add to the service account 53 | annotations: {} 54 | # The name of the service account to use. 55 | # If not set and create is true, a name is generated using the fullname template 56 | name: "" 57 | 58 | podAnnotations: {} 59 | 60 | podSecurityContext: {} 61 | 62 | securityContext: {} 63 | 64 | container: 65 | ports: 66 | http: 8545 67 | engine: 8551 68 | listener: 30303 69 | discovery: 30303 70 | prometheus: 9091 71 | 72 | service: 73 | type: ClusterIP 74 | http: 8545 75 | engine: 8551 76 | prometheus: 9091 77 | 78 | serviceP2P: 79 | type: NodePort 80 | listener: 30303 81 | discovery: 30303 82 | 83 | prometheus: false 84 | 85 | resources: {} 86 | # We usually recommend not to specify default resources and to leave this as a conscious 87 | # choice for the user. This also increases chances charts run on environments with little 88 | # resources, such as Minikube. If you do want to specify resources, uncomment the following 89 | # lines, adjust them as necessary, and remove the curly braces after 'resources:'. 90 | # limits: 91 | # cpu: 100m 92 | # memory: 128Mi 93 | # requests: 94 | # cpu: 100m 95 | # memory: 128Mi 96 | 97 | autoscaling: 98 | enabled: false 99 | minReplicas: 1 100 | maxReplicas: 10 101 | targetCPUUtilizationPercentage: 80 102 | # targetMemoryUtilizationPercentage: 80 103 | 104 | nodeSelector: {} 105 | 106 | tolerations: [] 107 | 108 | affinity: {} 109 | 110 | config: {} 111 | -------------------------------------------------------------------------------- /charts/onboarding-faucet/.helmignore: -------------------------------------------------------------------------------- 1 | # Patterns to ignore when building packages. 2 | # This supports shell glob matching, relative path matching, and 3 | # negation (prefixed with !). Only one pattern per line. 4 | .DS_Store 5 | # Common VCS dirs 6 | .git/ 7 | .gitignore 8 | .bzr/ 9 | .bzrignore 10 | .hg/ 11 | .hgignore 12 | .svn/ 13 | # Common backup files 14 | *.swp 15 | *.bak 16 | *.tmp 17 | *.orig 18 | *~ 19 | # Various IDEs 20 | .project 21 | .idea/ 22 | *.tmproj 23 | .vscode/ 24 | -------------------------------------------------------------------------------- /charts/onboarding-faucet/Chart.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v2 2 | appVersion: latest 3 | name: onboarding-faucet 4 | version: 0.1.4 5 | description: Onboarding faucet Helm chart for Kubernetes 6 | home: https://www.ethswarm.org 7 | icon: https://docs.ethswarm.org/img/swarm-logo-2.svg 8 | keywords: 9 | - blockchain 10 | - ethereum 11 | - faucet 12 | maintainers: 13 | - name: vandot 14 | email: vandot@ethswarm.org 15 | sources: 16 | - https://github.com/ethersphere/onboarding-faucet 17 | type: application 18 | -------------------------------------------------------------------------------- /charts/onboarding-faucet/README.md: -------------------------------------------------------------------------------- 1 | # Onboarding faucet Helm Chart 2 | 3 | [Onboarding faucet](https://github.com/ethersphere/onboarding-faucet) is a lightweight Prometheus proxy that will output Ethereum wallet balances from a list of addresses you specify. 4 | 5 | ## Prerequisites 6 | 7 | Make sure you have Helm [installed](https://helm.sh/docs/intro/install/) installed. 8 | 9 | ## Get Repo Info 10 | 11 | ```bash 12 | helm repo add ethersphere https://ethersphere.github.io/helm 13 | helm repo update 14 | ``` 15 | 16 | _See [helm repo](https://helm.sh/docs/helm/helm_repo/) for command documentation._ 17 | 18 | ## QuickStart 19 | 20 | ```bash 21 | $ helm install --generate-name ethersphere/onboarding-faucet 22 | ``` 23 | 24 | ## Introduction 25 | 26 | This chart deploys a [Onboarding faucet](https://github.com/ethersphere/onboarding-faucet) onto a Kubernetes cluster using the Helm package manager. 27 | 28 | ## Prerequisites 29 | 30 | * Kubernetes 1.15 31 | * Helm 3.0 32 | 33 | ## Installing the Chart 34 | 35 | To install the chart with the release name `my-release`: 36 | 37 | ```bash 38 | $ helm install my-release ethersphere/onboarding-faucet 39 | ``` 40 | 41 | The command deploys Onboarding faucet on the Kubernetes cluster in the default configuration. The [configuration](#configuration) section lists the parameters that can be configured during installation. 42 | 43 | ## Uninstalling the Chart 44 | 45 | To uninstall/delete the `my-release` deployment: 46 | 47 | ```bash 48 | $ helm delete my-release 49 | ``` 50 | 51 | The command removes all the Kubernetes components associated with the chart and deletes the release. 52 | 53 | ## Configuration 54 | 55 | The default configuration values for this chart are listed in **values.yaml**. 56 | 57 | ## Helmsman Usage 58 | 59 | ### Prerequisites 60 | 61 | * Kubernetes 1.15 62 | * Helm 3.0 63 | * Helmsman 3.0 64 | 65 | ### Installing 66 | 67 | Create onboarding-faucet.yaml file as shown bellow: 68 | 69 | ```yaml 70 | namespaces: 71 | onboarding-faucet: 72 | 73 | helmRepos: 74 | ethersphere: "https://ethersphere.github.io/helm" 75 | 76 | apps: 77 | onboarding-faucet: 78 | name: onboarding-faucet 79 | namespace: onboarding-faucet 80 | description: "Onboarding faucet" 81 | chart: "ethersphere/onboarding-faucet" 82 | version: "0.1.0" 83 | enabled: true 84 | wait: true 85 | timeout: 120 86 | 87 | ``` 88 | 89 | Execute following command: 90 | ```bash 91 | $ helmsman -apply -f onboarding-faucet.yaml 92 | ``` 93 | 94 | ### Uninstalling 95 | 96 | Execute following command: 97 | ```bash 98 | $ helmsman -destroy -f onboarding-faucet.yaml 99 | ``` 100 | -------------------------------------------------------------------------------- /charts/onboarding-faucet/templates/NOTES.txt: -------------------------------------------------------------------------------- 1 | 1. Get the application URL by running these commands: 2 | {{- if .Values.ingress.enabled }} 3 | {{- range $host := .Values.ingress.hosts }} 4 | {{- range .paths }} 5 | http{{ if $.Values.ingress.tls }}s{{ end }}://{{ $host.host }}{{ . }} 6 | {{- end }} 7 | {{- end }} 8 | {{- else if contains "NodePort" .Values.service.type }} 9 | export NODE_PORT=$(kubectl get --namespace {{ .Release.Namespace }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ include "onboarding-faucet.fullname" . }}) 10 | export NODE_IP=$(kubectl get nodes --namespace {{ .Release.Namespace }} -o jsonpath="{.items[0].status.addresses[0].address}") 11 | echo http://$NODE_IP:$NODE_PORT 12 | {{- else if contains "LoadBalancer" .Values.service.type }} 13 | NOTE: It may take a few minutes for the LoadBalancer IP to be available. 14 | You can watch the status of by running 'kubectl get --namespace {{ .Release.Namespace }} svc -w {{ include "onboarding-faucet.fullname" . }}' 15 | export SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ include "onboarding-faucet.fullname" . }} --template "{{"{{ range (index .status.loadBalancer.ingress 0) }}{{.}}{{ end }}"}}") 16 | echo http://$SERVICE_IP:{{ .Values.service.port }} 17 | {{- else if contains "ClusterIP" .Values.service.type }} 18 | export POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l "app.kubernetes.io/name={{ include "onboarding-faucet.name" . }},app.kubernetes.io/instance={{ .Release.Name }}" -o jsonpath="{.items[0].metadata.name}") 19 | echo "Visit http://127.0.0.1:8080 to use your application" 20 | kubectl --namespace {{ .Release.Namespace }} port-forward $POD_NAME 8080:{{ .Values.config.PROXY_API_PORT }} 21 | {{- end }} 22 | -------------------------------------------------------------------------------- /charts/onboarding-faucet/templates/_helpers.tpl: -------------------------------------------------------------------------------- 1 | {{/* vim: set filetype=mustache: */}} 2 | {{/* 3 | Expand the name of the chart. 4 | */}} 5 | {{- define "onboarding-faucet.name" -}} 6 | {{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" }} 7 | {{- end }} 8 | 9 | {{/* 10 | Create a default fully qualified app name. 11 | We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). 12 | If release name contains chart name it will be used as a full name. 13 | */}} 14 | {{- define "onboarding-faucet.fullname" -}} 15 | {{- if .Values.fullnameOverride }} 16 | {{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" }} 17 | {{- else }} 18 | {{- $name := default .Chart.Name .Values.nameOverride }} 19 | {{- if contains $name .Release.Name }} 20 | {{- .Release.Name | trunc 63 | trimSuffix "-" }} 21 | {{- else }} 22 | {{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" }} 23 | {{- end }} 24 | {{- end }} 25 | {{- end }} 26 | 27 | {{/* 28 | Create chart name and version as used by the chart label. 29 | */}} 30 | {{- define "onboarding-faucet.chart" -}} 31 | {{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }} 32 | {{- end }} 33 | 34 | {{/* 35 | Common labels 36 | */}} 37 | {{- define "onboarding-faucet.labels" -}} 38 | helm.sh/chart: {{ include "onboarding-faucet.chart" . }} 39 | {{ include "onboarding-faucet.selectorLabels" . }} 40 | {{- if .Chart.AppVersion }} 41 | app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} 42 | {{- end }} 43 | app.kubernetes.io/managed-by: {{ .Release.Service }} 44 | {{- end }} 45 | 46 | {{/* 47 | Selector labels 48 | */}} 49 | {{- define "onboarding-faucet.selectorLabels" -}} 50 | app.kubernetes.io/name: {{ include "onboarding-faucet.name" . }} 51 | app.kubernetes.io/instance: {{ .Release.Name }} 52 | {{- end }} 53 | 54 | {{/* 55 | Create the name of the service account to use 56 | */}} 57 | {{- define "onboarding-faucet.serviceAccountName" -}} 58 | {{- if .Values.serviceAccount.create }} 59 | {{- default (include "onboarding-faucet.fullname" .) .Values.serviceAccount.name }} 60 | {{- else }} 61 | {{- default "default" .Values.serviceAccount.name }} 62 | {{- end }} 63 | {{- end }} 64 | -------------------------------------------------------------------------------- /charts/onboarding-faucet/templates/config.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | kind: ConfigMap 3 | metadata: 4 | name: {{ include "onboarding-faucet.fullname" . }} 5 | labels: 6 | {{- include "onboarding-faucet.labels" . | nindent 4 }} 7 | data: 8 | AUTH_TOKEN: {{ .Values.config.AUTH_TOKEN | quote }} 9 | HOSTNAME: {{ .Values.config.HOSTNAME | quote }} 10 | LOG_LEVEL: {{ .Values.config.LOG_LEVEL | quote }} 11 | PORT: {{ .Values.config.PORT | quote }} 12 | RPC_URL: {{ .Values.config.RPC_URL | quote }} 13 | 14 | 15 | -------------------------------------------------------------------------------- /charts/onboarding-faucet/templates/deployment.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: apps/v1 2 | kind: Deployment 3 | metadata: 4 | name: {{ include "onboarding-faucet.fullname" . }} 5 | labels: 6 | {{- include "onboarding-faucet.labels" . | nindent 4 }} 7 | spec: 8 | {{- if not .Values.autoscaling.enabled }} 9 | replicas: {{ .Values.replicaCount }} 10 | {{- end }} 11 | strategy: 12 | {{- toYaml .Values.strategy | nindent 4 }} 13 | selector: 14 | matchLabels: 15 | {{- include "onboarding-faucet.selectorLabels" . | nindent 6 }} 16 | template: 17 | metadata: 18 | {{- with .Values.podAnnotations }} 19 | annotations: 20 | {{- toYaml . | nindent 8 }} 21 | {{- end }} 22 | labels: 23 | {{- include "onboarding-faucet.selectorLabels" . | nindent 8 }} 24 | spec: 25 | {{- with .Values.imagePullSecrets }} 26 | imagePullSecrets: 27 | {{- toYaml . | nindent 8 }} 28 | {{- end }} 29 | serviceAccountName: {{ include "onboarding-faucet.serviceAccountName" . }} 30 | securityContext: 31 | {{- toYaml .Values.podSecurityContext | nindent 8 }} 32 | containers: 33 | - name: {{ .Chart.Name }} 34 | securityContext: 35 | {{- toYaml .Values.securityContext | nindent 12 }} 36 | image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}" 37 | imagePullPolicy: {{ .Values.image.pullPolicy }} 38 | envFrom: 39 | - configMapRef: 40 | name: {{ include "onboarding-faucet.fullname" . }} 41 | {{- if .Values.config.PRIVATE_KEY }} 42 | - secretRef: 43 | name: {{ include "onboarding-faucet.fullname" . }} 44 | {{- end }} 45 | ports: 46 | - name: api 47 | containerPort: {{ .Values.config.PORT }} 48 | protocol: TCP 49 | livenessProbe: 50 | httpGet: 51 | path: /health 52 | port: api 53 | periodSeconds: 20 54 | readinessProbe: 55 | httpGet: 56 | path: /readiness 57 | port: api 58 | periodSeconds: 20 59 | resources: 60 | {{- toYaml .Values.resources | nindent 12 }} 61 | {{- with .Values.nodeSelector }} 62 | nodeSelector: 63 | {{- toYaml . | nindent 8 }} 64 | {{- end }} 65 | {{- with .Values.affinity }} 66 | affinity: 67 | {{- toYaml . | nindent 8 }} 68 | {{- end }} 69 | {{- with .Values.tolerations }} 70 | tolerations: 71 | {{- toYaml . | nindent 8 }} 72 | {{- end }} 73 | -------------------------------------------------------------------------------- /charts/onboarding-faucet/templates/hpa.yaml: -------------------------------------------------------------------------------- 1 | {{- if .Values.autoscaling.enabled }} 2 | apiVersion: autoscaling/v2beta1 3 | kind: HorizontalPodAutoscaler 4 | metadata: 5 | name: {{ include "onboarding-faucet.fullname" . }} 6 | labels: 7 | {{- include "onboarding-faucet.labels" . | nindent 4 }} 8 | spec: 9 | scaleTargetRef: 10 | apiVersion: apps/v1 11 | kind: Deployment 12 | name: {{ include "onboarding-faucet.fullname" . }} 13 | minReplicas: {{ .Values.autoscaling.minReplicas }} 14 | maxReplicas: {{ .Values.autoscaling.maxReplicas }} 15 | metrics: 16 | {{- if .Values.autoscaling.targetCPUUtilizationPercentage }} 17 | - type: Resource 18 | resource: 19 | name: cpu 20 | targetAverageUtilization: {{ .Values.autoscaling.targetCPUUtilizationPercentage }} 21 | {{- end }} 22 | {{- if .Values.autoscaling.targetMemoryUtilizationPercentage }} 23 | - type: Resource 24 | resource: 25 | name: memory 26 | targetAverageUtilization: {{ .Values.autoscaling.targetMemoryUtilizationPercentage }} 27 | {{- end }} 28 | {{- end }} 29 | -------------------------------------------------------------------------------- /charts/onboarding-faucet/templates/ingress.yaml: -------------------------------------------------------------------------------- 1 | {{- if .Values.ingress.enabled -}} 2 | {{- $fullName := include "onboarding-faucet.fullname" . -}} 3 | {{- $svcPort := .Values.service.port -}} 4 | {{- if semverCompare ">=1.19-0" .Capabilities.KubeVersion.Version -}} 5 | apiVersion: networking.k8s.io/v1 6 | {{- else -}} 7 | apiVersion: extensions/v1beta1 8 | {{- end }} 9 | kind: Ingress 10 | metadata: 11 | name: {{ $fullName }} 12 | labels: 13 | {{- include "onboarding-faucet.labels" . | nindent 4 }} 14 | {{- with .Values.ingress.annotations }} 15 | annotations: 16 | {{- toYaml . | nindent 4 }} 17 | {{- end }} 18 | spec: 19 | ingressClassName: {{ .Values.ingress.class }} 20 | {{- if .Values.ingress.tls }} 21 | tls: 22 | {{- range .Values.ingress.tls }} 23 | - hosts: 24 | {{- range .hosts }} 25 | - {{ . | quote }} 26 | {{- end }} 27 | secretName: {{ .secretName }} 28 | {{- end }} 29 | {{- end }} 30 | rules: 31 | {{- range .Values.ingress.hosts }} 32 | - host: {{ .host | quote }} 33 | http: 34 | paths: 35 | {{- range .paths }} 36 | - path: {{ . }} 37 | pathType: ImplementationSpecific 38 | backend: 39 | service: 40 | name: {{ $fullName }} 41 | port: 42 | number: {{ $svcPort }} 43 | {{- end }} 44 | {{- end }} 45 | {{- end }} 46 | -------------------------------------------------------------------------------- /charts/onboarding-faucet/templates/secret.yaml: -------------------------------------------------------------------------------- 1 | {{- if .Values.config.PRIVATE_KEY -}} 2 | apiVersion: v1 3 | kind: Secret 4 | metadata: 5 | name: {{ include "onboarding-faucet.fullname" . }} 6 | labels: 7 | {{- include "onboarding-faucet.labels" . | nindent 4 }} 8 | type: Opaque 9 | data: 10 | PRIVATE_KEY: {{ .Values.config.PRIVATE_KEY | b64enc }} 11 | {{- end -}} 12 | -------------------------------------------------------------------------------- /charts/onboarding-faucet/templates/service.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | kind: Service 3 | metadata: 4 | name: {{ include "onboarding-faucet.fullname" . }} 5 | labels: 6 | {{- include "onboarding-faucet.labels" . | nindent 4 }} 7 | spec: 8 | type: {{ .Values.service.type }} 9 | ports: 10 | - port: {{ .Values.service.port }} 11 | targetPort: api 12 | protocol: TCP 13 | name: api 14 | selector: 15 | {{- include "onboarding-faucet.selectorLabels" . | nindent 4 }} 16 | -------------------------------------------------------------------------------- /charts/onboarding-faucet/templates/serviceaccount.yaml: -------------------------------------------------------------------------------- 1 | {{- if .Values.serviceAccount.create -}} 2 | apiVersion: v1 3 | kind: ServiceAccount 4 | metadata: 5 | name: {{ include "onboarding-faucet.serviceAccountName" . }} 6 | labels: 7 | {{- include "onboarding-faucet.labels" . | nindent 4 }} 8 | {{- with .Values.serviceAccount.annotations }} 9 | annotations: 10 | {{- toYaml . | nindent 4 }} 11 | {{- end }} 12 | {{- end }} 13 | -------------------------------------------------------------------------------- /charts/onboarding-faucet/templates/servicemonitor.yaml: -------------------------------------------------------------------------------- 1 | {{- if .Values.serviceMonitor.enabled -}} 2 | 3 | --- 4 | apiVersion: monitoring.coreos.com/v1 5 | kind: ServiceMonitor 6 | metadata: 7 | name: {{ include "onboarding-faucet.fullname" . }} 8 | {{- if .Values.serviceMonitor.namespace }} 9 | namespace: {{ .Values.serviceMonitor.namespace }} 10 | {{- end }} 11 | labels: 12 | app: {{ include "onboarding-faucet.name" . }} 13 | chart: {{ .Chart.Name }} 14 | release: {{ .Release.Name }} 15 | heritage: {{ .Release.Service }} 16 | {{- if .Values.serviceMonitor.additionalLabels }} 17 | {{ toYaml .Values.serviceMonitor.additionalLabels | indent 4 }} 18 | {{- end }} 19 | spec: 20 | endpoints: 21 | - port: api 22 | path: /metrics 23 | {{- if .Values.serviceMonitor.scrapeInterval }} 24 | interval: {{ .Values.serviceMonitor.scrapeInterval }} 25 | {{- end }} 26 | {{- if .Values.serviceMonitor.honorLabels }} 27 | honorLabels: true 28 | {{- end }} 29 | {{- if .Values.serviceMonitor.relabelings }} 30 | relabelings: {{ toYaml .Values.serviceMonitor.relabelings | nindent 8 }} 31 | {{- end }} 32 | {{- if .Values.serviceMonitor.metricRelabelings }} 33 | metricRelabelings: {{ toYaml .Values.serviceMonitor.metricRelabelings | nindent 8 }} 34 | {{- end }} 35 | namespaceSelector: 36 | matchNames: 37 | - {{ .Release.Namespace }} 38 | {{- if .Values.serviceMonitor.targetLabels }} 39 | targetLabels: 40 | {{- range .Values.serviceMonitor.targetLabels }} 41 | - {{ . }} 42 | {{- end }} 43 | {{- end }} 44 | selector: 45 | matchLabels: 46 | app.kubernetes.io/name: {{ include "onboarding-faucet.name" . }} 47 | 48 | {{- end -}} 49 | -------------------------------------------------------------------------------- /charts/onboarding-faucet/values.yaml: -------------------------------------------------------------------------------- 1 | # Default values for onboarding-faucet. 2 | # This is a YAML-formatted file. 3 | # Declare variables to be passed into your templates. 4 | 5 | replicaCount: 1 6 | 7 | image: 8 | repository: ethersphere/onboarding-faucet 9 | pullPolicy: IfNotPresent 10 | # Overrides the image tag whose default is the chart version. 11 | tag: 0.3.0 12 | 13 | imagePullSecrets: [] 14 | nameOverride: "" 15 | fullnameOverride: "" 16 | 17 | serviceAccount: 18 | # Specifies whether a service account should be created 19 | create: true 20 | # Annotations to add to the service account 21 | annotations: {} 22 | # The name of the service account to use. 23 | # If not set and create is true, a name is generated using the fullname template 24 | name: "" 25 | 26 | podAnnotations: {} 27 | 28 | podSecurityContext: {} 29 | # fsGroup: 2000 30 | 31 | securityContext: {} 32 | # capabilities: 33 | # drop: 34 | # - ALL 35 | # readOnlyRootFilesystem: true 36 | # runAsNonRoot: true 37 | # runAsUser: 1000 38 | 39 | service: 40 | type: ClusterIP 41 | port: 80 42 | 43 | ingress: 44 | enabled: false 45 | annotations: {} 46 | # kubernetes.io/ingress.class: nginx 47 | # kubernetes.io/tls-acme: "true" 48 | class: "" 49 | hosts: 50 | - host: chart-example.local 51 | paths: [] 52 | tls: [] 53 | # - secretName: chart-example-tls 54 | # hosts: 55 | # - chart-example.local 56 | 57 | resources: {} 58 | # If you do want to specify resources, uncomment the following lines, 59 | # adjust them as necessary, and remove the curly braces after 'resources:'. 60 | # limits: 61 | # cpu: 300m 62 | # ephemeral-storage: 2Gi 63 | # memory: 512Mi 64 | # requests: 65 | # cpu: 300m 66 | # ephemeral-storage: 512Mi 67 | # memory: 512Mi 68 | 69 | serviceMonitor: 70 | enabled: false 71 | additionalLabels: {} 72 | ## Specify a namespace if needed 73 | # namespace: monitoring 74 | ## Fallback to the prometheus default unless specified 75 | # scrapeInterval: 10s 76 | # honorLabels: true 77 | targetLabels: [] 78 | relabelings: [] 79 | metricRelabelings: [] 80 | 81 | autoscaling: 82 | enabled: false 83 | minReplicas: 1 84 | maxReplicas: 100 85 | targetCPUUtilizationPercentage: 80 86 | targetMemoryUtilizationPercentage: 80 87 | 88 | nodeSelector: {} 89 | 90 | tolerations: [] 91 | 92 | affinity: {} 93 | 94 | strategy: 95 | type: RollingUpdate 96 | 97 | # environment variables 98 | config: 99 | AUTH_TOKEN: "secret" 100 | HOSTNAME: "0.0.0.0" 101 | LOG_LEVEL: "info" 102 | RPC_URL: "https://rpc.gnosischain.com" 103 | PORT: "3000" 104 | PRIVATE_KEY: "" 105 | -------------------------------------------------------------------------------- /charts/tokenexporter/.helmignore: -------------------------------------------------------------------------------- 1 | # Patterns to ignore when building packages. 2 | # This supports shell glob matching, relative path matching, and 3 | # negation (prefixed with !). Only one pattern per line. 4 | .DS_Store 5 | # Common VCS dirs 6 | .git/ 7 | .gitignore 8 | .bzr/ 9 | .bzrignore 10 | .hg/ 11 | .hgignore 12 | .svn/ 13 | # Common backup files 14 | *.swp 15 | *.bak 16 | *.tmp 17 | *.orig 18 | *~ 19 | # Various IDEs 20 | .project 21 | .idea/ 22 | *.tmproj 23 | .vscode/ 24 | -------------------------------------------------------------------------------- /charts/tokenexporter/Chart.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v2 2 | appVersion: latest 3 | name: tokenexporter 4 | version: 0.2.1 5 | description: Tokenexporter Helm chart for Kubernetes 6 | home: https://www.ethswarm.org 7 | icon: https://docs.ethswarm.org/img/swarm-logo-2.svg 8 | keywords: 9 | - blockchain 10 | - ethereum 11 | - token 12 | - prometheus 13 | - exporter 14 | maintainers: 15 | - name: darkobas2 16 | email: darkobas@ethswarm.org 17 | sources: 18 | - https://github.com/ethersphere/tokenexporter 19 | type: application 20 | -------------------------------------------------------------------------------- /charts/tokenexporter/README.md: -------------------------------------------------------------------------------- 1 | # Tokenexporter Helm Chart 2 | 3 | [Tokenexporter](https://github.com/ethersphere/tokenexporter) is a lightweight Prometheus exporter that will output ERC20 Token balances from a list of addresses you specify. 4 | 5 | ## Prerequisites 6 | 7 | Make sure you have Helm [installed](https://helm.sh/docs/intro/install/) installed. 8 | 9 | ## Get Repo Info 10 | 11 | ```bash 12 | helm repo add ethersphere https://ethersphere.github.io/helm 13 | helm repo update 14 | ``` 15 | 16 | _See [helm repo](https://helm.sh/docs/helm/helm_repo/) for command documentation._ 17 | 18 | ## QuickStart 19 | 20 | ```bash 21 | $ helm install --generate-name ethersphere/tokenexporter 22 | ``` 23 | 24 | ## Introduction 25 | 26 | This chart deploys a [Tokenexporter](https://github.com/ethersphere/tokenexporter) onto a Kubernetes cluster using the Helm package manager. 27 | 28 | ## Prerequisites 29 | 30 | * Kubernetes 1.15 31 | * Helm 3.0 32 | 33 | ## Installing the Chart 34 | 35 | To install the chart with the release name `my-release`: 36 | 37 | ```bash 38 | $ helm install my-release ethersphere/tokenexporter 39 | ``` 40 | 41 | The command deploys Tokenexporter on the Kubernetes cluster in the default configuration. The [configuration](#configuration) section lists the parameters that can be configured during installation. 42 | 43 | ## Uninstalling the Chart 44 | 45 | To uninstall/delete the `my-release` deployment: 46 | 47 | ```bash 48 | $ helm delete my-release 49 | ``` 50 | 51 | The command removes all the Kubernetes components associated with the chart and deletes the release. 52 | 53 | ## Configuration 54 | 55 | The default configuration values for this chart are listed in **values.yaml**. 56 | 57 | ## Helmsman Usage 58 | 59 | ### Prerequisites 60 | 61 | * Kubernetes 1.15 62 | * Helm 3.0 63 | * Helmsman 3.0 64 | 65 | ### Installing 66 | 67 | Create tokenexporter.yaml file as shown bellow: 68 | 69 | ```yaml 70 | namespaces: 71 | tokenexporter: 72 | 73 | helmRepos: 74 | ethersphere: "https://ethersphere.github.io/helm" 75 | 76 | apps: 77 | tokenexporter: 78 | name: tokenexporter 79 | namespace: tokenexporter 80 | description: "Tokenexporter" 81 | chart: "ethersphere/tokenexporter" 82 | version: "0.1.0" 83 | enabled: true 84 | wait: true 85 | timeout: 120 86 | 87 | ``` 88 | 89 | Execute following command: 90 | ```bash 91 | $ helmsman -apply -f tokenexporter.yaml 92 | ``` 93 | 94 | ### Uninstalling 95 | 96 | Execute following command: 97 | ```bash 98 | $ helmsman -destroy -f tokenexporter.yaml 99 | ``` 100 | -------------------------------------------------------------------------------- /charts/tokenexporter/ci/ct-values.yaml: -------------------------------------------------------------------------------- 1 | serviceMonitor: 2 | enabled: false 3 | 4 | addressesTxt: 5 | enabled: true 6 | addresses: | 7 | bittrex:0xFBb1b73C4f0BDa4f67dcA266ce6Ef42f520fBB98:github 8 | etherdelta:0x8d12A197cB00D4747a1fe03395095ce2A5CC6819:github 9 | 10 | tokenexporter: 11 | gethEndpoint: https://xdai.fairdatasociety.org 12 | -------------------------------------------------------------------------------- /charts/tokenexporter/templates/NOTES.txt: -------------------------------------------------------------------------------- 1 | TOKENexporter -------------------------------------------------------------------------------- /charts/tokenexporter/templates/_helpers.tpl: -------------------------------------------------------------------------------- 1 | {{/* vim: set filetype=mustache: */}} 2 | {{/* 3 | Expand the name of the chart. 4 | */}} 5 | {{- define "tokenexporter.name" -}} 6 | {{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}} 7 | {{- end -}} 8 | 9 | {{/* 10 | Create a default fully qualified app name. 11 | We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). 12 | If release name contains chart name it will be used as a full name. 13 | */}} 14 | {{- define "tokenexporter.fullname" -}} 15 | {{- if .Values.fullnameOverride -}} 16 | {{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}} 17 | {{- else -}} 18 | {{- $name := default .Chart.Name .Values.nameOverride -}} 19 | {{- if contains $name .Release.Name -}} 20 | {{- .Release.Name | trunc 63 | trimSuffix "-" -}} 21 | {{- else -}} 22 | {{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}} 23 | {{- end -}} 24 | {{- end -}} 25 | {{- end -}} 26 | 27 | {{/* 28 | Create chart name and version as used by the chart label. 29 | */}} 30 | {{- define "tokenexporter.chart" -}} 31 | {{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}} 32 | {{- end -}} 33 | 34 | {{/* 35 | Common labels 36 | */}} 37 | {{- define "tokenexporter.labels" -}} 38 | helm.sh/chart: {{ include "tokenexporter.chart" . }} 39 | {{ include "tokenexporter.selectorLabels" . }} 40 | {{- if .Chart.AppVersion }} 41 | app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} 42 | {{- end }} 43 | app.kubernetes.io/managed-by: {{ .Release.Service }} 44 | {{- end -}} 45 | 46 | {{/* 47 | Selector labels 48 | */}} 49 | {{- define "tokenexporter.selectorLabels" -}} 50 | app.kubernetes.io/name: {{ include "tokenexporter.name" . }} 51 | app.kubernetes.io/instance: {{ .Release.Name }} 52 | {{- end -}} 53 | 54 | {{/* 55 | Create the name of the service account to use 56 | */}} 57 | {{- define "tokenexporter.serviceAccountName" -}} 58 | {{- if .Values.serviceAccount.create -}} 59 | {{ default (include "tokenexporter.fullname" .) .Values.serviceAccount.name }} 60 | {{- else -}} 61 | {{ default "default" .Values.serviceAccount.name }} 62 | {{- end -}} 63 | {{- end -}} 64 | -------------------------------------------------------------------------------- /charts/tokenexporter/templates/config-addresses.yaml: -------------------------------------------------------------------------------- 1 | {{- if .Values.addressesTxt.enabled }} 2 | {{- if .Values.addressesTxt.addresses }} 3 | --- 4 | apiVersion: v1 5 | kind: ConfigMap 6 | metadata: 7 | name: {{ template "tokenexporter.fullname" . }}-addresses 8 | namespace: {{ .Release.Namespace }} 9 | labels: 10 | {{- include "tokenexporter.labels" . | nindent 4 }} 11 | data: 12 | addresses.txt: | 13 | {{ .Values.addressesTxt.addresses | indent 4 }} 14 | {{- end }} 15 | {{- end }} 16 | -------------------------------------------------------------------------------- /charts/tokenexporter/templates/config-tokens.yaml: -------------------------------------------------------------------------------- 1 | {{- if .Values.tokensJson.enabled -}} 2 | --- 3 | apiVersion: v1 4 | kind: ConfigMap 5 | metadata: 6 | name: {{ template "tokenexporter.fullname" . }}-tokens 7 | namespace: {{ .Release.Namespace }} 8 | labels: 9 | {{- include "tokenexporter.labels" . | nindent 4 }} 10 | data: 11 | tokens-list.json: {{ .Values.tokensJson.tokens | quote }} 12 | {{- end -}} 13 | -------------------------------------------------------------------------------- /charts/tokenexporter/templates/deployment.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | apiVersion: apps/v1 3 | kind: Deployment 4 | metadata: 5 | name: {{ include "tokenexporter.fullname" . }} 6 | labels: 7 | {{- include "tokenexporter.labels" . | nindent 4 }} 8 | spec: 9 | replicas: {{ .Values.replicaCount }} 10 | selector: 11 | matchLabels: 12 | {{- include "tokenexporter.selectorLabels" . | nindent 6 }} 13 | template: 14 | metadata: 15 | labels: 16 | {{- include "tokenexporter.selectorLabels" . | nindent 8 }} 17 | spec: 18 | {{- with .Values.imagePullSecrets }} 19 | imagePullSecrets: 20 | {{- toYaml . | nindent 8 }} 21 | {{- end }} 22 | serviceAccountName: {{ include "tokenexporter.serviceAccountName" . }} 23 | securityContext: 24 | {{- toYaml .Values.podSecurityContext | nindent 8 }} 25 | containers: 26 | - name: tokenexporter 27 | securityContext: 28 | {{- toYaml .Values.securityContext | nindent 12 }} 29 | image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}" 30 | imagePullPolicy: {{ .Values.image.pullPolicy }} 31 | env: 32 | - name: GETH 33 | value: "{{ .Values.tokenexporter.gethEndpoint }}" 34 | - name: INTERVAL 35 | value: "{{ .Values.tokenexporter.interval }}" 36 | - name: PORT 37 | value: "{{ .Values.service.port }}" 38 | ports: 39 | - name: metrics 40 | containerPort: {{ int .Values.service.port }} 41 | protocol: TCP 42 | resources: 43 | {{- toYaml .Values.resources | nindent 12 }} 44 | {{- if or .Values.addressesTxt.enabled .Values.tokensJson.enabled }} 45 | volumeMounts: 46 | {{- if .Values.addressesTxt.enabled }} 47 | - name: addresses-volume 48 | mountPath: /app/addresses.txt 49 | subPath: addresses.txt 50 | {{- end }} 51 | {{- if .Values.tokensJson.enabled }} 52 | - name: tokens-volume 53 | mountPath: /app/tokens-list.json 54 | subPath: tokens-list.json 55 | {{- end }} 56 | command: 57 | - tokenexporter 58 | {{- end }} 59 | {{- if or .Values.addressesTxt.enabled .Values.tokensJson.enabled }} 60 | volumes: 61 | {{- if .Values.addressesTxt.enabled }} 62 | - name: addresses-volume 63 | configMap: 64 | {{- if not .Values.addressesTxt.addresses }} 65 | name: {{ .Values.addressesTxt.existingConfigMap }} 66 | {{- else }} 67 | name: {{ include "tokenexporter.fullname" . }}-addresses 68 | items: 69 | - key: addresses.txt 70 | path: addresses.txt 71 | {{- end }} 72 | {{- end }} 73 | {{- if .Values.tokensJson.enabled }} 74 | - name: tokens-volume 75 | configMap: 76 | name: {{ include "tokenexporter.fullname" . }}-tokens 77 | {{- end }} 78 | {{- end }} 79 | {{- with .Values.nodeSelector }} 80 | nodeSelector: 81 | {{- toYaml . | nindent 8 }} 82 | {{- end }} 83 | {{- with .Values.affinity }} 84 | affinity: 85 | {{- toYaml . | nindent 8 }} 86 | {{- end }} 87 | {{- with .Values.tolerations }} 88 | tolerations: 89 | {{- toYaml . | nindent 8 }} 90 | {{- end }} 91 | -------------------------------------------------------------------------------- /charts/tokenexporter/templates/ingress.yaml: -------------------------------------------------------------------------------- 1 | {{- if .Values.ingress.enabled -}} 2 | {{- $fullName := include "tokenexporter.fullname" . -}} 3 | {{- $svcPort := .Values.service.port -}} 4 | --- 5 | {{- if semverCompare ">=1.14-0" .Capabilities.KubeVersion.GitVersion -}} 6 | apiVersion: networking.k8s.io/v1beta1 7 | {{- else -}} 8 | apiVersion: extensions/v1beta1 9 | {{- end }} 10 | kind: Ingress 11 | metadata: 12 | name: {{ $fullName }} 13 | labels: 14 | {{- include "tokenexporter.labels" . | nindent 4 }} 15 | {{- with .Values.ingress.annotations }} 16 | annotations: 17 | {{- toYaml . | nindent 4 }} 18 | {{- end }} 19 | spec: 20 | {{- if .Values.ingress.tls }} 21 | tls: 22 | {{- range .Values.ingress.tls }} 23 | - hosts: 24 | {{- range .hosts }} 25 | - {{ . | quote }} 26 | {{- end }} 27 | secretName: {{ .secretName }} 28 | {{- end }} 29 | {{- end }} 30 | rules: 31 | {{- range .Values.ingress.hosts }} 32 | - host: {{ .host | quote }} 33 | http: 34 | paths: 35 | {{- range .paths }} 36 | - path: {{ . }} 37 | backend: 38 | serviceName: {{ $fullName }} 39 | servicePort: {{ $svcPort }} 40 | {{- end }} 41 | {{- end }} 42 | {{- end }} 43 | -------------------------------------------------------------------------------- /charts/tokenexporter/templates/service.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | apiVersion: v1 3 | kind: Service 4 | metadata: 5 | name: {{ include "tokenexporter.fullname" . }} 6 | labels: 7 | {{- include "tokenexporter.labels" . | nindent 4 }} 8 | spec: 9 | type: {{ .Values.service.type }} 10 | ports: 11 | - port: {{ .Values.service.port }} 12 | targetPort: metrics 13 | protocol: TCP 14 | name: metrics 15 | selector: 16 | {{- include "tokenexporter.selectorLabels" . | nindent 4 }} -------------------------------------------------------------------------------- /charts/tokenexporter/templates/serviceaccount.yaml: -------------------------------------------------------------------------------- 1 | {{- if .Values.serviceAccount.create -}} 2 | --- 3 | apiVersion: v1 4 | kind: ServiceAccount 5 | metadata: 6 | namespace: {{ .Release.Namespace }} 7 | name: {{ include "tokenexporter.serviceAccountName" . }} 8 | labels: 9 | {{- include "tokenexporter.labels" . | nindent 4 }} 10 | {{- with .Values.serviceAccount.annotations }} 11 | annotations: 12 | {{- toYaml . | nindent 4 }} 13 | {{- end }} 14 | {{- end -}} 15 | -------------------------------------------------------------------------------- /charts/tokenexporter/templates/servicemonitor.yaml: -------------------------------------------------------------------------------- 1 | {{- if .Values.serviceMonitor.enabled -}} 2 | --- 3 | apiVersion: monitoring.coreos.com/v1 4 | kind: ServiceMonitor 5 | metadata: 6 | name: {{ include "tokenexporter.fullname" . }} 7 | {{- if .Values.serviceMonitor.namespace }} 8 | namespace: {{ .Values.serviceMonitor.namespace }} 9 | {{- end }} 10 | labels: 11 | app: {{ include "tokenexporter.name" . }} 12 | chart: {{ .Chart.Name }} 13 | release: {{ .Release.Name }} 14 | heritage: {{ .Release.Service }} 15 | {{- if .Values.serviceMonitor.additionalLabels }} 16 | {{ toYaml .Values.serviceMonitor.additionalLabels | indent 4 }} 17 | {{- end }} 18 | spec: 19 | endpoints: 20 | - port: metrics 21 | path: /metrics 22 | {{- if .Values.serviceMonitor.scrapeInterval }} 23 | interval: {{ .Values.serviceMonitor.scrapeInterval }} 24 | scheme: http 25 | {{- end }} 26 | {{- if .Values.serviceMonitor.honorLabels }} 27 | honorLabels: true 28 | {{- end }} 29 | {{- if .Values.serviceMonitor.relabelings }} 30 | relabelings: 31 | {{ toYaml .Values.serviceMonitor.relabelings | indent 6 }} 32 | {{- end }} 33 | namespaceSelector: 34 | matchNames: 35 | - {{ .Release.Namespace }} 36 | selector: 37 | matchLabels: 38 | app.kubernetes.io/name: {{ include "tokenexporter.name" . }} 39 | app.kubernetes.io/instance: {{ .Release.Name }} 40 | {{- end -}} 41 | -------------------------------------------------------------------------------- /charts/tokenexporter/templates/tests/test-connection.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | kind: Pod 3 | metadata: 4 | name: "{{ include "tokenexporter.fullname" . }}-dummy-test" 5 | labels: 6 | {{ include "tokenexporter.labels" . | nindent 4 }} 7 | annotations: 8 | "helm.sh/hook": test-success 9 | spec: 10 | containers: 11 | - name: dummy 12 | image: busybox 13 | command: ['echo'] 14 | args: ['dummy'] 15 | restartPolicy: Never 16 | -------------------------------------------------------------------------------- /charts/tokenexporter/values-cheques.yml: -------------------------------------------------------------------------------- 1 | # Default values for tokenexporter. 2 | # This is a YAML-formatted file. 3 | # Declare variables to be passed into your templates. 4 | 5 | image: 6 | repository: darkobas/tokenexporter 7 | tag: latest 8 | pullPolicy: IfNotPresent 9 | 10 | tokenexporter: 11 | gethEndpoint: http://rpc-gnosis-haproxy.default.svc.godfather2.local 12 | interval: 60 13 | 14 | addressesTxt: 15 | enabled: true 16 | existingConfigMap: "cheque-addresses" # Name of the existing ConfigMap 17 | #addresses: | 18 | # bittrex:0xFBb1b73C4f0BDa4f67dcA266ce6Ef42f520fBB98 19 | # etherdelta:0x8d12A197cB00D4747a1fe03395095ce2A5CC6819 20 | 21 | tokensJson: 22 | enabled: true 23 | tokens: | 24 | [ 25 | { 26 | "address": "0xdbf3ea6f5bee45c02255b2c26a16f300502f68da", 27 | "symbol": "BZZ", 28 | "decimal": 16, 29 | "type": "default" 30 | } 31 | ] 32 | 33 | replicaCount: 1 34 | 35 | imagePullSecrets: [] 36 | nameOverride: "" 37 | fullnameOverride: "" 38 | 39 | serviceAccount: 40 | create: false 41 | annotations: {} 42 | name: 43 | 44 | serviceMonitor: 45 | enabled: true 46 | additionalLabels: {} 47 | 48 | podSecurityContext: {} 49 | 50 | securityContext: {} 51 | 52 | service: 53 | type: ClusterIP 54 | port: 9021 55 | 56 | ingress: 57 | enabled: false 58 | annotations: {} 59 | tls: [] 60 | 61 | resources: {} 62 | # We usually recommend not to specify default resources and to leave this as a conscious 63 | # choice for the user. This also increases chances charts run on environments with little 64 | # resources, such as Minikube. If you do want to specify resources, uncomment the following 65 | # lines, adjust them as necessary, and remove the curly braces after 'resources:'. 66 | # limits: 67 | # cpu: 100m 68 | # memory: 128Mi 69 | # requests: 70 | # cpu: 100m 71 | # memory: 128Mi 72 | 73 | nodeSelector: {} 74 | 75 | tolerations: [] 76 | 77 | affinity: {} 78 | -------------------------------------------------------------------------------- /charts/tokenexporter/values.yaml: -------------------------------------------------------------------------------- 1 | # Default values for tokenexporter. 2 | # This is a YAML-formatted file. 3 | # Declare variables to be passed into your templates. 4 | 5 | image: 6 | repository: darkobas/tokenexporter 7 | tag: latest 8 | pullPolicy: IfNotPresent 9 | 10 | tokenexporter: 11 | gethEndpoint: http://rpc-gnosis-haproxy.default.svc.godfather2.local 12 | interval: 60 13 | 14 | addressesTxt: 15 | enabled: true 16 | existingConfigMap: "balance-addresses" # Name of the existing ConfigMap 17 | # addresses: | 18 | # bittrex:0xFBb1b73C4f0BDa4f67dcA266ce6Ef42f520fBB98 19 | # etherdelta:0x8d12A197cB00D4747a1fe03395095ce2A5CC6819 20 | 21 | tokensJson: 22 | enabled: true 23 | tokens: | 24 | [ 25 | { 26 | "address": "0xdbf3ea6f5bee45c02255b2c26a16f300502f68da", 27 | "symbol": "BZZ", 28 | "decimal": 16, 29 | "type": "default" 30 | } 31 | ] 32 | 33 | replicaCount: 1 34 | 35 | imagePullSecrets: [] 36 | nameOverride: "" 37 | fullnameOverride: "" 38 | 39 | serviceAccount: 40 | create: false 41 | annotations: {} 42 | name: 43 | 44 | serviceMonitor: 45 | enabled: true 46 | additionalLabels: {} 47 | 48 | podSecurityContext: {} 49 | 50 | securityContext: {} 51 | 52 | service: 53 | type: ClusterIP 54 | port: 9021 55 | 56 | ingress: 57 | enabled: false 58 | annotations: {} 59 | tls: [] 60 | 61 | resources: {} 62 | # We usually recommend not to specify default resources and to leave this as a conscious 63 | # choice for the user. This also increases chances charts run on environments with little 64 | # resources, such as Minikube. If you do want to specify resources, uncomment the following 65 | # lines, adjust them as necessary, and remove the curly braces after 'resources:'. 66 | # limits: 67 | # cpu: 100m 68 | # memory: 128Mi 69 | # requests: 70 | # cpu: 100m 71 | # memory: 128Mi 72 | 73 | nodeSelector: {} 74 | 75 | tolerations: [] 76 | 77 | affinity: {} 78 | --------------------------------------------------------------------------------