Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions charts/juicefs-s3-gateway/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@ spec:
imagePullSecrets:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- if .Values.serviceAccount.name }}
serviceAccountName: {{ .Values.serviceAccount.name }}
{{- end }}
initContainers:
- name: format
image: {{ .Values.image.repository }}:{{ .Values.image.tag }}
Expand All @@ -33,14 +36,15 @@ spec:
- sh
- -c
{{- if .Values.secret.token }}
- juicefs auth ${name} --token=${token} {{ if .Values.secret.bucket }}--bucket=${bucket}{{ end }} --access-key=${accesskey} --secret-key=${secretkey}
- juicefs auth ${name} --token=${token} {{ if .Values.secret.bucket }}--bucket=${bucket}{{ end }}{{ if not .Values.secret.useEnvForInit }} --access-key=${accesskey} --secret-key=${secretkey}{{ end }}
{{- else }}
- juicefs format ${metaurl} ${name} --storage=${storage} --bucket=${bucket} --access-key=${accesskey} --secret-key=${secretkey} {{ .Values.formatOptions }}
- juicefs format ${metaurl} ${name} --storage=${storage} --bucket=${bucket}{{ if not .Values.secret.useEnvForInit }} --access-key=${accesskey} --secret-key=${secretkey}{{ end }} {{ .Values.formatOptions }}
{{- end }}
envFrom:
- secretRef:
name: juicefs-secret
env:
{{- if not .Values.secret.useEnvForInit }}
- name: accesskey
valueFrom:
secretKeyRef:
Expand All @@ -51,6 +55,7 @@ spec:
secretKeyRef:
name: juicefs-secret
key: secret-key
{{- end }}
{{- if .Values.initEnvs }}
{{ toYaml .Values.initEnvs | indent 12 }}
{{- end }}
Expand Down
11 changes: 11 additions & 0 deletions charts/juicefs-s3-gateway/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,11 @@ imagePullSecrets: []
nameOverride: ""
fullnameOverride: ""

serviceAccount:
# -- The name of the service account to use for the gateway pods.
# If not set, no service account will be specified in the pod spec
name: ""

podAnnotations: {}

service:
Expand Down Expand Up @@ -88,6 +93,12 @@ secret:
# CE Ref: https://juicefs.com/docs/community/how_to_setup_object_storage
# EE Ref (see --bucket): https://juicefs.com/docs/cloud/reference/command_reference/#auth
bucket: ""
# -- Use environment credentials for backend authentication in init container.
# When true, --access-key and --secret-key will NOT be passed to juicefs auth/format commands,
# allowing JuiceFS to discover credentials from environment variables (e.g., AWS_ACCESS_KEY_ID,
# AWS_SECRET_ACCESS_KEY).
# MINIO_ROOT_USER and MINIO_ROOT_PASSWORD will still be set from accessKey/secretKey.
useEnvForInit: false
# -- Encryption settings
# JFS_RSA_PASSPHRASE: xxx
# encrypt_rsa_key: |
Expand Down