Open strowi opened 2 years ago
not to play gravedigger, but could anyone take a look? Just tried an update from 2.x to v3.4.0, and i am still running into the same issue, which is fixed for e.g. rancher with a simple:
diff --git a/lib/krane/cluster_resource_discovery.rb b/lib/krane/cluster_resource_discovery.rb
index 44f9689..e60af01 100644
--- a/lib/krane/cluster_resource_discovery.rb
+++ b/lib/krane/cluster_resource_discovery.rb
@@ -64,7 +64,7 @@ module Krane
def fetch_api_path(path)
@api_path_cache[path] ||= begin
- raw_json, err, st = kubectl.run("get", "--raw", path, attempts: 2, use_namespace: false)
+ raw_json, err, st = kubectl.run("get", "--raw", base_api_path + path, attempts: 2, use_namespace: false)
if st.success?
MultiJson.load(raw_json)
else
pinging @timothysmith0609 - not sure you're the right person, but you fixed + merged my previous attempts mentioned on the top post.
Problem still exists with 3.6.0 so i created a PR, sadly i have no idea about the failing unit-tests ;( But have verified it working on top-level and sub-domain cluster-urls.
Bug report
Might be related to #891 and #827 missing cluster_url on
get --raw
commands.krane fails to get raw api-paths because it is missing the cluster_url on some requests:
Expected behavior: No errors, deployment should work.
Actual behavior: Deployment failed
Version(s) affected: 2.4.7
Steps to Reproduce
Probable fix
A most probably dirty and not complete fix (there are probably other places to update) for me was changing the
path
in lib/krane/cluster_resource_discovery.rb:lib/krane/cluster_resource_discovery.rb:
regards, strowi