Skip to content

v1.3.0 release changes#98

Open
Gazza7205 wants to merge 31 commits into
mainfrom
develop
Open

v1.3.0 release changes#98
Gazza7205 wants to merge 31 commits into
mainfrom
develop

Conversation

@Gazza7205

@Gazza7205 Gazza7205 commented Apr 22, 2026

Copy link
Copy Markdown
Contributor

Gateway Configuration

  • Dual OTK Support for Ephemeral Gateways
  • ExternalCerts now supports configMaps
  • Graphman 11.2.0 schema (supports 11.2.x)
    • the following entities have been added
      • PolicyBackedServices
      • PolicyAliases
      • ServiceAliases
      • SampleMessages
  • Startup probe configuration
  • New Migration Job (supports 11.2.2+)

General Updates

  • ListenPorts
    • the selected management port (dynamicSyncPort) will only be updated at gateway boot
  • Enhanced logging
    • Repository controller
    • Gateway controller
  • Example Ingress Controller has been changed to Contour
  • Bumped dependencies

Resolved issues

  • Statestore repositories now sync correctly
  • serviceResolutionConfigs now apply when using repositoryReferenceDelete
  • Empty repositories are ignored
  • Fixed an issue where an invalid repository would not be updated by a subsequent commit.
  • Fixed an issue where services would not be recreated after deletion
  • Fixed an issue where the ingress object would receive an update on every reconcile.

Known issues

  • When using a repository with multiple directories, moving entities between directories can result in the entity being deleted when automated mappings are enabled.

Gazza7205 and others added 30 commits March 30, 2026 10:41
…it repo syncs required two reconciles to reflect the latest commit
… a warning when using insecureSkipVerify with repositories, updated examples
…toreKey to reflect new namespaced convention
* feat: add pre-upgrade database migration job support
Introduces an opt-in Kubernetes Job that runs Liquibase schema migrations
before Gateway pods roll out during an upgrade. Gateway pods are blocked
until the job succeeds, preventing pods from starting against an unmigrated
schema.
Key behaviors:
- Works with Gateway 11.2.2 and later which provides four schema update modes in entrypoint.sh: default, skip,
  liquibase-only, liquibase-only-with-unlock
- Migration job enabled via spec.app.management.database.migrationJob.enabled
- clearLocks field releases stale Liquibase locks before migrating
- Gateway pods automatically use skip mode when migration job is enabled
- Job is auto-replaced when spec changes (image, jdbcUrl, clearLocks)
- Failed jobs block the deployment and require manual deletion to retry
- jdbcUrl override only applies in diskless mode; node.properties wins
  in non-diskless mode, consistent with Helm behavior

* feat: add pre-upgrade database migration job support
Introduces an opt-in Kubernetes Job that runs Liquibase schema migrations
before Gateway pods roll out during an upgrade. Gateway pods are blocked
until the job succeeds, preventing pods from starting against an unmigrated
schema.
Key behaviors:
- Works with Gateway 11.2.2 and later which provides four schema update modes in entrypoint.sh: default, skip,
  liquibase-only, liquibase-only-with-unlock
- Migration job enabled via spec.app.management.database.migrationJob.enabled
- clearLocks field releases stale Liquibase locks before migrating
- Gateway pods automatically use skip mode when migration job is enabled
- Job is auto-replaced when spec changes (image, jdbcUrl, clearLocks)
- Failed jobs block the deployment and require manual deletion to retry
- jdbcUrl override only applies in diskless mode; node.properties wins
  in non-diskless mode, consistent with Helm behavior

* fix bugs. Improve error handling.

* fix to modify / characters in branch names to be replaced with hyphen.

* Replace job-existence-based migration tracking with persistent status in
Gateway.Status.MigrationStatus. This addresses issue with previous
implementation would re-run migrations on every 12-hour reconcile if the
completed Job had been deleted.
Changes:
- Add MigrationStatus struct (SpecHash, Complete) to GatewayStatus in
  gateway_types.go. Once Complete is true, GatewayMigrationJob returns
  immediately on all future reconciles regardless of Job existence.
- Add DeepCopyInto/DeepCopy for MigrationStatus in zz_generated.deepcopy.go.
- Update CRD schema (security.brcmlabs.com_gateways.yaml) to include the
  new migrationStatus status fields.
- Rewrite GatewayMigrationJob in reconcile/migration_job.go:
  - Compute a 16-char spec hash from image, effective jdbcUrl, clearLocks,
    and activeDeadlineSeconds. A hash change (e.g. image upgrade) resets
    status and triggers a fresh migration automatically.
  - On first enable: write hash to status, create Job, wait.
  - On Job success: write Complete=true to status, unblock Deployment.
  - On Job failure (both pod attempts exhausted): log error with exact
    kubectl delete command, block Deployment. User deletes Job to retry.
  - On disabled: clean up any orphaned Job.
  - Remove migrationJobSpecChanged — spec change detection is now fully
    handled by the hash comparison.
Recovery after failure: fix the root cause (run kubectl patch with clearLocks:true or
restore DB to pre-upgrade state if partially migrated) , then:
  kubectl delete job <name>-db-migration -n <namespace>
The operator automatically creates a new Job. No kubectl apply needed.

* improve re-use of the MigrationJobName function.

* Gate on migration status instead of the GatewayMigrationJob

* Remove extra comments.

* Fix bug.

* Added control-plane related End2End tests for the database migration.

* Migration job: run-to-completion reconcile, event-driven waits, pod spec parity

- Reconcile loop no longer short-circuits while the migration job is pending — it runs every op to completion each pass and only stops on a genuine error. The Deployment step alone gates on Gateway.Status.MigrationStatus.
- GatewayMigrationJob returns nil for all "not done yet" states instead of a synthetic ErrMigrationPending; progress is driven by the Job's own watch events (create/update/delete) rather than a fixed poll interval.
- Fixed an edge case where a spec change (e.g. image upgrade) with no existing Job to delete could stall migration Job recreation for up to 12 hours — it now creates the replacement Job in the same reconcile pass when there's nothing to wait on.
- Failure log message no longer embeds a kubectl command.
- The migration Job's pod/container spec now inherits the same settings as the main Gateway Deployment (security contexts, resources, node selector, affinity, tolerations, topology spread constraints, pod annotations/labels) instead of a bare-minimum hand-built spec, and uses the same app.kubernetes.io/* labeling convention as other operator-managed resources.
- Added a regression test for the "spec changed, no existing Job" case; existing migration job tests updated for the new nil-return contract.

* Fix to accept forward slash in the branch name.

* Updated gateway.md with Gateway.spec.app.management.database.migrationJob

* Fix jenkins to allow branch name to have forward slash.
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.

2 participants