Skip to content

Commit

Permalink
Refactor beta function used in the deployment update
Browse files Browse the repository at this point in the history
  • Loading branch information
mrdubr committed Jul 26, 2024
1 parent 8e24853 commit 810fb32
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions contents/deployment-update.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,11 +106,15 @@ def create_deployment_object(data):
template.metadata = client.V1ObjectMeta(labels=labels)

# Create the specification of deployment
spec = client.ExtensionsV1beta1DeploymentSpec(
spec = client.V1DeploymentSpec(
replicas=int(data["replicas"]),
template=template)
template=template,
selector=client.V1LabelSelector(
match_labels={} # This will match all pods
)
)
# Instantiate the deployment object
deployment = client.ExtensionsV1beta1Deployment(
deployment = client.V1Deployment(
api_version=data["api_version"],
kind="Deployment",
metadata=client.V1ObjectMeta(labels=labels,
Expand Down

0 comments on commit 810fb32

Please sign in to comment.