{{- $gatewayLogLevel := default "silent" .Values.gateway.logLevel -}} {{- $iamServer := .Values.iamServer | default dict -}} {{- $iamServerEnabled := $iamServer.enabled | default false -}} {{- $iamServerPrivate := $iamServer.private | default dict -}} {{- $iamServerPrivateEnabled := $iamServerPrivate.enabled | default false -}} {{- $iamServerAuth := $iamServer.auth | default dict -}} {{- $iamStandalone := .Values.iam.standalone | default dict -}} {{- $iamStandaloneEndpoint := $iamStandalone.endpoint | default "" -}} {{- $iamStandaloneCredentials := $iamStandalone.credentials | default dict -}} {{- $internalIAM := and .Values.iam.enabled (eq .Values.iam.type "internal") -}} {{- $iamDir := clean (.Values.iam.dir | default "/mnt/iam") -}} {{- $iamPersistence := .Values.iam.persistence | default dict -}} {{- $sidecarDir := .Values.gateway.backend.sidecarDir -}} {{- $versioningDir := .Values.gateway.backend.versioningDir -}} {{- $adminPathPrefix := .Values.admin.pathPrefix | default "" -}} {{- $webuiS3Prefix := .Values.webui.s3Prefix | default "" -}} {{- /* Safety check: multiple replicas with local state must have persistence enabled */}} {{- if and (gt (int .Values.replicaCount) 1) .Values.iam.enabled (eq .Values.iam.type "internal") }} {{- fail "replicaCount > 1 cannot use iam.type=internal because the file store does not coordinate concurrent writers; use standalone or another external IAM backend" }} {{- end }} {{- if and (gt (int .Values.replicaCount) 1) (not .Values.persistence.enabled) }} {{- if eq .Values.gateway.backend.type "posix" }} {{- fail "Multiple replicas with a POSIX backend require persistence.enabled=true. If using a stateless backend (e.g. S3 or Azure) and external IAM, persistence can be disabled." }} {{- end }} {{- end }} {{- if and .Values.persistence.enabled (not .Values.persistence.create) (not .Values.persistence.claimName) (not .Values.persistence.hostPath) }} {{- fail "persistence.claimName or persistence.hostPath is required when persistence.create is false" }} {{- end }} {{- if and .Values.persistence.claimName .Values.persistence.hostPath }} {{- fail "only persistence.claimName or persistence.hostPath can be set" }} {{- end }} {{- if and .Values.persistence.create .Values.persistence.hostPath }} {{- fail "persistence.create must be false for persistence.hostPath can be set" }} {{- end }} {{- if and .Values.gateway.backend.sidecarDir (ne .Values.gateway.backend.type "posix") }} {{- fail "gateway.backend.sidecarDir is only supported with the posix backend" }} {{- end }} {{- if and .Values.gateway.backend.versioningDir (not (or (eq .Values.gateway.backend.type "posix") (eq .Values.gateway.backend.type "scoutfs"))) }} {{- fail "gateway.backend.versioningDir is only supported with the posix and scoutfs backends" }} {{- end }} {{- /* Bucket deletion removes