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

Simplify YAML API (GetResource) with prompt values #1108

Open
Tracked by #1971
lblackstone opened this issue May 7, 2020 · 0 comments
Open
Tracked by #1971

Simplify YAML API (GetResource) with prompt values #1108

lblackstone opened this issue May 7, 2020 · 0 comments
Labels
area/yaml kind/enhancement Improvements or new features mro2 Monica's list of 2st tier overlay related issues

Comments

@lblackstone
Copy link
Member

Problem description

The YAML API currently creates resources stored as Outputs in the TS, Python, and .NET SDKs. We are choosing to diverge from this behavior in the Go SDK because it makes the API meaningfully simpler to use.

Prompt example:

hostIP := resources.GetResource("v1/Pod", "foo", "").(*corev1.Pod).Status.HostIP()

Output example:

hostIP := resources.GetResource("v1/Pod", "foo", "").Apply(func(r interface{}) (interface{}, error) {
	pod := r.(*corev1.Pod)
	return pod.Status.HostIP(), nil
})

There's currently no strong technical reason that we couldn't use a prompt API for the other SDKs as well.

Related: #1107

@lblackstone lblackstone self-assigned this May 7, 2020
@mnlumi mnlumi added the mro2 Monica's list of 2st tier overlay related issues label Mar 28, 2023
@lblackstone lblackstone removed their assignment Jul 14, 2023
@lblackstone lblackstone added the kind/enhancement Improvements or new features label Jul 14, 2023
@EronWright EronWright changed the title Simplify YAML API with prompt values Simplify YAML API (GetResource) with prompt values Apr 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/yaml kind/enhancement Improvements or new features mro2 Monica's list of 2st tier overlay related issues
Projects
None yet
Development

No branches or pull requests

3 participants