Skip to content

Commit

Permalink
Add release v0.15.0 (#23)
Browse files Browse the repository at this point in the history
* add v0.15.0 release

* add v0.15.0 release

* add v0.15.0 release

* add new configurations

* add new docs

* fix typos on wss protocol

* feat: improvements

Signed-off-by: Smuu <18609909+Smuu@users.noreply.github.com>

* fix nil pointer on node ws settings

* fix: add env var for tls path

Signed-off-by: Smuu <18609909+Smuu@users.noreply.github.com>

* feat(node): files fixes -testing

Signed-off-by: Jose Ramon Mañes <jose@celestia.org>

* feat(node): files fixes -testing

Signed-off-by: Jose Ramon Mañes <jose@celestia.org>

* fix: some bugs

Signed-off-by: Smuu <18609909+Smuu@users.noreply.github.com>

* feat: improve way to mount keys

Signed-off-by: Smuu <18609909+Smuu@users.noreply.github.com>

* fix: dont hardcode path

Signed-off-by: Smuu <18609909+Smuu@users.noreply.github.com>

---------

Signed-off-by: Smuu <18609909+Smuu@users.noreply.github.com>
Signed-off-by: Jose Ramon Mañes <jose@celestia.org>
Co-authored-by: Smuu <18609909+Smuu@users.noreply.github.com>
Co-authored-by: Jose Ramon Mañes <jose@celestia.org>
  • Loading branch information
3 people authored Aug 13, 2024
1 parent 3051511 commit d769d18
Show file tree
Hide file tree
Showing 22 changed files with 698 additions and 516 deletions.
2 changes: 1 addition & 1 deletion charts/celestia-app/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# celestia-app

![Version: 0.1.0](https://img.shields.io/badge/Version-0.1.0-informational?style=flat-square) ![AppVersion: v1.11.0](https://img.shields.io/badge/AppVersion-v1.11.0-informational?style=flat-square)
![Version: 0.1.2](https://img.shields.io/badge/Version-0.1.2-informational?style=flat-square) ![AppVersion: v1.11.0](https://img.shields.io/badge/AppVersion-v1.11.0-informational?style=flat-square)

Celestia App

Expand Down
6 changes: 3 additions & 3 deletions charts/celestia-node/Chart.lock
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
dependencies:
- name: common
repository: oci://registry-1.docker.io/bitnamicharts
version: 2.20.2
digest: sha256:35d895f873f86ebff35e439bcf9da34c42a78c4db2e0e179bfb4014a2a0e2e10
generated: "2024-06-13T11:08:30.71548+02:00"
version: 2.21.0
digest: sha256:aad727fb6bd333a7ebb22f06f1edcb53349acdbffaa1baffa0266d9a33162dbd
generated: "2024-08-08T12:00:46.778208+02:00"
4 changes: 2 additions & 2 deletions charts/celestia-node/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ annotations:
category: celestia
licenses: Apache-2.0
apiVersion: v2
appVersion: v0.14.1
appVersion: v0.15.0
dependencies:
- name: common
repository: oci://registry-1.docker.io/bitnamicharts
Expand All @@ -21,4 +21,4 @@ maintainers:
name: celestia-node
sources:
- https://github.com/celestiaorg/celestia-node
version: 0.1.4
version: 0.2.0
336 changes: 248 additions & 88 deletions charts/celestia-node/README.md

Large diffs are not rendered by default.

8 changes: 7 additions & 1 deletion charts/celestia-node/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ Compile all deprecation warnings into a single message.
{{- define "node.deprecationWarnings" -}}
{{- $warnings := list -}}
{{- if .Values.node.args -}}
DEPRECATION WARNING: The use of node.args is deprecated. Please configure container args using node.settings.nodeType and node.extraArgs.
{{- $warnings = append $warnings "DEPRECATION WARNING: The use of node.args is deprecated. Please configure container args using node.settings.nodeType and node.extraArgs." -}}
{{- end -}}
{{- $warnings := without $warnings "" -}}
{{- $warning := join "\n" $warnings -}}
Expand All @@ -98,6 +98,12 @@ Compile all validation messages into a single message and fail the deployment if
{{- define "node.validateValues" -}}
{{- $messages := list -}}
{{- $messages := append $messages (include "node.validateValues.nodeType" .) -}}
{{- if .Values.node.settings.node_id -}}
{{- $messages = append $messages "ERROR: The use of node.settings.node_id is not allowed. Please use the secret specified in node.settings.secret." -}}
{{- end -}}
{{- if .Values.node.settings.address -}}
{{- $messages = append $messages "ERROR: The use of node.settings.address is not allowed. Please use the secret specified in node.settings.secret." -}}
{{- end -}}
{{- $messages := without $messages "" -}}
{{- $message := join "\n" $messages -}}

Expand Down
12 changes: 0 additions & 12 deletions charts/celestia-node/templates/configmap-address.yaml

This file was deleted.

5 changes: 2 additions & 3 deletions charts/celestia-node/templates/configmap-bridge.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,8 @@ data:
RPCPort = "{{ .Values.node.config.bridge.configtoml.Core.RPCPort }}"
GRPCPort = "{{ .Values.node.config.bridge.configtoml.Core.GRPCPort }}"
[State]
KeyringAccName = "{{ .Values.node.config.bridge.configtoml.State.KeyringAccName }}"
KeyringBackend = "{{ .Values.node.config.bridge.configtoml.State.KeyringBackend }}"
GranterAddress = {{ .Values.node.config.bridge.configtoml.State.GranterAddress }}
DefaultKeyName = "{{ .Values.node.config.bridge.configtoml.State.DefaultKeyName }}"
DefaultBackendName = "{{ .Values.node.config.bridge.configtoml.State.DefaultBackendName }}"
[P2P]
ListenAddresses = [{{ range $index, $element := .Values.node.config.bridge.configtoml.P2P.ListenAddresses }}{{ if $index }}, {{ end }}"{{ $element }}"{{ end }}]
AnnounceAddresses = {{ .Values.node.config.bridge.configtoml.P2P.AnnounceAddresses }}
Expand Down
5 changes: 2 additions & 3 deletions charts/celestia-node/templates/configmap-full.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,8 @@ data:
RPCPort = "{{ .Values.node.config.full.configtoml.Core.RPCPort }}"
GRPCPort = "{{ .Values.node.config.full.configtoml.Core.GRPCPort }}"
[State]
KeyringAccName = "{{ .Values.node.config.full.configtoml.State.KeyringAccName }}"
KeyringBackend = "{{ .Values.node.config.full.configtoml.State.KeyringBackend }}"
GranterAddress = {{ .Values.node.config.full.configtoml.State.GranterAddress }}
DefaultKeyName = "{{ .Values.node.config.full.configtoml.State.DefaultKeyName }}"
DefaultBackendName = "{{ .Values.node.config.full.configtoml.State.DefaultBackendName }}"
[P2P]
ListenAddresses = [{{ range $index, $element := .Values.node.config.full.configtoml.P2P.ListenAddresses }}{{ if $index }}, {{ end }}"{{ $element }}"{{ end }}]
AnnounceAddresses = {{ .Values.node.config.full.configtoml.P2P.AnnounceAddresses }}
Expand Down
7 changes: 4 additions & 3 deletions charts/celestia-node/templates/configmap-light.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,8 @@ data:
RPCPort = "{{ .Values.node.config.light.configtoml.Core.RPCPort }}"
GRPCPort = "{{ .Values.node.config.light.configtoml.Core.GRPCPort }}"
[State]
KeyringAccName = "{{ .Values.node.config.light.configtoml.State.KeyringAccName }}"
KeyringBackend = "{{ .Values.node.config.light.configtoml.State.KeyringBackend }}"
GranterAddress = {{ .Values.node.config.light.configtoml.State.GranterAddress }}
DefaultKeyName = "{{ .Values.node.config.light.configtoml.State.DefaultKeyName }}"
DefaultBackendName = "{{ .Values.node.config.light.configtoml.State.DefaultBackendName }}"
[P2P]
ListenAddresses = [{{ range $index, $element := .Values.node.config.light.configtoml.P2P.ListenAddresses }}{{ if $index }}, {{ end }}"{{ $element }}"{{ end }}]
AnnounceAddresses = {{ .Values.node.config.light.configtoml.P2P.AnnounceAddresses }}
Expand Down Expand Up @@ -63,6 +62,8 @@ data:
PeerCooldown = "{{ .Values.node.config.light.configtoml.Share.PeerManagerParams.PeerCooldown }}"
GcInterval = "{{ .Values.node.config.light.configtoml.Share.PeerManagerParams.GcInterval }}"
EnableBlackListing = {{ .Values.node.config.light.configtoml.Share.PeerManagerParams.EnableBlackListing }}
[Share.LightAvailability]
SampleAmount = {{ printf "%.0f" .Values.node.config.light.configtoml.Share.LightAvailability.SampleAmount }}
[Share.Discovery]
PeersLimit = {{ printf "%.0f" .Values.node.config.light.configtoml.Share.Discovery.PeersLimit }}
AdvertiseInterval = "{{ .Values.node.config.light.configtoml.Share.Discovery.AdvertiseInterval }}"
Expand Down
19 changes: 19 additions & 0 deletions charts/celestia-node/templates/service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,19 @@ spec:
nodePort: null
{{- end }}
{{- end }}
{{- if .Values.service.external.ports.ws }}
- name: ws
port: {{ .Values.service.external.ports.ws }}
{{- if not (eq .Values.service.external.ports.ws .Values.node.containerPorts.ws) }}
targetPort: {{ .Values.node.containerPorts.ws }}
{{- end }}
protocol: TCP
{{- if and (or (eq .Values.service.external.type "NodePort") (eq .Values.service.external.type "LoadBalancer")) (not (empty .Values.service.external.nodePorts.ws)) }}
nodePort: {{ .Values.service.external.nodePorts.ws }}
{{- else if eq .Values.service.external.type "ClusterIP" }}
nodePort: null
{{- end }}
{{- end }}
{{- if .Values.service.external.ports.rest }}
- name: rest
port: {{ .Values.service.external.ports.rest }}
Expand Down Expand Up @@ -151,6 +164,12 @@ spec:
port: {{ .Values.service.internal.ports.p2p }}
targetPort: {{ .Values.node.containerPorts.p2p }}
protocol: UDP
- name: ws
port: {{ .Values.service.internal.ports.ws }}
{{- if not (eq .Values.service.internal.ports.ws .Values.node.containerPorts.ws) }}
targetPort: {{ .Values.node.containerPorts.ws }}
{{- end }}
protocol: TCP
- name: rest
port: {{ .Values.service.internal.ports.rest }}
{{- if not (eq .Values.service.internal.ports.rest .Values.node.containerPorts.rest) }}
Expand Down
65 changes: 42 additions & 23 deletions charts/celestia-node/templates/statefulset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -116,33 +116,32 @@ spec:
command:
- "sh"
- "-c"
- "chown -R {{ .Values.node.containerSecurityContext.runAsUser }}:{{ .Values.node.containerSecurityContext.runAsGroup }} /home"
- |
set -ex
chown -R {{ .Values.node.containerSecurityContext.runAsUser }}:{{ .Values.node.containerSecurityContext.runAsGroup }} /home
ls -ltra /home
volumeMounts:
- name: home-dir # This is needed so that the process has permissions to create files in the home directory
mountPath: /home
readOnly: false
- name: keys-permission
- name: keys
image: busybox
command:
- "sh"
- "-c"
- |
mkdir -p /keys-volume/keyring-test && \
cp /keys/* /keys-volume/ && \
cp /address/* /keys-volume/keyring-test/ && \
cp /celes-key/* /keys-volume/keyring-test/ && \
chown -R {{ .Values.node.containerSecurityContext.runAsUser }}:{{ .Values.node.containerSecurityContext.runAsGroup }} /keys-volume/* /keys-volume/keyring-test/ && \
set -ex
mkdir -p /keys-volume/keyring-test
cp /keys/NJ3XILLTMVRXEZLUFZVHO5A /keys-volume/
cp /keys/OAZHALLLMV4Q /keys-volume/
cp /keys/my_celes_key.info /keys-volume/keyring-test/
printf "%s" "$(cat /keys/address)" > /keys-volume/keyring-test/$(cat /keys/uid).address
chown -R {{ .Values.node.containerSecurityContext.runAsUser }}:{{ .Values.node.containerSecurityContext.runAsGroup }} /keys-volume/
find /keys-volume/ -type f -exec chmod 0600 {} \;
volumeMounts:
- name: keys
mountPath: /keys
readOnly: true
- name: address
mountPath: /address
readOnly: true
- name: celes-key
mountPath: /celes-key
readOnly: true
- name: keys-volume
mountPath: /keys-volume
{{- if .Values.node.initContainers }}
Expand All @@ -168,6 +167,10 @@ spec:
env:
- name: CELESTIA_HOME
value: {{ .Values.node.settings.home }}
{{- if .Values.node.settings.ws.tls.enabled }}
- name: CELESTIA_TLS_PATH
value: {{ .Values.node.settings.home }}/tls
{{- end }}
{{- if .Values.node.extraEnvVars }}
{{- include "common.tplvalues.render" (dict "value" .Values.node.extraEnvVars "context" $) | nindent 12 }}
{{- end }}
Expand All @@ -194,6 +197,10 @@ spec:
containerPort: {{ .Values.node.containerPorts.p2p }}
hostPort: {{ .Values.node.containerPorts.p2p }}
protocol: UDP
- name: ws
containerPort: {{ .Values.node.containerPorts.ws }}
hostPort: {{ .Values.node.containerPorts.ws }}
protocol: TCP
- name: rest
containerPort: {{ .Values.node.containerPorts.rest }}
hostPort: {{ .Values.node.containerPorts.rest }}
Expand Down Expand Up @@ -272,6 +279,16 @@ spec:
- name: home-dir # This is needed so that the process has permissions to create files in the home directory
mountPath: {{ .Values.node.settings.home }}
readOnly: false
{{- if .Values.node.settings.ws.tls.enabled }}
- name: tls-certs
mountPath: {{ .Values.node.settings.home }}/tls/cert.pem
subPath: tls.crt
readOnly: true
- name: tls-certs
mountPath: {{ .Values.node.settings.home }}/tls/key.pem
subPath: tls.key
readOnly: true
{{- end }}
{{- if .Values.node.extraVolumeMounts }}
{{- include "common.tplvalues.render" (dict "value" .Values.node.extraVolumeMounts "context" $) | nindent 12 }}
{{- end }}
Expand Down Expand Up @@ -326,25 +343,27 @@ spec:
path: OAZHALLLMV4Q
- key: my_celes_key_info
path: my_celes_key.info
- name: address
configMap:
name: {{ template "common.names.fullname" . }}-address
items:
- key: uid
path: uid
- key: address
path: address
- name: celes-key
secret:
secretName: {{ .Values.node.settings.secret.name }}
items:
- key: my_celes_key_info
path: my_celes_key.info
- name: keys-volume
emptyDir: {}
- name: home-dir
emptyDir: {}
- name: configtoml
configMap:
name: {{ template "common.names.fullname" . }}-configtoml
{{- if .Values.node.settings.ws.tls.enabled }}
- name: tls-certs
secret:
secretName: {{ .Values.node.settings.ws.tls.secret.name }}
items:
- key: tls.crt
path: tls.crt
- key: tls.key
path: tls.key
{{- end }}
- name: otel-agent-config
configMap:
name: {{ template "common.names.fullname" . }}-otel-agent
Expand Down
Loading

0 comments on commit d769d18

Please sign in to comment.