-
Notifications
You must be signed in to change notification settings - Fork 116
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
Update cluster discovery #778
Conversation
4fba280
to
8efba14
Compare
875c6b0
to
ec9c323
Compare
fd3997e
to
6d1bd36
Compare
89e9ea4
to
04fa7dc
Compare
97a1db8
to
39ec876
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.
I think it's worth considering a bit more the threadsafetiness of fetching api paths
"TCPIngress" => "v1beta1" } | ||
def fetch_api_path(path) | ||
@api_path_cache[path] ||= begin | ||
raw_json, err, st = kubectl.run("get", "--raw", path, attempts: 1, use_namespace: false) |
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.
Flipping this from attempts: 2
to attempts: 1
didn't speed up the tests.
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.
The approach makes a lot of sense! 👏
Use a cache and concurency to be faster
I've squashed and rebased this PR on master. For 🎩 : I manually deployed the hello-cloud fixtures on v1.15.10 minikube and then removed resources to test pruning. I did the same thing with |
This (potentially) requires extra permissions on the cluster in order to be able to deploy with krane. Could this requirement be documented?
|
WOOOOO!!!!!! |
What are you trying to accomplish with this PR?
Remove the need for a hard coded GVK overide list: #699
Fix v.19 & 1.20 compatiblity
How is this accomplished?
Query the raw api to determine group/versin membership per kind
What could go wrong?
The code is wrong and everything blows up because apply to told to prune the wrong things or things that doesn't exist.
** Notes **
How to generate new fixtures:
kubectl get --raw / > test/fixtures/for_unit_tests/api_raw.txt
How kubeclient does this https://github.com/abonas/kubeclient/blob/master/lib/kubeclient/common.rb#L600