Followup: defaults, named args, expanded docs#1
Merged
idorozin merged 1 commit intoJun 3, 2026
Merged
Conversation
- Add defaultSecret/defaultConfigMap to @initKubernetes() for the common one-Secret-per-app deployment pattern - Support mixed positional + named args (id=, name=, key=) on all four resolver functions, with explicit conflict errors - Rename KubernetesAuthConfig -> KubernetesInstanceConfig (now holds more than auth) - Switch icon to mdi:kubernetes - Drop dead 'unreachable' error guards in the bulk resolvers - Expand website docs and README to match other plugins (scope statement, Discord pointer for deeper k8s integration, auth priority, RBAC setup, formal Reference, troubleshooting) - Add tests for defaults, named args, and conflict errors
idorozin
approved these changes
Jun 3, 2026
Owner
idorozin
left a comment
There was a problem hiding this comment.
Tested against my setup — no regression.
- Existing k8sSecret(...) positional patterns still resolve
- defaultSecret via k8sSecret() (key auto-inferred)
- key= / name= overrides (key= returns a different value → genuinely re-targeting)
- positional + named conflict correctly errors
- build/typecheck/tests green (11/11)
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.
Hey @idorozin! Picking up on PR dmno-dev#737 — really like the plugin, and wanted to layer on a few ergonomic improvements and bring the docs/README in line with our other plugins (AWS, Vault, etc.) before we merge.
Sending as a PR into your fork's branch rather than pushing directly so you can review at your pace and it doesn't clobber any in-flight work on your side. Feel free to take or leave anything.
What changed
Plugin behavior
defaultSecret/defaultConfigMapon@initKubernetes()— for the very common k8s pattern where one app has one Secret + one ConfigMap. Lets you writeDATABASE_URL=k8sSecret()instead of repeatingapp-secretson every line.id=,name=,key=) — so callers can override just one field, e.g.k8sSecret(key=stripe_api_key)to use the default Secret but a custom key. Conflicts (e.g. positional + named for the same field) raise a schema error.KubernetesAuthConfig→KubernetesInstanceConfigsince it now holds non-auth config too.mdi:kubernetes(matches our preferred icon set).'unreachable'error guards in the bulk resolvers — they were dead-code guards against impossible states the type system already ruled out.Docs
Tests
Added 5 tests covering:
defaultSecret,defaultConfigMap(withname=/key=overrides), positional name overriding default, missing-name-without-default error, and positional/named arg conflict detection. Existing 6 tests still pass — 11/11 green.Verification
bun run --filter @varlock/kubernetes-plugin build✓bun run --filter @varlock/kubernetes-plugin typecheck✓bun run --filter @varlock/kubernetes-plugin test✓ (11/11)bun run lint✓Merging this into your
add-kubernetes-pluginbranch will automatically update PR dmno-dev#737 againstdmno-dev/varlock. Once that's green we can ship it!