2026-08-05 16:26:36 -03:00
|
|
|
# services/keycloak/bootstrap-jobs/hermes-access-oidc-client-job.yaml
|
2026-08-13 17:45:09 -03:00
|
|
|
# Purpose: create Hermes browser clients and its automation identity.
|
2026-01-14 02:24:32 -03:00
|
|
|
apiVersion: batch/v1
|
|
|
|
|
kind: Job
|
|
|
|
|
metadata:
|
refactor(hermes): rename the owner agent host to worker.bstein.dev
Introduce worker.bstein.dev as the canonical hostname for the owner-only
Hermes coordinator, previously agent.hermes.bstein.dev.
The rename is additive, matching the shape #38 restored for chat and triage.
CoreDNS, both agent Ingresses and the hermes-sites certificate now serve BOTH
names, so merging this cannot take away the endpoint the operator uses to
reach the coordinator. Retiring agent.hermes.bstein.dev is a separate,
separately scheduled change. No redirect middleware is added.
What switches to the new host:
- HERMES_DASHBOARD_PUBLIC_URL and the oauth2-proxy --redirect-url
- the Keycloak agent proxy rootUrl
- operator docs, skills, the ZAP baseline target and the triage monitor default
What stays dual-homed until retirement:
- CoreDNS hosts entry, both agent Ingress rules, certificate SANs
- API_SERVER_CORS_ORIGINS (now a comma-separated pair)
- the Keycloak redirect URIs, web origins and post-logout origins, so a
rollback only needs the oauth2-proxy --redirect-url reverted and does not
require re-running the ensure job
The agent client passes its legacy origin through the optional fourth argument
#38 added to ensure_proxy_client, so no second mechanism is introduced. The
immutable ensure Job goes -11 -> -12 because #38 already consumed -11 and that
run has completed; without a further bump this change would never be applied.
Login on the new host fails until the -12 Job completes.
Because the session and CSRF cookies use the __Host- prefix they are bound to
one origin, so a fresh login must start on worker.bstein.dev and existing
sessions do not carry over -- re-login is required after rollout.
#38's public-host continuity test now covers the agent proxy's dual origins
rather than asserting the agent surface was untouched by the rename.
Knowledge catalogs and diagrams regenerated with `make knowledge`.
2026-08-21 10:29:46 +00:00
|
|
|
name: hermes-access-oidc-client-ensure-12
|
2026-01-14 02:24:32 -03:00
|
|
|
namespace: sso
|
|
|
|
|
spec:
|
2026-08-02 02:30:44 -03:00
|
|
|
backoffLimit: 3
|
2026-01-14 02:24:32 -03:00
|
|
|
template:
|
2026-01-14 13:20:57 -03:00
|
|
|
metadata:
|
|
|
|
|
annotations:
|
|
|
|
|
vault.hashicorp.com/agent-inject: "true"
|
2026-01-14 14:29:29 -03:00
|
|
|
vault.hashicorp.com/agent-pre-populate-only: "true"
|
2026-08-13 18:07:22 -03:00
|
|
|
vault.hashicorp.com/agent-requests-cpu: "25m"
|
|
|
|
|
vault.hashicorp.com/agent-limits-cpu: "100m"
|
2026-08-02 02:30:44 -03:00
|
|
|
vault.hashicorp.com/role: sso-secrets
|
|
|
|
|
vault.hashicorp.com/agent-inject-secret-keycloak-admin-env.sh: kv/data/atlas/shared/keycloak-admin
|
2026-01-14 13:20:57 -03:00
|
|
|
vault.hashicorp.com/agent-inject-template-keycloak-admin-env.sh: |
|
2026-01-14 13:40:29 -03:00
|
|
|
{{ with secret "kv/data/atlas/shared/keycloak-admin" }}
|
2026-01-14 13:20:57 -03:00
|
|
|
export KEYCLOAK_ADMIN="{{ .Data.data.username }}"
|
|
|
|
|
export KEYCLOAK_ADMIN_USER="{{ .Data.data.username }}"
|
|
|
|
|
export KEYCLOAK_ADMIN_PASSWORD="{{ .Data.data.password }}"
|
2026-01-14 13:40:29 -03:00
|
|
|
{{ end }}
|
2026-01-14 02:24:32 -03:00
|
|
|
spec:
|
|
|
|
|
serviceAccountName: mas-secrets-ensure
|
|
|
|
|
restartPolicy: Never
|
|
|
|
|
affinity:
|
|
|
|
|
nodeAffinity:
|
|
|
|
|
requiredDuringSchedulingIgnoredDuringExecution:
|
|
|
|
|
nodeSelectorTerms:
|
|
|
|
|
- matchExpressions:
|
|
|
|
|
- key: kubernetes.io/arch
|
|
|
|
|
operator: In
|
2026-08-02 02:30:44 -03:00
|
|
|
values:
|
|
|
|
|
- arm64
|
2026-01-14 02:24:32 -03:00
|
|
|
- key: node-role.kubernetes.io/worker
|
|
|
|
|
operator: Exists
|
2026-08-13 18:03:08 -03:00
|
|
|
- key: hardware
|
|
|
|
|
operator: In
|
2026-08-02 02:35:39 -03:00
|
|
|
values:
|
2026-08-13 18:03:08 -03:00
|
|
|
- rpi5
|
2026-01-14 02:24:32 -03:00
|
|
|
containers:
|
|
|
|
|
- name: apply
|
2026-01-17 01:02:58 -03:00
|
|
|
image: bitnami/kubectl@sha256:554ab88b1858e8424c55de37ad417b16f2a0e65d1607aa0f3fe3ce9b9f10b131
|
2026-08-02 02:30:44 -03:00
|
|
|
command:
|
|
|
|
|
- /scripts/hermes_access_oidc_ensure.sh
|
2026-01-14 02:24:32 -03:00
|
|
|
volumeMounts:
|
2026-08-02 02:30:44 -03:00
|
|
|
- name: script
|
2026-01-14 02:24:32 -03:00
|
|
|
mountPath: /scripts
|
2026-01-17 01:02:58 -03:00
|
|
|
readOnly: true
|
2026-08-02 02:30:44 -03:00
|
|
|
resources:
|
|
|
|
|
requests:
|
|
|
|
|
cpu: 25m
|
|
|
|
|
memory: 32Mi
|
|
|
|
|
limits:
|
|
|
|
|
cpu: 250m
|
|
|
|
|
memory: 128Mi
|
|
|
|
|
volumes:
|
|
|
|
|
- name: script
|
|
|
|
|
configMap:
|
|
|
|
|
name: hermes-access-oidc-script
|
|
|
|
|
defaultMode: 0555
|