mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-21 19:01:49 +00:00
Merge pull request #62242 from feiskyer/pod-cidr
Automatic merge from submit-queue (batch tested with PRs 63314, 63884, 63799, 63521, 62242). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>. Check CIDR before updating node status **What this PR does / why we need it**: Check CIDR before updating node status. See #62164. **Which issue(s) this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close the issue(s) when PR gets merged)*: Fixes #62164 **Special notes for your reviewer**: **Release note**: ```release-note NONE ```
This commit is contained in:
commit
792832bafc
@ -3052,7 +3052,8 @@ func (*RemoveImageResponse) ProtoMessage() {}
|
||||
func (*RemoveImageResponse) Descriptor() ([]byte, []int) { return fileDescriptorApi, []int{76} }
|
||||
|
||||
type NetworkConfig struct {
|
||||
// CIDR to use for pod IP addresses.
|
||||
// CIDR to use for pod IP addresses. If the CIDR is empty, runtimes
|
||||
// should omit it.
|
||||
PodCidr string `protobuf:"bytes,1,opt,name=pod_cidr,json=podCidr,proto3" json:"pod_cidr,omitempty"`
|
||||
}
|
||||
|
||||
|
@ -1047,7 +1047,8 @@ message RemoveImageRequest {
|
||||
message RemoveImageResponse {}
|
||||
|
||||
message NetworkConfig {
|
||||
// CIDR to use for pod IP addresses.
|
||||
// CIDR to use for pod IP addresses. If the CIDR is empty, runtimes
|
||||
// should omit it.
|
||||
string pod_cidr = 1;
|
||||
}
|
||||
|
||||
|
@ -384,7 +384,9 @@ func (kl *Kubelet) tryUpdateNodeStatus(tryNumber int) error {
|
||||
return fmt.Errorf("nil %q node object", kl.nodeName)
|
||||
}
|
||||
|
||||
kl.updatePodCIDR(node.Spec.PodCIDR)
|
||||
if node.Spec.PodCIDR != "" {
|
||||
kl.updatePodCIDR(node.Spec.PodCIDR)
|
||||
}
|
||||
|
||||
kl.setNodeStatus(node)
|
||||
// Patch the current status on the API server
|
||||
|
Loading…
Reference in New Issue
Block a user