Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add private_cluster parameters #133

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions plugins/modules/de.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,11 @@
- Creates a CDE endpoint (Load Balancer) in a publicly accessible subnet
type: bool
required: False
enable_private_network:
description:
- Create a fully private CDE instance
type: bool
required: False
loadbalancer_ips:
description:
- List of CIDRs allowed to access the load balancer.
Expand Down Expand Up @@ -346,6 +351,7 @@ def __init__(self, module):
self.maximum_spot_instances = self._get_param('maximum_spot_instances')
self.chart_value_overrides = self._get_param('chart_value_overrides')
self.enable_public_endpoint = self._get_param('enable_public_endpoint')
self.enable_private_network = self._get_param('enable_private_network')
self.enable_workload_analytics = self._get_param('enable_workload_analytics')
self.initial_instances = self._get_param('initial_instances')
self.initial_spot_instances = self._get_param('initial_spot_instances')
Expand Down Expand Up @@ -448,6 +454,7 @@ def _enable_service(self):
maximum_spot_instances=self.maximum_spot_instances,
chart_value_overrides=self.chart_value_overrides,
enable_public_endpoint=self.enable_public_endpoint,
enable_private_network=self.enable_private_network,
loadbalancer_allowlist=self.loadbalancer_ips,
enable_workload_analytics=self.enable_workload_analytics,
initial_instances=self.initial_instances,
Expand Down Expand Up @@ -502,6 +509,7 @@ def main():
maximum_spot_instances=dict(required=False, type='int', default=0),
chart_value_overrides=dict(required=False, type='list', default=None),
enable_public_endpoint=dict(required=False, type='bool', default=True),
enable_private_network=dict(required=False, type='bool', default=False),
loadbalancer_ips=dict(required=False, type='list', elements='str', default=None),
enable_workload_analytics=dict(required=False, type='bool', default=True),
initial_instances=dict(required=False, type='int', default=1),
Expand Down
11 changes: 11 additions & 0 deletions plugins/modules/df_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,14 @@
required: False
aliases:
- use_public_load_balancer
private_cluster:
description:
- Flag to specify if a private K8s cluster should be created.
type: bool
required: False
default: False
aliases:
- enable_private_cluster
loadbalancer_ip_ranges:
description: The IP ranges authorized to connect to the load balancer
type: list
Expand Down Expand Up @@ -295,6 +303,7 @@ def __init__(self, module):
self.nodes_min = self._get_param('nodes_min')
self.nodes_max = self._get_param('nodes_max')
self.public_loadbalancer = self._get_param('public_loadbalancer')
self.private_cluster = self._get_param('private_cluster')
self.lb_ip_ranges = self._get_param('loadbalancer_ip_ranges')
self.k8s_ip_ranges = self._get_param('k8s_ip_ranges')
self.cluster_subnets = self._get_param('cluster_subnets')
Expand Down Expand Up @@ -378,6 +387,7 @@ def process(self):
min_nodes=self.nodes_min,
max_nodes=self.nodes_max,
enable_public_ip=self.public_loadbalancer,
private_cluster=self.private_cluster,
lb_ips=self.lb_ip_ranges,
kube_ips=self.k8s_ip_ranges,
# tags=self.tags, # Currently overstrict blocking of values
Expand Down Expand Up @@ -472,6 +482,7 @@ def main():
nodes_min=dict(type='int', default=3, aliases=['min_k8s_node_count']),
nodes_max=dict(type='int', default=3, aliases=['max_k8s_node_count']),
public_loadbalancer=dict(type='bool', default=False, aliases=['use_public_load_balancer']),
private_cluster=dict(type='bool', default=False, aliases=['enable_private_cluster']),
loadbalancer_ip_ranges=dict(type='list', elements='str', default=None),
k8s_ip_ranges=dict(type='list', elements='str', default=None),
cluster_subnets=dict(type='list', elements='str', default=None),
Expand Down
12 changes: 12 additions & 0 deletions plugins/modules/ml.py
Original file line number Diff line number Diff line change
Expand Up @@ -272,6 +272,14 @@
default: False
aliases:
- enable_public_loadbalancer
private_cluster:
description:
- Flag to specify if a private K8s cluster should be created.
type: bool
required: False
default: False
aliases:
- enable_private_cluster
force:
description:
- Flag to force delete a workspace even if errors occur during deletion.
Expand Down Expand Up @@ -586,6 +594,7 @@ def __init__(self, module):
self.nfs_version = self._get_param('nfs_version')
self.ip_addresses = self._get_param('ip_addresses')
self.public_loadbalancer = self._get_param('public_loadbalancer')
self.private_cluster = self._get_param('private_cluster')
self.k8s_request = self._get_param('k8s_request')

self.force = self._get_param('force')
Expand Down Expand Up @@ -665,6 +674,7 @@ def process(self):
nfsVersion=self.nfs_version,
loadBalancerIPWhitelists=self.ip_addresses,
usePublicLoadBalancer=self.public_loadbalancer,
privateCluster=self.private_cluster,
provisionK8sRequest=self.k8s_request
)
if self.k8s_request and self.k8s_request['tags'] is not None:
Expand Down Expand Up @@ -775,6 +785,8 @@ def main():
'loadbalancer_access_ips']),
public_loadbalancer=dict(required=False, type='bool', default=False, aliases=[
'enable_public_loadbalancer']),
private_cluster=dict(required=False, type='bool', default=False, aliases=[
'enable_private_cluster']),
force=dict(required=False, type='bool',
default=False, aliases=['force_delete']),
storage=dict(required=False, type='bool',
Expand Down
Loading