Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

--mount flag in update command failed with more than one level of directory #961

Closed
zsxking opened this issue Jul 31, 2020 · 2 comments · Fixed by #975
Closed

--mount flag in update command failed with more than one level of directory #961

zsxking opened this issue Jul 31, 2020 · 2 comments · Fixed by #975
Assignees
Labels
kind/bug Categorizes issue or PR as related to a bug.
Milestone

Comments

@zsxking
Copy link

zsxking commented Jul 31, 2020

Bug report

When trying to mount a configmap with:

$ kn service update heloapp -n app --mount /my/path=cm:test

it gives error

Error: giving up after 3 retries: admission webhook "validation.webhook.serving.knative.dev" denied the request: validation failed: invalid value: my.path-1f5d5125: spec.template.spec.volumes[1].name

Expected behavior

It should work and mount the configmap onto /my/path

When mounting to folder on root, like /mypath, it work:

$ kn service update heloapp -n app --mount /mypath=cm:test
Updating Service 'heloapp' in namespace 'app':
...

Steps to reproduce the problem

  1. create a configmap called test
  2. deploy a kn service: kn service create hello --image gcr.io/cloudrun/hello
  3. use kn service update to mount the configmap to mypath: kn service update hello --mount /my/path=cm:test

kn version

Version:      v20200728-4c246812
Build Date:   2020-07-28 10:36:25
Git Revision: 4c246812
Supported APIs:
* Serving
  - serving.knative.dev/v1 (knative-serving v0.16.1-0.20200715073232-81d40bfc82a6)
* Eventing
  - sources.knative.dev/v1alpha2 (knative-eventing v0.16.1-0.20200715062032-28f9f61e6131)
  - eventing.knative.dev/v1beta1 (knative-eventing v0.16.1-0.20200715062032-28f9f61e6131)

Knative (serving/eventing) version

0.13.2

@zsxking zsxking added the kind/bug Categorizes issue or PR as related to a bug. label Jul 31, 2020
@navidshaikh
Copy link
Collaborator

The volume spec requires the volume to be DNS_LABEL, which only allows - in the names. We are currently replacing all the / with . (except root /).

@navidshaikh navidshaikh added this to the v0.17.0 milestone Aug 10, 2020
@navidshaikh
Copy link
Collaborator

/assign

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Categorizes issue or PR as related to a bug.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants