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

volume mounting - update examples #604

Closed
ryandawsonuk opened this issue May 30, 2019 · 2 comments · Fixed by #631
Closed

volume mounting - update examples #604

ryandawsonuk opened this issue May 30, 2019 · 2 comments · Fixed by #631
Assignees

Comments

@ryandawsonuk
Copy link
Contributor

ryandawsonuk commented May 30, 2019

The java-base seldon operator (0.2.8 and below) requires volumes to be specified like:

							"volumes": [
								{
									"name": "persistent-storage",
									"volumeSource": {
										"persistentVolumeClaim": {
											"claimName": "modelpvc"
										}
									}
								}
							]

With the new go-based operator we need to remove the volumeSource level like:

							"volumes": [
								{
									"name": "persistent-storage",
									"persistentVolumeClaim": {
											"claimName": "modelpvc"
                                    }
								}

We need to update examples here and in kubeflow. (Encountered this when running kf example with new operator.) We also need to update kubeflow's seldon operator version.

@ryandawsonuk
Copy link
Contributor Author

It seems we are seeing this due to upgrading the k8s client library in the operator and the volumeSource form doesn't work with that anymore. I tried running:

{
	"apiVersion": "v1",
	"kind": "Pod",
	"metadata": {
		"name": "pvc-access-container"
	},
	"spec": {
		"containers": [
			{
				"name": "pvc-access-container",
				"image": "busybox",
				"command": [
					"/bin/sh",
					"-ec",
					"sleep 1000"
				],
				"volumeMounts": [
					{
						"name": "mypvc",
						"mountPath": "/mnt"
					}
				]
			}
		],
		"volumes": [
			{
				"name": "mypvc",
				"volumeSource": {
					"persistentVolumeClaim": {
						"claimName": "nfs-1"
					}
				}
			}
		]
	}
}

And got error: error validating "pvcvolumesourcetester.json": error validating data: ValidationError(Pod.spec.volumes[0]): unknown field "volumeSource" in io.k8s.api.core.v1.Volume; if you choose to ignore these errors, turn validation off with --validate=false. So the form that seldon has been using doesn't work even in ordinary pods in this k8s version (client 1.14, server v1.11.9-gke.8). It seems to make sense therefore that the new operator doesn't support the old volumeSource form.

@ukclivecox
Copy link
Contributor

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants