Skip to content

Commit 964a4f9

Browse files
authored
Merge pull request #4057 from onflow/haroldsphinx/1152-Update-Benchnet2-automation-and-helmchart
[BN2] Update benchnet2 automation
2 parents 302e23d + 68da8df commit 964a4f9

File tree

9 files changed

+146
-65
lines changed

9 files changed

+146
-65
lines changed

Makefile

Lines changed: 37 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
# The short Git commit hash
22
SHORT_COMMIT := $(shell git rev-parse --short HEAD)
3+
BRANCH_NAME:=$(shell git rev-parse --abbrev-ref HEAD | tr '/' '-')
34
# The Git commit hash
45
COMMIT := $(shell git rev-parse HEAD)
56
# The tag of the current commit, otherwise empty
@@ -9,6 +10,9 @@ VERSION := $(shell git describe --tags --abbrev=2 --match "v*" --match "secure-c
910
# dynamically split up CI jobs into smaller jobs that can be run in parallel
1011
GO_TEST_PACKAGES := ./...
1112

13+
FLOW_GO_TAG := v0.28.15
14+
15+
1216
# Image tag: if image tag is not set, set it with version (or short commit if empty)
1317
ifeq (${IMAGE_TAG},)
1418
IMAGE_TAG := ${VERSION}
@@ -33,6 +37,7 @@ GOARCH := $(shell go env GOARCH)
3337
# The location of the k8s YAML files
3438
K8S_YAMLS_LOCATION_STAGING=./k8s/staging
3539

40+
3641
# docker container registry
3742
export CONTAINER_REGISTRY := gcr.io/flow-container-registry
3843
export DOCKER_BUILDKIT := 1
@@ -248,12 +253,12 @@ docker-ci-integration:
248253
docker-build-collection:
249254
docker build -f cmd/Dockerfile --build-arg TARGET=./cmd/collection --build-arg COMMIT=$(COMMIT) --build-arg VERSION=$(IMAGE_TAG) --build-arg GOARCH=$(GOARCH) --target production \
250255
--label "git_commit=${COMMIT}" --label "git_tag=${IMAGE_TAG}" \
251-
-t "$(CONTAINER_REGISTRY)/collection:latest" -t "$(CONTAINER_REGISTRY)/collection:$(SHORT_COMMIT)" -t "$(CONTAINER_REGISTRY)/collection:$(IMAGE_TAG)" .
256+
-t "$(CONTAINER_REGISTRY)/collection:latest" -t "$(CONTAINER_REGISTRY)/collection:$(SHORT_COMMIT)" -t "$(CONTAINER_REGISTRY)/collection:$(IMAGE_TAG)" -t "$(CONTAINER_REGISTRY)/collection:$(FLOW_GO_TAG)" .
252257

253258
.PHONY: docker-build-collection-without-netgo
254259
docker-build-collection-without-netgo:
255260
docker build -f cmd/Dockerfile --build-arg TAGS=relic --build-arg TARGET=./cmd/collection --build-arg COMMIT=$(COMMIT) --build-arg VERSION=$(IMAGE_TAG_NO_NETGO) --build-arg GOARCH=$(GOARCH) --target production \
256-
--label "git_commit=${COMMIT}" --label "git_tag=$(IMAGE_TAG_NO_NETGO)" -t "$(CONTAINER_REGISTRY)/collection:$(IMAGE_TAG_NO_NETGO)" .
261+
--label "git_commit=${COMMIT}" --label "git_tag=$(IMAGE_TAG_NO_NETGO)" -t "$(CONTAINER_REGISTRY)/collection:$(IMAGE_TAG_NO_NETGO)" .
257262

258263
.PHONY: docker-build-collection-debug
259264
docker-build-collection-debug:
@@ -264,7 +269,7 @@ docker-build-collection-debug:
264269
docker-build-consensus:
265270
docker build -f cmd/Dockerfile --build-arg TARGET=./cmd/consensus --build-arg COMMIT=$(COMMIT) --build-arg VERSION=$(IMAGE_TAG) --build-arg GOARCH=$(GOARCH) --target production \
266271
--label "git_commit=${COMMIT}" --label "git_tag=${IMAGE_TAG}" \
267-
-t "$(CONTAINER_REGISTRY)/consensus:latest" -t "$(CONTAINER_REGISTRY)/consensus:$(SHORT_COMMIT)" -t "$(CONTAINER_REGISTRY)/consensus:$(IMAGE_TAG)" .
272+
-t "$(CONTAINER_REGISTRY)/consensus:latest" -t "$(CONTAINER_REGISTRY)/consensus:$(SHORT_COMMIT)" -t "$(CONTAINER_REGISTRY)/consensus:$(IMAGE_TAG)" -t "$(CONTAINER_REGISTRY)/consensus:$(FLOW_GO_TAG)" .
268273

269274
.PHONY: docker-build-consensus-without-netgo
270275
docker-build-consensus-without-netgo:
@@ -280,7 +285,7 @@ docker-build-consensus-debug:
280285
docker-build-execution:
281286
docker build -f cmd/Dockerfile --build-arg TARGET=./cmd/execution --build-arg COMMIT=$(COMMIT) --build-arg VERSION=$(IMAGE_TAG) --build-arg GOARCH=$(GOARCH) --target production \
282287
--label "git_commit=${COMMIT}" --label "git_tag=${IMAGE_TAG}" \
283-
-t "$(CONTAINER_REGISTRY)/execution:latest" -t "$(CONTAINER_REGISTRY)/execution:$(SHORT_COMMIT)" -t "$(CONTAINER_REGISTRY)/execution:$(IMAGE_TAG)" .
288+
-t "$(CONTAINER_REGISTRY)/execution:latest" -t "$(CONTAINER_REGISTRY)/execution:$(SHORT_COMMIT)" -t "$(CONTAINER_REGISTRY)/execution:$(IMAGE_TAG)" -t "$(CONTAINER_REGISTRY)/execution:$(FLOW_GO_TAG)" .
284289

285290
.PHONY: docker-build-execution-without-netgo
286291
docker-build-execution-without-netgo:
@@ -306,7 +311,7 @@ docker-build-execution-corrupt:
306311
docker-build-verification:
307312
docker build -f cmd/Dockerfile --build-arg TARGET=./cmd/verification --build-arg COMMIT=$(COMMIT) --build-arg VERSION=$(IMAGE_TAG) --build-arg GOARCH=$(GOARCH) --target production \
308313
--label "git_commit=${COMMIT}" --label "git_tag=${IMAGE_TAG}" \
309-
-t "$(CONTAINER_REGISTRY)/verification:latest" -t "$(CONTAINER_REGISTRY)/verification:$(SHORT_COMMIT)" -t "$(CONTAINER_REGISTRY)/verification:$(IMAGE_TAG)" .
314+
-t "$(CONTAINER_REGISTRY)/verification:latest" -t "$(CONTAINER_REGISTRY)/verification:$(SHORT_COMMIT)" -t "$(CONTAINER_REGISTRY)/verification:$(IMAGE_TAG)" -t "$(CONTAINER_REGISTRY)/verification:$(FLOW_GO_TAG)" .
310315

311316
.PHONY: docker-build-verification-without-netgo
312317
docker-build-verification-without-netgo:
@@ -332,7 +337,7 @@ docker-build-verification-corrupt:
332337
docker-build-access:
333338
docker build -f cmd/Dockerfile --build-arg TARGET=./cmd/access --build-arg COMMIT=$(COMMIT) --build-arg VERSION=$(IMAGE_TAG) --build-arg GOARCH=$(GOARCH) --target production \
334339
--label "git_commit=${COMMIT}" --label "git_tag=${IMAGE_TAG}" \
335-
-t "$(CONTAINER_REGISTRY)/access:latest" -t "$(CONTAINER_REGISTRY)/access:$(SHORT_COMMIT)" -t "$(CONTAINER_REGISTRY)/access:$(IMAGE_TAG)" .
340+
-t "$(CONTAINER_REGISTRY)/access:latest" -t "$(CONTAINER_REGISTRY)/access:$(SHORT_COMMIT)" -t "$(CONTAINER_REGISTRY)/access:$(IMAGE_TAG)" -t "$(CONTAINER_REGISTRY)/access:$(FLOW_GO_TAG)" .
336341

337342
.PHONY: docker-build-access-without-netgo
338343
docker-build-access-without-netgo:
@@ -419,6 +424,7 @@ docker-build-benchnet: docker-build-flow docker-build-loader
419424
docker-push-collection:
420425
docker push "$(CONTAINER_REGISTRY)/collection:$(SHORT_COMMIT)"
421426
docker push "$(CONTAINER_REGISTRY)/collection:$(IMAGE_TAG)"
427+
docker push "$(CONTAINER_REGISTRY)/collection:$(FLOW_GO_TAG)"
422428

423429
.PHONY: docker-push-collection-without-netgo
424430
docker-push-collection-without-netgo:
@@ -432,6 +438,7 @@ docker-push-collection-latest: docker-push-collection
432438
docker-push-consensus:
433439
docker push "$(CONTAINER_REGISTRY)/consensus:$(SHORT_COMMIT)"
434440
docker push "$(CONTAINER_REGISTRY)/consensus:$(IMAGE_TAG)"
441+
docker push "$(CONTAINER_REGISTRY)/consensus:$(FLOW_GO_TAG)"
435442

436443
.PHONY: docker-push-consensus-without-netgo
437444
docker-push-consensus-without-netgo:
@@ -445,6 +452,13 @@ docker-push-consensus-latest: docker-push-consensus
445452
docker-push-execution:
446453
docker push "$(CONTAINER_REGISTRY)/execution:$(SHORT_COMMIT)"
447454
docker push "$(CONTAINER_REGISTRY)/execution:$(IMAGE_TAG)"
455+
docker push "$(CONTAINER_REGISTRY)/execution:$(FLOW_GO_TAG)"
456+
457+
.PHONY: docker-push-execution-corrupt
458+
docker-push-execution-corrupt:
459+
docker push "$(CONTAINER_REGISTRY)/execution-corrupted:$(SHORT_COMMIT)"
460+
docker push "$(CONTAINER_REGISTRY)/execution-corrupted:$(IMAGE_TAG)"
461+
448462

449463
.PHONY: docker-push-execution-without-netgo
450464
docker-push-execution-without-netgo:
@@ -458,6 +472,12 @@ docker-push-execution-latest: docker-push-execution
458472
docker-push-verification:
459473
docker push "$(CONTAINER_REGISTRY)/verification:$(SHORT_COMMIT)"
460474
docker push "$(CONTAINER_REGISTRY)/verification:$(IMAGE_TAG)"
475+
docker push "$(CONTAINER_REGISTRY)/verification:$(FLOW_GO_TAG)"
476+
477+
.PHONY: docker-push-verification-corrupt
478+
docker-push-verification-corrupt:
479+
docker push "$(CONTAINER_REGISTRY)/verification-corrupted:$(SHORT_COMMIT)"
480+
docker push "$(CONTAINER_REGISTRY)/verification-corrupted:$(IMAGE_TAG)"
461481

462482
.PHONY: docker-push-verification-without-netgo
463483
docker-push-verification-without-netgo:
@@ -471,6 +491,12 @@ docker-push-verification-latest: docker-push-verification
471491
docker-push-access:
472492
docker push "$(CONTAINER_REGISTRY)/access:$(SHORT_COMMIT)"
473493
docker push "$(CONTAINER_REGISTRY)/access:$(IMAGE_TAG)"
494+
docker push "$(CONTAINER_REGISTRY)/access:$(FLOW_GO_TAG)"
495+
496+
.PHONY: docker-push-access-corrupt
497+
docker-push-access-corrupt:
498+
docker push "$(CONTAINER_REGISTRY)/access-corrupted:$(SHORT_COMMIT)"
499+
docker push "$(CONTAINER_REGISTRY)/access-corrupted:$(IMAGE_TAG)"
474500

475501
.PHONY: docker-push-access-without-netgo
476502
docker-push-access-without-netgo:
@@ -479,6 +505,7 @@ docker-push-access-without-netgo:
479505
.PHONY: docker-push-access-latest
480506
docker-push-access-latest: docker-push-access
481507
docker push "$(CONTAINER_REGISTRY)/access:latest"
508+
482509

483510
.PHONY: docker-push-observer
484511
docker-push-observer:
@@ -520,6 +547,9 @@ docker-push-flow-without-netgo: docker-push-collection-without-netgo docker-push
520547
.PHONY: docker-push-flow-latest
521548
docker-push-flow-latest: docker-push-collection-latest docker-push-consensus-latest docker-push-execution-latest docker-push-verification-latest docker-push-access-latest docker-push-observer-latest
522549

550+
.PHONY: docker-push-flow-corrupt
551+
docker-push-flow-corrupt: docker-push-access-corrupt docker-push-execution-corrupt docker-push-verification-corrupt
552+
523553
.PHONY: docker-push-benchnet
524554
docker-push-benchnet: docker-push-flow docker-push-loader
525555

@@ -621,4 +651,4 @@ monitor-rollout:
621651
kubectl --kubeconfig=$$kconfig rollout status statefulsets.apps flow-collection-node-v1; \
622652
kubectl --kubeconfig=$$kconfig rollout status statefulsets.apps flow-consensus-node-v1; \
623653
kubectl --kubeconfig=$$kconfig rollout status statefulsets.apps flow-execution-node-v1; \
624-
kubectl --kubeconfig=$$kconfig rollout status statefulsets.apps flow-verification-node-v1
654+
kubectl --kubeconfig=$$kconfig rollout status statefulsets.apps flow-verification-node-v1

integration/benchnet2/Makefile

Lines changed: 29 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,14 @@
11
# eventually, DOCKER_TAG will use the git commit hash
22
# this isn't working fully yet so fow now we will specify the explicit Git tag to use as the Docker tag
33
#DOCKER_TAG := $(shell git rev-parse --short HEAD)
4-
FLOW_GO_TAG = v0.28.15
4+
FLOW_GO_TAG := v0.28.15
5+
BRANCH_NAME:=$(shell git rev-parse --abbrev-ref HEAD | tr '/' '-')
56
DOCKER_TAG := $(FLOW_GO_TAG)
7+
COMMIT_SHA:=$(shell git rev-parse --short=9 HEAD)
8+
9+
ifeq ($(strip $(FLOW_GO_TAG)),)
10+
$(eval FLOW_GO_TAG=$(BRANCH_NAME))
11+
endif
612

713
# default value of the Docker base registry URL which can be overriden when invoking the Makefile
814
DOCKER_REGISTRY := us-west1-docker.pkg.dev/dl-flow-benchnet-automation/benchnet
@@ -26,13 +32,18 @@ else ifeq ($(strip $(VALID_CONSENSUS)), 1)
2632
else ifeq ($(strip $(VALID_COLLECTION)), 1)
2733
$(error Number of Collection nodes should be no less than 6)
2834
else ifeq ($(strip $(NAMESPACE)),)
29-
$(error Namespace cannot be empty)
35+
$(error NAMESPACE cannot be empty)
36+
endif
37+
38+
init:
39+
ifeq ($(strip $(PROJECT_NAME)),)
40+
$(eval PROJECT_NAME=$(COMMIT_SHA))
3041
endif
3142

3243
# assumes there is a checked out version of flow-go in a "flow-go" sub-folder at this level so that the bootstrap executable
3344
# for the checked out version will be run in the sub folder but the bootstrap folder will be created here (outside of the checked out flow-go in the sub folder)
3445
gen-bootstrap: clone-flow
35-
cd flow-go/cmd/bootstrap && go run -tags relic . genconfig --address-format "%s%d.${NAMESPACE}:3569" --access $(ACCESS) --collection $(COLLECTION) --consensus $(CONSENSUS) --execution $(EXECUTION) --verification $(VERIFICATION) --weight 100 -o ./ --config ../../../bootstrap/conf/node-config.json
46+
cd flow-go/cmd/bootstrap && go run -tags relic . genconfig --address-format "%s%d-${PROJECT_NAME}.${NAMESPACE}:3569" --access $(ACCESS) --collection $(COLLECTION) --consensus $(CONSENSUS) --execution $(EXECUTION) --verification $(VERIFICATION) --weight 100 -o ./ --config ../../../bootstrap/conf/node-config.json
3647
cd flow-go/cmd/bootstrap && go run -tags relic . keygen --machine-account --config ../../../bootstrap/conf/node-config.json -o ../../../bootstrap/keys
3748
echo {} > ./bootstrap/conf/partner-stakes.json
3849
mkdir ./bootstrap/partner-nodes
@@ -49,13 +60,13 @@ gen-helm-l2:
4960
# runs bootstrap to generate all node info
5061
# runs level 1 automation to read bootstrap data and generate data input for level 2
5162
# runs level 2 automation to generate values.yml based on template and data values from previous step
52-
gen-helm-values: validate gen-bootstrap gen-helm-l1 gen-helm-l2
63+
gen-helm-values: validate init gen-bootstrap gen-helm-l1 gen-helm-l2
5364

5465
# main target for deployment
55-
deploy-all: validate gen-helm-values k8s-secrets-create helm-deploy
66+
deploy-all: validate init gen-helm-values k8s-secrets-create helm-deploy
5667

5768
# main target for cleaning up a deployment
58-
clean-all: validate k8s-delete k8s-delete-secrets clean-bootstrap clean-gen-helm clean-flow
69+
clean-all: validate init k8s-delete k8s-delete-secrets clean-bootstrap clean-gen-helm clean-flow
5970

6071
clean-bootstrap:
6172
rm -rf ./bootstrap
@@ -65,31 +76,31 @@ clean-gen-helm:
6576
rm -f template-data.json
6677

6778
k8s-secrets-create:
68-
bash ./create-secrets.sh
79+
bash ./create-secrets.sh ${PROJECT_NAME} ${NAMESPACE}
6980

7081
helm-deploy:
71-
helm upgrade --install -f ./values.yml ${NAMESPACE} ./flow --debug --namespace ${NAMESPACE}
82+
helm upgrade --install -f ./values.yml ${PROJECT_NAME} ./flow --set commit="${PROJECT_NAME}" --debug --namespace ${NAMESPACE}
7283

7384
k8s-delete:
74-
helm delete ${NAMESPACE} --namespace ${NAMESPACE}
75-
kubectl delete pvc -l service=flow --namespace ${NAMESPACE}
85+
helm delete ${PROJECT_NAME} --namespace ${NAMESPACE}
86+
kubectl delete pvc -l project=${PROJECT_NAME} --namespace ${NAMESPACE}
7687

7788
k8s-delete-secrets:
78-
kubectl delete secrets -l service=flow --namespace ${NAMESPACE}
89+
kubectl delete secrets -l project=${PROJECT_NAME} --namespace ${NAMESPACE}
7990

80-
k8s-expose-locally:
81-
kubectl port-forward service/access1 9000:9000 --namespace ${NAMESPACE}
91+
k8s-expose-locally: validate
92+
kubectl port-forward service/access1-${PROJECT_NAME} 9000:9000 --namespace ${NAMESPACE}
8293

83-
k8s-pod-health:
84-
kubectl get pods
94+
k8s-pod-health: validate
95+
kubectl get pods --namespace ${NAMESPACE}
8596

8697
k8s-test-network-accessibility:
8798
flow blocks get latest --host localhost:9000
8899
flow accounts create --network benchnet --key e0ef5e52955e6542287db4528b3e8acc84a2c204eee9609f7c3120d1dac5a11b1bcb39677511db14354aa8c1a0ef62151220d97f015d49a8f0b78b653b570bfd --signer benchnet-account -f ~/flow.json
89100

90-
clone-flow: clean-flow
101+
clone-flow: clean-flow
91102
# this cloned repo will be used for generating bootstrap info specific to that tag / version
92-
git clone --depth 1 --branch $(FLOW_GO_TAG) https://github.com/onflow/flow-go.git
93-
103+
git clone --depth 1 --branch $(FLOW_GO_TAG) https://github.com/onflow/flow-go.git --single-branch
104+
94105
clean-flow:
95106
rm -rf flow-go

integration/benchnet2/automate/templates/helm-values-all-nodes.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,10 @@ execution:
8888
resources:
8989
requests:
9090
cpu: "200m"
91-
memory: "512Mi"
91+
memory: "1024Mi"
92+
limits:
93+
cpu: "800m"
94+
memory: "10Gi"
9295
storage: 10G
9396
nodes:
9497
{{- range $val := .}}{{if eq ($val.role) ("execution")}}

integration/benchnet2/create-secrets.sh

Lines changed: 16 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
#!/bin/bash
22

3+
# Set Arguments
4+
PROJECT_NAME=$1
5+
NAMESPACE=$2
6+
37
# Create execution-state secrets required to run network
48
# Note - As K8s secrets cannot contain forward slashes, we remove the path prefix
59
# Note - Since this is non-secret, this could be a configmap rather than a secret
@@ -8,10 +12,12 @@ for f in bootstrap/execution-state/*; do
812
# Example start bootstrap/execution-state/00000000
913
# Example result 00000000
1014
PREFIXREMOVED=${f//bootstrap\/execution-state\//};
15+
PREFIXREMOVED="$PROJECT_NAME.$PREFIXREMOVED";
1116

1217
# Create the secret after string manipulation
13-
kubectl create secret generic $PREFIXREMOVED --from-file=$f;
14-
kubectl label secret $PREFIXREMOVED "service=flow"
18+
kubectl create secret generic $PREFIXREMOVED --from-file=$f --namespace=$NAMESPACE;
19+
kubectl label secret $PREFIXREMOVED "service=flow" --namespace=$NAMESPACE
20+
kubectl label secret $PREFIXREMOVED "project=$PROJECT_NAME" --namespace=$NAMESPACE
1521
done
1622

1723
# Create private-root-information secrets required to run network
@@ -22,15 +28,17 @@ for f in bootstrap/private-root-information/*/*; do
2228
# Remove the bootstrap/private-root-information/private-node-info_ prefix to ensure NodeId is retained
2329
# Example result 416c65782048656e74736368656c00e4e3235298a4b91382ecd84f13b9c237e6/node-info.priv.json
2430
PREFIXREMOVED=${f//bootstrap\/private-root-information\/private-node-info_/};
31+
PREFIXREMOVED="$PROJECT_NAME.$PREFIXREMOVED";
2532

2633
# Substitute the forward slash "/" for a period "."
2734
# Example $PREFIXREMOVED value 416c65782048656e74736368656c00e4e3235298a4b91382ecd84f13b9c237e6/node-info.priv.json
2835
# Example result after string manipulation 416c65782048656e74736368656c00e4e3235298a4b91382ecd84f13b9c237e6.node-info.priv.json
2936
KEYNAME=${PREFIXREMOVED//\//.}
3037

3138
# Create the secret after string manipulation
32-
kubectl create secret generic $KEYNAME --from-file=$f;
33-
kubectl label secret $KEYNAME "service=flow"
39+
kubectl create secret generic $KEYNAME --from-file=$f --namespace=$NAMESPACE;
40+
kubectl label secret $KEYNAME "service=flow" --namespace=$NAMESPACE
41+
kubectl label secret $KEYNAME "project=$PROJECT_NAME" --namespace=$NAMESPACE
3442
done
3543

3644
# Create public-root-information secrets required to run network
@@ -41,8 +49,10 @@ for f in bootstrap/public-root-information/*.json; do
4149
# Example start bootstrap/public-root-information/node-infos.pub.json
4250
# Example result node-info.pub.json
4351
PREFIXREMOVED=${f//bootstrap\/public-root-information\//};
52+
PREFIXREMOVED="$PROJECT_NAME.$PREFIXREMOVED";
4453

4554
# Create the secret after string manipulation
46-
kubectl create secret generic $PREFIXREMOVED --from-file=$f ;
47-
kubectl label secret $PREFIXREMOVED "service=flow"
55+
kubectl create secret generic $PREFIXREMOVED --from-file=$f --namespace=$NAMESPACE ;
56+
kubectl label secret $PREFIXREMOVED "service=flow" --namespace=$NAMESPACE
57+
kubectl label secret $PREFIXREMOVED "project=$PROJECT_NAME" --namespace=$NAMESPACE
4858
done

integration/benchnet2/flow/templates/access.yml

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ metadata:
1010
branch: {{ $.Values.branch }}
1111
nodeType: access
1212
service: flow
13+
project: {{ $.Values.commit }} # Prefixing the project name as label
1314

1415
spec:
1516
serviceName: {{ $k }}
@@ -19,6 +20,7 @@ spec:
1920
app: {{ $k }}
2021
nodeType: access
2122
service: flow
23+
project: {{ $.Values.commit }}
2224

2325
template:
2426
metadata:
@@ -27,6 +29,7 @@ spec:
2729
branch: {{ $.Values.branch }}
2830
nodeType: access
2931
service: flow
32+
project: {{ $.Values.commit }}
3033
spec:
3134
containers:
3235
- name: {{ $k }}
@@ -89,27 +92,29 @@ spec:
8992
volumes:
9093
- name: node-info-priv-json
9194
secret:
92-
secretName: {{ $v.nodeId }}.node-info.priv.json
95+
secretName: {{ $.Values.commit }}.{{ $v.nodeId }}.node-info.priv.json
9396

9497
- name: node-info-pub-json
9598
secret:
96-
secretName: node-infos.pub.json
99+
secretName: {{ $.Values.commit }}.node-infos.pub.json
97100

98101
- name: root-block-json
99102
secret:
100-
secretName: root-block.json
103+
secretName: {{ $.Values.commit }}.root-block.json
101104

102105
- name: root-protocol-state-snapshot-json
103106
secret:
104-
secretName: root-protocol-state-snapshot.json
107+
secretName: {{ $.Values.commit }}.root-protocol-state-snapshot.json
105108

106109
- name: secretsdb-key
107110
secret:
108-
secretName: {{ $v.nodeId }}.secretsdb-key
111+
secretName: {{ $.Values.commit }}.{{ $v.nodeId }}.secretsdb-key
109112

110113
volumeClaimTemplates:
111114
- metadata:
112115
name: data
116+
labels:
117+
project: {{ $.Values.commit }}
113118
spec:
114119
accessModes: ["ReadWriteOnce"]
115120
resources:
@@ -130,6 +135,7 @@ metadata:
130135
name: {{ $k }}
131136
labels:
132137
app: {{ $k }}
138+
project: {{ $.Values.commit }}
133139
spec:
134140
{{ if $v.servicePorts }}
135141
ports: {{ $v.servicePorts | toYaml | nindent 12 }}

0 commit comments

Comments
 (0)