kubernetes-sigs / cluster-api-provider-aws

Kubernetes Cluster API Provider AWS provides consistent deployment and day 2 operations of "self-managed" and EKS Kubernetes clusters on AWS.
http://cluster-api-aws.sigs.k8s.io/
Apache License 2.0
643 stars 569 forks source link

Add conditions to AWSMachine #1739

Closed gab-satchi closed 4 years ago

gab-satchi commented 4 years ago

Describe the solution you'd like As a developer, I would like to see Conditions on an AWSMachine expressing the current state so that I could use that info for higher level objects (AWSCluster).

Anything else you would like to add: AWSMachine controller does the following at the infrastructure level:

Proposing to create the following conditions on the AWSMachine object

// InstanceReady reports on current status of the EC2 instance. Ready indicates the instance is in a Running state. 
// When set to false, severity can be a Warning if the instance state is pending, stopping, stopped
// When set to false, severity can be an Error if the instance state is shutting down, terminated or unknown. 
InstanceReady ConditionType = "InstanceReady"

// SecurityGroupsReady indicates the security groups are up to date on the AWSMachine. 
SecurityGroupsReady ConditionType = "SecurityGroupsReady"

// Only applicable to control plane machines. ELBAttached will report true when a control plane is successfully registered with an ELB
// When set to false, severity can be an Error if the subnet is not found or unavailable in the instance's AZ
ELBAttached ConditionType = "ELBAttached"

An aggregate Ready condition is also required to report the overall status of the AWSMachine.

Original Conditions CAEP

/kind feature

detiber commented 4 years ago

/priority important-soon /milestone v0.5.x

gab-satchi commented 4 years ago

/assign

gab-satchi commented 4 years ago

The PR for this is ready, just waiting for CAPI release. Can this fit into v0.5.5 release? @detiber