You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

20 lines
1012 B

  1. {{- if not (or .Values.filer.s3.skipAuthSecretCreation .Values.s3.skipAuthSecretCreation) }}
  2. {{- $access_key_admin := randAlphaNum 16 -}}
  3. {{- $secret_key_admin := randAlphaNum 32 -}}
  4. {{- $access_key_read := randAlphaNum 16 -}}
  5. {{- $secret_key_read := randAlphaNum 32 -}}
  6. apiVersion: v1
  7. kind: Secret
  8. type: Opaque
  9. metadata:
  10. name: seaweedfs-s3-secret
  11. namespace: {{ .Release.Namespace }}
  12. annotations:
  13. "helm.sh/resource-policy": keep
  14. "helm.sh/hook": "pre-install"
  15. stringData:
  16. admin_access_key_id: {{ $access_key_admin }}
  17. admin_secret_access_key: {{ $secret_key_admin }}
  18. read_access_key_id: {{ $access_key_read }}
  19. read_secret_access_key: {{ $secret_key_read }}
  20. seaweedfs_s3_config: '{"identities":[{"name":"anvAdmin","credentials":[{"accessKey":"{{ $access_key_admin }}","secretKey":"{{ $secret_key_admin }}"}],"actions":["Admin","Read","Write"]},{"name":"anvReadOnly","credentials":[{"accessKey":"{{ $access_key_read }}","secretKey":"{{ $secret_key_read }}"}],"actions":["Read"]}]}'
  21. {{- end }}