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.
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
adminClusterRolepermissions. Now using theadminrole, one has permissions toget,delete,update,listdeployments but not thestatussub-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
clipperrelies on getting theavailable replicashere:clipper/clipper_admin/clipper_admin/kubernetes/kubernetes_container_manager.py
Line 392 in 3c5a1cc
Now a
namespaceadmin will not have access tostatussub 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 deploymentIt will be great if the switch is made to using the
read_namespaced_deploymentapi endpoint instead of theread_namespaced_deployment_statusendpoint.