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

kfam/v1/profiles ignores resourceQuotaSpec field in kubeflow profile spec #36

Open
mohittalele opened this issue Feb 16, 2022 · 7 comments

Comments

@mohittalele
Copy link

/kind bug

What steps did you take and what happened:
I am trying to put the resource quota limitation for kubeflow users. Due to the design of our system, I have to use Json object for profile specs and then use curl POST using kfam API endpoint : http://profiles-kfam.kubeflow.svc.cluster.local:8081/kfam/v1/profiles

Essentially this is what I am trying to achieve :

  1. Create a Json object in a file kubeflowProfile.json
 {
    "metadata": {
        "name": "kubeflow-profile"
    },
    "spec": {
        "owner": {
            "kind": "User",
            "name": "kubeflow-user@example.com"
        },
        "resourceQuotaSpec": {
            "hard": {
                "cpu": "2",
                "memory": "1Gi",
                "requests.storage": "20Gi"
            }
        }
    }
}
  1. curl -d @kubeflowProfile.json http://profiles-kfam.kubeflow.svc.cluster.local:8081/kfam/v1/profiles

What did you expect to happen:
I would expect the kubeflow API to create a profile with fields spec.owner and spec.resourceQuotaSpec. However, the API seems to only post spec.owner. The profile which is created is as follows :

apiVersion: kubeflow.org/v1
kind: Profile
metadata:
  name: kubeflow-profile
spec:
  owner:
    kind: User
    name: kubeflow-user@example.com
  resourceQuotaSpec: {}

Environment:

  • Kubeflow version: 1.4
  • kfctl version: (use kfctl version):NA
  • Kubernetes platform: AKS
  • Kubernetes version: 1.21
  • OS (e.g. from /etc/os-release):NA
@jbottum
Copy link

jbottum commented Feb 18, 2022

/priority p2
/platform azure
@kubeflow/wg-notebooks-leads would this be an issue that the notebook / central service working group would look at?

@mohittalele I believe that KF 1.4 was not tested with K8s 1.21. Have you tried an earlier K8s version ?

@mohittalele
Copy link
Author

@jbottum I have not tested and reproduced bug with earlier k8s version. Actually in our system we can't downgrade k8s version due to compatibility with other components such as istio.

@hellobiek
Copy link

anyone solved this problem?

@thesuperzapper
Copy link
Member

@kimwnasptd this is probably related to our Profile CRD spec resulting in unexpected fields being removed from spec. resourceQuotaSpec.

We can either fix it by fully defining the valid resourceQuotaSpec definitions, or allowing unexpected fields (but this could result in crashing the controller when bad fields are added).

See our current CRD definition here:
https://github.com/kubeflow/kubeflow/blob/5e09536fd36cf8265d76730de4cbbd5c6140b28e/components/profile-controller/config/crd/bases/kubeflow.org_profiles.yaml#L85-L146

@andreyvelich
Copy link
Member

/transfer dashboard

Copy link

@mohittalele: The label(s) kind/bug cannot be applied, because the repository doesn't have them.

In response to this:

/kind bug

What steps did you take and what happened:
I am trying to put the resource quota limitation for kubeflow users. Due to the design of our system, I have to use Json object for profile specs and then use curl POST using kfam API endpoint : http://profiles-kfam.kubeflow.svc.cluster.local:8081/kfam/v1/profiles

Essentially this is what I am trying to achieve :

  1. Create a Json object in a file kubeflowProfile.json
{
   "metadata": {
       "name": "kubeflow-profile"
   },
   "spec": {
       "owner": {
           "kind": "User",
           "name": "kubeflow-user@example.com"
       },
       "resourceQuotaSpec": {
           "hard": {
               "cpu": "2",
               "memory": "1Gi",
               "requests.storage": "20Gi"
           }
       }
   }
}
  1. curl -d @kubeflowProfile.json http://profiles-kfam.kubeflow.svc.cluster.local:8081/kfam/v1/profiles

What did you expect to happen:
I would expect the kubeflow API to create a profile with fields spec.owner and spec.resourceQuotaSpec. However, the API seems to only post spec.owner. The profile which is created is as follows :

apiVersion: kubeflow.org/v1
kind: Profile
metadata:
 name: kubeflow-profile
spec:
 owner:
   kind: User
   name: kubeflow-user@example.com
 resourceQuotaSpec: {}

Environment:

  • Kubeflow version: 1.4
  • kfctl version: (use kfctl version):NA
  • Kubernetes platform: AKS
  • Kubernetes version: 1.21
  • OS (e.g. from /etc/os-release):NA

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@google-oss-prow google-oss-prow bot transferred this issue from kubeflow/kubeflow Nov 11, 2024
Copy link

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

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

5 participants