driver/kubernetes: add manifest-patch driver option#3791
Open
abhay1999 wants to merge 1 commit intodocker:masterfrom
Open
driver/kubernetes: add manifest-patch driver option#3791abhay1999 wants to merge 1 commit intodocker:masterfrom
abhay1999 wants to merge 1 commit intodocker:masterfrom
Conversation
AkihiroSuda
reviewed
Apr 10, 2026
scutuatua-crypto
approved these changes
Apr 11, 2026
scutuatua-crypto
approved these changes
Apr 11, 2026
AkihiroSuda
reviewed
Apr 12, 2026
4fe2a88 to
4fab23b
Compare
4fab23b to
cc6a52e
Compare
Author
|
@AkihiroSuda I've addressed your feedback and pushed an updated version:
Example usage for the original ownerReferences use case: Could you take another look when you get a chance? |
cc6a52e to
cd62112
Compare
AkihiroSuda
reviewed
Apr 13, 2026
Add a generic "manifest-patch" driver option that accepts a jq
expression, applied to the generated Deployment or StatefulSet
manifest after creation.
This allows users to set arbitrary manifest fields that are not
exposed as dedicated driver options, such as ownerReferences:
--driver-opt manifest-patch='.metadata.ownerReferences=[{"apiVersion":"actions.github.com/v1alpha1","kind":"EphemeralRunner","name":"runner-xyz","uid":"..."}]'
The jq expression is evaluated using github.com/itchyny/gojq, a
pure-Go jq implementation. The expression is validated at driver
initialization time, and an error is returned if it is invalid or
produces no output.
Fixes: docker#2626
Signed-off-by: abhay1999 <abhaychaurasiya19@gmail.com>
cd62112 to
b4c8746
Compare
AkihiroSuda
approved these changes
Apr 13, 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.
Add a generic
manifest-patchdriver option that accepts a jqexpression applied to the generated Deployment or StatefulSet
manifest after creation.
This allows users to set arbitrary manifest fields not exposed as
dedicated driver options, such as
ownerReferences:The jq expression is evaluated using github.com/itchyny/gojq, a
pure-Go jq implementation. The expression is validated at driver
initialization time. An error is returned if the expression is
invalid or produces no output.
Fixes #2626