-
Notifications
You must be signed in to change notification settings - Fork 38.8k
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
add NetworkStatus in NetworkPlugin interface for kubelet to consume #24693
Conversation
7f21d69
to
2c4ee54
Compare
err = fmt.Errorf("Error on adding ip table rules: %v", err) | ||
glog.Error(err) | ||
kl.runtimeState.setNetworkState(err) | ||
if kl.flannelExperimentalOverlay { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could we consolidate all the network state initialization/syncing to this function? E.g., if pod CIDR is required for the network plugins, we can still check whether pod CIDR is set and then call setNetworkState()
. What do you think?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
let me try
2c4ee54
to
aa72dfa
Compare
ad9f075
to
ba3bb50
Compare
if configureNetwork { | ||
networkError = fmt.Errorf("network state unknown") | ||
} | ||
var networkError = fmt.Errorf("network state unknown") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: just initialize in line 97.
Looks good overall with a nit. Also, the kubelet unit test failed. |
332d60c
to
e3c9970
Compare
e3c9970
to
e5ea262
Compare
Not sure why this happens
|
@k8s-bot test this issue: #IGNORE |
What's the forward plan here for NetworkStatus()? Is it intended to report plugin status out-of-band from setup/teardown operations? |
@dcbw Yes. Kubelet tries to keep track of network status and it already runs a BTW, I want to rename the current |
+1 for renaming the method |
PTAL |
GetPodNetworkStatus(namespace string, name string, podInfraContainerID kubecontainer.ContainerID) (*PodNetworkStatus, error) | ||
|
||
// NetworkStatus returns error if the network plugin is in error state | ||
NetworkStatus() error |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: I think this can be rename to Status()
c6a11b2
to
49a605c
Compare
Renamed. PTAL |
LGTM |
Thanks! |
49a605c
to
b8f7a3f
Compare
@freehan I'm hoping that syncNetworkStatus() will eventually go away when kubenet replaces the configureCBR0 code. But I guess the current use of the network plugin status for kubenet is OK, so LGTM too. |
b8f7a3f
to
5ce455a
Compare
5ce455a
to
04b80f7
Compare
GCE e2e build/test passed for commit 04b80f7. |
This PR fixes cluster bootstrap problem in kubenet e2e suite. |
ref: #24692
cc: @thockin @dcbw