Skip to content
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

reduce logging when configuring kubectl #1383

Open
lahabana opened this issue Jan 9, 2024 · 0 comments · May be fixed by #1384
Open

reduce logging when configuring kubectl #1383

lahabana opened this issue Jan 9, 2024 · 0 comments · May be fixed by #1384
Labels
bug Something isn't working

Comments

@lahabana
Copy link
Contributor

lahabana commented Jan 9, 2024

Describe the bug
We use terratest extensively and we have a lot of similar logs:

   2024-01-09T16:33:09Z retry.go:91: install yaml resource
   2024-01-09T16:33:09Z logger.go:66: Running command kubectl with args [--kubeconfig /home/runner/.kube/kind-kuma-1-config apply -f /tmp/2761655101]
   2024-01-09T16:33:09Z logger.go:66: mesh.kuma.io/trafficlog-tcp-logging created
   2024-01-09T16:33:09Z retry.go:91: install yaml resource
   2024-01-09T16:33:09Z logger.go:66: Running command kubectl with args [--kubeconfig /home/runner/.kube/kind-kuma-1-config apply -f /tmp/3467148955]
   2024-01-09T16:33:09Z logger.go:66: trafficlog.kuma.io/all-traffic created
   2024-01-09T16:33:09Z retry.go:91: install yaml resource
   2024-01-09T16:33:09Z logger.go:66: Running command kubectl with args [--kubeconfig /home/runner/.kube/kind-kuma-1-config apply -f /tmp/2416380511]
   2024-01-09T16:33:09Z logger.go:66: namespace/trafficlog-tcp-logging created
   2024-01-09T16:33:09Z client.go:45: Configuring Kubernetes client using config file /home/runner/.kube/kind-kuma-1-config with context 
   2024-01-09T16:33:09Z retry.go:91: install yaml resource
   2024-01-09T16:33:09Z logger.go:66: Running command kubectl with args [--kubeconfig /home/runner/.kube/kind-kuma-1-config apply -f /tmp/855550114]
   2024-01-09T16:33:09Z logger.go:66: deployment.apps/demo-client created
   2024-01-09T16:33:09Z retry.go:91: Wait for num pods created to match desired count 1.
   2024-01-09T16:33:09Z client.go:45: Configuring Kubernetes client using config file /home/runner/.kube/kind-kuma-1-config with context 
   2024-01-09T16:33:09Z retry.go:103: Wait for num pods created to match desired count 1. returned an error: Desired number of pods (1) matching filter {{ } app=demo-client  false false   <nil> 0  <nil>} not yet created. Sleeping for 3s and will try again.
   2024-01-09T16:33:12Z retry.go:91: Wait for num pods created to match desired count 1.
   2024-01-09T16:33:12Z client.go:45: Configuring Kubernetes client using config file /home/runner/.kube/kind-kuma-1-config with context 
   2024-01-09T16:33:12Z pod.go:101: Desired number of Pods created
   2024-01-09T16:33:12Z client.go:45: Configuring Kubernetes client using config file /home/runner/.kube/kind-kuma-1-config with context 
   2024-01-09T16:33:12Z retry.go:91: Wait for pod demo-client-64788f84cd-m7j2h to be provisioned.
   2024-01-09T16:33:12Z client.go:45: Configuring Kubernetes client using config file /home/runner/.kube/kind-kuma-1-config with context 
   2024-01-09T16:33:12Z retry.go:103: Wait for pod demo-client-64788f84cd-m7j2h to be provisioned. returned an error: Pod demo-client-64788f84cd-m7j2h is not available, reason: , message: . Sleeping for 3s and will try again.
   2024-01-09T16:33:15Z retry.go:91: Wait for pod demo-client-64788f84cd-m7j2h to be provisioned.
   2024-01-09T16:33:15Z client.go:45: Configuring Kubernetes client using config file /home/runner/.kube/kind-kuma-1-config with context 
   2024-01-09T16:33:15Z retry.go:103: Wait for pod demo-client-64788f84cd-m7j2h to be provisioned. returned an error: Pod demo-client-64788f84cd-m7j2h is not available, reason: , message: . Sleeping for 3s and will try again.
   2024-01-09T16:33:18Z retry.go:91: Wait for pod demo-client-64788f84cd-m7j2h to be provisioned.
   2024-01-09T16:33:18Z client.go:45: Configuring Kubernetes client using config file /home/runner/.kube/kind-kuma-1-config with context 
   2024-01-09T16:33:18Z pod.go:135: Pod is now available

We'd like to make things more readable by removing occurrences of: Configuring Kubernetes client using config file

Versions

  • Terratest version: v0.46.9
  • Environment details (Ubuntu 20.04, Windows 10, etc.): any
@lahabana lahabana added the bug Something isn't working label Jan 9, 2024
lahabana added a commit to lahabana/terratest that referenced this issue Jan 9, 2024
This enables users to not log messages like: "Configuring Kubernetes
client using config file"

Fix gruntwork-io#1383

Signed-off-by: Charly Molter <[email protected]>
lahabana added a commit to lahabana/terratest that referenced this issue Mar 8, 2024
This enables users to not log messages like: "Configuring Kubernetes
client using config file"

Fix gruntwork-io#1383

Signed-off-by: Charly Molter <[email protected]>
lahabana added a commit to lahabana/terratest that referenced this issue Sep 20, 2024
This enables users to not log messages like: "Configuring Kubernetes
client using config file"

Fix gruntwork-io#1383

Signed-off-by: Charly Molter <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant