Skip to content

Commit

Permalink
Update endpoints for Deployment
Browse files Browse the repository at this point in the history
Change from the deprecated extensions/v1beta1/Deployment endpoint,
which will be removed by default in kubernetes 1.16,
to apps/v1/Deployment, which is available since kubernetes 1.9

Relates to fiaas/fiaas-deploy-daemon#39
  • Loading branch information
gregjones committed Jan 10, 2020
1 parent 0384fa5 commit 613d3ca
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions k8s/models/deployment.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,8 @@ class DeploymentStatus(Model):

class Deployment(Model):
class Meta:
list_url = "/apis/extensions/v1beta1/deployments"
url_template = "/apis/extensions/v1beta1/namespaces/{namespace}/deployments/{name}"
list_url = "/apis/apps/v1/deployments"
url_template = "/apis/apps/v1/namespaces/{namespace}/deployments/{name}"

metadata = Field(ObjectMeta)
spec = Field(DeploymentSpec)
Expand Down
2 changes: 1 addition & 1 deletion tests/k8s/test_deployer.py
Original file line number Diff line number Diff line change
Expand Up @@ -182,4 +182,4 @@ def _create_mock_response():


def _uri(namespace, name=""):
return "/apis/extensions/v1beta1/namespaces/{namespace}/deployments/{name}".format(name=name, namespace=namespace)
return "/apis/apps/v1/namespaces/{namespace}/deployments/{name}".format(name=name, namespace=namespace)

0 comments on commit 613d3ca

Please sign in to comment.