Skip to content

Commit

Permalink
Add ability to set Horizon route annotation
Browse files Browse the repository at this point in the history
This change adds the ability to set annotations on the Horizon route.
This can be leveraged as per the OpenShift documentation:
https://docs.openshift.com/container-platform/4.13/networking/routes/route-configuration.html#nw-route-specific-annotations_route-configuration

Depends-On: openstack-k8s-operators/lib-common#288
Signed-off-by: Brendan Shephard <[email protected]>
  • Loading branch information
bshephar committed Jun 26, 2023
1 parent 48f096f commit 76bdde4
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions controllers/horizon_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -241,6 +241,11 @@ func (r *HorizonReconciler) reconcileInit(
routeAnnotations = instance.Spec.Route.RouteAnnotations
}

var routeAnnotations = map[string]string{}
if len(instance.Spec.Route.RouteAnnotations) != 0 {
routeAnnotations = instance.Spec.Route.RouteAnnotations
}

apiEndpoints, ctrlResult, err := endpoint.ExposeEndpoints(
ctx,
helper,
Expand Down

0 comments on commit 76bdde4

Please sign in to comment.