k8s-helper-cli 0.2.4__tar.gz → 0.2.6__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.6}/PKG-INFO +1 -1
- {k8s_helper_cli-0.2.4 → k8s_helper_cli-0.2.6}/pyproject.toml +1 -1
- {k8s_helper_cli-0.2.4 → k8s_helper_cli-0.2.6}/src/k8s_helper/__init__.py +1 -1
- {k8s_helper_cli-0.2.4 → k8s_helper_cli-0.2.6}/src/k8s_helper/cli.py +10 -6
- {k8s_helper_cli-0.2.4 → k8s_helper_cli-0.2.6}/src/k8s_helper/core.py +22 -14
- {k8s_helper_cli-0.2.4 → k8s_helper_cli-0.2.6}/src/k8s_helper_cli.egg-info/PKG-INFO +1 -1
- {k8s_helper_cli-0.2.4 → k8s_helper_cli-0.2.6}/LICENSE +0 -0
- {k8s_helper_cli-0.2.4 → k8s_helper_cli-0.2.6}/README.md +0 -0
- {k8s_helper_cli-0.2.4 → k8s_helper_cli-0.2.6}/setup.cfg +0 -0
- {k8s_helper_cli-0.2.4 → k8s_helper_cli-0.2.6}/src/k8s_helper/config.py +0 -0
- {k8s_helper_cli-0.2.4 → k8s_helper_cli-0.2.6}/src/k8s_helper/utils.py +0 -0
- {k8s_helper_cli-0.2.4 → k8s_helper_cli-0.2.6}/src/k8s_helper_cli.egg-info/SOURCES.txt +0 -0
- {k8s_helper_cli-0.2.4 → k8s_helper_cli-0.2.6}/src/k8s_helper_cli.egg-info/dependency_links.txt +0 -0
- {k8s_helper_cli-0.2.4 → k8s_helper_cli-0.2.6}/src/k8s_helper_cli.egg-info/entry_points.txt +0 -0
- {k8s_helper_cli-0.2.4 → k8s_helper_cli-0.2.6}/src/k8s_helper_cli.egg-info/requires.txt +0 -0
- {k8s_helper_cli-0.2.4 → k8s_helper_cli-0.2.6}/src/k8s_helper_cli.egg-info/top_level.txt +0 -0
- {k8s_helper_cli-0.2.4 → k8s_helper_cli-0.2.6}/tests/test_core.py +0 -0
- {k8s_helper_cli-0.2.4 → k8s_helper_cli-0.2.6}/tests/test_integration.py +0 -0
@@ -779,16 +779,18 @@ 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']}")
|
785
786
|
|
786
787
|
console.print(f"⏳ Waiting for node group to become active...")
|
787
|
-
|
788
|
-
|
789
|
-
|
790
|
-
|
791
|
-
|
788
|
+
with console.status("Waiting for node group to be ready..."):
|
789
|
+
if eks_client.wait_for_nodegroup_active(name, nodegroup_name):
|
790
|
+
console.print("✅ Node group is now active!")
|
791
|
+
console.print("🎉 Cluster is ready with worker nodes!")
|
792
|
+
else:
|
793
|
+
console.print("❌ Timeout waiting for node group to become active")
|
792
794
|
except Exception as e:
|
793
795
|
console.print(f"❌ Failed to create node group: {e}")
|
794
796
|
|
@@ -841,6 +843,7 @@ def create_nodegroup(
|
|
841
843
|
desired_size: int = typer.Option(2, "--desired-size", help="Desired number of nodes"),
|
842
844
|
ami_type: str = typer.Option("AL2_x86_64", "--ami-type", help="AMI type for nodes"),
|
843
845
|
capacity_type: str = typer.Option("ON_DEMAND", "--capacity-type", help="Capacity type: ON_DEMAND or SPOT"),
|
846
|
+
ssh_key: Optional[str] = typer.Option(None, "--ssh-key", help="EC2 SSH key name for remote access"),
|
844
847
|
wait: bool = typer.Option(True, "--wait/--no-wait", help="Wait for node group to be ready")
|
845
848
|
):
|
846
849
|
"""Create an EKS managed node group"""
|
@@ -892,7 +895,8 @@ def create_nodegroup(
|
|
892
895
|
instance_types=instance_type_list,
|
893
896
|
ami_type=ami_type,
|
894
897
|
capacity_type=capacity_type,
|
895
|
-
scaling_config=scaling_config
|
898
|
+
scaling_config=scaling_config,
|
899
|
+
ssh_key=ssh_key
|
896
900
|
)
|
897
901
|
|
898
902
|
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.6}/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
|