-
-
Notifications
You must be signed in to change notification settings - Fork 337
feat!: add custom egress rules to worker security groups #1222
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
feat!: add custom egress rules to worker security groups #1222
Conversation
Hey @ikarlashov! 👋 Thank you for your contribution to the project. Please refer to the contribution rules for a quick overview of the process. Make sure that this PR clearly explains:
With submitting this PR you confirm that you hold the rights of the code added and agree that it will published under this LICENSE. The following ChatOps commands are supported:
Simply add a comment with the command in the first line. If you need to pass more information, separate it with a blank line from the command. This message was generated automatically. You are welcome to improve it. |
…Don't provision docker-machine security group when docker-autoscaler is used. Signed-off-by: Yevgen Karlashov <[email protected]>
b2e2ef5
to
bfa1b36
Compare
Signed-off-by: Yevgen Karlashov <[email protected]>
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.
Thanks for your work to improve this module. I noticed the major change, but I think we can go on as it is easy to handle for the users.
Signed-off-by: Yevgen Karlashov <[email protected]>
Signed-off-by: Yevgen Karlashov <[email protected]>
…r manager and Runner workers ASGs Signed-off-by: Yevgen Karlashov <[email protected]>
…cker-autoscaler workers' ASG Signed-off-by: Yevgen Karlashov <[email protected]>
Signed-off-by: Yevgen Karlashov <[email protected]>
Signed-off-by: Yevgen Karlashov <[email protected]>
Signed-off-by: Yevgen Karlashov <[email protected]>
It would be nice to allow traffic within runner-manager ASG and Docker-autoscaler workers ASG. Basically add this to
But if I add it, terraform doesn't detect any changes for runner's SG. |
Signed-off-by: Yevgen Karlashov <[email protected]>
Perhaps it is already in place? |
…ler SG rules Signed-off-by: Yevgen Karlashov <[email protected]>
Signed-off-by: Yevgen Karlashov <[email protected]>
Signed-off-by: Yevgen Karlashov <[email protected]>
Signed-off-by: Yevgen Karlashov <[email protected]>
Signed-off-by: Yevgen Karlashov <[email protected]>
Signed-off-by: Yevgen Karlashov <[email protected]>
Signed-off-by: Yevgen Karlashov <[email protected]>
Signed-off-by: Yevgen Karlashov <[email protected]>
Signed-off-by: Yevgen Karlashov <[email protected]>
Did a refactoring and notice that we also have |
Verification
|
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.
Looks good to me.
I'd like to test this with my current setup before merging it. |
…docker_autoscaler
│ protocols and specific ports. Please specify each protocol and port range combination individually, or all protocols and no port range.
Checked with docker+machine.
@ikarlashov Could you please have a look at my commits? |
🤖 I have created a release *beep* *boop* --- ## [9.0.0](8.1.0...9.0.0) (2025-02-09) ### ⚠ BREAKING CHANGES * remove declaration of unused variables for docker-autoscaler setup ([#1223](#1223)) * add custom egress rules to worker security groups ([#1222](#1222)) ### Features * add custom egress rules to worker security groups ([#1222](#1222)) ([a197e4f](a197e4f)) * enabled usage of private key with docker autoscaler ([#1232](#1232)) ([95c7ea6](95c7ea6)) ### Miscellaneous Chores * remove declaration of unused variables for docker-autoscaler setup ([#1223](#1223)) ([41058c8](41058c8)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --------- Co-authored-by: cattle-ops-releaser-2[bot] <134548870+cattle-ops-releaser-2[bot]@users.noreply.github.com> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Matthias Kay <[email protected]>
Hello, my setup is using I think specifying the machine type would be better because now Terraform is trying to create egress rules for a The only way to make the module work is to explicitly give an empty Please correct me if I'm wrong. |
@Alexandre-Orisha Perfectly right! Fixed in 9.0.1 |
Add custom egress rules to docker-autoscaler security group and remove condition to provision unused docker-machine security group.
Description
var.runner_worker_docker_autoscaler_asg
becomes bulky and hard to read. Considering the complexity of the ingress rules structure, it makes sense to create a separate variablevar.runner_worker_docker_autoscaler_ingress_rules
for ingress rules. This way we will follow variable convention for existing security group rules variables, i.e.var.runner_worker_docker_machine_extra_egress_rules
. In the result of the change:var.runner_worker_docker_autoscaler_asg.sg_ingresses
is removed and its content should be moved tovar.runner_worker_ingress_rules
.var.runner_ingress_rules
to manage Ingress rules for runner-manager security group.var.runner_networking_egress_rules
has migrated tovar.runner_egress_rules
with a new spec.Migrations required
var.runner_worker_docker_autoscaler_asg.sg_ingresses
tovar.runner_worker_ingress_rules
.var.runner_networking_egress_rules
migrated tovar.runner_manager_egress_rules
with a new spec.var.runner_worker_docker_machine_extra_egress_rules
tovar.runner_worker_egress_rules
. In case you used multiple cidr_blocks, ... you have to create multiple rules.Attention: The default value for
var.runner_worker_docker_machine_extra_egress_rules
allowing all egress traffic has been replaced by a rule allowing traffic to port 22/443 only. Don't forget to add the rules you need tovar.runner_worker_egress_rules
.Attention: Due to the resource replacement you might see inconsistencies and disappearing security group rules. In that case delete all rules from the Runner and Runner Workers and apply the module again.
Sample egress rule: