Open-source AI coworkers that each get a computer of their own: a browser, files and tools, with every action decided before it happens and recorded after. Bring any AG-UI agent.
{{- if and (not .Values.secrets.existingSecret) (not .Values.externalSecrets.enabled) }}
{{/*
The fallback, and the default, because a plain Kubernetes Secret is what a self-hosted cluster has.
A deployment on a cloud points `externalSecrets` at its own store instead and this renders nothing.
Either way the templates that read these keys are identical, which is the point: no vendor appears
anywhere except in a values block.
`helm.sh/resource-policy: keep` is deliberate. `KEY_ENCRYPTION_KEY` is what the credential vault is
encrypted with, so a `helm uninstall` that took it would leave every stored credential unreadable
even after a reinstall against the same database.
*/}}
apiVersion: v1
kind: Secret
metadata:
name: {{ include "openbot.secretName" . }}
labels:
{{ include "openbot.labels" . | indent 4 }}
annotations:
helm.sh/resource-policy: keep
type: Opaque
stringData:
key-encryption-key: {{ required "secrets.keyEncryptionKey is required unless secrets.existingSecret or externalSecrets is used. Generate one with: openssl rand -base64 32" .Values.secrets.keyEncryptionKey | quote }}
intelligence-api-key: {{ required "secrets.intelligenceApiKey is required. OpenBot needs CopilotKit Intelligence and refuses to start without it." .Values.secrets.intelligenceApiKey | quote }}
{{- with .Values.secrets.licenseToken }}
license-token: {{ . | quote }}
{{- end }}
{{- with .Values.secrets.composioApiKey }}
composio-api-key: {{ . | quote }}
{{- end }}
{{- with .Values.secrets.betterAuthSecret }}
better-auth-secret: {{ . | quote }}
{{- end }}
{{- with .Values.secrets.modelApiKey }}
model-api-key: {{ . | quote }}
{{- end }}
{{- with .Values.secrets.managedAgentToken }}
managed-agent-token: {{ . | quote }}
{{- end }}
{{- with .Values.secrets.googleClientSecret }}
google-client-secret: {{ . | quote }}
{{- end }}
{{- with .Values.secrets.microsoftClientSecret }}
microsoft-client-secret: {{ . | quote }}
{{- end }}
{{- with .Values.secrets.oktaClientSecret }}
okta-client-secret: {{ . | quote }}
{{- end }}
{{- with .Values.secrets.computerToken }}
computer-token: {{ . | quote }}
{{- end }}
{{- with .Values.secrets.supervisorToken }}
supervisor-token: {{ . | quote }}
{{- end }}
{{- /*
`commonEnv` references this key whenever `routines.enabled`, so a silent `with` here would let a
deployment turn routines on with no secret and find out at 03:05 that every firing gets a 401.
`required` fails at `helm install` instead.
*/}}
{{- if (.Values.routines).enabled }}
worker-shared-secret: {{ required "secrets.workerSharedSecret is required when routines.enabled. Generate one with: openssl rand -base64 32" .Values.secrets.workerSharedSecret | quote }}
{{- end }}
{{- /*
The same reasoning for the delivery and directory switches: `commonEnv` references these keys
whenever the switch is on, so the switch without its secret fails here rather than in a pod.
*/}}
{{- if (.Values.config.opentag).enabled }}
opentag-shared-secret: {{ required "secrets.opentagSharedSecret is required when config.opentag.enabled. Generate one with: openssl rand -hex 32" .Values.secrets.opentagSharedSecret | quote }}
{{- end }}
{{- if (.Values.config.sms).enabled }}
twilio-auth-token: {{ required "secrets.twilioAuthToken is required when config.sms.enabled." .Values.secrets.twilioAuthToken | quote }}
{{- end }}
{{- if (.Values.config.scim).enabled }}
scim-bearer-token: {{ required "secrets.scimBearerToken is required when config.scim.enabled. Generate one with: openssl rand -hex 32" .Values.secrets.scimBearerToken | quote }}
{{- end }}
{{- with .Values.secrets.scimBearerTokenNext }}
scim-bearer-token-next: {{ . | quote }}
{{- end }}
{{- with .Values.secrets.expoAccessToken }}
expo-access-token: {{ . | quote }}
{{- end }}
{{- with .Values.secrets.otelLogsHeaders }}
otel-logs-headers: {{ . | quote }}
{{- end }}
{{- with .Values.secrets.otelHeaders }}
otel-headers: {{ . | quote }}
{{- end }}
{{- with (.Values.secrets).webBotAuthKey }}
web-bot-auth-key: {{ . | quote }}
{{- end }}
{{- /*
The computers reference this key whenever the proxy is on and names no Secret of its own, so the
switch without the URL fails here rather than as a computer whose every page fails.
*/}}
{{- $egressProxy := (.Values.computers).egressProxy | default dict }}
{{- if and $egressProxy.enabled (not $egressProxy.existingSecret) }}
egress-proxy-url: {{ required "secrets.egressProxyUrl is required when computers.egressProxy.enabled and computers.egressProxy.existingSecret is empty. It is the proxy URL with its credentials, such as http://user:[email protected]:8000." (.Values.secrets).egressProxyUrl | quote }}
{{- end }}
{{- end }}