aws / amazon-ecs-service-connect-agent

Amazon ECS Service Connect Agent
Apache License 2.0
27 stars 10 forks source link

Include static runtime flag into bootstrap metadata #44

Closed suniltheta closed 1 year ago

suniltheta commented 1 year ago

Summary

Include the static runtime config into bootstrap metadata, so that control plane can get feedback if any runtime config is overridden

Implementation details

Just call static runtime config generator again inside metadata generator

Testing

cd agent; make build

New tests cover the changes: yes

Description for the changelog

Include static runtime flag into bootstrap metadata

Licensing

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

ytsssun commented 1 year ago

Can you provide a bit more context on why we need this? Not quite getting what problem we are trying to solve here.

suniltheta commented 1 year ago

This will help get the information on Control plane side if any customer has overridden the default runtime flag.

Let's say in future we flip successful_active_health_check_uneject_host flag to be true by default on a particular Envoy image release. Then we would know if customer is explicitly setting false value.

Open for any suggestion that is much simpler. Other option is to read these env variable and include in metadata. We just have to make sure any future runtime override option provided will start with any of these Prefixes https://github.com/aws/amazon-ecs-service-connect-agent/blob/ee4dd364a9bbe0537ea0160cdee5da01ed1045e2/agent/config/agent_config.go#L277-L290

karanvasnani commented 1 year ago

We haven't been very consistent in naming the Environment variables. I have tried to split them into categories in the README and their function but it's only best effort. I would like to selectively pass the Environment variables in the metadata which can be useful in debugging but, we will need to avoid the added noise in the control plane logs.