Skip to content

Commit

Permalink
feat(node): files fixes -testing
Browse files Browse the repository at this point in the history
Signed-off-by: Jose Ramon Mañes <[email protected]>
  • Loading branch information
tty47 committed Aug 8, 2024
1 parent c2ad90d commit 61db244
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 11 deletions.
2 changes: 1 addition & 1 deletion charts/celestia-node/templates/configmap-address.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@ metadata:
annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
{{- end }}
data:
address: {{ .Values.node.settings.address }}
{{ .Values.node.settings.node_id }}.address: {{ .Values.node.settings.address }}
27 changes: 17 additions & 10 deletions charts/celestia-node/templates/statefulset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,10 @@ 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
Expand All @@ -127,18 +130,22 @@ spec:
- "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/ && \
find /keys-volume/ -type f -exec chmod 0600 {} \;
set -ex
mkdir -p /keys-volume/keyring-test
cp /keys/* /keys-volume/
cp /address/* /keys-volume/keyring-test/
cp /celes-key/* /keys-volume/keyring-test/
printf "%s" "$(cat /celes-key/my_celes_key.info)" > /keys-volume/keyring-test/my_celes_key.info
rm /keys-volume/my_celes_key.info
chown -R {{ .Values.node.containerSecurityContext.runAsUser }}:{{ .Values.node.containerSecurityContext.runAsGroup }} /keys-volume/* /keys-volume/keyring-test/
find /keys-volume/ -type f -exec chmod 0400 {} \;
volumeMounts:
- name: keys
mountPath: /keys
readOnly: true
- name: address
mountPath: /address
mountPath: /address/{{ .Values.node.settings.node_id }}.address
subPath: {{ .Values.node.settings.node_id }}.address
readOnly: true
- name: celes-key
mountPath: /celes-key
Expand Down Expand Up @@ -348,8 +355,8 @@ spec:
configMap:
name: {{ template "common.names.fullname" . }}-address
items:
- key: address
path: address
- key: {{ .Values.node.settings.node_id }}.address
path: {{ .Values.node.settings.node_id }}.address
- name: celes-key
secret:
secretName: {{ .Values.node.settings.secret.name }}
Expand Down

0 comments on commit 61db244

Please sign in to comment.