-
Notifications
You must be signed in to change notification settings - Fork 423
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
fix node labels syncing #1259
fix node labels syncing #1259
Conversation
6f4aa95
to
a00b776
Compare
@@ -90,6 +90,7 @@ func (s *nodeSyncer) translateUpdateBackwards(pNode *corev1.Node, vNode *corev1. | |||
} | |||
} else { | |||
labels, annotations = translate.ApplyMetadata(pNode.Annotations, vNode.Annotations, pNode.Labels, vNode.Labels) | |||
labels["kubernetes.io/hostname"] = GetNodeHost(vNode.Name) |
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.
Why is this needed, the issue only talks about fake sync? Also if we need this, why do we ignore the enableScheduler path?
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.
Hi @FabianKramm actually the original issue also mentioned
This should also be done for the "real nodes sync".
And yea I think I added the above line at the wrong place, I will move it out of the if-else block – we should not be ignoring the enableScheduler
path, thanks for pointing out
Signed-off-by: Ishan Khare <me@ishankhare.dev>
24e9eb4
to
cee27cf
Compare
Signed-off-by: Ishan Khare <me@ishankhare.dev>
134aeaa
to
0b300b1
Compare
@@ -98,8 +98,11 @@ func (s *nodeSyncer) translateUpdateBackwards(pNode *corev1.Node, vNode *corev1. | |||
} else { | |||
delete(annotations, TaintsAnnotation) | |||
} | |||
labels, annotations = translate.ApplyMetadata(pNode.Annotations, vNode.Annotations, pNode.Labels, vNode.Labels) |
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.
Why is that needed here?
@@ -100,6 +100,8 @@ func (s *nodeSyncer) translateUpdateBackwards(pNode *corev1.Node, vNode *corev1. | |||
} | |||
} | |||
|
|||
labels["kubernetes.io/hostname"] = GetNodeHost(vNode.Name) |
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.
I think we should only do this if s.useFakeKubelets
is true as otherwise we won't rewritte the hostname at all
What issue type does this pull request address? (keep at least one, remove the others)
/kind bugfix
/kind enhancement
/kind test
What does this pull request do? Which issues does it resolve? (use
resolves #<issue_number>
if possible)resolves #1001 ENG-1289
Please provide a short message that should be published in the vcluster release notes
Fixed an issue where vcluster node were syncing as
fake-$NAME
. Use$NAME.nodes.vcluster.com
insteadWhat else do we need to know?