Skip to content
This repository has been archived by the owner on Nov 22, 2024. It is now read-only.

VolumeMount API is not working. #1072

Closed
RayRoestenburg opened this issue Jul 21, 2021 · 0 comments · Fixed by #1073
Closed

VolumeMount API is not working. #1072

RayRoestenburg opened this issue Jul 21, 2021 · 0 comments · Fixed by #1073

Comments

@RayRoestenburg
Copy link
Contributor

RayRoestenburg commented Jul 21, 2021

Describe the bug
A clear and concise description of what the bug is.
--volume-mount, in combination with VolumeMount API, is not working. The --volume-mount command line option is also not checked.
The 'new way' of defining volumes does work, by using the Cloudflow configuration file, as described here: https://cloudflow.io/docs/current/develop/cloudflow-configuration-kubernetes.html#_mounting_persistent_volume_claims
Having two ways to do the same thing is confusing.

Before, the following error message would appear, if you would omit the --volume-mount flag, or specify the volume mount incorrectly:

[Error] The following volume mount needs to be bound to a Persistence Volume claim using the --volume-mount flag

To Reproduce
Create a PVC, use the Volume Mount API in a Streamlet, and try to deploy the streamlet with --volume-mount option.

Expected behavior
A clear and concise description of what you expected to happen.
The streamlet should run correctly. Instead the operator crashes:

Caused by: io.fabric8.kubernetes.client.KubernetesClientException: Failure executing: POST at: https://10.43.0.1/apis/apps/v1/namespaces/file-ingestion/deployments. Message: Deployment.apps "file-ingestion-file-ingress" is invalid: [spec.template.spec.volumes[2].persistentVolumeClaim.claimName: Required value, spec.template.spec.containers[0].volumeMounts[1].name: Not found: "source-data-mount"]. Received status: Status(apiVersion=v1, code=422, details=StatusDetails(causes=[StatusCause(field=spec.template.spec.volumes[2].persistentVolumeClaim.claimName, message=Required value, reason=FieldValueRequired, additionalProperties={}), StatusCause(field=spec.template.spec.containers[0].volumeMounts[1].name, message=Not found: "source-data-mount", reason=FieldValueNotFound, additionalProperties={})], group=apps, kind=Deployment, name=file-ingestion-file-ingress, retryAfterSeconds=null, uid=null, additionalProperties={}), kind=Status, message=Deployment.apps "file-ingestion-file-ingress" is invalid: [spec.template.spec.volumes[2].persistentVolumeClaim.claimName: Required value, spec.template.spec.containers[0].volumeMounts[1].name: Not found: "source-data-mount"], metadata=ListMeta(_continue=null, remainingItemCount=null, resourceVersion=null, selfLink=null, additionalProperties={}), reason=Invalid, status=Failure, additionalProperties={}).
Thu, Jul 15 2021 2:47:09 pm at io.fabric8.kubernetes.client.dsl.base.OperationSupport.requestFailure(OperationSupport.java:570)
RayRoestenburg added a commit that referenced this issue Jul 23, 2021
* Added support back in for --volume-mount.

 Added test.

Some refactoring, added check for missing volume mounts.

Better error message.

Cleanup.

Fix for compile.

Added a comment.

* Added the Cloudflow CRD. (#1074)

* Cloudflow Custom Resource Definition (CRD).

* Comment to remove endpoint statuses from CRD status, not used.

* Added docs to CRD fields.

* Remove tmp file.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant