Skip to content

Commit 144e0f9

Browse files
Fix SetDefaultRouteAnnotations reciver type
This method need to be call from openstack operator lvl which is using NovaSpecCore in template
1 parent 0bd4d7a commit 144e0f9

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

api/v1beta1/nova_webhook.go

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ import (
2929
service "github.com/openstack-k8s-operators/lib-common/modules/common/service"
3030
"github.com/robfig/cron/v3"
3131

32+
topologyv1 "github.com/openstack-k8s-operators/infra-operator/apis/topology/v1beta1"
3233
apierrors "k8s.io/apimachinery/pkg/api/errors"
3334
"k8s.io/apimachinery/pkg/runtime"
3435
"k8s.io/apimachinery/pkg/runtime/schema"
@@ -38,7 +39,6 @@ import (
3839
logf "sigs.k8s.io/controller-runtime/pkg/log"
3940
"sigs.k8s.io/controller-runtime/pkg/webhook"
4041
"sigs.k8s.io/controller-runtime/pkg/webhook/admission"
41-
topologyv1 "github.com/openstack-k8s-operators/infra-operator/apis/topology/v1beta1"
4242
)
4343

4444
// NovaDefaults -
@@ -272,7 +272,6 @@ func (r *NovaSpecCore) ValidateSchedulerServiceTemplate(basePath *field.Path, na
272272
return errors
273273
}
274274

275-
276275
// ValidateCreate validates the NovaSpec during the webhook invocation.
277276
func (r *NovaSpec) ValidateCreate(basePath *field.Path, namespace string) field.ErrorList {
278277
return r.NovaSpecCore.ValidateCreate(basePath, namespace)
@@ -380,7 +379,7 @@ func (r *Nova) ValidateDelete() (admission.Warnings, error) {
380379

381380
// SetDefaultRouteAnnotations sets HAProxy timeout values of the route
382381
// NOTE: it is used by ctlplane webhook on openstack-operator
383-
func (r *NovaSpec) SetDefaultRouteAnnotations(annotations map[string]string) {
382+
func (r *NovaSpecCore) SetDefaultRouteAnnotations(annotations map[string]string) {
384383
const haProxyAnno = "haproxy.router.openshift.io/timeout"
385384
// Use a custom annotation to flag when the operator has set the default HAProxy timeout
386385
// With the annotation func determines when to overwrite existing HAProxy timeout with the APITimeout

0 commit comments

Comments
 (0)