Skip to content

Feature: override autoscaling ⚖️, chore: fix nbs pub key 🗝️ #27

Merged
alismx merged 3 commits intomainfrom
alis/nbs_pub_key_update
May 15, 2025
Merged

Feature: override autoscaling ⚖️, chore: fix nbs pub key 🗝️ #27
alismx merged 3 commits intomainfrom
alis/nbs_pub_key_update

Conversation

@alismx
Copy link
Copy Markdown
Collaborator

@alismx alismx commented May 6, 2025

Changes Proposed

  • Introduced a new variable “override_autoscaling” to customize autoscaling parameters for different services instead of hardcoding values.
  • Adjusted local configurations in _local.tf to use the override_autoscaling values for ECS service defaults (CPU, memory, min/max capacity, target utilization).
  • Updated autoscaling.tf and ecs.tf to reference the override_autoscaling values for scaling targets, capacity limits, and task definitions.
  • Removed the autoscaling attributes from the service_data variable, as these are now managed by the new autoscaling configuration.
  • Update the NBS pub key to fix auth by default.

Additional Information

  • The decision was made to introduce a central override_autoscaling configuration to simplify managing scaling parameters across multiple services.
  • Future work includes testing the new autoscaling configurations in various environments and further refining the defaults if necessary.

Testing

Replace the default public key for eCR Viewer authentication with the new one.
- Introduce new override_autoscaling variable for autoscaling parameters.
- Refactor service definitions and autoscaling resources to use the new config.
- Remove embedded fargate capacity values from service_data.
- Update README to document the change.
@alismx alismx force-pushed the alis/nbs_pub_key_update branch 3 times, most recently from beae09d to 5f60dc5 Compare May 15, 2025 16:46
@alismx alismx marked this pull request as ready for review May 15, 2025 17:09
…tings

