-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Deepak Mishra <deepak@swirldslabs.com>
- Loading branch information
1 parent
6b40d2d
commit 70c66ca
Showing
9 changed files
with
235 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
# Patterns to ignore when building packages. | ||
# This supports shell glob matching, relative path matching, and | ||
# negation (prefixed with !). Only one pattern per line. | ||
.DS_Store | ||
# Common VCS dirs | ||
.git/ | ||
.gitignore | ||
.bzr/ | ||
.bzrignore | ||
.hg/ | ||
.hgignore | ||
.svn/ | ||
# Common backup files | ||
*.swp | ||
*.bak | ||
*.tmp | ||
*.orig | ||
*~ | ||
# Various IDEs | ||
.project | ||
.idea/ | ||
*.tmproj | ||
.vscode/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
apiVersion: v2 | ||
name: hedera-network | ||
description: A Helm chart for the Hedera network | ||
version: 0.1.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
1. Get the application URL by running these commands: | ||
... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
apiVersion: v1 | ||
kind: ConfigMap | ||
metadata: | ||
name: uploader-mirror-config | ||
data: | ||
# add your data here | ||
property1: value1 | ||
property2: value2 | ||
--- | ||
apiVersion: v1 | ||
kind: ConfigMap | ||
metadata: | ||
name: backup-config | ||
data: | ||
# add your data here | ||
property1: value1 | ||
property2: value2 |
52 changes: 52 additions & 0 deletions
52
charts/hedera-network/templates/network-node-statefulset.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
|
||
{{ range $nodeName, $nodeConfig := ($.Values.hedera.nodes) }} | ||
--- | ||
apiVersion: apps/v1 | ||
kind: StatefulSet | ||
metadata: | ||
name: network-{{ $nodeName }} | ||
labels: | ||
app: network-{{ $nodeName }} | ||
spec: | ||
replicas: 1 | ||
serviceName: "network-node-{{ $nodeName }}" | ||
selector: | ||
matchLabels: | ||
app: network-{{ $nodeName }} | ||
template: | ||
metadata: | ||
labels: | ||
app: network-{{ $nodeName }} | ||
spec: | ||
containers: | ||
- name: root-container | ||
image: {{ $.Values.infrastructure.docker.registry }}/{{ $.Values.infrastructure.docker.images.root }} | ||
resources: | ||
requests: | ||
memory: 50Mi | ||
cpu: {{ index (index $.Values.hedera.nodes $nodeName) "cpu" }} | ||
limits: | ||
memory: 100Mi | ||
cpu: 100m | ||
- name: record-stream-uploader | ||
image: {{ $.Values.infrastructure.docker.registry }}/{{ $.Values.infrastructure.docker.images.streamuploader }} | ||
envFrom: | ||
- configMapRef: | ||
name: uploader-mirror-config | ||
- secretRef: | ||
name: uploader-mirror-secrets | ||
- name: event-stream-uploader | ||
image: {{ $.Values.infrastructure.docker.registry }}/{{ $.Values.infrastructure.docker.images.streamuploader }} | ||
envFrom: | ||
- configMapRef: | ||
name: uploader-mirror-config | ||
- secretRef: | ||
name: uploader-mirror-secrets | ||
- name: backup-uploader | ||
image: {{ $.Values.infrastructure.docker.registry }}/{{ $.Values.infrastructure.docker.images.backupuploader }} | ||
envFrom: | ||
- configMapRef: | ||
name: backup-config | ||
- secretRef: | ||
name: backup-secrets | ||
{{ end }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
{{ range $nodeName, $nodeConfig := ($.Values.hedera.nodes) }} | ||
--- | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
name: haproxy-{{ $nodeName }} | ||
spec: | ||
replicas: {{ $.Values.haproxyReplicaCount }} | ||
selector: | ||
matchLabels: | ||
app: haproxy-{{ $nodeName }} | ||
template: | ||
metadata: | ||
labels: | ||
app: haproxy-{{ $nodeName }} | ||
spec: | ||
containers: | ||
- name: haproxy | ||
image: {{ $.Values.infrastructure.docker.registry }}/{{ $.Values.infrastructure.docker.images.haproxy }} | ||
imagePullPolicy: Always | ||
--- | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
name: envoy-proxy-{{ $nodeName }} | ||
spec: | ||
replicas: {{ $.Values.envoyProxyReplicaCount }} | ||
selector: | ||
matchLabels: | ||
app: envoy-proxy-{{ $nodeName }} | ||
template: | ||
metadata: | ||
labels: | ||
app: envoy-proxy-{{ $nodeName }} | ||
spec: | ||
containers: | ||
- name: envoy-proxy | ||
image: {{ $.Values.infrastructure.docker.registry }}/{{ $.Values.infrastructure.docker.images.envoyproxy }} | ||
imagePullPolicy: Always | ||
--- | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
name: json-rpc-relay-{{ $nodeName }} | ||
spec: | ||
replicas: 1 | ||
selector: | ||
matchLabels: | ||
app: json-rpc-relay-{{ $nodeName }} | ||
template: | ||
metadata: | ||
labels: | ||
app: json-rpc-relay-{{ $nodeName }} | ||
spec: | ||
containers: | ||
- name: json-rpc-relay | ||
image: {{ $.Values.infrastructure.docker.registry }}/{{ $.Values.infrastructure.docker.images.jsonrpcrelay }} | ||
imagePullPolicy: Always | ||
{{- end }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
apiVersion: v1 | ||
kind: Secret | ||
metadata: | ||
name: uploader-mirror-secrets | ||
type: Opaque | ||
data: | ||
# add your secrets here | ||
# Note: Kubernetes secrets should be base64 encoded | ||
secret1: "c2VjcmV0" | ||
secret2: "c2VjcmV0" | ||
--- | ||
apiVersion: v1 | ||
kind: Secret | ||
metadata: | ||
name: backup-secrets | ||
type: Opaque | ||
data: | ||
# add your secrets here | ||
# Note: Kubernetes secrets should be base64 encoded | ||
secret1: "c2VjcmV0" | ||
secret2: "c2VjcmV0" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
{{ range $nodeName, $nodeConfig := ($.Values.hedera.nodes) }} | ||
--- | ||
apiVersion: v1 | ||
kind: Service | ||
metadata: | ||
name: service-network-{{ $nodeName }} | ||
spec: | ||
selector: | ||
app: network-{{ $nodeName }} | ||
ports: | ||
- protocol: TCP | ||
port: 50211 | ||
targetPort: 50211 | ||
{{- end }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
hedera: | ||
# TODO: do we need an easy way (to avoid repetition) to create multiple notes if they all have the same configuration? | ||
nodes: | ||
node-1: | ||
# TODO: Configuration like address ( and similar ), can be autogenerated by helm, do we need to think about this ? | ||
address: 0.0.1 | ||
cpu: 1 | ||
memory: 1GB | ||
latency: 10ms | ||
bandwidth: 1 Mbps | ||
node-2: | ||
address: 0.0.2 | ||
cpu: 1 | ||
memory: 1GB | ||
latency: 10ms | ||
bandwidth: 2 Mbps | ||
node-3: | ||
address: 0.0.3 | ||
cpu: 1 | ||
memory: 1GB | ||
latency: 10ms | ||
bandwidth: 3 Mbps | ||
|
||
infrastructure: | ||
docker: | ||
registry: docker.io | ||
images: | ||
root: docker:24.0.2-dind | ||
envoyproxy: envoyproxy/envoy:v1.26-latest | ||
haproxy: haproxy:lts-alpine3.18 | ||
jsonrpcrelay: jsonrpcrelay | ||
streamuploader: ubuntu | ||
backupuploader: ubuntu | ||
|
||
proxies: | ||
# 1 Haproxy Deployment is created for 1 hedera network node (StatefulSet) | ||
# This controls how many replicas within a deployment are needed, in production we use 3 | ||
haproxyReplicas: 1 | ||
envoyProxyReplicas: 1 | ||
|
||
|
||
|
||
|