mirror of
https://github.com/hanzoai/bootnode.git
synced 2026-09-30 20:46:32 +00:00
Use latest Kubernetes
This commit is contained in:
+1
-1
@@ -1,3 +1,3 @@
|
||||
config/cluster.yaml
|
||||
config/*/cluster.yaml
|
||||
*.pyc
|
||||
__pycache__
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
export KUBECONFIG=config/cluster.yaml
|
||||
|
||||
sha1 := $(shell git rev-parse --short=8 HEAD)
|
||||
geth := /bin/geth --datadir=/data
|
||||
net ?= testnet
|
||||
@@ -7,6 +5,9 @@ cfg := config/$(net)
|
||||
region := us-central1
|
||||
zone := us-central1-a
|
||||
number ?= 047
|
||||
chain ?= ethereum
|
||||
|
||||
export KUBECONFIG=config/$(chain)-$(net)/cluster.yaml
|
||||
|
||||
all: deploy
|
||||
|
||||
@@ -78,7 +79,7 @@ add-gcr-key:
|
||||
|
||||
# Get credentials for kubectl for current cluster
|
||||
get-credentials:
|
||||
gcloud container clusters get-credentials ethereum --zone $(zone) --project hanzo-ai
|
||||
gcloud container clusters get-credentials $(chain)-$(net) --zone $(zone) --project hanzo-ai
|
||||
|
||||
# Default to whatever zone you launched your cluster in to reduce key strokes
|
||||
region-zone-defaults:
|
||||
|
||||
@@ -289,6 +289,7 @@ class Gcloud(object):
|
||||
zone = self.zone
|
||||
|
||||
name = "{}-{}".format(chain, network)
|
||||
version = "1.11.3-gke.18"
|
||||
|
||||
body = {
|
||||
"cluster": {
|
||||
@@ -296,6 +297,7 @@ class Gcloud(object):
|
||||
"description": "Boonode created and managed cluster for {} chain, {} network".format(chain, network),
|
||||
"nodePools": [{
|
||||
"name": "default-pool",
|
||||
"version": version,
|
||||
"initialNodeCount": 1,
|
||||
"autoscaling": {
|
||||
"enabled": True,
|
||||
@@ -323,6 +325,7 @@ class Gcloud(object):
|
||||
"useIpAliases": True,
|
||||
"createSubnetwork": True,
|
||||
},
|
||||
"initialClusterVersion": version,
|
||||
# "addons_config": {
|
||||
# "horizontal_pod_autoscaling": {
|
||||
# "disabled": False,
|
||||
|
||||
@@ -71,7 +71,7 @@ class Pod(object):
|
||||
|
||||
|
||||
class Kubernetes(object):
|
||||
def __init__(self, config_path='config/cluster.yaml'):
|
||||
def __init__(self, config_path='config/ethereum-testnet/cluster.yaml'):
|
||||
self.config_path = config_path
|
||||
|
||||
config.load_kube_config(config_path)
|
||||
|
||||
Reference in New Issue
Block a user