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

metallbv2-add-connect-timer #666

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

gkopels
Copy link
Contributor

@gkopels gkopels commented Sep 16, 2024

Adding metallb connect timer. Connect timer is part of mlbtypesv1beta2

@gkopels gkopels force-pushed the metallb-add-bgppeer-connect-timer branch 8 times, most recently from 734fd28 to e5cff99 Compare September 16, 2024 12:55
Copy link
Contributor

@evgenLevin evgenLevin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

several comments

}

glog.V(100).Infof(
"Creating BGPPeer %s in namespace %s with this holdTime: %s",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

change holdTime to ConnectTime

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

changed


builder.errorMsg = "bgppeer 'connectTime' value is not valid"
}

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please add

if builder.errorMsg != "" {
	return builder
}

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

added

@@ -397,8 +421,9 @@ func (builder *BGPPeerBuilder) WithNodeSelector(nodeSelector map[string]string)
return builder
}

ndSelector := []mlbtypes.NodeSelector{{MatchLabels: nodeSelector}}
builder.Definition.Spec.NodeSelectors = ndSelector
builder.Definition.Spec.NodeSelectors = []metav1.LabelSelector{{
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What's the idea of this change?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

They changed it upstream in mlbtypesv1beta2

@@ -291,11 +329,6 @@ func TestBGPPeerWithNodeSelector(t *testing.T) {
testBGPPeer: buildValidBGPPeerBuilder(buildBGPPeerTestClientWithDummyObject()),
nodeSelector: map[string]string{"test": "test1"},
},
{
testBGPPeer: buildInValidBGPPeerBuilder(buildBGPPeerTestClientWithDummyObject()),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What's the idea of this change?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

replaced

@gkopels gkopels force-pushed the metallb-add-bgppeer-connect-timer branch 2 times, most recently from f94ecb2 to 08622f3 Compare September 16, 2024 18:02
Copy link
Contributor

@evgenLevin evgenLevin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

1 comment

// WithNodeSelector defines the nodeSelector placed in the BGPPeer spec.
func (builder *BGPPeerBuilder) WithNodeSelector(nodeSelector map[string]string) *BGPPeerBuilder {
if valid, _ := builder.validate(); !valid {
return builder
}

if builder.errorMsg != "" {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

removed

@gkopels gkopels force-pushed the metallb-add-bgppeer-connect-timer branch from 08622f3 to 3a98dbf Compare September 17, 2024 08:05
@evgenLevin
Copy link
Contributor

/lgtm

Copy link
Collaborator

@klaskosk klaskosk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm

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.

3 participants