-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: boilerplate helm chart #121
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 | ||
Comment on lines
+3
to
+22
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This needs to be a list construct, but changing this is outside the scope of this issue/PR. |
||
|
||
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 | ||
|
||
|
||
|
||
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it seems like it would be better to use github secrets, even if this is an example and not a real secret.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should actually just generate these pseudo-randomly via Helm and then we can retrieve the secret from the K8S cluster.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
On a side note, this is just a boilerplate/template. @jeromy-cannon Your point is valid we should never commit actual secrets to a repository, but for expediency we should go ahead and treat this as an intentionally committed toss away secret.
Changing this to a generated secret is outside the scope of this issue/PR.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes there are just for completeness sake, we should never checkin real secrets