plantoncloud / planton

CLI Interface for Planton Cloud
https://planton.cloud
0 stars 0 forks source link

get-credentials command is not working for newly created kube cluster #36

Open sureshattaluri opened 10 months ago

sureshattaluri commented 10 months ago

run following planton cli command got nil pointer error

planton get-credentials k8c-planton-dev

image
sureshattaluri commented 10 months ago
================================================================================
The Planton CLI encountered a fatal error. This is a bug!
We would appreciate a report: https://github.com/plantoncloud-inc/planton-cli/issues/
Please provide all of the below text in your report.
================================================================================
CLI Version:   v0.0.76
Go Version:       go1.20.6
Go Compiler:      gc
Architecture:     arm64
Operating System: darwin
Panic:            runtime error: invalid memory address or nil pointer dereference

goroutine 1 [running]:
runtime/debug.Stack()
    /opt/homebrew/Cellar/go/1.20.6/libexec/src/runtime/debug/stack.go:24 +0x64
github.com/plantoncloud-inc/planton-cli/internal/cli/panic.Handle(0x1400101ff4f)
    /Users/swarup/scm/github.com/plantoncloud-inc/planton-cli/internal/cli/panic/panic.go:19 +0x44
panic({0x107462260, 0x10cc0ac40})
    /opt/homebrew/Cellar/go/1.20.6/libexec/src/runtime/panic.go:884 +0x204
github.com/plantoncloud-inc/planton-cli/internal/planton/domain/code2cloud/deploy/kubecluster.GetCredentials({0x16d7a3318?, 0x0?})
    /Users/swarup/scm/github.com/plantoncloud-inc/planton-cli/internal/planton/domain/code2cloud/deploy/kubecluster/kube_cluster.go:116 +0x48
github.com/plantoncloud-inc/planton-cli/cmd/planton/root.getCredentialsHandler(0x10cc35260?, {0x14000c347b0, 0x1, 0x1?})
    /Users/swarup/scm/github.com/plantoncloud-inc/planton-cli/cmd/planton/root/get_credentials.go:60 +0x2d4
github.com/spf13/cobra.(*Command).execute(0x10cc35260, {0x14000c34770, 0x1, 0x1})
    /Users/swarup/gopa/pkg/mod/github.com/spf13/cobra@v1.7.0/command.go:944 +0x5b0
github.com/spf13/cobra.(*Command).ExecuteC(0x10cc34120)
    /Users/swarup/gopa/pkg/mod/github.com/spf13/cobra@v1.7.0/command.go:1068 +0x35c
github.com/spf13/cobra.(*Command).Execute(...)
    /Users/swarup/gopa/pkg/mod/github.com/spf13/cobra@v1.7.0/command.go:992
github.com/plantoncloud-inc/planton-cli/cmd/planton.Execute()
    /Users/swarup/scm/github.com/plantoncloud-inc/planton-cli/cmd/planton/root.go:46 +0x28
main.main()
    /Users/swarup/scm/github.com/plantoncloud-inc/planton-cli/main.go:11 +0x50