• Replace manual null checks with try() in _local.tf for autoscaling values.
• Remove redundant fargate_* settings from service_data.
• Update ECS task and service definitions to pull cpu, memory, and desired_count from override_autoscaling.
• Add new architectural design sections to README.
@alismx alismx force-pushed the alis/nbs_pub_key_update branch from 5f60dc5 to ccfe5e7 Compare May 15, 2025 17:14
@alismx alismx changed the title fix: update eCR viewer authentication public key Feature: override autoscaling May 15, 2025
@alismx alismx changed the title Feature: override autoscaling Feature: override autoscaling ⚖️ May 15, 2025
Comment thread README.md
| <a name="input_dibbs_repo"></a> [dibbs\_repo](#input\_dibbs\_repo) | Name of the DIBBS repository | `string` | `"ghcr.io/cdcgov/dibbs-ecr-viewer"` | no |
| <a name="input_disable_ecr"></a> [disable\_ecr](#input\_disable\_ecr) | Flag to disable the aws ecr service for docker image storage, defaults to false | `bool` | `false` | no |
| <a name="input_ecr_viewer_auth_pub_key"></a> [ecr\_viewer\_auth\_pub\_key](#input\_ecr\_viewer\_auth\_pub\_key) | The public key used to validate the incoming authenication for the eCR Viewer. | `string` | `"-----BEGIN PUBLIC KEY-----\nMIICIjANBgkqhkiG9w0BAQEFAAOCAg8AMIICCgKCAgEAqjrH9PprQCB5dX15zYfd\nS6K2ezNi/ZOu8vKEhQuLqwHACy1iUt1Yyp2PZLIV7FVDgBHMMVWPVx3GJ2wEyaJw\nMHkv6XNpUpWLhbs0V1T7o/OZfEIqcNua07OEoBxX9vhKIHtaksWdoMyKRXQJz0js\noWpawfOWxETnLqGvybT4yvY2RJhquTXLcLu90L4LdvIkADIZshaOtAU/OwI5ATcb\nfE3ip15E6jIoUm7FAtfRiuncpI5l/LJPP6fvwf8QCbbUJBZklLqcUuf4qe/L/nIq\npIONb8KZFWPhnGeRZ9bwIcqYWt3LAAshQLSGEYl2PGXaqbkUD2XLETSKDjisxd0g\n9j8bIMPgBKi+dBYcmBZnR7DxJe+vEDDw8prHG/+HRy5fim/BcibTKnIl8PR5yqHa\nmWQo7N+xXhILdD9e33KLRgbg97+erHqvHlNMdwDhAfrBT+W6GCdPwp3cePPsbhsc\noGSHOUDhzyAujr0J8h5WmZDGUNWjGzWqubNZD8dBXB8x+9dDoWhfM82nw0pvAeKf\nwJodvn3Qo8/S5hxJ6HyGkUTANKN8IxWh/6R5biET5BuztZP6jfPEaOAnt6sq+C38\nhR9rUr59dP2BTlcJ19ZXobLwuJEa81S5BrcbDwYNOAzC8jl2EV1i4bQIwJJaY27X\nIynom6unaheZpS4DFIh2w9UCAwEAAQ==\n-----END PUBLIC KEY-----\n"` | no |
| <a name="input_ecr_viewer_auth_pub_key"></a> [ecr\_viewer\_auth\_pub\_key](#input\_ecr\_viewer\_auth\_pub\_key) | The public key used to validate the incoming authenication for the eCR Viewer. | `string` | `"-----BEGIN PUBLIC KEY-----\nMIICIjANBgkqhkiG9w0BAQEFAAOCAg8AMIICCgKCAgEAnlA1YmmbydxQdBh7DAq0\nwUfsjR25eWZOB995mHclT3C46oLat3YLu70akLfoMXd9YcJe0d4q3sP7tS1J4QDO\nIkfapvK3ClDJR2VUERTzR9yQ+1B1Sd+MSful/V3aP9L6wPRAJmsmziizUBz+X0oN\nWTkGP/xi0F/IlyBfh2sk89JKKmgXSFbgDTD7+8L5WeRY5koR0KfDJLBcyerrcIPW\n1FyD8RbkUH78yJXc+/ThXKBNpsDTvV0k/4zqLSADIEmhQFkW8oYOfF4ufBGSnGdZ\ngPoWbKHtlK+m1sFWMq0hAtJsNKsJQocPAEO2NIxRCX4k6X9HfvCYVniDI4OdVz0V\njTF+galQDAybgtYc9ZN8ROpePDVkCANHzniBJFOwzv2yekreqdX7M399uLB+ztDX\nIz2RpZbGkgspl4TWvvB+eN64DJykmExImIw1nFc/6AVd3jhKSnCrckpGV3XaF8lW\nWMA6au0RXjmRa4YxO/uQbFZeFkM7aQtQK/CxqdBfG0SACcIMwU2S7Kb5+c9Hs687\nLI8j7j0oVyCiAyJ44Mi70i4A2GedyM6kzdixTmszin+c4tT8mYjmEMpJle6GLBIa\naqEy3CVEqecFIo4ypfoo4GjTqvv/JjtxwBl1FPC+HzFkOjSoLbrDmn64NnQhXlC9\nkd+ONf43CmqDSTa3atSFq4sCAwEAAQ==\n-----END PUBLIC KEY-----\n"` | no |
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Changing the NBS key looks out of scope here. Just wanted to confirm that this was intentional. (Totally understand this is just a readme, but still worth a check to be sure!)

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

This key needs to be updated, too. This new key is also referenced in code. I'll make a note of it in the description and title.

@alismx alismx changed the title Feature: override autoscaling ⚖️ Feature: override autoscaling ⚖️, chore: fix nbs pub key May 15, 2025
@alismx alismx changed the title Feature: override autoscaling ⚖️, chore: fix nbs pub key Feature: override autoscaling ⚖️, chore: fix nbs pub key 🗝️ May 15, 2025
Copy link
Copy Markdown
Collaborator

@rin-skylight rin-skylight left a comment

Choose a reason for hiding this comment

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

🚢

@alismx alismx merged commit f047f74 into main May 15, 2025
2 checks passed
@alismx alismx deleted the alis/nbs_pub_key_update branch May 15, 2025 18:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants