knative / client

Knative developer experience, docs, reference Knative CLI implementation
Apache License 2.0
354 stars 261 forks source link

CLI: `--user` option does not work as expected #1926

Closed vyasgun closed 7 months ago

vyasgun commented 8 months ago

Bug report

Specifying --user flag does not populate the knative service yaml with the supplied value.

Expected behavior

kn service create s0 --image knativesamples/helloworld --user 1001

should set the value of RunAsUser field in container security context to 1001 but it remains unpopulated.

Steps to reproduce the problem

kn version

gvyas-mac:knative gvyas$ kn version
Version:      v1.13.0
Build Date:   2024-01-24 16:48:59
Git Revision: 543522a3
Supported APIs:
* Serving
  - serving.knative.dev/v1 (knative-serving v1.13.0)
* Eventing
  - sources.knative.dev/v1 (knative-eventing v1.13.0)
  - eventing.knative.dev/v1 (knative-eventing v1.13.0)

Knative (serving/eventing) version

Nightly 0.12.x 0.11.x 0.10.x 0.9.x