Skip to content

Make credential migration hook configurable via opencloud.migration.enabled#98

Merged
Tim-herbie merged 2 commits into
mainfrom
copilot/add-optional-migration-job
May 30, 2026
Merged

Make credential migration hook configurable via opencloud.migration.enabled#98
Tim-herbie merged 2 commits into
mainfrom
copilot/add-optional-migration-job

Conversation

Copy link
Copy Markdown

Copilot AI commented May 30, 2026

The chart always rendered and executed the credential migration post-upgrade hook, even for installations that no longer need legacy PVC migration. This change introduces an explicit toggle while preserving current behavior by default.

  • What changed

    • Added opencloud.migration.enabled to chart values with default true.
    • Updated migration hook template gating so ServiceAccount/Role/RoleBinding/Job render only when migration is enabled.
    • Kept default behavior unchanged for existing users (enabled: true).
  • Chart values + docs

    • Extended values.yaml with the new migration toggle.
    • Updated charts/opencloud/README.md parameter table and example to document enable/disable behavior.
  • Template behavior

    • charts/opencloud/templates/opencloud/migration-job.yaml now uses:
      • opencloud.enabled
      • opencloud.migration.enabled
    • This makes migration hook creation opt-in/out without affecting unrelated resources.
opencloud:
  migration:
    enabled: false
    configPvcClaimName: "my-old-opencloud-config"
Original prompt

Der Migrations-Job in der Helm-Chart für opencloud-helm wird derzeit immer ausgeführt. Dieser PR fügt eine Option hinzu, mit der der Migrations-Job ein- oder ausgeschaltet werden kann, indem ein neuer Parameter eingeführt wird. Die Änderungen umfassen:

  1. Hinzufügen eines Wertes (value) in den Helm-Chart-Werten (values.yaml), der das Aktivieren oder Deaktivieren des Migrations-Jobs steuert.
  2. Änderung an den zugehörigen Job-Templates, um den Migrations-Job nur zu erstellen, wenn der Parameter gesetzt ist.
  3. Aktualisierung der Dokumentation (falls vorhanden), um den neuen Parameter zu erklären.
  4. Sicherstellen, dass bestehende Nutzer diese Funktionalität nicht beeinträchtigt, indem der Standardwert den aktuellen Status beibehält (Job wird standardmäßig ausgeführt).

Die Änderungen sollten den Migrations-Job optional machen, ohne sich negativ auf die aktuelle Funktionalität auszuwirken.

The following is the prior conversation context from the user's chat exploration (may be truncated):

User: Siehst du den issue #97 in meinem opencloud repo?

Assistant: Ja, ich sehe, dass du auf Issue #97 in deinem Repository opencloud-helm verweist. Wie kann ich dir damit helfen? Möchtest du Informationen über diesen Issue erhalten, Unterstützung bei der Lösung des Problems oder etwas anderes?

User: Kannst du mir einen pr erstellen der den migrations job optional macht bzw mit einem parameter an und ausschaltbar weil er aktuell immer ausgeführt wird

Assistant: Um einen PR zu erstellen, der den Migrations-Job optional macht und über einen Parameter aktiviert oder deaktiviert werden kann, werde ich zunächst den aktuellen Stand des Codes und relevante Stellen im opencloud-helm-Repro untersuchen. Dies beinhaltet die folgende Vorgehensweise:

  • Identifikation des Migrations-Jobs und der Logik.
  • Feststellen, welche Konfigurationsdatei oder Parameter genutzt werden kann, um den Job auszulösen.
  • Erstellung eines modifizierten Templates, das den neuen Parameter verwendet, um den Migrations-Job ein- oder auszuschalten.

Ich beginne direkt mit der Umsetzung dieses PR.

Assistant: Ich bin bereit, einen Pull Request zu erstellen, um den Migrations-Job in deiner Helm-Chart optional zu machen. Soll ich fortfahren?

This pull request was created from Copilot chat.

Copilot AI changed the title [WIP] Add option to enable or disable migration job in Helm chart Make credential migration hook configurable via opencloud.migration.enabled May 30, 2026
Copilot AI requested a review from Tim-herbie May 30, 2026 08:23
@Tim-herbie Tim-herbie marked this pull request as ready for review May 30, 2026 16:39
Copilot AI review requested due to automatic review settings May 30, 2026 16:39
@Tim-herbie Tim-herbie merged commit 74ff53b into main May 30, 2026
1 of 2 checks passed
@Tim-herbie Tim-herbie deleted the copilot/add-optional-migration-job branch May 30, 2026 16:40
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants