diff --git a/charts/hedera-network/templates/configmaps.yaml b/charts/hedera-network/templates/configmaps.yaml index f8bdc2cd8..2bc5edb53 100644 --- a/charts/hedera-network/templates/configmaps.yaml +++ b/charts/hedera-network/templates/configmaps.yaml @@ -1,22 +1,89 @@ apiVersion: v1 kind: ConfigMap metadata: - name: uploader-config + name: account-balance-uploader-config data: DEBUG: "{{ $.Values.mirror.debug }}" REAPER_ENABLE: "{{ $.Values.mirror.reaper.enable }}" REAPER_MIN_KEEP: "{{ $.Values.mirror.reaper.minKeep }}" REAPER_INTERVAL: "{{ $.Values.mirror.reaper.interval }}" REAPER_DEFAULT_BACKOFF: "{{ $.Values.mirror.reaper.defaultBackoff }}" + STREAM_FILE_EXTENSION: "pb" + STREAM_SIG_EXTENSION: "pb_sig" + STREAM_EXTENSION: "pb.gz" S3_ENABLE: "{{ $.Values.mirror.s3.enable }}" GCS_ENABLE: "{{ $.Values.mirror.gcs.enable }}" SIG_REQUIRE: "{{ $.Values.mirror.sig.require }}" SIG_PRIORITIZE: "{{ $.Values.mirror.sig.prioritize }}" + SIG_EXTENSION: "pb_sig.gz" BUCKET_PATH: "{{ $.Values.mirror.accountBalance.bucketPath }}" BUCKET_NAME: "{{ $.Values.mirror.accountBalance.bucketName }}" --- apiVersion: v1 kind: ConfigMap +metadata: + name: record-stream-uploader-config +data: + DEBUG: "{{ $.Values.mirror.debug }}" + REAPER_ENABLE: "{{ $.Values.mirror.reaper.enable }}" + REAPER_MIN_KEEP: "{{ $.Values.mirror.reaper.minKeep }}" + REAPER_INTERVAL: "{{ $.Values.mirror.reaper.interval }}" + REAPER_DEFAULT_BACKOFF: "{{ $.Values.mirror.reaper.defaultBackoff }}" + STREAM_FILE_EXTENSION: "rcd" + STREAM_SIG_EXTENSION: "rcd_sig" + STREAM_EXTENSION: "rcd" + S3_ENABLE: "{{ $.Values.mirror.s3.enable }}" + GCS_ENABLE: "{{ $.Values.mirror.gcs.enable }}" + SIG_REQUIRE: "{{ $.Values.mirror.sig.require }}" + SIG_PRIORITIZE: "{{ $.Values.mirror.sig.prioritize }}" + SIG_EXTENSION: "rcd_sig" + BUCKET_PATH: "{{ $.Values.mirror.recordStream.bucketPath }}" + BUCKET_NAME: "{{ $.Values.mirror.recordStream.bucketName }}" +--- +apiVersion: v1 +kind: ConfigMap +metadata: + name: event-stream-uploader-config +data: + DEBUG: "{{ $.Values.mirror.debug }}" + REAPER_ENABLE: "{{ $.Values.mirror.reaper.enable }}" + REAPER_MIN_KEEP: "{{ $.Values.mirror.reaper.minKeep }}" + REAPER_INTERVAL: "{{ $.Values.mirror.reaper.interval }}" + REAPER_DEFAULT_BACKOFF: "{{ $.Values.mirror.reaper.defaultBackoff }}" + STREAM_FILE_EXTENSION: "evts" + STREAM_SIG_EXTENSION: "evts_sig" + STREAM_EXTENSION: "evts" + S3_ENABLE: "{{ $.Values.mirror.s3.enable }}" + GCS_ENABLE: "{{ $.Values.mirror.gcs.enable }}" + SIG_REQUIRE: "{{ $.Values.mirror.sig.require }}" + SIG_PRIORITIZE: "{{ $.Values.mirror.sig.prioritize }}" + SIG_EXTENSION: "evts_sig" + BUCKET_PATH: "{{ $.Values.mirror.eventStream.bucketPath }}" + BUCKET_NAME: "{{ $.Values.mirror.eventStream.bucketName }}" +--- +apiVersion: v1 +kind: ConfigMap +metadata: + name: record-stream-sidecar-config +data: + DEBUG: "{{ $.Values.mirror.debug }}" + REAPER_ENABLE: "{{ $.Values.mirror.reaper.enable }}" + REAPER_MIN_KEEP: "{{ $.Values.mirror.reaper.minKeep }}" + REAPER_INTERVAL: "{{ $.Values.mirror.reaper.interval }}" + REAPER_DEFAULT_BACKOFF: "{{ $.Values.mirror.reaper.defaultBackoff }}" + STREAM_FILE_EXTENSION: "rcd" + STREAM_SIG_EXTENSION: "rcd_sig" + STREAM_EXTENSION: "rcd" + S3_ENABLE: "{{ $.Values.mirror.s3.enable }}" + GCS_ENABLE: "{{ $.Values.mirror.gcs.enable }}" + SIG_REQUIRE: "{{ $.Values.mirror.sig.require }}" + SIG_PRIORITIZE: "{{ $.Values.mirror.sig.prioritize }}" + SIG_EXTENSION: "rcd_sig" + BUCKET_PATH: "{{ $.Values.mirror.recordStreamSideCar.bucketPath }}" + BUCKET_NAME: "{{ $.Values.mirror.recordStreamSideCar.bucketName }}" +--- +apiVersion: v1 +kind: ConfigMap metadata: name: backup-config data: diff --git a/charts/hedera-network/templates/network-node-statefulset.yaml b/charts/hedera-network/templates/network-node-statefulset.yaml index d89d5e864..eb3a37ad1 100644 --- a/charts/hedera-network/templates/network-node-statefulset.yaml +++ b/charts/hedera-network/templates/network-node-statefulset.yaml @@ -19,16 +19,26 @@ spec: app: network-{{ $node.name }} spec: volumes: - - name: hedera-storage + - name: hgcapp-storage # change me emptyDir: {} {{- if $.Values.sidecars.otel.enabled }} - name: otel-collector-config configMap: name: otel-collector-config {{- end }} + initContainers: + - name: init-container + image: {{ $.Values.infrastructure.docker.images.root }} + command: [ "/bin/sh", "-c", "mkdir /opt/hgcapp/accountbalance /opt/hgcapp/events /opt/hgcapp/recordstream /opt/hgcapp/sidecar /opt/hgcapp/recordstream/uploader-stats/" ] + runAsUser: {{ $.Values.mirror.user }} + volumeMounts: + - name: hgcapp-storage + mountPath: /opt/hgcapp/ containers: - name: root-container - image: {{ $.Values.infrastructure.docker.registry }}/{{ $.Values.infrastructure.docker.images.root }} + image: {{ $.Values.infrastructure.docker.images.root }} + command: [ "/bin/sh" ] + args: [ "-c", "while true; do echo root:heartbeat; sleep 10;done" ] resources: requests: cpu: {{ $node.requests.cpu }} @@ -37,7 +47,7 @@ spec: cpu: {{ $node.limits.cpu }} memory: {{ $node.limits.memory }} volumeMounts: - - name: hedera-storage + - name: hgcapp-storage mountPath: /opt/hgcapp/ {{- if $node.uploaderSidecars }} @@ -55,11 +65,11 @@ spec: - --watch-directory - {{ $.Values.mirror.accountBalance.watchDir }} volumeMounts: - - name: hedera-storage + - name: hgcapp-storage mountPath: /opt/hgcapp/ envFrom: - configMapRef: - name: uploader-config + name: account-balance-uploader-config - secretRef: name: uploader-secrets @@ -76,11 +86,11 @@ spec: - --watch-directory - {{ $.Values.mirror.eventStream.watchDir }} volumeMounts: - - name: hedera-storage + - name: hgcapp-storage mountPath: /opt/hgcapp/ envFrom: - configMapRef: - name: uploader-config + name: event-stream-uploader-config - secretRef: name: uploader-secrets @@ -99,11 +109,11 @@ spec: - --csv-stats-directory - {{ $.Values.mirror.recordStream.csvStatsDir }} volumeMounts: - - name: hedera-storage + - name: hgcapp-storage mountPath: /opt/hgcapp/ envFrom: - configMapRef: - name: uploader-config + name: record-stream-uploader-config - secretRef: name: uploader-secrets @@ -120,11 +130,11 @@ spec: - --watch-directory - {{ $.Values.mirror.recordStreamSideCar.watchDir }} volumeMounts: - - name: hedera-storage + - name: hgcapp-storage mountPath: /opt/hgcapp/ envFrom: - configMapRef: - name: uploader-config + name: record-stream-sidecar-config - secretRef: name: uploader-secrets {{ end }} diff --git a/charts/hedera-network/templates/secrets.yaml b/charts/hedera-network/templates/secrets.yaml index 05abaf80c..db222eb46 100644 --- a/charts/hedera-network/templates/secrets.yaml +++ b/charts/hedera-network/templates/secrets.yaml @@ -15,7 +15,7 @@ metadata: name: backup-secrets type: Opaque data: - # add your secrets here - # Note: Kubernetes secrets should be base64 encoded - secret1: "c2VjcmV0" - secret2: "c2VjcmV0" + S3_ACCESS_KEY: "" + S3_SECRET_KEY: "" + GCS_ACCESS_KEY: "" + GCS_SECRET_KEY: "" diff --git a/charts/hedera-network/values.yaml b/charts/hedera-network/values.yaml index 837025d8f..f58204afc 100644 --- a/charts/hedera-network/values.yaml +++ b/charts/hedera-network/values.yaml @@ -41,7 +41,7 @@ infrastructure: docker: registry: docker.io images: - root: docker:24.0.2-dind + root: ghcr.io/hashgraph/full-stack-testing/ubi8-init-dind:0.1.2 envoyproxy: envoyproxy/envoy:v1.26-latest haproxy: haproxy:lts-alpine3.18 jsonrpcrelay: jsonrpcrelay @@ -55,17 +55,21 @@ mirror: accountBalance: watchDir: /opt/hgcapp/accountbalance bucketPath: /accountbalance + bucketName: "dev" recordStream: watchDir: /opt/hgcapp/recordstream - csvStatsDir: /uploader-stats/recordstreams/gcs + csvStatsDir: /opt/hgcapp/recordstream/uploader-stats/ bucketPath: /recordstream + bucketName: "dev" recordStreamSideCar: watchDir: /opt/hgcapp/sidecar bucketPath: /recordstreamsidecar + bucketName: "dev" eventStream: watchDir: /opt/hgcapp/events bucketPath: /events - user: 1000 + bucketName: "dev" + user: 2000 debug: true reaper: enable: true @@ -79,8 +83,6 @@ mirror: enable: true gcs: enable: false - bucket: - path: bucket proxies: # 1 Haproxy Deployment is created for 1 hedera network node (StatefulSet)