mirror of
https://github.com/truenas/charts.git
synced 2026-04-13 17:52:13 +08:00
19 lines
635 B
YAML
19 lines
635 B
YAML
apiVersion: v1
|
|
kind: ConfigMap
|
|
metadata:
|
|
name: "initial-scripts"
|
|
annotations:
|
|
rollme: {{ randAlphaNum 5 | quote }}
|
|
|
|
data:
|
|
init_config.sh: |-
|
|
#!/bin/sh
|
|
if ! [ -f ${DEFAULT_CERT_PATH} ] && ! [ -f ${DEFAULT_IDENTITY_CERT_PATH} ]; then
|
|
curl -L https://github.com/storj/storj/releases/latest/download/identity_linux_amd64.zip -o identity_linux_amd64.zip
|
|
unzip -o identity_linux_amd64.zip
|
|
chmod +x identity
|
|
./identity create storagenode
|
|
./identity authorize storagenode ${AUTH_KEY}
|
|
chown -R {{ .Values.runAsUser }}:{{ .Values.runAsGroup }} {{ .Values.identityCreationMountPath }}
|
|
fi
|