Skip to content
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
2 changes: 1 addition & 1 deletion Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
PATH
remote: .
specs:
MovableInkAWS (2.11.4)
MovableInkAWS (2.11.5)
aws-sdk-athena (~> 1)
aws-sdk-autoscaling (~> 1)
aws-sdk-cloudwatch (~> 1)
Expand Down
2 changes: 1 addition & 1 deletion lib/movable_ink/aws/ec2.rb
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ def map_k8s_consul_endpoint(endpoint, role)
value: role
}
],
placement: { availability_zone: nil }
placement: { availability_zone: endpoint.Service.dig('Meta', 'external-k8s-topology-zone') }
Copy link

Copilot AI Dec 18, 2025

Choose a reason for hiding this comment

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

The node_meta filter on line 132 filters based on Node.Meta.availability_zone, but for kubernetes pods, the availability zone is stored in Service.Meta['external-k8s-topology-zone']. This means when availability_zone parameter is provided, the Consul query will filter out all kubernetes pods (since they don't have the availability_zone in Node.Meta), but the code will still try to map them and set the placement zone from Service.Meta. Consider either: 1) filtering kubernetes endpoints in application code after retrieval, or 2) handling kubernetes and EC2 endpoints separately with different queries.

Copilot uses AI. Check for mistakes.
})
end

Expand Down
2 changes: 1 addition & 1 deletion lib/movable_ink/version.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
module MovableInk
class AWS
VERSION = '2.11.4'
VERSION = '2.11.5'
end
end
3 changes: 2 additions & 1 deletion spec/ec2_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -418,6 +418,7 @@
"Meta": {
"external-source": "kubernetes",
"external-k8s-ns": "default",
"external-k8s-topology-zone": "us-east-1a",
}
}
}
Expand Down Expand Up @@ -484,7 +485,7 @@
expect(roles_tag[:value]).to eq('kubernetes-service-name')
expect(backend.instance_id).to eq(nil)
expect(backend.private_ip_address).to eq('10.0.0.1')
expect(backend.private_ip_address).to eq('10.0.0.1')
expect(backend.placement[:availability_zone]).to eq('us-east-1a')
end
end

Expand Down