Skip to content

Kubernetes model deployment permissions issue #597

@dipayan90

Description

@dipayan90

I see this as a common scenario where in organizations that use a k8s cluster with multi tenancy. Usually every team within the Org is given admin ClusterRole permissions. Now using the admin role, one has permissions to get, delete, update, list deployments but not the status sub-resource. The admin role permissions do not let you write deployment status. They let you create and delete the deployment objects, controlling the "spec" portion of the object. Status modification permissions are granted to the deployment controller.

When deploying a model clipper relies on getting the available replicas here:

while self._k8s_beta.read_namespaced_deployment_status(

Now a namespace admin will not have access to status sub resource. However the information about number of available replicas can be obtained by just calling the https://github.com/kubernetes-client/python/blob/master/kubernetes/docs/ExtensionsV1beta1Api.md#read_namespaced_deployment as well . the status subresource doesn't give you any more information than simply fetching the deployment

It will be great if the switch is made to using the read_namespaced_deployment api endpoint instead of the read_namespaced_deployment_status endpoint.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions