-
Notifications
You must be signed in to change notification settings - Fork 519
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
Deprecate ECS settings applier #3834
Deprecate ECS settings applier #3834
Conversation
81f0b32
to
ff32437
Compare
(Forced push added unit tests) |
ff32437
to
bd1d34c
Compare
(forced push adds the migration and fixes the implementation of one of the schnauzer helpers) |
bd1d34c
to
0b24989
Compare
Forced push includes:
|
0b24989
to
b936f3f
Compare
(forced push includes rebase to resolve conflicts) |
b936f3f
to
ea39589
Compare
Forced push to address one comment about the |
Environment=ECS_LOGLEVEL="{{settings.ecs.loglevel}}" | ||
Environment=ECS_NUM_IMAGES_DELETE_PER_CYCLE="{{default 5 settings.ecs.image-cleanup-delete-per-cycle}}" | ||
Environment=ECS_RESERVED_MEMORY="{{default 0 settings.ecs.reserved-memory}}" | ||
Environment=ECS_TASK_METADATA_RPS_LIMIT="{{ecs_metadata_service_limits settings.ecs.metadata-service-rps settings.ecs.metadata-service-burst}}" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For consistency with the rest of the template, where the defaults are visible, you could pass the defaults here as well, e.g.:
Environment=ECS_TASK_METADATA_RPS_LIMIT="{{ecs_metadata_service_limits settings.ecs.metadata-service-rps settings.ecs.metadata-service-burst}}" | |
Environment=ECS_TASK_METADATA_RPS_LIMIT="{{ecs_metadata_service_limits 40 60 settings.ecs.metadata-service-rps settings.ecs.metadata-service-burst}}" |
ea39589
to
26cca1f
Compare
Forced push includes:
|
26cca1f
to
e61eedd
Compare
(Forced push includes a missing fix to rename |
This adds the new `negate_or_else` helper which takes a boolean value and applies a boolean not to it. Signed-off-by: Arnaldo Garcia Rincon <[email protected]>
This adds the `ecs_metadata_service_limits` template helper used to render properly formatted values for the `ECS_METADATA_SERVICE_LIMITS` configuration for the ECS agent. Signed-off-by: Arnaldo Garcia Rincon <[email protected]>
With this, all the API settings to configure the ECS agent are now created as systemd drop-in files. Two subpackages were created to modularize the configuration. Signed-off-by: Arnaldo Garcia Rincon <[email protected]>
Now that all the configurations are included in systemd drop-ins, this binary isn't needed Signed-off-by: Arnaldo Garcia Rincon <[email protected]>
Signed-off-by: Arnaldo Garcia Rincon <[email protected]>
e61eedd
to
65b279e
Compare
(Forced push to rebase onto develop) |
Issue number:
Closes #3621
Description of changes:
This deprecates the ECS settings applier and migrates all the ECS configurations to use systemd drop-ins.
The
ecs.config
template file was removed, and replaced with systemd drop-ins for theecs.service
. This will allow downstream builders consume the configurations and build upon them if needed. The new configuration files include:00-defaults.conf
: immutable configuration file with the default hard-coded configurations used for Bottlerocket10-base.conf
: mutable configuration file generated by the API server20-nvidia.conf
: immutable configuration file with the hard-coded configuration to enable NVIDIA supportWith this PR, the
ecs-agent-base
andecs-agent-nvidia
packages were created to pull down the correct configuration while building the variant. Variants were updated accordingly to use the respective file.In the new
ecs-base-conf
template file, most of the{{#if}}
statements were removed in favor of using helpers likedefault
. There are two ECS boolean configurations in the API system whose values are inverted:ECS_PRIVILEGED_DISABLED
->allow-privileged-containers
ECS_DISABLE_IMAGE_CLEANUP
->image-cleanup-enabled
I tried to use the native
not
helper to generate the correct values for the settings, e.g.{{not (default <setting>)}}
. However, thedefault
helper will transform theboolean
types tostring
when passed to thenot
helper. This results in thenot
helper always returningtrue
, since not-empty strings are considered "truthy". I added thenegate_or_else
handlebars helper, which will render the passed configuration or a default value.Testing done:
For aws-ecs-2:
ECS_AVAILABLE_LOGGING_DRIVERS
is a valid JSON string, and that the ECS agent parses itECS_ENABLE_CONTAINER_METADATA
ecs.config
andecs.config.json
exist on downgradeFor aws-ecs-1:
All the other tests are omitted since the configuration file and API definition are the same for both variants.
For aws-ecs-2-nvidia:
For aws-ecs-1-nvidia:
Terms of contribution:
By submitting this pull request, I agree that this contribution is dual-licensed under the terms of both the Apache License, version 2.0, and the MIT license.