Skip to content

Conversation

@skkra0
Copy link
Collaborator

@skkra0 skkra0 commented Jan 18, 2026

If .Values.anvilops.apps.netpol.createIngressNetworkPolicy is true and an allowlist of namespace labels is provided in .Values.anvilops.apps.netpol.allowedIngressMatchLabels, create network policies in tenant namespaces restricting ingress to namespaces with allowed labels and apps of the same app group.

  • Add documentation on setting allowedIngressMatchLabels
    • The network policy will block ingress from all namespaces that don't have an allowlisted label and aren't part of the app group. This could include many system services, such as ingress controllers, telemetry collectors, health checkers.

Rancher Project Isolation

  • When project isolation is enabled, Rancher creates network policies in each namespace that allow ingress from certain ipBlocks, the project that namespace belongs to, and the System project. In this case, it's sufficient to set allowedIngressMatchLabels to [].
  • Setting createIngressNetworkPolicy: true can still be useful in case an app group is split across projects.

@FluxCapacitor2 FluxCapacitor2 force-pushed the main branch 2 times, most recently from be4651d to b466543 Compare January 18, 2026 21:28
@skkra0 skkra0 marked this pull request as ready for review January 21, 2026 19:53
@skkra0 skkra0 requested a review from FluxCapacitor2 January 21, 2026 19:53
Copy link
Collaborator

@FluxCapacitor2 FluxCapacitor2 left a comment

Choose a reason for hiding this comment

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

Looks great! Tested creating an app & migrating an app on staging and they both work as intended.

When I was testing, I did find a two things about migrating that may be unintended:

  1. The image repository is deleted, so for apps that AnvilOps has built, the container will never start up again. We should either tell the user about this or keep images for migrated apps.
  2. AnvilOps-generated environment variables are kept (e.g. PORT, ANVILOPS_CLUSTER_HOSTNAME, ANVILOPS_APP_ID, etc.). This is probably good for stability, since someone might start relying on these, but it does mean we leave a trace when we stop managing the project.

This PR is good to merge and we can address these later.

@skkra0 skkra0 merged commit 5e52d1f into main Jan 22, 2026
1 check passed
@FluxCapacitor2 FluxCapacitor2 deleted the network-isolation branch January 22, 2026 18:02
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.

3 participants