Skip to content

Commit

Permalink
Integrate ccip-scripts deployment with devspace env
Browse files Browse the repository at this point in the history
  • Loading branch information
scheibinger committed Mar 18, 2024
1 parent c124211 commit 73985f0
Show file tree
Hide file tree
Showing 5 changed files with 249 additions and 0 deletions.
9 changes: 9 additions & 0 deletions charts/chainlink-cluster/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -106,11 +106,20 @@ kubectl create ns cl-cluster
kubectl config set-context --current --namespace cl-cluster
```

Template
```
helm template app -f values.yaml -n crib-radek . --output-dir .rendered \
--set=ingress.baseDomain="$DEVSPACE_INGRESS_BASE_DOMAIN"
```

Install
```
helm install -f values.yaml cl-cluster .
```



## Create a new release
Bump version in `Chart.yml` add your changes and add `helm_release` label to any PR to trigger a release

Expand Down
2 changes: 2 additions & 0 deletions charts/chainlink-cluster/devspace.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,8 @@ pipelines:
--set=helm.values.chainlink.nodes[3].image=$image \
--set=helm.values.chainlink.nodes[4].image=$image \
--set=helm.values.chainlink.nodes[5].image=$image
--set=helm.values.ingress.baseDomain=$DEVSPACE_INGRESS_BASE_DOMAIN
--set=helm.values.ccip.ccipScriptsImage=$DEVSPACE_CCIP_SCRIPTS_IMAGE
echo
echo "Namespace ${DEVSPACE_NAMESPACE} will be deleted in ${NS_TTL}"
echo "To extend the TTL for e.g. 72 hours, run: devspace run ttl ${DEVSPACE_NAMESPACE} 72h"
Expand Down
38 changes: 38 additions & 0 deletions charts/chainlink-cluster/templates/ccip-scripts-job.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
apiVersion: v1
kind: ConfigMap
metadata:
name: ccip-scripts-config
data:
config.json: |
{
"hello": "world"
}
---
apiVersion: batch/v1
kind: Job
metadata:
name: ccip-scripts-deploy
spec:
template:
spec:
containers:
- name: ccip-scripts
image: {{.Values.ccip.ccipScriptsImage}}
command: ["cat", "version"]
volumeMounts:
- name: config-volume
mountPath: /data/config.json
securityContext:
capabilities:
drop:
- ALL
runAsUser: 999
runAsGroup: 999
runAsNonRoot: true
restartPolicy: Never
volumes:
- name: config-volume
configMap:
name: ccip-scripts-config
backoffLimit: 4

87 changes: 87 additions & 0 deletions charts/chainlink-cluster/templates/ccip-scripts-pod.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
apiVersion: v1
kind: ConfigMap
metadata:
name: ccip-scripts-config
data:
config.json: |
{
"EnvName": "{{$.Release.Namespace}}",
"DONCreds": {
"Env": "{{$.Release.Namespace}}",
"Bootstrap": {
{{- with (index $.Values.chainlink.nodes 0) }}
{{- $nameWithoutHyphen := .name | replace "-" "" }}
"URL": "https://{{$.Release.Namespace}}-{{$nameWithoutHyphen}}.{{$.Values.ingress.baseDomain}}/",
"Email": "notreal@fakeemail.ch",
"Password": "fj293fbBnlQ!f9vNs",
"InternalIP": "{{$.Release.Name}}-{{.name}}",
{{- end}}
"HTTPTimeout": null
},
"Nodes": [
{{- range $index, $cfg := $.Values.chainlink.nodes }}
{{- if ne $index 0}}
{{- $nameWithoutHyphen := $cfg.name | replace "-" "" }}
{
"URL": "https://{{$.Release.Namespace}}-{{$nameWithoutHyphen}}.{{$.Values.ingress.baseDomain}}/",
"Email": "notreal@fakeemail.ch",
"Password": "fj293fbBnlQ!f9vNs",
"InternalIP": "{{$.Release.Name}}-{{$cfg.name}}",
"HTTPTimeout": null
},
{{- end}}
{{- end}}
]
},
{{- $networkIDs := list }}
{{- range $index, $cfg :=$.Values.ccip.chains }}
{{- $networkIDs = append $networkIDs $cfg.NetworkId }}
{{- end }}
{{- $delimiter := "," }}
{{- $foldedString := join $delimiter $networkIDs }}
"ChainPairs":[{{- printf $foldedString | quote }}],
"CCIPChains": {
{{- range $index, $cfg := $.Values.ccip.chains }}
"geth_{{$cfg.NetworkId}}":{
"NetworkURL": "wss://{{$.Release.Namespace}}-geth-{{$cfg.NetworkId}}-ws.{{$.Values.ingress.baseDomain}}",
"WalletKey": "ac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80",
"DeployLink": false,
"DeployWETH": false,
"ChainConfig": {{$cfg.ChainConfig | toJson}}
},
{{- end}}
},
"LaneDeploySettings": {{$.Values.ccip.LaneDeploySettings | toJson }}
}
---
apiVersion: v1
kind: Pod
metadata:
name: ccip-scripts-deploy

spec:
containers:
- name: ccip-scripts
image: {{.Values.ccip.ccipScriptsImage}}
command:
- "tail"
- "-f"
- "/dev/null"
volumeMounts:
- name: config-volume
mountPath: /data/config.json
securityContext:
capabilities:
drop:
- ALL
runAsUser: 999
runAsGroup: 999
runAsNonRoot: true
restartPolicy: Never
volumes:
- name: config-volume
configMap:
name: ccip-scripts-config

113 changes: 113 additions & 0 deletions charts/chainlink-cluster/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,118 @@ geth:
limits:
cpu: 1
memory: 1024Mi

ccip:
ccipScriptsImage: ccip-scripts-mage:image-tag
chains:
- NetworkId: 1337
WalletKey: 59c6995e998f97a5a0044966f0945389dc9e86dae88c7a8412f4603b6b78690d
DeployLink: false
DeployWETH: false
ChainConfig:
EvmChainId: 1337
GasSettings:
EIP1559: true
GasTipCap: 1000000000
SupportedTokens:
ChainLink Token:
ChainId: 1337
Token: "0x5fbdb2315678afecb367f032d93f642f64180aa3"
Pool: "0xa513e6e4b8f2a923d98304ec87f64353c4d5c853"
TokenPriceType: "TokenPrices"
Price: 10000000000000000000
Aggregator: "0x0000000000000000000000000000000000000000"
TokenPoolType: "lockRelease"
WETH:
ChainId: 1337
Token: "0xcf7ed3acca5a467e9e704c703e8d87f634fb0fc9"
Pool: "0x0000000000000000000000000000000000000000"
TokenPriceType: "TokenPrices"
Price: 1.8e+21
Aggregator: "0x0000000000000000000000000000000000000000"
TokenPoolType: "feeTokenOnly"
Router: "0x0165878a594ca255338adfa4d48449f69242eb8f"
ARM: "0xdc64a140aa3e981100a9beca4e685f962f0cf6c9"
ARMProxy: "0x5fc8d32690cc91d4c39d9d3abcbd16989f875707"
PriceRegistry: "0x8a791620dd6260079bf849dc5567adc3f2fdc318"
DeploySettings:
DeployedAtBlock: 478
TunableChainValues:
FinalityDepth: 1
OptimisticConfirmations: 1
BatchGasLimit: 7000000
RelativeBoostPerWaitHour: 2400
FeeUpdateHeartBeat: "24h0m0s"
FeeUpdateDeviationPPB: 100000000
MaxGasPrice: 1000000000000
InflightCacheExpiry: "3m0s"
RootSnoozeTime: "5m0s"
- NetworkId: 2337
WalletKey: "59c6995e998f97a5a0044966f0945389dc9e86dae88c7a8412f4603b6b78690d"
DeployLink: false
DeployWETH: false
ChainConfig:
EvmChainId: 2337
GasSettings:
EIP1559: true
GasTipCap: 1000000000
SupportedTokens:
ChainLink Token:
ChainId: 2337
Token: "0x8464135c8f25da09e49bc8782676a84730c318bc"
Pool: "0x1275d096b9dbf2347bd2a131fb6bdab0b4882487"
TokenPriceType: "TokenPrices"
Price: 10000000000000000000
Aggregator: "0x0000000000000000000000000000000000000000"
TokenPoolType: "lockRelease"
WETH:
ChainId: 2337
Token: "0x712516e61c8b383df4a63cfe83d7701bce54b03e"
Pool: "0x0000000000000000000000000000000000000000"
TokenPriceType: "TokenPrices"
Price: 1.8e+21
Aggregator: "0x0000000000000000000000000000000000000000"
TokenPoolType: "feeTokenOnly"
Router: "0xc6ba8c3233ecf65b761049ef63466945c362edd2"
ARM: "0xbcf26943c0197d2ee0e5d05c716be60cc2761508"
ARMProxy: "0x59f2f1fcfe2474fd5f0b9ba1e73ca90b143eb8d0"
PriceRegistry: "0x0b48af34f4c854f5ae1a3d587da471fea45bad52"
DeploySettings:
DeployedAtBlock: 479
TunableChainValues:
FinalityDepth: 1
OptimisticConfirmations: 1
BatchGasLimit: 7000000
RelativeBoostPerWaitHour: 2400
FeeUpdateHeartBeat: "24h0m0s"
FeeUpdateDeviationPPB: 100000000
MaxGasPrice: 1000000000000
InflightCacheExpiry: "3m0s"
RootSnoozeTime: "5m0s"
LaneDeploySettings:
geth_1337,geth_2337:
DeployLane: false
DeployPingPongDapp: false
CCIPLaneConfigs:
geth_1337:
geth_2337:
OnRamp: "0x610178da211fef7d417bc0e6fed39f05609ad788"
OffRamp: "0x0b306bf915c4d645ff596e518faf3f9669b97016"
CommitStore: "0x0dcd1bf9a1b36ce34237eeafef220932846bcd82"
PingPongDapp: "0x68b1d87f95878fe05b998f19b66f4baba5de1aed"
DeploySettings:
DeployedAtBlock: 478
geth_2337:
geth_1337:
OnRamp: "0x0f5d1ef48f12b6f691401bfe88c2037c690a6afe"
OffRamp: "0x381445710b5e73d34af196c53a3d5cda58edbf7a"
CommitStore: "0x2de080e97b0cae9825375d31f5d0ed5751fdf16d"
PingPongDapp: "0x0d4ff719551e23185aeb16ffbf2abebb90635942"
DeploySettings:
DeployedAtBlock: 479



Check failure on line 256 in charts/chainlink-cluster/values.yaml

View workflow job for this annotation

GitHub Actions / ci-lint-helm-charts

256:1 [empty-lines] too many blank lines (3 > 2)
# mockserver is https://www.mock-server.com/where/kubernetes.html
# used to stub External Adapters
mockserver:
Expand Down Expand Up @@ -270,6 +382,7 @@ ingress:
enabled: false
annotations: {}
ingressClassName: alb
baseDomain: "example.com"
hosts:
- host: chainlink-node-1.local
http:
Expand Down

0 comments on commit 73985f0

Please sign in to comment.