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>
This commit is contained in:
co-authored by
Claude Opus 4.6
parent
a79a01437a
commit
b3d48198c4
@@ -11,20 +11,15 @@ stringData:
|
||||
# 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. Required at runtime even with SSO commented out.
|
||||
# Auth.js JWT signing key.
|
||||
AUTH_SECRET: {{ required "secrets.authSecret is required" .Values.secrets.authSecret | quote }}
|
||||
AUTH_TRUST_HOST: "true"
|
||||
|
||||
# Break-glass local login. Empty disables it entirely (src/auth.ts fails closed).
|
||||
LOCAL_ADMIN_PASSWORD: {{ .Values.secrets.localAdminPassword | default "" | quote }}
|
||||
# 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 }}
|
||||
|
||||
# Microsoft Entra ID SSO. Required: a deploy fails loudly rather than shipping
|
||||
# a build whose sign-in button 500s.
|
||||
AUTH_MICROSOFT_ENTRA_ID_ID: {{ required "secrets.entraClientId is required" .Values.secrets.entraClientId | quote }}
|
||||
AUTH_MICROSOFT_ENTRA_ID_SECRET: {{ required "secrets.entraClientSecret is required" .Values.secrets.entraClientSecret | quote }}
|
||||
AUTH_MICROSOFT_ENTRA_ID_ISSUER: {{ required "secrets.entraIssuer is required" .Values.secrets.entraIssuer | quote }}
|
||||
# Derived from the ingress host so the OAuth callback URL always matches what
|
||||
# is registered in Entra. AUTH_TRUST_HOST alone would leave Auth.js depending
|
||||
# on X-Forwarded-Proto; if that is ever wrong it builds an http:// callback and
|
||||
# Entra rejects it with AADSTS50011 (http is invalid for non-localhost).
|
||||
AUTH_URL: {{ printf "https://%s" (required "ingress.host is required" .Values.ingress.host) | 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 }}
|
||||
|
||||
@@ -4,7 +4,7 @@ replicaCount: 1
|
||||
|
||||
server:
|
||||
image:
|
||||
repository: jfrog.trendmicro.com/ameait-it-cost-dashboard/it-cost-dashboard-server-dev
|
||||
repository: host.docker.internal:8080/library/it-cost-dashboard-server-dev
|
||||
resources:
|
||||
requests:
|
||||
cpu: 100m
|
||||
@@ -15,10 +15,10 @@ server:
|
||||
|
||||
db:
|
||||
image:
|
||||
repository: jfrog.trendmicro.com/ameait-it-cost-dashboard/it-cost-dashboard-db-dev
|
||||
repository: host.docker.internal:8080/library/it-cost-dashboard-db-dev
|
||||
storage:
|
||||
size: 5Gi
|
||||
storageClassName: gp3
|
||||
storageClassName: hostpath
|
||||
resources:
|
||||
requests:
|
||||
cpu: 100m
|
||||
@@ -30,5 +30,6 @@ db:
|
||||
ingress:
|
||||
enabled: true
|
||||
className: nginx
|
||||
# TODO: point this at a hostname resolving to the ingress-nginx external IP.
|
||||
host: it-cost-dashboard-dev.trendmicro.com
|
||||
# Local ingress hostname — map it to the Mac mini's IP (192.168.0.31) in
|
||||
# /etc/hosts or local DNS.
|
||||
host: it-cost-dashboard-dev.local
|
||||
|
||||
@@ -4,7 +4,7 @@ replicaCount: 2
|
||||
|
||||
server:
|
||||
image:
|
||||
repository: jfrog.trendmicro.com/ameait-it-cost-dashboard/it-cost-dashboard-server-prod
|
||||
repository: host.docker.internal:8080/library/it-cost-dashboard-server-prod
|
||||
resources:
|
||||
requests:
|
||||
cpu: 250m
|
||||
@@ -15,10 +15,10 @@ server:
|
||||
|
||||
db:
|
||||
image:
|
||||
repository: jfrog.trendmicro.com/ameait-it-cost-dashboard/it-cost-dashboard-db-prod
|
||||
repository: host.docker.internal:8080/library/it-cost-dashboard-db-prod
|
||||
storage:
|
||||
size: 20Gi
|
||||
storageClassName: gp3
|
||||
storageClassName: hostpath
|
||||
resources:
|
||||
requests:
|
||||
cpu: 250m
|
||||
@@ -30,5 +30,6 @@ db:
|
||||
ingress:
|
||||
enabled: true
|
||||
className: nginx
|
||||
# TODO: point this at a hostname resolving to the ingress-nginx external IP.
|
||||
host: it-cost-dashboard-prod.trendmicro.com
|
||||
# Local ingress hostname — map it to the Mac mini's IP (192.168.0.31) in
|
||||
# /etc/hosts or local DNS.
|
||||
host: it-cost-dashboard-prod.local
|
||||
|
||||
+10
-13
@@ -29,7 +29,8 @@ db:
|
||||
database: it_cost_dashboard
|
||||
storage:
|
||||
size: 5Gi
|
||||
storageClassName: gp3
|
||||
# Docker Desktop's built-in StorageClass.
|
||||
storageClassName: hostpath
|
||||
resources:
|
||||
requests:
|
||||
cpu: 100m
|
||||
@@ -44,23 +45,19 @@ ingress:
|
||||
host: "" # required per-env
|
||||
|
||||
secrets:
|
||||
authSecret: "" # from GitHub secret AUTH_SECRET_<ENV>
|
||||
authSecret: "" # from Gitea secret AUTH_SECRET_<ENV>
|
||||
# MySQL root password. MUST be [A-Za-z0-9-] only — it is interpolated into
|
||||
# DATABASE_URL and Helm has no URL-encode function.
|
||||
dbRootPassword: "" # from GitHub secret DB_ROOT_PASSWORD_<ENV>
|
||||
# Optional; empty disables local login entirely (src/auth.ts fails closed).
|
||||
dbRootPassword: "" # from Gitea secret DB_ROOT_PASSWORD_<ENV>
|
||||
# Local admin login password. Empty disables login entirely (src/auth.ts
|
||||
# fails closed), so this is effectively required now that it is the only
|
||||
# sign-in path.
|
||||
localAdminPassword: ""
|
||||
# Microsoft Entra ID SSO. Supplied per-env by the CI workflow from GitHub
|
||||
# secrets; server-secret.yaml marks them required, so a deploy fails loudly
|
||||
# rather than shipping a build whose sign-in button 500s.
|
||||
entraClientId: ""
|
||||
entraClientSecret: ""
|
||||
entraIssuer: ""
|
||||
|
||||
# Pre-created manually, once per namespace (see the deploy notes). Not templated:
|
||||
# the kubelet needs it independently of Helm.
|
||||
# Created/refreshed by the CI workflow in each namespace ("Ensure Harbor pull
|
||||
# secret exists" step). Not templated: the kubelet needs it independently of Helm.
|
||||
imagePullSecrets:
|
||||
- name: jfrog-registry-creds
|
||||
- name: harbor-pull-secret
|
||||
|
||||
nodeSelector: {}
|
||||
tolerations: []
|
||||
|
||||
Reference in New Issue
Block a user