Skip to content

Implementation proposal: honor admintools version in schema setup job #10

Description

@Azerothian

Source

Upstream issue: alexandrevilain#933 — "admin tools version not honored in schema setup job"

In the latest version v0.21.0, Schema setup job seems to be pulling the default admin tools image tag 1.24.2-tctl-1.18.1-cli-0.13.2. It might be regression with PR alexandrevilain#825 … Example Spec: spec.admintools.version: 1.24.2.

Why it fits this operator

The operator runs the schema-setup job to bootstrap and upgrade the Temporal databases. That job's admin-tools image must honor the user-configured spec.admintools.version (and image), otherwise schema setup runs with a mismatched admin-tools version — a correctness concern where the operator owns persistence initialization.

Proposed implementation

  1. Fix the image tag source — in the schema-setup job builder (internal/resource/persistence/schema_setup_job_builder.go), resolve the admin-tools image/version from spec.admintools.{image,version}, falling back to defaults only when unset. Restores behavior that PR fix(admintools): add default image tag if left empty alexandrevilain/temporal-operator#825 regressed.
  2. Reuse helper — centralize admin-tools image resolution into one shared helper used by both the job builder and the admin-tools deployment so they can't drift.
  3. Tests — add/restore a unit test asserting the job's container image reflects spec.admintools.version; confirm e2e coverage.

Affected areas

  • internal/resource/persistence/schema_setup_job_builder.go
  • Admin-tools image/version resolution helper
  • Schema-setup e2e tests

Risks / migration concerns

  • Users relying on the buggy auto-default may see the job image change to match their admintools.version — that's the intended, documented contract being restored.
  • Ensure a user-specified admintools.image (private registry) is honored by the job too, not just version.
  • Minimal blast radius: image selection only; job semantics and TTL unchanged.

Activity

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

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions