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

Epic: Kpt OpenAPI roadmap #1521

Open
5 of 8 tasks
natasha41575 opened this issue Mar 4, 2021 · 7 comments
Open
5 of 8 tasks

Epic: Kpt OpenAPI roadmap #1521

natasha41575 opened this issue Mar 4, 2021 · 7 comments
Assignees
Labels
area/hydrate epic triaged Issue has been triaged by adding an `area/` label

Comments

@natasha41575
Copy link
Contributor

natasha41575 commented Mar 4, 2021

This is an umbrella issue describing the tasks that @mengqiy outlined, for OpenAPI features in kpt

Why do we need to do this?

We want our tools to work well with custom resources. We want our functions to have a good UX and custom resources work like builtin types, so that users don't have to provide their own hardcoded fieldspecs for their CRDs (see this example). Instead of having to provide their own fieldspecs, we would like to see if they can be inferred from OpenAPI instead, and make CRDs work like builtins. For this to work, we need to build OpenAPI extensions so that the necessary metadata is available for kpt and kpt functions.

We also want users to have a good UX including a separation between CRD authors and function consumers. In an ideal workflow, the CRD author would provide the OpenAPI specification and extensions needed to use their CRD, and function users would be able to use them seamlessly. These users would only need to provide their desired fields without including the fieldspec metadata that can be provided by the author.

Not only does this affect functions, but kpt uses OpenAPI data for merging packages. 3-way merge requires metadata from OpenAPI (to get merge key and patch strategy information). 3-way merge is necessary for kpt package update. If a user can provide their own OpenAPI doc, then they can also control how kpt merges resources.

Why do this now?

Because this work may take a few months, and ideally this would be available for kpt functions in the function catalog when they are ready. It is better to start now rather than start when the need arises. This will impact every function that needs metadata from OpenAPI which will affect most functions in the function catalog.

@natasha41575 natasha41575 added this to To do in kpt kanban board via automation Mar 4, 2021
@natasha41575 natasha41575 assigned natasha41575 and mengqiy and unassigned mengqiy Mar 4, 2021
@natasha41575
Copy link
Contributor Author

@mengqiy umbrella issue for the openapi work

@natasha41575
Copy link
Contributor Author

we may also want to look into kubernetes-sigs/kustomize#3670

@mikebz
Copy link
Contributor

mikebz commented Mar 6, 2021

I'd consider moving this into "In Progress" if it's actively being worked on.

@natasha41575 natasha41575 moved this from To do to In progress in kpt kanban board Mar 8, 2021
@natasha41575 natasha41575 added epic triaged Issue has been triaged by adding an `area/` label labels Mar 8, 2021
@mikebz
Copy link
Contributor

mikebz commented Mar 12, 2021

Could we link some questions or issues that were filed because this feature didn't exist? It would be great to get back to those users and see if we are addressing their needs and also could be early design partners.

@natasha41575
Copy link
Contributor Author

I will link issues if they arise. The main goal here is to make sure the UX for functions is good, so we are welcoming any input from users on that.

@mikebz
Copy link
Contributor

mikebz commented Mar 12, 2021

I have rarely seen a feature well received if it wasn't addressing a problem that customers already knew they had.

@frankfarzan
Copy link
Contributor

This is a cross-cutting and critical part of having good UX when manipulating KRM resources. Even most basic functions like name-prefix require augmented OpenAPI semantics to work properly. Kustomize has done this for core k8s native types based on a real need, we need to generalize and extend this.

@natasha41575
Copy link
Contributor Author

natasha41575 commented Mar 12, 2021

Another note: because kustomize had only been built with OpenAPI for native types, issues have come up regarding the lack of OpenAPI support for CRDs (see kubernetes-sigs/kustomize#2825, kubernetes-sigs/kustomize#1689, kubernetes-sigs/kustomize#3677). It will be good if kpt can learn from this and support it early on.

@frankfarzan frankfarzan added this to the v1.0 final milestone Mar 30, 2021
@mikebz mikebz moved this from In progress to To do in kpt kanban board Apr 8, 2021
@natasha41575 natasha41575 modified the milestones: v1.0 m3, v1.1 May 13, 2021
@mikebz mikebz removed this from the v1.1 milestone Jul 14, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/hydrate epic triaged Issue has been triaged by adding an `area/` label
Projects
None yet
Development

No branches or pull requests

5 participants