Skip to content

Repair Khoj immutable Deployment selector migration #16

Description

@linear-code

Problem

khoj-homelab has been unable to sync since 2026-08-13. ArgoCD reports:

Deployment.apps "khoj" is invalid: spec.selector: Invalid value: ... field is immutable

The operation remains Running while the Application is OutOfSync/Progressing, so later GitOps changes to the Deployment cannot apply. CTK-537 deliberately left SearXNG at its live 250m CPU request rather than replace the Deployment during the runner-capacity rollout.

Acceptance criteria

  • Identify the live selector and the chart change that introduced the desired selector.
  • Choose a maintenance-safe migration: preserve the live selector in Git or replace only Deployment/khoj while retaining its PVC and data.
  • khoj-homelab reaches the current Git revision and becomes Healthy without data loss.
  • Re-evaluate the deferred SearXNG CPU request after GitOps is restored.

Evidence

Argo operation started 2026-08-13T01:54:15Z; sync result for Deployment/khoj is SyncFailed/Failed with the immutable-selector error.

Related: CTK-537, CTK-539

GitHub: samuelho-dev/ai-dev-env#993

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions