|
1 | 1 | #namespace defaults
|
2 |
| -{{ $_ := set .Values "_namespaceDefaults" ( `{"common":{"features":["nimbus","proxyd"],"scaling":{"deployments":1,"erigon":{},"nimbus":{}}},"flavor":"mainnet","mainnet":{"features":["nimbus","proxyd"],"scaling":{"deployments":1,"erigon":{},"nimbus":{}},"targetNamespace":"eth-mainnet"},"goerli":{"features":["nimbus","proxyd"],"scaling":{"deployments":1,"erigon":{},"nimbus":{}},"targetNamespace":"eth-goerli"},"holesky":{"features":["nimbus","proxyd"],"scaling":{"deployments":1,"erigon":{},"nimbus":{}},"targetNamespace":"eth-holesky"},"sepolia":{"features":["nimbus","proxyd"],"scaling":{"deployments":1,"erigon":{},"nimbus":{}},"targetNamespace":"eth-sepolia"}}` | fromJson ) }} |
| 2 | +{{ $_ := set .Values "_namespaceDefaults" ( `{"common":{"features":["proxyd"],"scaling":{"deployments":1,"erigon":{},"nimbus":{},"lighthouse":{}}},"flavor":"mainnet","mainnet":{"features":["proxyd"],"scaling":{"deployments":1,"erigon":{},"nimbus":{},"lighthouse":{}},"targetNamespace":"eth-mainnet"},"holesky":{"features":["proxyd"],"scaling":{"deployments":1,"erigon":{},"nimbus":{},"lighthouse":{}},"targetNamespace":"eth-holesky"},"sepolia":{"features":["proxyd"],"scaling":{"deployments":1,"erigon":{},"nimbus":{},"lighthouse":{}},"targetNamespace":"eth-sepolia"}}` | fromJson ) }} |
3 | 3 | #set default flavor when missing
|
4 | 4 | {{ if not ( hasKey .Values "flavor" ) }}
|
5 | 5 | {{ $_ := set .Values "flavor" "mainnet" }}
|
@@ -188,6 +188,21 @@ templates:
|
188 | 188 | version: "0.6.1"
|
189 | 189 | {{- end }}
|
190 | 190 |
|
| 191 | + lighthouse: |
| 192 | + {{- if ( .Values | get "lighthouse" dict | get "chartUrl" false ) }} |
| 193 | + chart: {{ .Values | get "lighthouse" | get "chartUrl" }} |
| 194 | + {{- else }} |
| 195 | + chart: "graphops/lighthouse" |
| 196 | + {{- end }} |
| 197 | + inherit: |
| 198 | + - template: "defaults" |
| 199 | + {{- if ( .Values | get "lighthouse" dict | get "chartVersion" false ) }} |
| 200 | + version: {{ .Values | get "lighthouse" | get "chartVersion" }} |
| 201 | + {{- end }} |
| 202 | + {{- if (not (or ( .Values | get "lighthouse" dict | get "chartVersion" false ) ( .Values | get "lighthouse" dict | get "chartUrl" false ) )) }} |
| 203 | + version: "0.6.0" |
| 204 | + {{- end }} |
| 205 | + |
191 | 206 | proxyd:
|
192 | 207 | {{- if ( .Values | get "proxyd" dict | get "chartUrl" false ) }}
|
193 | 208 | chart: {{ .Values | get "proxyd" | get "chartUrl" }}
|
@@ -296,6 +311,53 @@ releases:
|
296 | 311 | {{- tpl $_tplReleaseValues (dict "Values" $.Values "canonicalRelease" $canonicalRelease "release" $release) | indent 4 -}}
|
297 | 312 | {{- end -}}
|
298 | 313 | {{- end -}}
|
| 314 | + {{ if has "lighthouse" ( .Values | get "features" list ) }} |
| 315 | + {{- $canonicalRelease := "lighthouse" }} |
| 316 | + {{- range $index := until (.Values.scaling | get $canonicalRelease dict | get "deployments" .Values.scaling.deployments) }} |
| 317 | + {{- $deploymentIndex := (add . 1) }} |
| 318 | + {{- $release := (printf "%s%v" "lighthouse-" $deploymentIndex) }} |
| 319 | + {{- $_templatedValue_0 := $canonicalRelease }} |
| 320 | + {{- $_templatedValue_1 := $release }} |
| 321 | + {{- $_templatedValue_2 := $deploymentIndex }} |
| 322 | + {{- $_releaseResourceLabels := dict |
| 323 | + `app.launchpad.graphops.xyz/layer` `consensus` |
| 324 | + `app.launchpad.graphops.xyz/component` $_templatedValue_0 |
| 325 | + `app.launchpad.graphops.xyz/release` $_templatedValue_1 |
| 326 | + `app.launchpad.graphops.xyz/scalingIndex` $_templatedValue_2 |
| 327 | + }} |
| 328 | + {{- $_releaseResourceLabels = mergeOverwrite $_commonLabels $_commonResourceLabels $_releaseResourceLabels }} |
| 329 | + - name: "{{ $release }}" |
| 330 | + inherit: |
| 331 | + - template: "{{ $canonicalRelease }}" |
| 332 | + labels: |
| 333 | + app.launchpad.graphops.xyz/layer: consensus |
| 334 | + app.launchpad.graphops.xyz/release: '{{ $release }}' |
| 335 | + app.launchpad.graphops.xyz/component: '{{ $canonicalRelease }}' |
| 336 | + app.launchpad.graphops.xyz/scalingIndex: '{{ $deploymentIndex }}' |
| 337 | + |
| 338 | + {{- range $key,$value := ( $.Values | get $canonicalRelease dict | get "labels" dict ) }} |
| 339 | + {{ $key }}: {{ $value }} |
| 340 | + {{- $_ := set $_releaseResourceLabels $key $value }} |
| 341 | + {{- end }} |
| 342 | + {{- if (ne $release $canonicalRelease) }} |
| 343 | + {{- range $key,$value := ( $.Values | get $release dict | get "labels" dict ) }} |
| 344 | + {{ $key }}: {{ $value }} |
| 345 | + {{- $_ := set $_releaseResourceLabels $key $value }} |
| 346 | + {{- end }} |
| 347 | + {{- end }} |
| 348 | + {{- range $key,$value := ( $.Values | get $canonicalRelease dict | get "resourceLabels" dict ) }} |
| 349 | + {{- $_ := set $_releaseResourceLabels $key $value }} |
| 350 | + {{- end }} |
| 351 | + {{- if (ne $release $canonicalRelease) }} |
| 352 | + {{- range $key,$value := ( $.Values | get $release dict | get "resourceLabels" dict ) }} |
| 353 | + {{- $_ := set $_releaseResourceLabels $key $value }} |
| 354 | + {{- end }} |
| 355 | + {{- end }} |
| 356 | + {{- tpl $_tplTransforms (dict "Values" $.Values "release" $release "canonicalRelease" $canonicalRelease "resourceLabels" $_releaseResourceLabels ) | indent 4 -}} |
| 357 | + values: |
| 358 | + {{- tpl $_tplReleaseValues (dict "Values" $.Values "canonicalRelease" $canonicalRelease "release" $release) | indent 4 -}} |
| 359 | + {{- end -}} |
| 360 | + {{- end -}} |
299 | 361 | {{ if has "proxyd" ( .Values | get "features" list ) }}
|
300 | 362 | {{- $canonicalRelease := "proxyd" }}
|
301 | 363 | {{- $release := "proxyd" }}
|
|
0 commit comments