k8s-helper-cli 0.2.4__tar.gz → 0.2.5__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {k8s_helper_cli-0.2.4 → k8s_helper_cli-0.2.5}/PKG-INFO +1 -1
- {k8s_helper_cli-0.2.4 → k8s_helper_cli-0.2.5}/pyproject.toml +1 -1
- {k8s_helper_cli-0.2.4 → k8s_helper_cli-0.2.5}/src/k8s_helper/__init__.py +1 -1
- {k8s_helper_cli-0.2.4 → k8s_helper_cli-0.2.5}/src/k8s_helper/cli.py +4 -1
- {k8s_helper_cli-0.2.4 → k8s_helper_cli-0.2.5}/src/k8s_helper/core.py +22 -14
- {k8s_helper_cli-0.2.4 → k8s_helper_cli-0.2.5}/src/k8s_helper_cli.egg-info/PKG-INFO +1 -1
- {k8s_helper_cli-0.2.4 → k8s_helper_cli-0.2.5}/LICENSE +0 -0
- {k8s_helper_cli-0.2.4 → k8s_helper_cli-0.2.5}/README.md +0 -0
- {k8s_helper_cli-0.2.4 → k8s_helper_cli-0.2.5}/setup.cfg +0 -0
- {k8s_helper_cli-0.2.4 → k8s_helper_cli-0.2.5}/src/k8s_helper/config.py +0 -0
- {k8s_helper_cli-0.2.4 → k8s_helper_cli-0.2.5}/src/k8s_helper/utils.py +0 -0
- {k8s_helper_cli-0.2.4 → k8s_helper_cli-0.2.5}/src/k8s_helper_cli.egg-info/SOURCES.txt +0 -0
- {k8s_helper_cli-0.2.4 → k8s_helper_cli-0.2.5}/src/k8s_helper_cli.egg-info/dependency_links.txt +0 -0
- {k8s_helper_cli-0.2.4 → k8s_helper_cli-0.2.5}/src/k8s_helper_cli.egg-info/entry_points.txt +0 -0
- {k8s_helper_cli-0.2.4 → k8s_helper_cli-0.2.5}/src/k8s_helper_cli.egg-info/requires.txt +0 -0
- {k8s_helper_cli-0.2.4 → k8s_helper_cli-0.2.5}/src/k8s_helper_cli.egg-info/top_level.txt +0 -0
- {k8s_helper_cli-0.2.4 → k8s_helper_cli-0.2.5}/tests/test_core.py +0 -0
- {k8s_helper_cli-0.2.4 → k8s_helper_cli-0.2.5}/tests/test_integration.py +0 -0
@@ -779,6 +779,7 @@ def create_eks_cluster(
|
|
779
779
|
ami_type=ami_type,
|
780
780
|
capacity_type=capacity_type,
|
781
781
|
scaling_config=scaling_config
|
782
|
+
# No SSH key for automatic creation
|
782
783
|
)
|
783
784
|
console.print(f"✅ Node group creation initiated: {nodegroup_name}")
|
784
785
|
console.print(f"📋 Node group ARN: {nodegroup_info['nodegroup_arn']}")
|
@@ -841,6 +842,7 @@ def create_nodegroup(
|
|
841
842
|
desired_size: int = typer.Option(2, "--desired-size", help="Desired number of nodes"),
|
842
843
|
ami_type: str = typer.Option("AL2_x86_64", "--ami-type", help="AMI type for nodes"),
|
843
844
|
capacity_type: str = typer.Option("ON_DEMAND", "--capacity-type", help="Capacity type: ON_DEMAND or SPOT"),
|
845
|
+
ssh_key: Optional[str] = typer.Option(None, "--ssh-key", help="EC2 SSH key name for remote access"),
|
844
846
|
wait: bool = typer.Option(True, "--wait/--no-wait", help="Wait for node group to be ready")
|
845
847
|
):
|
846
848
|
"""Create an EKS managed node group"""
|
@@ -892,7 +894,8 @@ def create_nodegroup(
|
|
892
894
|
instance_types=instance_type_list,
|
893
895
|
ami_type=ami_type,
|
894
896
|
capacity_type=capacity_type,
|
895
|
-
scaling_config=scaling_config
|
897
|
+
scaling_config=scaling_config,
|
898
|
+
ssh_key=ssh_key
|
896
899
|
)
|
897
900
|
|
898
901
|
console.print(f"✅ Node group creation initiated")
|
@@ -337,7 +337,8 @@ class EKSClient:
|
|
337
337
|
def create_nodegroup(self, cluster_name: str, nodegroup_name: str,
|
338
338
|
instance_types: List[str] = None, ami_type: str = "AL2_x86_64",
|
339
339
|
capacity_type: str = "ON_DEMAND", scaling_config: Dict = None,
|
340
|
-
subnets: List[str] = None, node_role_arn: str = None
|
340
|
+
subnets: List[str] = None, node_role_arn: str = None,
|
341
|
+
ssh_key: str = None) -> Dict:
|
341
342
|
"""Create an EKS managed node group
|
342
343
|
|
343
344
|
Args:
|
@@ -349,6 +350,7 @@ class EKSClient:
|
|
349
350
|
scaling_config: Scaling configuration
|
350
351
|
subnets: List of subnet IDs
|
351
352
|
node_role_arn: IAM role ARN for nodes
|
353
|
+
ssh_key: EC2 SSH key name for remote access (optional)
|
352
354
|
|
353
355
|
Returns:
|
354
356
|
Dict containing node group information
|
@@ -374,20 +376,26 @@ class EKSClient:
|
|
374
376
|
cluster_details = self.eks_client.describe_cluster(name=cluster_name)
|
375
377
|
subnets = cluster_details['cluster']['resourcesVpcConfig']['subnetIds']
|
376
378
|
|
377
|
-
#
|
378
|
-
|
379
|
-
clusterName
|
380
|
-
nodegroupName
|
381
|
-
scalingConfig
|
382
|
-
instanceTypes
|
383
|
-
amiType
|
384
|
-
capacityType
|
385
|
-
nodeRole
|
386
|
-
subnets
|
387
|
-
|
388
|
-
|
379
|
+
# Prepare node group creation parameters
|
380
|
+
nodegroup_params = {
|
381
|
+
'clusterName': cluster_name,
|
382
|
+
'nodegroupName': nodegroup_name,
|
383
|
+
'scalingConfig': scaling_config,
|
384
|
+
'instanceTypes': instance_types,
|
385
|
+
'amiType': ami_type,
|
386
|
+
'capacityType': capacity_type,
|
387
|
+
'nodeRole': node_role_arn,
|
388
|
+
'subnets': subnets
|
389
|
+
}
|
390
|
+
|
391
|
+
# Only add remoteAccess if SSH key is provided
|
392
|
+
if ssh_key:
|
393
|
+
nodegroup_params['remoteAccess'] = {
|
394
|
+
'ec2SshKey': ssh_key
|
389
395
|
}
|
390
|
-
|
396
|
+
|
397
|
+
# Create the node group
|
398
|
+
response = self.eks_client.create_nodegroup(**nodegroup_params)
|
391
399
|
|
392
400
|
return {
|
393
401
|
'nodegroup_name': nodegroup_name,
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{k8s_helper_cli-0.2.4 → k8s_helper_cli-0.2.5}/src/k8s_helper_cli.egg-info/dependency_links.txt
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|