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

Missing scope in CRD spec? #1985

Closed
lluunn opened this issue Nov 21, 2018 · 4 comments
Closed

Missing scope in CRD spec? #1985

lluunn opened this issue Nov 21, 2018 · 4 comments

Comments

@lluunn
Copy link
Contributor

lluunn commented Nov 21, 2018

I was trying Gitop deployment,
and got error when applying:

KIND                      NAME                                    STATUS     HEALTH   HOOK  OPERATIONMSG
CustomResourceDefinition  pytorchjobs.kubeflow.org                OutOfSync  Missing        error validating data: ValidationError(CustomResourceDefinition.spec): missing required field "scope" in io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1beta1.CustomResourceDefinitionSpec
CustomResourceDefinition  studyjobs.kubeflow.org                  OutOfSync  Missing        error validating data: ValidationError(CustomResourceDefinition.spec): missing required field "scope" in io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1beta1.CustomResourceDefinitionSpec
CustomResourceDefinition  tfjobs.kubeflow.org                     OutOfSync  Missing        error validating data: ValidationError(CustomResourceDefinition.spec): missing required field "scope" in io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1beta1.CustomResourceDefinitionSpec
@lluunn
Copy link
Contributor Author

lluunn commented Nov 21, 2018

https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/#create-a-customresourcedefinition

Seems there should be a scope field in CRD spec, but not sure how we didn't get error.
Maybe because I am using k8s 1.11 here.

@lluunn
Copy link
Contributor Author

lluunn commented Nov 21, 2018

Similar to #1524

@jlewi
Copy link
Contributor

jlewi commented Nov 22, 2018

@lluunn Are you deploying from master branch?

Any idea why are tests aren't catching this?

@jlewi
Copy link
Contributor

jlewi commented Nov 22, 2018

For pytorch looks like we might not be setting scope;
https://github.com/kubeflow/kubeflow/blob/master/kubeflow/pytorch-job/pytorch-operator.libsonnet

I suspect we might have been relying on the default value but with 1.11 things change.

jlewi added a commit to jlewi/kubeflow that referenced this issue Nov 22, 2018
* PyTorch, TFJob, StudyJob CRD's should have scope namespace because the
  resources always belong to a namespace.

* For TFJob the deploymentScope parameter doesn't affect the CRD definition
  it only affects the controller itself and determines whether the controller
  monitors a particular namespace or all namespaces.

Fix kubeflow#1985, kubeflow#1524
@jlewi jlewi mentioned this issue Nov 22, 2018
jlewi added a commit to jlewi/kubeflow that referenced this issue Nov 22, 2018
* PyTorch, TFJob, StudyJob CRD's should have scope namespace because the
  resources always belong to a namespace.

* For TFJob the deploymentScope parameter doesn't affect the CRD definition
  it only affects the controller itself and determines whether the controller
  monitors a particular namespace or all namespaces.

Fix kubeflow#1985, kubeflow#1524

* Add a unittest for the PyTorch configs for the CRD and deployment.
k8s-ci-robot pushed a commit that referenced this issue Nov 23, 2018
* PyTorch, TFJob, StudyJob CRD's should have scope namespace because the
  resources always belong to a namespace.

* For TFJob the deploymentScope parameter doesn't affect the CRD definition
  it only affects the controller itself and determines whether the controller
  monitors a particular namespace or all namespaces.

Fix #1985, #1524

* Add a unittest for the PyTorch configs for the CRD and deployment.
saffaalvi pushed a commit to StatCan/kubeflow that referenced this issue Feb 11, 2021
* PyTorch, TFJob, StudyJob CRD's should have scope namespace because the
  resources always belong to a namespace.

* For TFJob the deploymentScope parameter doesn't affect the CRD definition
  it only affects the controller itself and determines whether the controller
  monitors a particular namespace or all namespaces.

Fix kubeflow#1985, kubeflow#1524

* Add a unittest for the PyTorch configs for the CRD and deployment.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants