Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: konnectExtension with bg enabled #910

Merged
merged 2 commits into from
Dec 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,12 @@
anymore - default is set to `konghq.com`.
[#947](https://github.com/Kong/gateway-operator/pull/947)

### Fixes

- Fix `DataPlane`s with `KonnectExtension` and `BlueGreen` settings. Both the Live
and preview deployments are now customized with Konnect-related settings.
[#910](https://github.com/Kong/gateway-operator/pull/910)

## [v1.4.1]

> Release date: 2024-11-28
Expand Down
16 changes: 16 additions & 0 deletions controller/dataplane/bluegreen_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,8 @@ type BlueGreenReconciler struct {
ContextInjector ctxinjector.CtxInjector

DefaultImage string

KonnectEnabled bool
}

// SetupWithManager sets up the controller with the Manager.
Expand Down Expand Up @@ -135,6 +137,20 @@ func (r *BlueGreenReconciler) Reconcile(ctx context.Context, req ctrl.Request) (

// DataPlane is ready and we can proceed with deploying preview resources.

// customize the dataplane with the extensions field
log.Trace(logger, "applying extensions")
patched, requeue, err := applyExtensions(ctx, r.Client, logger, &dataplane, r.KonnectEnabled)
if err != nil {
if !requeue {
log.Debug(logger, "failed to apply extensions", "err", err)
return ctrl.Result{}, nil
}
return ctrl.Result{}, err
}
if patched {
return ctrl.Result{}, nil
}

// Ensure "preview" Admin API service.
res, dataplaneAdminService, err := r.ensurePreviewAdminAPIService(ctx, logger, &dataplane)
if err != nil {
Expand Down
3 changes: 2 additions & 1 deletion modules/manager/controller_setup.go
Original file line number Diff line number Diff line change
Expand Up @@ -450,7 +450,8 @@ func SetupControllers(mgr manager.Manager, c *Config) (map[string]ControllerDef,
BeforeDeployment: dataplane.CreateCallbackManager(),
AfterDeployment: dataplane.CreateCallbackManager(),
},
DefaultImage: consts.DefaultDataPlaneImage,
DefaultImage: consts.DefaultDataPlaneImage,
KonnectEnabled: c.KonnectControllersEnabled,
},
},
DataPlaneOwnedServiceFinalizerControllerName: {
Expand Down
Loading