@kubernetes/sig-cli-feature-requests
—
You are receiving this because you are on a team that was mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.
Issues go stale after 90d of inactivity.
Mark the issue as fresh with /remove-lifecycle stale
.
Stale issues rot after an additional 30d of inactivity and eventually close.
Prevent issues from auto-closing with an /lifecycle frozen
comment.
If this issue is safe to close now please do so with /close
.
Send feedback to sig-testing, kubernetes/test-infra and/or @fejta
.
/lifecycle stale
Using -p "$(cat)"
works to load the secret from stdin.
:; jq '{stringData: .AccessKey}' create-access-key-response.json | kubectl patch secret whatever-aws-apikey -p "$(cat)" secret "whatever-aws-apikey" patched
Stale issues rot after 30d of inactivity.
Mark the issue as fresh with /remove-lifecycle rotten
.
Rotten issues close after an additional 30d of inactivity.
If this issue is safe to close now please do so with /close
.
Send feedback to sig-testing, kubernetes/test-infra and/or fejta.
/lifecycle rotten
/remove-lifecycle stale
Closed #17028.
Rotten issues close after 30d of inactivity.
Reopen the issue with /reopen
.
Mark the issue as fresh with /remove-lifecycle rotten
.
Send feedback to sig-testing, kubernetes/test-infra and/or fejta.
/close
/remove-lifecycle rotten
Got here because I was trying to figure out how to load a patch from a file... seems like the -p "(cat mypatch.yaml)" method is the best so far. I really think patch and apply should behave identically, though, with regards to supplying the json or yaml from a file or stdin.
—
You are receiving this because you are on a team that was mentioned.
Reply to this email directly, view it on GitHub, or unsubscribe.
/reopen
@foobarbecue: You can't reopen an issue/PR unless you authored it or you are a collaborator.
In response to this:
/reopen
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.
(Obvious warning that kubectl patch secret foo -p "$(cat)"
is not giving the security benefits that "read secrets from stdin" has.)
My reason for wanting this: what if your patch is bigger than getconf ARG_MAX
?
For anyone who is having trouble with this. You can try
kubectl patch secret foo --type=json --patch-file=/dev/stdin <<-EOF
[
{
"op": "replace",
"path": "/data/metadata/name",
"value": "bar"
}
]
EOF
—
You are receiving this because you are on a team that was mentioned.
Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications on the go with GitHub Mobile for iOS or Android.
/reopen
/remove-lifecycle rotten
I still experience this issue with kubectl v1.27.4.
clientVersion: buildDate: "2023-07-28T09:46:04Z" compiler: gc gitCommit: 36645e7311e9bdbbf2adb79ecd8bd68556bc86f6 gitTreeState: clean gitVersion: v1.27.4+k3s1 goVersion: go1.20.6 major: "1" minor: "27" platform: linux/amd64 kustomizeVersion: v5.0.1 serverVersion: buildDate: "2023-07-28T09:46:04Z" compiler: gc gitCommit: 36645e7311e9bdbbf2adb79ecd8bd68556bc86f6 gitTreeState: clean gitVersion: v1.27.4+k3s1 goVersion: go1.20.6 major: "1" minor: "27" platform: linux/amd64
I just tried @nobiit 's suggestion and it works. How come it can read from /dev/stdin
, but ignore -
? Using -
as the standard input is the Linux standard.
kubectl apply -f -
works just as expected.
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are on a team that was mentioned.
@davidshen84: You can't reopen an issue/PR unless you authored it or you are a collaborator.
In response to this:
/reopen
/remove-lifecycle rotten
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are on a team that was mentioned.
For anyone who is having trouble with this. You can try
kubectl patch secret foo --type=json --patch-file=/dev/stdin <<-EOF [ { "op": "replace", "path": "/data/metadata/name", "value": "bar" } ] EOF
Many thanks for the workaround @nobiit , this works a treat. I must admit I didnt think about trying this. Kudos to you sir.
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are on a team that was mentioned.