feat(oabctl): wire k8s secret refs into K8sDriver (slice 3d) - #100
Open
brettchien wants to merge 1 commit into
Open
feat(oabctl): wire k8s secret refs into K8sDriver (slice 3d)#100brettchien wants to merge 1 commit into
brettchien wants to merge 1 commit into
Conversation
spec.secrets values for a k8s-runtime manifest must now be k8s-secret://<secret-name>#<key> — parsed in secrets.rs (pure, no API call: unlike aws-sm://, a k8s Secret is referenced by name+key directly, kubelet resolves it at pod-start time) and wired into build_deployment as env[].valueFrom.secretKeyRef. Any other scheme (an ECS aws-sm:// ref or raw ARN left over from copy-pasting an ECS manifest) fails loudly at apply time instead of silently mis-deploying — same "declare the contract, fail closed on mismatch" shape the rest of this driver already uses. The Secret object itself must already exist in the target namespace — creating it is a separate concern, deliberately out of scope here (mirrors aws-sm://, which likewise only *references* a secret Secrets Manager already holds, never creates one). reject_unsupported() now only guards spec.bundleFrom (3c, still open) — secrets are no longer in that list. 6 new tests (2 in secrets.rs for the parser, 4 in k8s_driver.rs), 98/98 total green, clippy -D warnings clean. Ref: studio#97 (K8s driver — ADR #63 slice 3, sub-slice tracking)
This was referenced Aug 21, 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.
Summary
Sub-slice 3d of #97 (K8s driver — ADR #63 slice 3): k8s secret refs, wired into
K8sDriver.secrets::parse_k8s_secret_uri("k8s-secret://<secret-name>#<key>")— pure parsing, no API call (unlikeaws-sm://, which resolves a logical secret-id to an ARN viaDescribeSecret; a k8s Secret is referenced by name+key directly, kubelet resolves it at pod-start).K8sDriver::build_deploymentnow emitsenv[].valueFrom.secretKeyReffor eachspec.secretsentry, instead of the placeholder bail from feat(oabctl): K8sDriver skeleton — apply/scale/delete against a Deployment (slice 3b) #99.aws-sm://ref or raw ARN — e.g. copy-pasted from an ECS manifest) fails loudly at apply time with a clear message, rather than being silently ignored or mis-deployed.aws-sm://already has for ECS (it references a secret Secrets Manager already holds, never creates one). Who/what creates the Secret iscreate.rs-wizard-adjacent territory, tracked separately (already flagged as open in K8s driver (ADR #63 slice 3) — sub-slice tracking #97's 3a notes).reject_unsupported()now only guardsspec.bundleFrom(3c, still open) — secrets are no longer on that list.Stacking note
Branched from #99 (3b). Diff will narrow once #98→#99→this land in order.
Testing
cargo test -p oabctl(98/98, 6 new) +cargo clippy -p oabctl --all-targets -- -D warnings— clean,CARGO_PROFILE_DEV_DEBUG=0as usual on this box.Ref #97.