From cd35f3bce61b991b9d891252b494acecf174899f Mon Sep 17 00:00:00 2001 From: Samir Faci Date: Thu, 9 Mar 2023 13:50:38 -0500 Subject: [PATCH] Adding DataPlane V2 support. fix for #566 --- galaxy.yml | 9 ++++----- plugins/modules/gcp_container_cluster.py | 11 ++++++++--- 2 files changed, 12 insertions(+), 8 deletions(-) diff --git a/galaxy.yml b/galaxy.yml index 4569bae..91695a5 100644 --- a/galaxy.yml +++ b/galaxy.yml @@ -9,7 +9,7 @@ namespace: google name: cloud # The version of the collection. Must be compatible with semantic versioning -version: "1.1.3" +version: "1.1.4" # The path to the Markdown (.md) readme file. This path is relative to the root of the collection readme: README.md @@ -17,9 +17,8 @@ readme: README.md # A list of the collection's content authors. Can be just the name or in the format 'Full Name (url) # @nicks:irc/im.site#channel' authors: -- Google -- Google - + - Google + - Google ### OPTIONAL but strongly recommended @@ -29,7 +28,7 @@ description: The Google Cloud Platform collection. # Either a single license or a list of licenses for content inside of a collection. Ansible Galaxy currently only # accepts L(SPDX,https://spdx.org/licenses/) licenses. This key is mutually exclusive with 'license_file' license: -- GPL-2.0-or-later + - GPL-2.0-or-later # The path to the license file for the collection. This path is relative to the root of the collection. This key is # mutually exclusive with 'license' diff --git a/plugins/modules/gcp_container_cluster.py b/plugins/modules/gcp_container_cluster.py index 968dfb3..b46bd5a 100644 --- a/plugins/modules/gcp_container_cluster.py +++ b/plugins/modules/gcp_container_cluster.py @@ -628,6 +628,11 @@ options: required: false type: dict suboptions: + datapath_provider: + description: + - The datapath provider selects the implementation of the Kubernetes networking model for service resolution and network policy enforcement. + required: false + type: str enable_intra_node_visibility: description: - Whether Intra-node visibility is enabled for this cluster. This makes same @@ -1572,7 +1577,7 @@ def main(): binary_authorization=dict(type='dict', options=dict(enabled=dict(type='bool'))), release_channel=dict(type='dict', options=dict(channel=dict(type='str'))), shielded_nodes=dict(type='dict', options=dict(enabled=dict(type='bool'))), - network_config=dict(type='dict', options=dict(enable_intra_node_visibility=dict(type='bool'), default_snat_status=dict(type='bool'))), + network_config=dict(type='dict', options=dict(enable_intra_node_visibility=dict(type='bool'), default_snat_status=dict(type='bool'), datapath_provider=dict(type='str'))), enable_kubernetes_alpha=dict(type='bool'), location=dict(required=True, type='str', aliases=['zone']), kubectl_path=dict(type='str'), @@ -2422,12 +2427,12 @@ class ClusterNetworkconfig(object): def to_request(self): return remove_nones_from_dict( - {u'enableIntraNodeVisibility': self.request.get('enable_intra_node_visibility'), u'defaultSnatStatus': self.request.get('default_snat_status')} + {u'enableIntraNodeVisibility': self.request.get('enable_intra_node_visibility'), u'defaultSnatStatus': self.request.get('default_snat_status'), u'datapathProvider': self.request.get('datapath_provider')} ) def from_response(self): return remove_nones_from_dict( - {u'enableIntraNodeVisibility': self.request.get(u'enableIntraNodeVisibility'), u'defaultSnatStatus': self.request.get(u'defaultSnatStatus')} + {u'enableIntraNodeVisibility': self.request.get(u'enableIntraNodeVisibility'), u'defaultSnatStatus': self.request.get(u'defaultSnatStatus'), u'datapathProvider': self.request.get('datapath_provider') } )