Files
it_cost_dashboard/helm/templates/server-secret.yaml
T
Tom Chien (IQ-AS)andClaude Opus 4.6 b3d48198c4 Migrate to Gitea + local Docker Desktop k8s/Harbor; remove SSO
- Remove Microsoft Entra ID SSO entirely; local admin credentials login
  is the only sign-in path (fail-closed on empty LOCAL_ADMIN_PASSWORD).
  Delete config/users.json allowlist and lookupRole.
- Move CI from .github to .gitea/workflows (Gitea Actions, runner label
  gitea-runner); drop the k8s-API network debug step.
- Replace JFrog with local Harbor: push/pull via
  host.docker.internal:8080/library, login with HARBOR_* Gitea secrets,
  pull secret renamed to harbor-pull-secret (created by CI per namespace).
- Adapt Helm values to Docker Desktop k8s: storageClassName hostpath,
  Harbor image repositories, *.local ingress hosts, AUTH_URL scheme http
  (configurable via ingress.scheme).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-11-17 14:00:45 +08:00

26 lines
1.5 KiB
YAML

apiVersion: v1
kind: Secret
metadata:
name: {{ include "it-cost-dashboard.fullname" . }}-server-secret
labels:
{{- include "it-cost-dashboard.componentLabels" (dict "ctx" . "component" "server") | nindent 4 }}
type: Opaque
stringData:
# Built in-template from the db root password + the db ClusterIP Service name.
# TRAP: Helm has no URL-encode function, so secrets.dbRootPassword must avoid
# URL-reserved characters (@ : / # ? % + & and space) — keep it [A-Za-z0-9-].
DATABASE_URL: "mysql://root:{{ required "secrets.dbRootPassword is required" .Values.secrets.dbRootPassword }}@{{ include "it-cost-dashboard.dbServiceName" . }}:{{ .Values.db.port }}/{{ .Values.db.database }}"
# Auth.js JWT signing key.
AUTH_SECRET: {{ required "secrets.authSecret is required" .Values.secrets.authSecret | quote }}
AUTH_TRUST_HOST: "true"
# Local admin login. Empty disables login entirely (src/auth.ts fails
# closed); required loudly here since it is now the only sign-in path.
LOCAL_ADMIN_PASSWORD: {{ required "secrets.localAdminPassword is required" .Values.secrets.localAdminPassword | quote }}
# Derived from the ingress host so Auth.js builds correct absolute redirect
# URLs regardless of X-Forwarded-Proto. Local Docker Desktop ingress has no
# TLS, so the scheme is http (override ingress.scheme if TLS is added later).
AUTH_URL: {{ printf "%s://%s" (.Values.ingress.scheme | default "http") (required "ingress.host is required" .Values.ingress.host) | quote }}