-
Notifications
You must be signed in to change notification settings - Fork 524
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
Merged
arnaldo2792
merged 5 commits into
bottlerocket-os:develop
from
arnaldo2792:ecs-settings-applier-remove
Apr 4, 2024
Merged
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
071efba
schnauzer: add negate_or_else template helper
arnaldo2792 b343702
schnauzer: add ecs_metadata_service_limits template helper
arnaldo2792 2b4d77a
ecs-agent: migrate all ECS settings to drop-ins
arnaldo2792 ec232f3
os: remove ecs-settings-applier
arnaldo2792 65b279e
migrations: add migrations needed to remove ECS settings applier
arnaldo2792 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
[required-extensions] | ||
autoscaling = "v1" | ||
container-registry = "v1" | ||
os = "v1" | ||
std = { version = "v1", helpers = ["default", "negate_or_else"] } | ||
ecs = { version = "v1", helpers = ["ecs_metadata_service_limits"] } | ||
+++ | ||
# Configurations set through the API; default values match the default values in the agent | ||
[Service] | ||
Environment=ECS_AWSVPC_BLOCK_IMDS="{{default "false" settings.ecs.awsvpc-block-imds}}" | ||
Environment=ECS_BACKEND_HOST="{{default "" settings.ecs.backend-host}}" | ||
Environment=ECS_CONTAINER_STOP_TIMEOUT="{{default "30s" settings.ecs.container-stop-timeout}}" | ||
Environment=ECS_CLUSTER="{{default "" settings.ecs.cluster}}" | ||
Environment=ECS_ENABLE_CONTAINER_METADATA="{{default "false" settings.ecs.enable-container-metadata}}" | ||
Environment=ECS_ENABLE_SPOT_INSTANCE_DRAINING="{{default "false" settings.enable-spot-instance-draining}}" | ||
Environment=ECS_ENGINE_TASK_CLEANUP_WAIT_DURATION="{{default "3h" settings.ecs.task-cleanup-wait}}" | ||
Environment=ECS_IMAGE_CLEANUP_INTERVAL="{{default "30m" settings.ecs.image-cleanup-wait}}" | ||
Environment=ECS_IMAGE_MINIMUM_CLEANUP_AGE="{{default "1h" settings.ecs.image-cleanup-age}}" | ||
Environment=ECS_IMAGE_PULL_BEHAVIOR="{{default "default" settings.ecs.image-pull-behavior}}" | ||
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}}" | ||
Environment=ECS_WARM_POOLS_CHECK="{{default "false" settings.autoscaling.should-wait}}" | ||
|
||
# Boolean configurations whose values are inverted in the API | ||
Environment=ECS_PRIVILEGED_DISABLED="{{negate_or_else true settings.ecs.allow-privileged-containers}}" | ||
Environment=ECS_DISABLE_IMAGE_CLEANUP="{{negate_or_else false settings.ecs.image-cleanup-enabled}}" | ||
|
||
Environment=ECS_INSTANCE_ATTRIBUTES='{ "bottlerocket.variant": "{{os.variant_id}}" | ||
{{~#if settings.ecs.instance-attributes~}} | ||
{{~#each settings.ecs.instance-attributes}} ,"{{@key}}": "{{this}}" {{~/each~}} | ||
{{~/if~}}}' | ||
|
||
{{#if settings.ecs.logging-drivers }} | ||
Environment=ECS_AVAILABLE_LOGGING_DRIVERS='[ | ||
{{~#each settings.ecs.logging-drivers~}} | ||
{{~#unless @first~}}, {{~/unless~}} | ||
"{{this}}" | ||
{{~/each~}}]' | ||
{{/if}} | ||
|
||
{{#if settings.container-registry.credentials~}} | ||
Environment=ECS_ENGINE_AUTH_TYPE=dockercfg | ||
|
||
Environment=ECS_ENGINE_AUTH_DATA='{ | ||
{{~#each settings.container-registry.credentials~}} | ||
{{~#unless @first~}},{{~/unless~}} | ||
{{~#if (eq registry "docker.io" )~}} | ||
"https://index.docker.io/v1/": | ||
{{~else~}} | ||
"{{registry}}": | ||
{{~/if~}} | ||
{"email": "." | ||
{{~#if auth~}},"auth": "{{{auth}}}"{{/if}} | ||
{{~#if username~}},"username": "{{{username}}}"{{/if}} | ||
{{~#if password~}},"password": "{{{password}}}"}{{/if}} | ||
{{~/each~}}}}' | ||
{{/if}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
[Service] | ||
# Path overrides | ||
Environment=ECS_AUDIT_LOGFILE="/var/log/ecs/audit.log" | ||
Environment=ECS_CNI_PLUGINS_PATH="/usr/libexec/amazon-ecs-agent" | ||
Environment=ECS_DATADIR="/var/lib/ecs/data" | ||
Environment=ECS_LOGFILE="/var/log/ecs/ecs-agent.log" | ||
# Default configurations | ||
Environment=ECS_ENABLE_AWSLOGS_EXECUTIONROLE_OVERRIDE="true" | ||
Environment=ECS_ENABLE_TASK_IAM_ROLE="true" | ||
Environment=ECS_ENABLE_TASK_IAM_ROLE_NETWORK_HOST="true" | ||
Environment=ECS_ENABLE_TASK_ENI="true" | ||
Environment=ECS_SELINUX_CAPABLE="true" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
[Service] | ||
Environment=ECS_ENABLE_GPU_SUPPORT="true" |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.: