Skip to content

Commit

Permalink
Stop passing stdin to the container
Browse files Browse the repository at this point in the history
It would avoid all the following errors:

  KubectlClient.exec stderr: Unable to use a TTY -
  input is not a terminal or the right kind of file

Signed-off-by: Cédric Ollivier <[email protected]>
  • Loading branch information
collivier authored and martin-mat committed Jan 11, 2025
1 parent 27a6a86 commit 3f350cc
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions cluster_tools.cr
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ module ClusterTools
cluster_tools_pod_name = pods[0].dig?("metadata", "name") if pods[0]?
Log.info { "cluster_tools_pod_name: #{cluster_tools_pod_name}"}

cmd = "-ti #{cluster_tools_pod_name} -- #{cli}"
cmd = "#{cluster_tools_pod_name} -- #{cli}"
KubectlClient.exec(cmd, namespace: self.namespace!)
end

Expand All @@ -92,7 +92,7 @@ module ClusterTools
cluster_tools_pod_name = pods[0].dig?("metadata", "name") if pods[0]?
Log.debug { "cluster_tools_pod_name: #{cluster_tools_pod_name}"}

full_cli = "-ti #{cluster_tools_pod_name} -- #{cli}"
full_cli = "#{cluster_tools_pod_name} -- #{cli}"
Log.debug { "ClusterTools exec full cli: #{full_cli}" }
return full_cli
end
Expand Down Expand Up @@ -243,7 +243,7 @@ module ClusterTools

# https://windsock.io/explaining-docker-image-ids/
# works on dockerhub and quay!
# ex. kubectl exec -ti cluster-tools-ww9lg -- skopeo inspect docker://jaegertracing/jaeger-agent:1.28.0
# ex. kubectl exec cluster-tools-ww9lg -- skopeo inspect docker://jaegertracing/jaeger-agent:1.28.0
# Accepts org/image:tag or repo/org/image:tag
# A content digest is an uncompressed digest, which is what Kubernetes tracks
def self.official_content_digest_by_image_name(image_name)
Expand Down

0 comments on commit 3f350cc

Please sign in to comment.