apiVersion: v1
kind: Secret
metadata:
  name: {{ include "workspace-mcp.fullname" . }}-oauth
  labels:
    {{- include "workspace-mcp.labels" . | nindent 4 }}
type: Opaque
data:
  {{- if .Values.secrets.googleOAuth.clientId }}
  client-id: {{ .Values.secrets.googleOAuth.clientId | b64enc }}
  {{- else }}
  {{- fail "Google OAuth Client ID is required. Set values.secrets.googleOAuth.clientId" }}
  {{- end }}
  {{- if .Values.secrets.googleOAuth.clientSecret }}
  client-secret: {{ .Values.secrets.googleOAuth.clientSecret | b64enc }}
  {{- else }}
  {{- fail "Google OAuth Client Secret is required. Set values.secrets.googleOAuth.clientSecret" }}
  {{- end }}
  {{- if .Values.secrets.googleOAuth.userEmail }}
  user-email: {{ .Values.secrets.googleOAuth.userEmail | b64enc }}
  {{- end }}