Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR is being split into two separate non-draft PR's. This Draft will stay open to show forward context when reviewing other PR's
First PR: PR for Initial App Manifest Implementation
What This PR Does
This PR implements #385
This PR introduces the
app
package, which contains a few important concepts:App
, an interface which describes a unit which is run for an app-platform application. This has a "default" implementation insimple
, but can be implemented by a user as they see fit. The interface describes actions which can be taken based on kinds (validate, mutate, convert, etc.) and main loop logic to be run by the wrapper/runner.Provider
, an interface for a wrapper/runner to use to get app data and instantiate an app with config based on its (the runner's) runtime.Manifest
, an early implementation of the App Manifest, which will likely be iterated on, but is required for the runners to work properly, as they need a way of describing app capability.There is also a "default"
app.App
implementation assimple.App
, and two "runners,":simple.StandaloneOperator
, which functions just like asimple.Operator
, andplugin.App
, which wraps the app in the plugin gRPC runtime, translating the plugin gRPC calls to app ones (this runner is still slightly WIP as there is not a mechanism at the moment for it to get a kube config on initialization).CUE codegen now also generates a file-based AppManifest (as a CR), and an in-code manifest to use if a AppManifest CRD is not available in the environment. Admission and conversion capabilities can be specified in the
apiResource
section of the kind's definition like so:An update to the tutorial project's
cmd/operator/main.go
using the new app setup would look like: