Skip to content

Commit

Permalink
wrap devspace commands (#11530)
Browse files Browse the repository at this point in the history
  • Loading branch information
skudasov authored Dec 11, 2023
1 parent 1a45097 commit 500a4db
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 4 deletions.
2 changes: 1 addition & 1 deletion charts/chainlink-cluster/dashboard/cmd/dashboard_deploy.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package main
import (
"os"

"github.com/smartcontractkit/chainlink/v2/dashboard/dashboard"
"github.com/smartcontractkit/chainlink/charts/chainlink-cluster/dashboard/dashboard"
"github.com/smartcontractkit/wasp"
)

Expand Down
24 changes: 23 additions & 1 deletion charts/chainlink-cluster/devspace.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ version: v2beta1
name: chainlink

vars:
NS_TTL: 72h
DEVSPACE_IMAGE:
source: env

Expand All @@ -20,17 +21,38 @@ pipelines:
run_dependencies --all # 1. Deploy any projects this project needs (see "dependencies")
ensure_pull_secrets --all # 2. Ensure pull secrets
build_images --all -t $(git rev-parse --short HEAD) # 3. Build, tag (git commit hash) and push all images (see "images")
create_deployments --all # 4. Deploy Helm charts and manifests specfied as "deployments"
create_deployments --all # 5. Deploy Helm charts and manifests specfied as "deployments"
kubectl annotate namespace ${DEVSPACE_NAMESPACE} janitor/ttl=${NS_TTL}
echo "Namespace ${DEVSPACE_NAMESPACE} will be deleted in ${NS_TTL}"
purge:
run: |-
kubectl delete ns ${DEVSPACE_NAMESPACE}
commands:
connect: |-
sudo kubefwd svc -n ${DEVSPACE_NAMESPACE}
images:
app:
image: ${DEVSPACE_IMAGE}
dockerfile: ../../core/chainlink.devspace.Dockerfile
context: ../..

hooks:
- wait:
running: true
terminatedWithCode: 0
container:
labelSelector:
# vars don't work here, = releaseName
release: "app"
events: ["after:deploy:app"]
name: "wait-for-pod-hook"

# This is a list of `deployments` that DevSpace can create for this project
deployments:
app:
namespace: ${DEVSPACE_NAMESPACE}
helm:
releaseName: "app"
chart:
Expand Down
2 changes: 1 addition & 1 deletion charts/chainlink-cluster/go.mod
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module github.com/smartcontractkit/chainlink/v2/dashboard
module github.com/smartcontractkit/chainlink/charts/chainlink-cluster/dashboard

go 1.21

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ metadata:
spec:
namespaceSelector:
matchNames:
- "cl-cluster"
- {{ $.Release.Namespace }}
podMetricsEndpoints:
- port: access
selector:
Expand Down

0 comments on commit 500a4db

Please sign in to comment.