Repository navigation
feat(defkit): experimental addon to install DefKit definition modules - #799
Merged
Merged
Conversation
A module is an Application that renders it in a Job, waits for review, then applies its definitions, which the Application tracks and garbage collects. The render tool and its Dockerfile are in render/. Signed-off-by: Brian Kane <briankane1@gmail.com> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
briankane
requested review from
FogDong,
anoop2811,
barnettZQG,
dhiguero,
jguionnet,
wangyikewxgm and
wonderflow
as code owners
October 6, 2026 12:10
There was a problem hiding this comment.
All reported issues were addressed across 11 files
Tip: instead of fixing issues one by one fix them all with cubic
Turn on auto-fix | Re-trigger cubic
Member
|
@briankane , can you take care of the cubic reviews |
An empty render wrote null for definitions.json and errors.json; both are always JSON lists. Signed-off-by: Brian Kane <briankane1@gmail.com>
module.json and clone errors carry the repository URL without its userinfo. Signed-off-by: Brian Kane <briankane1@gmail.com>
The URL may carry credentials, and the step message is shown wherever the workflow is. Signed-off-by: Brian Kane <briankane1@gmail.com>
A failed ConfigMap read, or a render without definitions.json, fails the step rather than applying an empty list. Signed-off-by: Brian Kane <briankane1@gmail.com>
A definition that failed to render fails the step, naming the first few errors, and nothing is applied. Signed-off-by: Brian Kane <briankane1@gmail.com>
Pruning selects defkit.oam.dev/render=true as well as the module, the labels a render is written with. Signed-off-by: Brian Kane <briankane1@gmail.com>
Renders and their Job carry defkit.oam.dev/module-namespace, and pruning selects it, so same-named modules in different namespaces keep their own renders. Signed-off-by: Brian Kane <briankane1@gmail.com>
The render Job runs the module in a tokenless init container and writes its result from a second container, the only one that mounts the token. Signed-off-by: Brian Kane <briankane1@gmail.com>
Each repositories entry names its module by exactly one of git and ref, as the render step takes it. Signed-off-by: Brian Kane <briankane1@gmail.com>
A multi-platform buildx build stays in the build cache unless it is pushed. Signed-off-by: Brian Kane <briankane1@gmail.com>
The example keeps them with keepLegacyResource, and the readme now says so. Signed-off-by: Brian Kane <briankane1@gmail.com>
Signed-off-by: Brian Kane <briankane1@gmail.com>
There was a problem hiding this comment.
All reported issues were addressed across 9 files (changes from recent commits).
Reply with feedback, questions, or to request a fix.
View guided diff | Re-trigger cubic
anoop2811
approved these changes
Oct 15, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Description of your changes
A new experimental addon for installing DefKit definition modules (Go modules of X-Definitions, such as vela-go-definitions) as Applications, so a cluster can take its definitions from a module and keep them in step with it.
Each module is an Application whose workflow renders, waits for review, then applies:
defkit-renderruns a Job that loads the module the wayvela def apply-moduledoes and writes what it generates to a ConfigMap. It runs in its ownvela-defkitnamespace, under an account that may only write ConfigMaps there.defkit-applyapplies the rendered definitions as the Application's resources, so it tracks them and garbage collects any a new version drops.The render tool and its Dockerfile are in
render/(it builds against KubeVela v1.11.0). Its image,oamdev/defkit-render:v0.1.0, isn't published yet: could a maintainer build and push it? It's multi-arch:The
imageparameter takes another image in the meantime.How has this code been tested?
On k3d with KubeVela v1.10.1, with the image built from
render/and loaded into the cluster:examples/vela-definitions-traits.yamlrenders vela-go-definitions atmain, then suspends for review.vela workflow resume, the Application isrunningand all 29 traits are applied asdk-*.Summary by cubic
Adds an experimental
defkitaddon that installs DefKit definition modules (Go modules of X-Definitions) as Applications. Each module is an Application whose workflow renders it in a Job, waits for review, then applies its definitions, which the Application tracks and garbage collects when a new version drops them.The render Job runs in the
vela-defkitnamespace. The module's code runs in a tokenless container; only a separate write container mounts the account token, which may write config maps there and nothing else. Renders are scoped per module namespace and redact Git credentials from output and step messages. The apply step fails, applying nothing, when the render can't be read, is missingdefinitions.json, or produced errors.Rollout
oamdev/defkit-render:v0.1.0is not published yet; a maintainer must build and push it, or set theimageparameter to a locally built image.Written for commit e244fa9. Summary will update on new commits.