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

test/helpers: Save JSON artifacts as .json #16442

Merged
merged 1 commit into from
Jun 7, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
24 changes: 12 additions & 12 deletions test/helpers/kubectl.go
Original file line number Diff line number Diff line change
Expand Up @@ -3601,21 +3601,21 @@ func (kub *Kubectl) DumpCiliumCommandOutput(ctx context.Context, namespace strin
// directory
func (kub *Kubectl) GatherLogs(ctx context.Context) {
reportCmds := map[string]string{
"kubectl get pods --all-namespaces -o json": "pods.txt",
"kubectl get services --all-namespaces -o json": "svc.txt",
"kubectl get nodes -o json": "nodes.txt",
"kubectl get ds --all-namespaces -o json": "ds.txt",
"kubectl get cnp --all-namespaces -o json": "cnp.txt",
"kubectl get cep --all-namespaces -o json": "cep.txt",
"kubectl get netpol --all-namespaces -o json": "netpol.txt",
"kubectl get pods --all-namespaces -o json": "pods.json",
"kubectl get services --all-namespaces -o json": "svc.json",
"kubectl get nodes -o json": "nodes.json",
"kubectl get ds --all-namespaces -o json": "ds.json",
"kubectl get cnp --all-namespaces -o json": "cnp.json",
"kubectl get cep --all-namespaces -o json": "cep.json",
"kubectl get netpol --all-namespaces -o json": "netpol.json",
"kubectl describe pods --all-namespaces": "pods_status.txt",
"kubectl get replicationcontroller --all-namespaces -o json": "replicationcontroller.txt",
"kubectl get deployment --all-namespaces -o json": "deployment.txt",
"kubectl get replicationcontroller --all-namespaces -o json": "replicationcontroller.json",
"kubectl get deployment --all-namespaces -o json": "deployment.json",
"kubectl get crd ciliumnetworkpolicies.cilium.io -o json": "cilium-network-policies-crd.json",
"kubectl get crd ciliumclusterwidenetworkpolicies.cilium.io -o json": "cilium-clusterwide-network-policies-crd.json",
"kubectl get serviceaccount --all-namespaces -o json": "serviceaccounts.txt",
"kubectl get clusterrole -o json": "clusterroles.txt",
"kubectl get clusterrolebinding -o json": "clusterrolebindings.txt",
"kubectl get serviceaccount --all-namespaces -o json": "serviceaccounts.json",
"kubectl get clusterrole -o json": "clusterroles.json",
"kubectl get clusterrolebinding -o json": "clusterrolebindings.json",

fmt.Sprintf("kubectl get cm cilium-config -n %s -o json", CiliumNamespace): "cilium-config.json",
fmt.Sprintf("kubectl logs -l k8s-app=cilium -n %s --timestamps -c clean-cilium-state --tail -1", CiliumNamespace): "cilium-init-container-logs.txt",
Expand Down