mirror of
https://github.com/ansible-collections/kubernetes.core.git
synced 2026-05-07 05:22:39 +00:00
Support resource definition using manifest URL (#478)
Support resource definition using manifest URL SUMMARY Closes #451 ISSUE TYPE Feature Pull Request COMPONENT NAME k8s k8s_scale k8s_service Reviewed-by: Mike Graves <mgraves@redhat.com> Reviewed-by: Abhijeet Kasurde <None> Reviewed-by: Bikouo Aubin <None>
This commit is contained in:
@@ -305,7 +305,6 @@ class K8sService:
|
||||
def create(self, resource: Resource, definition: Dict) -> Dict:
|
||||
namespace = definition["metadata"].get("namespace")
|
||||
name = definition["metadata"].get("name")
|
||||
results = {"changed": False, "result": {}}
|
||||
|
||||
if self.module.check_mode and not self.client.dry_run:
|
||||
k8s_obj = _encode_stringdata(definition)
|
||||
@@ -327,7 +326,7 @@ class K8sService:
|
||||
name
|
||||
)
|
||||
)
|
||||
return results
|
||||
return dict()
|
||||
except Exception as e:
|
||||
reason = e.body if hasattr(e, "body") else e
|
||||
msg = "Failed to create object: {0}".format(reason)
|
||||
|
||||
Reference in New Issue
Block a user