Skip to content

Commit

Permalink
fix: remove some debugging code from the branch
Browse files Browse the repository at this point in the history
  • Loading branch information
renescheepers committed Jul 13, 2022
1 parent 4f87cf4 commit efd35c5
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 8 deletions.
9 changes: 2 additions & 7 deletions lib/krane/kubectl.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ class Kubectl
empty: /\A\z/,
context_deadline: /context deadline exceeded/,
}
DEFAULT_TIMEOUT = 30
DEFAULT_TIMEOUT = 15
MAX_RETRY_DELAY = 16
SERVER_DRY_RUN_MIN_VERSION = "1.13"

Expand All @@ -35,7 +35,6 @@ def run(*args, log_failure: nil, use_context: true, use_namespace: true, output:

(1..attempts).to_a.each do |current_attempt|
logger.debug("Running command (attempt #{current_attempt}): #{cmd.join(' ')}")
cmd_string = cmd.join(' ')
env = { 'KUBECONFIG' => kubeconfig }
out, err, st = Open3.capture3(env, *cmd)

Expand All @@ -44,13 +43,9 @@ def run(*args, log_failure: nil, use_context: true, use_namespace: true, output:
out = out.dup.force_encoding(Encoding::UTF_8)
end

if cmd_string.include?("kubectl get Deploy")
# logger.debug(out)
end

if logger.debug? && !output_is_sensitive
# don't do the gsub unless we're going to print this
# logger.debug("Kubectl out: " + out.gsub(/\s+/, ' '))
logger.debug("Kubectl out: " + out.gsub(/\s+/, ' '))
end

break if st.success?
Expand Down
2 changes: 1 addition & 1 deletion lib/krane/kubernetes_resource/custom_resource.rb
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ def kind
end

def group
definition["apiVersion"].include?("/") ? definition["apiVersion"].split("/").first : ""
Krane.group_from_api_version(definition["apiVersion"])
end

def rollout_conditions
Expand Down

0 comments on commit efd35c5

Please sign in to comment.