-
Notifications
You must be signed in to change notification settings - Fork 208
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
feat: odigos describe sub commands for auto completion #1407
Conversation
|
||
if len(args) != 2 { | ||
fmt.Println("Usage: odigos describe <kind> <name>") | ||
deployment, err := client.AppsV1().Deployments(ns).Get(ctx, name, metav1.GetOptions{}) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see this function happens also at sources.go, login.go, uninstall.go.
Maybe we can create a util file and put the function over there.
Your call..
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since it's just one line, I prefer to use the k8s client directly and not introduce more complexity to the code
return | ||
} | ||
workloadObj := &K8sSourceObject{ | ||
Kind: "deployment", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure but I think deployment.Kind returns this string.
Also other places
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unfortunately, The Kind
property is not populated by the client when instantiating a Deployment
object. This is why I needed to add it explicitly
No description provided.