-
Notifications
You must be signed in to change notification settings - Fork 47
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
[Feature] Create a lookup
operation
#1034
Comments
/assign |
The purpose of this operation would be to read one (or more) resources from the cluster. Then create outputs based on the retrieved resources. I wonder if it would make sense to do that directly in |
I'll give it a try and see how it works out. |
@siddhikhapare i started working on this in #1089 |
@eddycharly I used this to read resources from cluster as helm have type Lookup struct {
// Timeout for the operation. Overrides the global timeout set in the Configuration.
// +optional
Timeout *metav1.Duration `json:"timeout,omitempty"`
// Namespace defines the namespace in which to search for the resources.
// +optional
Namespace string `json:"namespace,omitempty"`
// Labels defines the labels to filter the resources.
// +optional
Labels map[string]string `json:"labels,omitempty"`
// Kind defines the kind of resources to retrieve.
// +optional
Kind string `json:"kind,omitempty"`
// Name defines the name of the resource to retrieve.
// +optional
Name string `json:"name,omitempty"`
// APIVersion defines the API version of the resource to retrieve.
// +optional
APIVersion string `json:"apiVersion,omitempty"`
// Template determines whether resources should be considered for templating.
// +optional
Cluster string `json:"cluster,omitempty"`
// Cluster defines the target cluster (default cluster will be used if not specified and/or overridden).
// +optional
Template *bool `json:"template,omitempty"`
// DryRun determines whether the operation should be performed in dry run mode.
// +optional
DryRun *bool `json:"dryRun,omitempty"`
// Expect defines a list of matched checks to validate the operation outcome.
// +optional
Expect []Expectation `json:"expect,omitempty"`
} |
@siddhikhapare the only thing i'm not sure about is how to deal with multiple resources (when working with labels for example) |
@eddycharly can we create function to search resources of cluster by labels which specified in a Lookup struct using labelSelector? |
I'm still not sure how it will be useful, and we already have a |
Yeah, Sure. |
I would like very much to be able to use Were this implemented, I would expect the resulting JMESPath context
|
Create a
lookup
operation to read one or more resources from the cluster.The text was updated successfully, but these errors were encountered: