-
Notifications
You must be signed in to change notification settings - Fork 549
check api resources before install proxy #1210
Conversation
@@ -197,6 +197,9 @@ def run(self): | |||
kubectl_install_instance = kubectl_install.kubectl_install(self.cluster_config) | |||
kubectl_install_instance.run() | |||
|
|||
# check the registerd api resources | |||
common.execute_shell("kubectl api-resources", "kubectl command failed!") |
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.
Maybe you should retry util successful
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.
Good point
common.execute_shell_retry("kubectl api-resources", "kubectl command failed!", 5) | ||
|
||
# create kube-proxy until daemonset resource is registerd | ||
common.execute_shell_retry("kubectl api-resources | grep -q daemonsets", "Controller manager hasn't create daemonset object!", 5) |
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.
- Will
kubectl api-resources | grep -q daemonsets
return none zero when daemonsets not ready? - Does the grep -q case-sensitive?
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.
yes, only when it grep nothing it return 0, I have test
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.
kubectl api-resources results are all lowercase, the "grep" is case-sensitive
Fixes #1153 |
a8c4ec7
to
52d0832
Compare
52d0832
to
e26bcf6
Compare
Related issue #1153