-
Notifications
You must be signed in to change notification settings - Fork 49
Fix controlplane running as DaemonSet on single node clusters #1193
Fix controlplane running as DaemonSet on single node clusters #1193
Conversation
8f885cd
to
47e315b
Compare
Had to fix testing logic a bit and extend wait times to make sure we test properly. it should work fine now. |
47e315b
to
7578210
Compare
Tests failed once on AWS, but then passed 3 times, so I think they are stable enough. |
f374fc6
to
a72fb81
Compare
@invidian I can't review this right now due to load, sorry. Please assign someone else. |
@@ -164,7 +164,9 @@ func WaitForDaemonSet(t *testing.T, client kubernetes.Interface, ns, name string | |||
return false, nil | |||
} | |||
|
|||
return false, fmt.Errorf("getting DaemonSet %q: %w", name, err) | |||
t.Logf("getting DaemonSet %q: %v", name, err) |
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.
Depending on the main-retry-loop to retry can elongate the time for test if there actually is error and not something transient. We might think about introducing shorter retry for such stuff. This does not have to be here, could reside outside as a helper func.
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.
Right. But on the other hand, it also gives more time to investigate when you see that it loops here.
a72fb81
to
5e102c3
Compare
64373f7
to
29ff284
Compare
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.
Any idea how this impacts updates from v0.5.0?
test/components/kubernetes/controlplane-multi-node_disruptive_test.go
Outdated
Show resolved
Hide resolved
test/components/kubernetes/controlplane-multi-node_disruptive_test.go
Outdated
Show resolved
Hide resolved
29ff284
to
191d089
Compare
8b1cccf
to
8bc1cc5
Compare
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.
lgtm
Thanks @iaguis :)
I'll actually test that before merging. |
Tested, it magically works completely fine 😄 |
aea0ded
to
b5bc81d
Compare
58c6cdf
to
a5e256d
Compare
Signed-off-by: Mateusz Gozdek <mateusz@kinvolk.io>
To support verifying that given DaemonSet or Deployment has been updated, this commit adds extra condition for WaitForDaemonSet() and WaitForDeployment() functions before converging and extends log format to also include new information. Signed-off-by: Mateusz Gozdek <mateusz@kinvolk.io>
This commit fixes passed 'control_plane_replicas' value to Kubernetes Helm chart which caused kube-scheduler and kube-controller-manager to run as DaemonSet on single controlplane node clusters, which breaks the ability to update it gracefully. It also adds tests that controlplane is using right resource type on different controlplane sizes and that both can be gracefully updated without breaking cluster functionality. Closes #1097 Closes #90 Signed-off-by: Mateusz Gozdek <mateusz@kinvolk.io>
If we fail to get it and we get some error from API server, hope that this is transient and retry. This should mitigate hitting errors like 'etcdserver: leader changed'. Signed-off-by: Mateusz Gozdek <mateusz@kinvolk.io>
a5e256d
to
87fde27
Compare
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.
lgtm
This commit fixes passed 'control_plane_replicas' value to Kubernetes
Helm chart which caused kube-scheduler and kube-controller-manager to
run as DaemonSet on single controlplane node clusters, which breaks the
ability to update it gracefully.
It also adds tests that controlplane is using right resource type on
different controlplane sizes and that both can be gracefully updated
without breaking cluster functionality.
Closes #1097
Closes #90
Signed-off-by: Mateusz Gozdek mateusz@kinvolk.io