Skip to content

Prod GKE backend ExternalSecret still references missing SERVICE_ACCOUNT_JSON #9187

Closed

Description

@Git-on-my-level

Summary

Prod GKE prod-omi-backend-external-secret is currently unhealthy because it still references the missing Secret Manager key SERVICE_ACCOUNT_JSON.

This appears separate from the Cloud Run deploy-workflow cleanup in #9164/#9169: Cloud Run stale secret bindings were removed, but the GKE ExternalSecret still tries to sync the deleted/absent key.

Evidence

Read-only prod checks on 2026-07-07 UTC:

Warning UpdateFailed externalsecret/prod-omi-backend-external-secret
error processing spec.data[15] (key: SERVICE_ACCOUNT_JSON), err: unable to access Secret from SecretManager Client: Secret does not exist

kubectl get externalsecret -n prod-omi-backend prod-omi-backend-external-secret -o json showed:

condition Ready False SecretSyncedError could not get secret data from provider
mapping SERVICE_ACCOUNT_JSON remote SERVICE_ACCOUNT_JSON

Current workloads may continue running from already-synced Kubernetes Secret material, but the failed sync reduces confidence in future restarts/rollouts.

Expected behavior

Prod backend ExternalSecret resources should only reference live Secret Manager keys, and the ExternalSecret should report Ready=True.

Acceptance criteria

  • Remove or replace the stale SERVICE_ACCOUNT_JSON mapping from the prod backend ExternalSecret configuration.
  • prod-omi-backend-external-secret reports Ready=True / no SecretSyncedError.
  • Backend/listen/pusher rollout checks confirm pods do not depend on a deleted Secret Manager key.
  • Add a preflight check or runbook note so deleted Secret Manager keys do not silently leave ExternalSecrets unhealthy.

Related

Activity

  1. added
    bug
    backend
    p2
    on Jul 7, 2026
  2. Git-on-my-level commented on Jul 23, 2026

    @Git-on-my-level
    MemberAuthor

    Live verification (2026-07-23)

    Verdict: close — symptom resolved via Secret Manager restore, not mapping removal.

    Live cluster (prod-omi-gke / prod-omi-backend)

    kubectl get externalsecret -n prod-omi-backend prod-omi-backend-external-secret
    Ready=True reason=SecretSynced msg=secret synced
    lastTransitionTime=2026-07-17T07:03:09Z
    refreshTime=2026-07-23T05:41:57Z
    
    • Mapping still includes SERVICE_ACCOUNT_JSON → SERVICE_ACCOUNT_JSON (also in-repo: backend/charts/backend-secrets/prod_omi_backend_secrets_values.yaml).
    • No SecretSyncedError / UpdateFailed events observed; ExternalSecret continues to refresh successfully.

    Secret Manager

    gcloud secrets describe SERVICE_ACCOUNT_JSON --project=based-hardware
    createTime: 2026-07-10T18:58:25Z
    version 1: enabled
    

    The key that was missing when this issue was filed (2026-07-07) was restored on 2026-07-10. That matches Ready flipping to True on 2026-07-17.

    Why not “remove the mapping”

    #10173 correctly closed without merge: SERVICE_ACCOUNT_JSON is still a required runtime credential for Firebase/GCS paths and memory-maintenance-job; deleting the ExternalSecret binding fails the runtime-env validator and would be a Workload Identity migration, not a stale-key cleanup.

    Expected behavior from the issue (“only reference live Secret Manager keys” + Ready=True) is met. Closing.

  3. Git-on-my-level commented on Jul 23, 2026

    @Git-on-my-level
    MemberAuthor

    Closed after live verify: ExternalSecret Ready=True/SecretSynced since 2026-07-17; SERVICE_ACCOUNT_JSON restored in Secret Manager (2026-07-10). See verification comment.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    backendbugp2reliability

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions