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 new fields to aws.autoscaling.group #3681

Merged
merged 2 commits into from
Apr 1, 2024
Merged

Conversation

tas50
Copy link
Member

@tas50 tas50 commented Mar 30, 2024

Add new fields for checking on autoscaling groups.

  • Add min/max to the defaults
  • Add instances
  • Add capacityRebalance
  • Add defaultInstanceWarmup

The core bit of value here is the instances. We're going to need these to go from EKS cluster -> EKS nodegroup -> Nodes. EKS node groups use autoscaling groups so with this we can get cluster nodes now:

cnquery> aws.autoscaling.groups[15]{*}
aws.autoscaling.groups[15]: {
  instances: [
    0: aws.ec2.instance instanceId="i-12345" region="us-west-2" state="running" instanceType="t3.nano" architecture="x86_64" platformDetails="Linux/UNIX"
  ]
  desiredCapacity: 1
  capacityRebalance: true
  availabilityZones: [
    0: "us-west-2a"
    1: "us-west-2b"
    2: "us-west-2c"
    3: "us-west-2d"
  ]
  tags: {
    eks:cluster-name: "tim_test"
    eks:nodegroup-name: "high_cpu"
    k8s.io/cluster-autoscaler/enabled: "true"
    k8s.io/cluster-autoscaler/tim_test: "owned"
    kubernetes.io/cluster/tim_test: "owned"
  }
  loadBalancerNames: []
  createdAt: 2024-03-29 10:49:34.821 -0700 PDT
  healthCheckType: "EC2"
  maxInstanceLifetime: 0
  defaultInstanceWarmup: 0
  launchConfigurationName: null
  healthCheckGracePeriod: 15
  defaultCooldown: 300
  maxSize: 1
  name: "eks-high_cpu-b6c745aa-49c7-bc5c-67f0-12345"
  region: "us-west-2"
  arn: "arn:aws:autoscaling:us-west-2:12345:autoScalingGroup:5d3e8910-148c-4867-a73a-12345:autoScalingGroupName/eks-high_cpu-b6c745aa-49c7-bc5c-67f0-12345"
  minSize: 1
}

It's helpful to know where the instances are going to go.

Signed-off-by: Tim Smith <[email protected]>
Copy link
Contributor

github-actions bot commented Mar 30, 2024

Test Results

2 960 tests  ±0   2 959 ✅ ±0   1m 26s ⏱️ ±0s
  327 suites ±0       1 💤 ±0 
   23 files   ±0       0 ❌ ±0 

Results for commit 2b7521d. ± Comparison against base commit 9006248.

♻️ This comment has been updated with latest results.

instances is the important one here as it allows us to actually see what
systems are running in the group which we need for EKS node groups

Signed-off-by: Tim Smith <[email protected]>
@tas50 tas50 force-pushed the tas50/aws_autoscaling branch from 53cc07b to 2b7521d Compare March 30, 2024 06:12
@tas50 tas50 changed the title Add availability zones to aws autoscaling group Add new fields to aws.autoscaling.group Mar 30, 2024
Copy link
Contributor

@vjeffrey vjeffrey left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

works wonderfully, thank you!

@vjeffrey vjeffrey merged commit 081fa7f into main Apr 1, 2024
15 checks passed
@vjeffrey vjeffrey deleted the tas50/aws_autoscaling branch April 1, 2024 16:57
@github-actions github-actions bot locked and limited conversation to collaborators Apr 1, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants