Skip to content
Merged
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
4 changes: 4 additions & 0 deletions braintrust/templates/api-configmap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,12 @@ data:
CODE_BUNDLE_BUCKET: {{ .Values.objectStorage.google.apiBucket | quote }}
CODE_BUNDLE_BUCKET_PREFIX: "code-bundle/"
BRAINSTORE_REALTIME_WAL_BUCKET: {{ .Values.objectStorage.google.brainstoreBucket | quote }}
{{- if .Values.api.enableGcsAuth }}
ENABLE_GCS_AUTH: "true"
{{- else }}
AWS_ENDPOINT_URL: "https://storage.googleapis.com"
{{- end }}
{{- end }}

ALLOW_CODE_FUNCTION_EXECUTION: {{ .Values.api.allowCodeFunctionExecution | quote }}
BRAINSTORE_ENABLED: "true"
Expand Down
8 changes: 7 additions & 1 deletion braintrust/templates/api-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,16 @@ spec:
{{- if eq .Values.cloud "azure" }}
azure.workload.identity/use: "true"
{{- end }}
{{- if and (eq .Values.cloud "google") .Values.api.enableGcsAuth }}
gke-workload-identity/use: "true"
{{- end }}
{{- with (merge .Values.global.labels .Values.api.labels) }}
{{- toYaml . | nindent 8 }}
{{- end }}
annotations:
{{- if and (eq .Values.cloud "google") .Values.api.enableGcsAuth }}
iam.gke.io/gcp-service-account: {{ required "api.serviceAccount.googleServiceAccount is required when api.enableGcsAuth is true" .Values.api.serviceAccount.googleServiceAccount }}
{{- end }}
{{- with .Values.api.annotations.pod }}
{{- toYaml . | nindent 8 }}
{{- end }}
Expand Down Expand Up @@ -91,7 +97,7 @@ spec:
name: braintrust-secrets
key: AZURE_STORAGE_CONNECTION_STRING
{{- end }}
{{- if eq .Values.cloud "google" }}
{{- if and (eq .Values.cloud "google") (not .Values.api.enableGcsAuth) }}
- name: AWS_ACCESS_KEY_ID
valueFrom:
secretKeyRef:
Expand Down
3 changes: 3 additions & 0 deletions braintrust/templates/api-serviceaccount.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ metadata:
{{- if eq .Values.cloud "azure" }}
azure.workload.identity/client-id: {{ .Values.api.serviceAccount.azureClientId }}
{{- end }}
{{- if and (eq .Values.cloud "google") .Values.api.enableGcsAuth }}
iam.gke.io/gcp-service-account: {{ required "api.serviceAccount.googleServiceAccount is required when api.enableGcsAuth is true" .Values.api.serviceAccount.googleServiceAccount }}
{{- end }}
{{- with .Values.api.annotations.serviceaccount }}
{{- toYaml . | nindent 4 }}
{{- end }}
2 changes: 1 addition & 1 deletion braintrust/templates/brainstore-reader-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ spec:
{{- end }}
annotations:
{{- if eq .Values.cloud "google" }}
iam.gke.io/gcp-service-account: {{ .Values.brainstore.serviceAccount.googleServiceAccount }}
iam.gke.io/gcp-service-account: {{ required "brainstore.serviceAccount.googleServiceAccount is required when cloud is google" .Values.brainstore.serviceAccount.googleServiceAccount }}
{{- end }}
{{- with .Values.brainstore.reader.annotations.pod }}
{{- toYaml . | nindent 8 }}
Expand Down
2 changes: 1 addition & 1 deletion braintrust/templates/brainstore-serviceaccount.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ metadata:
azure.workload.identity/client-id: {{ .Values.brainstore.serviceAccount.azureClientId }}
{{- end }}
{{- if eq .Values.cloud "google" }}
iam.gke.io/gcp-service-account: {{ .Values.brainstore.serviceAccount.googleServiceAccount }}
iam.gke.io/gcp-service-account: {{ required "brainstore.serviceAccount.googleServiceAccount is required when cloud is google" .Values.brainstore.serviceAccount.googleServiceAccount }}
{{- end }}
{{- with .Values.brainstore.serviceAccount.annotations }}
{{- toYaml . | nindent 4 }}
Expand Down
2 changes: 1 addition & 1 deletion braintrust/templates/brainstore-writer-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ spec:
{{- end }}
annotations:
{{- if eq .Values.cloud "google" }}
iam.gke.io/gcp-service-account: {{ .Values.brainstore.serviceAccount.googleServiceAccount }}
iam.gke.io/gcp-service-account: {{ required "brainstore.serviceAccount.googleServiceAccount is required when cloud is google" .Values.brainstore.serviceAccount.googleServiceAccount }}
{{- end }}
{{- with .Values.brainstore.writer.annotations.pod }}
{{- toYaml . | nindent 8 }}
Expand Down
3 changes: 3 additions & 0 deletions braintrust/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,9 @@ api:
name: "braintrust-api"
awsRoleArn: ""
azureClientId: ""
googleServiceAccount: ""
# Enable native GCS authentication via workload identity (defaults to false for S3-compatible access)
enableGcsAuth: false
resources:
requests:
cpu: "2"
Expand Down