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

Use new nad.EnsureNetworksAnnotation() func to get NAD annotations #245

Merged

Conversation

stuggi
Copy link
Contributor

@stuggi stuggi commented Nov 13, 2024

For BGP setup there is the need to set the default gateway to the additional interface defined via the multus annotations. To allow this a user can configure ipam.gateway in the NAD. EnsureNetworksAnnotation() will override the pod network default route by reading the NAD. If ipam.gateway is defined and not "", it gets set on the networks annotation as the default-route.

Jira: https://issues.redhat.com/browse/OSPRH-8680

Depends-On: openstack-k8s-operators/lib-common#579

Copy link

openshift-ci bot commented Nov 13, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: stuggi

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@stuggi stuggi requested a review from lmiccini November 13, 2024 15:11
Copy link

Build failed (check pipeline). Post recheck (without leading slash)
to rerun all jobs. Make sure the failure cause has been resolved before
you rerun jobs.

https://softwarefactory-project.io/zuul/t/rdoproject.org/buildset/bc643614623e45bb868233cec42bb0dc

✔️ openstack-k8s-operators-content-provider SUCCESS in 4h 17m 21s
podified-multinode-edpm-deployment-crc-test-operator TIMED_OUT in 3h 11m 51s

@stuggi
Copy link
Contributor Author

stuggi commented Nov 14, 2024

/retest

@stuggi
Copy link
Contributor Author

stuggi commented Nov 14, 2024

recheck

@lpiwowar
Copy link
Collaborator

lpiwowar commented Nov 14, 2024

@stuggi, the job previously failed on: no kind is registered for the type v1.NetworkAttachmentDefinition in scheme \"go/pkg/mod/k8s.io/[email protected]/pkg/runtime/scheme.go:100\"

2024-11-13T17:18:36Z	ERROR	Reconciler error	{"controller": "tempest", "controllerGroup": "test.openstack.org", "controllerKind": "Tempest", "Tempest": {"name":"tempest-tests","namespace":"openstack"}, "namespace": "openstack", "name": "tempest-tests", "reconcileID": "97582aa0-1531-4fe1-84ae-883bbc64e5bf", "error": "Error getting network-attachment-definition ctlplane/openstack - no kind is registered for the type v1.NetworkAttachmentDefinition in scheme \"go/pkg/mod/k8s.io/[email protected]/pkg/runtime/scheme.go:100\""}
sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).reconcileHandler
	/opt/app-root/src/go/pkg/mod/sigs.k8s.io/[email protected]/pkg/internal/controller/controller.go:329
sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).processNextWorkItem
	/opt/app-root/src/go/pkg/mod/sigs.k8s.io/[email protected]/pkg/internal/controller/controller.go:266
sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).Start.func2.2
	/opt/app-root/src/go/pkg/mod/sigs.k8s.io/[email protected]/pkg/internal/controller/controller.go:227

https://logserver.rdoproject.org/45/245/d549cb3236e38b4ffbd0271ece083f0e38de9cc7/github-check/podified-multinode-edpm-deployment-crc-test-operator/fc3ca3a/controller/ci-framework-data/logs/openstack-k8s-operators-openstack-must-gather/namespaces/openstack/pods/test-operator-controller-manager-5c9fbbdd8f-pqb72/logs/manager.log

@stuggi stuggi requested review from abays and lpiwowar and removed request for lewisdenny November 14, 2024 09:36
@stuggi
Copy link
Contributor Author

stuggi commented Nov 14, 2024

@stuggi, the job previously failed on: no kind is registered for the type v1.NetworkAttachmentDefinition in scheme \"go/pkg/mod/k8s.io/[email protected]/pkg/runtime/scheme.go:100\"

2024-11-13T17:18:36Z	ERROR	Reconciler error	{"controller": "tempest", "controllerGroup": "test.openstack.org", "controllerKind": "Tempest", "Tempest": {"name":"tempest-tests","namespace":"openstack"}, "namespace": "openstack", "name": "tempest-tests", "reconcileID": "97582aa0-1531-4fe1-84ae-883bbc64e5bf", "error": "Error getting network-attachment-definition ctlplane/openstack - no kind is registered for the type v1.NetworkAttachmentDefinition in scheme \"go/pkg/mod/k8s.io/[email protected]/pkg/runtime/scheme.go:100\""}
sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).reconcileHandler
	/opt/app-root/src/go/pkg/mod/sigs.k8s.io/[email protected]/pkg/internal/controller/controller.go:329
sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).processNextWorkItem
	/opt/app-root/src/go/pkg/mod/sigs.k8s.io/[email protected]/pkg/internal/controller/controller.go:266
sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).Start.func2.2
	/opt/app-root/src/go/pkg/mod/sigs.k8s.io/[email protected]/pkg/internal/controller/controller.go:227

https://logserver.rdoproject.org/45/245/d549cb3236e38b4ffbd0271ece083f0e38de9cc7/github-check/podified-multinode-edpm-deployment-crc-test-operator/fc3ca3a/controller/ci-framework-data/logs/openstack-k8s-operators-openstack-must-gather/namespaces/openstack/pods/test-operator-controller-manager-5c9fbbdd8f-pqb72/logs/manager.log

ack, let me check

For BGP setup there is the need to set the default gateway
to the additional interface defined via the multus annotations.
To allow this a user can configure `ipam.gateway` in the NAD.
EnsureNetworksAnnotation() will override the pod network default
route by reading the NAD. If `ipam.gateway` is defined and not "",
it gets set on the networks annotation as the `default-route`.

Jira: https://issues.redhat.com/browse/OSPRH-8680

Depends-On: openstack-k8s-operators/lib-common#579

Signed-off-by: Martin Schuppert <[email protected]>
@stuggi
Copy link
Contributor Author

stuggi commented Nov 14, 2024

@lpiwowar its fixed now. could you review/approve?

@lpiwowar
Copy link
Collaborator

/lgtm

@openshift-ci openshift-ci bot added the lgtm label Nov 14, 2024
@openshift-merge-bot openshift-merge-bot bot merged commit bda006a into openstack-k8s-operators:main Nov 14, 2024
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants