mirror of
https://github.com/datahaven-xyz/datahaven
synced 2026-05-24 01:38:32 +00:00
This PR contains improvements to the DataHaven deployment infrastructure: 1. Directory restructure: Moved from `deployment/` to `deploy/` (more common for K8s / Helm -based deployment configs). 2. Added **local environment** support: updated CLI to support deploying to a local K8s cluster. 3. Manual deployment script: `deploy/scripts/deploy.sh` for manual deployments. 4. Environment-specific configurations: Structured values files for each environment. 5. Chart organization: Renamed bridges-common-relay to relay for clarity. --------- Co-authored-by: Gonza Montiel <gon.montiel@gmail.com> Co-authored-by: Gonza Montiel <gonzamontiel@users.noreply.github.com>
22 lines
1.1 KiB
YAML
22 lines
1.1 KiB
YAML
{{ $fullname := include "node.fullname" . }}
|
|
{{ if .Values.node.persistGeneratedNodeKey }}
|
|
{{ else if .Values.node.customNodeKey }}
|
|
apiVersion: v1
|
|
kind: Secret
|
|
metadata:
|
|
name: {{ $fullname }}-custom-node-key
|
|
data:
|
|
{{- if kindIs "string" .Values.node.customNodeKey }}
|
|
custom-node-key: {{ .Values.node.customNodeKey | mustRegexFind "^[0-9a-zA-Z]{64}$" | b64enc }}
|
|
{{- else if kindIs "slice" .Values.node.customNodeKey }}
|
|
{{- range $index, $key := .Values.node.customNodeKey }}
|
|
custom-node-key-{{ $index }}: {{ $key | mustRegexFind "^[0-9a-zA-Z]{64}$" | b64enc }}
|
|
{{- end }}
|
|
{{- else if kindIs "map" .Values.node.customNodeKey }}
|
|
{{- range $index := until (max .Values.autoscaling.maxReplicas .Values.node.replicas | int) }}
|
|
custom-node-key-{{ $index }}: {{ printf "%s/%s/%d" $.Values.node.customNodeKey.seed (default $fullname $.Values.node.customNodeKey.extraDerivation) $index | sha256sum | mustRegexFind "^[0-9a-zA-Z]{64}$" | b64enc }}
|
|
{{- end }}
|
|
{{- else }}
|
|
{{- fail (printf "ERROR: '.Values.node.customNodeKey' is invalid. Expected type 'string', 'slice', or 'map', but got: '%s'" (kindOf .Values.node.customNodeKey)) }}
|
|
{{- end }}
|
|
{{ end }}
|