Skip to content
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

Add test deploy k8s secret #937

Merged
merged 5 commits into from
Jan 25, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions deployment/scripts/.env
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ fuel_core_human_logging=false
fuel_core_utxo_validation=true
fuel_core_vm_backtrace=false
fuel_core_min_gas_price=0
fuel_core_consensus_key_secret="dGVzdA=="

# Ingress Environment variables
fuel_core_ingress_dns="node.example.com"
Expand Down
127 changes: 125 additions & 2 deletions deployment/scripts/chainspec/dev_chainspec.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,133 @@
"max_gas_per_tx": 100000000,
"max_script_length": 1048576,
"max_script_data_length": 1048576,
"max_static_contracts": 255,
"max_storage_slots": 255,
"max_predicate_length": 1048576,
"max_predicate_data_length": 1048576,
"gas_price_factor": 1000000
"gas_price_factor": 1000000000,
"gas_per_byte": 4,
"max_message_data_length": 1048576
},
"gas_costs": {
"add": 1,
"addi": 1,
"aloc": 1,
"and": 1,
"andi": 1,
"bal": 21,
"bhei": 1,
"bhsh": 1,
"burn": 35,
"cb": 2,
"cfei": 1,
"cfsi": 1,
"croo": 28,
"div": 1,
"divi": 1,
"ecr": 1703,
"eq": 1,
"exp": 1,
"expi": 1,
"flag": 1,
"gm": 1,
"gt": 1,
"gtf": 1,
"ji": 1,
"jmp": 1,
"jne": 1,
"jnei": 1,
"jnzi": 1,
"k256": 19,
"lb": 1,
"log": 40,
"lt": 1,
"lw": 1,
"mcpi": 3,
"mint": 35,
"mlog": 1,
"mod": 1,
"modi": 1,
"move": 1,
"movi": 1,
"mroo": 2,
"mul": 1,
"muli": 1,
"noop": 1,
"not": 1,
"or": 1,
"ori": 1,
"ret_contract": 61,
"rvrt_contract": 61,
"s256": 5,
"sb": 1,
"scwq": 11,
"sll": 1,
"slli": 1,
"srl": 1,
"srli": 1,
"srw": 23,
"sub": 1,
"subi": 1,
"sw": 1,
"sww": 79,
"swwq": 72,
"time": 1,
"tr": 120,
"tro": 99,
"xor": 1,
"xori": 1,
"call": {
"base": 116,
"dep_per_unit": 14
},
"ccp": {
"base": 24,
"dep_per_unit": 13
},
"csiz": {
"base": 17,
"dep_per_unit": 15
},
"ldc": {
"base": 23,
"dep_per_unit": 14
},
"logd": {
"base": 46,
"dep_per_unit": 19
},
"mcl": {
"base": 1,
"dep_per_unit": 2359
},
"mcli": {
"base": 1,
"dep_per_unit": 2322
},
"mcp": {
"base": 1,
"dep_per_unit": 1235
},
"meq": {
"base": 1,
"dep_per_unit": 2343
},
"retd_contract": {
"base": 65,
"dep_per_unit": 19
},
"smo": {
"base": 84,
"dep_per_unit": 13
},
"srwq": {
"base": 54,
"dep_per_unit": 2
}
},
"consensus": {
"PoA": {
"signing_key": "0xf65d6448a273b531ee942c133bb91a6f904c7d7f3104cdaf6b9f7f50d3518871"
}
}
}
12 changes: 11 additions & 1 deletion deployment/scripts/fuel-core-deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,18 @@ set -o allexport && source .env && set +o allexport
if [ "${k8s_provider}" == "eks" ]; then
echo "Updating your kube context locally ...."
aws eks update-kubeconfig --name ${TF_VAR_eks_cluster_name}
echo "Copying chainspec into deployment context..."
echo "Copying chainspec into deployment context ...."
cp chainspec/${chain_spec_file} ../charts/chainspec.json
export fuel_core_consensus_key_secret_base64_encoded=$(echo -n $fuel_core_consensus_key_secret | base64 -w 0)
cd ../secrets/
echo "Creating the fuel-core k8s secret ...."
mv fuel-core-secret.yaml fuel-core-secret.template
envsubst < fuel-core-secret.template > fuel-core-secret.yaml
rm fuel-core-secret.template
kubectl create ns ${k8s_namespace} || true
kubectl delete -f fuel-core-secret.yaml || true
kubectl apply -f fuel-core-secret.yaml
kubectl get secrets -n ${k8s_namespace} | grep fuel-core-secret
cd ../charts
mv values.yaml values.template
envsubst < values.template > values.yaml
Expand Down