Skip to content
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

Dynamically add network policy for apiserver egress with configured K8SServicEndpoint #3487

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

tmjd
Copy link
Member

@tmjd tmjd commented Sep 3, 2024

For Enterprise, where the operator creates and manages policy to allow components to function in the presence of default deny policy, it was found that there was not appropriate allow policy when the K8s apiserver is defined with a K8SServiceEndpoint. This PR add an Egress rule to allow the needed traffic.

Description

For PR author

  • Tests for change.
  • If changing pkg/apis/, run make gen-files
  • If changing versions, run make gen-versions

For PR reviewers

A note for code reviewers - all pull requests must have the following:

  • Milestone set according to targeted release.
  • Appropriate labels:
    • kind/bug if this is a bugfix.
    • kind/enhancement if this is a a new feature.
    • enterprise if this PR applies to Calico Enterprise only.

@tmjd tmjd added kind/bug Something isn't working kind/enhancement New feature or request release-note-required docs-not-required labels Sep 3, 2024
@tmjd tmjd requested a review from a team as a code owner September 3, 2024 18:33
@marvin-tigera marvin-tigera added this to the v1.36.0 milestone Sep 3, 2024
Protocol: &networkpolicy.TCPProtocol,
Destination: calicov3.EntityRule{
Ports: networkpolicy.Ports(1234),
Domains: []string{"k8shost"},
Copy link
Contributor

Choose a reason for hiding this comment

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

The test took me a bit by surprise since the host is (most) often an IP 😅

Copy link
Member Author

Choose a reason for hiding this comment

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

When using EKS it is a long AWS DNS name.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants