Skip to content

Add support for NetworkACLs for LB on VPC networks#69

Merged
nvazquez merged 16 commits into
mainfrom
support-acl
Jul 31, 2024
Merged

Add support for NetworkACLs for LB on VPC networks#69
nvazquez merged 16 commits into
mainfrom
support-acl

Conversation

@Pearl1594

@Pearl1594 Pearl1594 commented Jul 2, 2024

Copy link
Copy Markdown
Contributor

This adds support to create and delete Network ACLs as done for Isolated networks (where Firewall rules are added)

On cluster creation:

image

On deploying nginx

kubectl apply -f <nginx.yaml>
image

On deleting nginx

kubectl delete -f <nginx.yaml>
image

@Pearl1594

Copy link
Copy Markdown
Contributor Author

need to upload the image to apache docker repo - before it's merged

@Pearl1594
Pearl1594 marked this pull request as ready for review July 22, 2024 12:57
Comment thread cloudstack_loadbalancer.go Outdated
// create ACL rule
acl := lb.NetworkACL.NewCreateNetworkACLParams(protocol.CSProtocol())
acl.SetAclid(network.Aclid)
acl.SetAction("Allow")

@nvazquez nvazquez Jul 22, 2024

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Can you make these values parametrized? (action, cidr, trafficType) - it looks like you currently want them for adding the default ACL allow but it can be reused later if parameters are used

@Pearl1594 Pearl1594 Jul 22, 2024

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

ideally should not be required. Because, these rules correspond to the LB service created on Kubernetes side. So these would ideally be fixed to action: "allow" and traffictype: "Ingress"

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Ok, thanks

Comment thread cloudstack_loadbalancer.go
Comment thread cloudstack_loadbalancer.go Outdated

@weizhouapache weizhouapache left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

code lgtm

@nvazquez nvazquez left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Code LGTM, thanks @Pearl1594

// create ACL rule
acl := lb.NetworkACL.NewCreateNetworkACLParams(protocol.CSProtocol())
acl.SetAclid(network.Aclid)
acl.SetAction("Allow")

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Ok, thanks

@kiranchavala kiranchavala left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

@Pearl1594

This is not working on a vmware environment

It works fine on a Cloudstack +kvm environment

Let me know If i should create a separate issue(Cloudstack+vmware) to track it

@Pearl1594

Copy link
Copy Markdown
Contributor Author

@kiranchavala I don't think the issue is wrt to this PR, but in general there's an issue with vmware.

@kiranchavala kiranchavala left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM, Tested the cks deployment on a vpc network custom acl.

The rules were successfully added/removed for kubernetes deployments

@nvazquez

Copy link
Copy Markdown

LGTM - thanks @Pearl1594

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.

5 participants