diff --git a/Tiltfile b/Tiltfile index 9d9aebecc..9e26f5dee 100644 --- a/Tiltfile +++ b/Tiltfile @@ -763,6 +763,12 @@ if wormchain: target = "vue-export", ) + docker_build( + ref = "wormchain-deploy", + context = "./wormchain", + dockerfile = "./wormchain/Dockerfile.deploy", + ) + def build_wormchain_yaml(yaml_path, num_instances): wormchain_yaml = read_yaml_stream(yaml_path) @@ -814,6 +820,12 @@ if wormchain: trigger_mode = trigger_mode, ) + k8s_resource( + "wormchain-deploy", + resource_deps = ["wormchain"], + labels = ["wormchain"], + trigger_mode = trigger_mode, + ) if ibc_relayer: docker_build( diff --git a/devnet/wormchain.yaml b/devnet/wormchain.yaml index dc0bd1dd3..5a06d588f 100644 --- a/devnet/wormchain.yaml +++ b/devnet/wormchain.yaml @@ -92,3 +92,38 @@ spec: path: / periodSeconds: 5 restartPolicy: Always +--- +apiVersion: apps/v1 +kind: StatefulSet +metadata: + labels: + app: wormchain-deploy + name: wormchain-deploy +spec: + selector: + matchLabels: + app: wormchain-deploy + replicas: 1 + updateStrategy: + type: RollingUpdate + template: + metadata: + labels: + app: wormchain-deploy + spec: + containers: + - name: wormchain-deploy + image: wormchain-deploy + command: + - /bin/sh + - -c + - "npm run deploy-wormchain --prefix=/app/tools && touch /app/tools/success && sleep infinity" + readinessProbe: + exec: + command: + - test + - -e + - "/app/tools/success" + initialDelaySeconds: 5 + periodSeconds: 5 + restartPolicy: Always