Merge pull request #46330 from bdrung/fix_kubernetes_test_create_deployments

Fix ValueError for template in AppsV1beta1DeploymentSpec
This commit is contained in:
Nicole Thomas 2018-03-12 12:56:17 -04:00 committed by GitHub
commit 5c4c182d75
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1468,7 +1468,7 @@ def __dict_to_deployment_spec(spec):
'''
Converts a dictionary into kubernetes AppsV1beta1DeploymentSpec instance.
'''
spec_obj = AppsV1beta1DeploymentSpec()
spec_obj = AppsV1beta1DeploymentSpec(template=spec.get('template', ''))
for key, value in iteritems(spec):
if hasattr(spec_obj, key):
setattr(spec_obj, key, value)