initial_scripts.yaml 635 B

123456789101112131415161718
  1. apiVersion: v1
  2. kind: ConfigMap
  3. metadata:
  4. name: "initial-scripts"
  5. annotations:
  6. rollme: {{ randAlphaNum 5 | quote }}
  7. data:
  8. init_config.sh: |-
  9. #!/bin/sh
  10. if ! [ -f ${DEFAULT_CERT_PATH} ] && ! [ -f ${DEFAULT_IDENTITY_CERT_PATH} ]; then
  11. curl -L https://github.com/storj/storj/releases/latest/download/identity_linux_amd64.zip -o identity_linux_amd64.zip
  12. unzip -o identity_linux_amd64.zip
  13. chmod +x identity
  14. ./identity create storagenode
  15. ./identity authorize storagenode ${AUTH_KEY}
  16. chown -R {{ .Values.runAsUser }}:{{ .Values.runAsGroup }} {{ .Values.identityCreationMountPath }}
  17. fi