Skip to content

Enable tiers oss#4489

Open
radixo wants to merge 8 commits intotigera:masterfrom
radixo:enable-tiers-oss
Open

Enable tiers oss#4489
radixo wants to merge 8 commits intotigera:masterfrom
radixo:enable-tiers-oss

Conversation

@radixo
Copy link
Contributor

@radixo radixo commented Mar 3, 2026

Description

  • Enable calico-system tier for OSS
  • Translate k8s NPs used on OSS renders to CNPs

Release Note

TBD

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.

radixo added 2 commits March 3, 2026 00:45
* translate k8s NPs used on OSS to CNPs
radixo added 2 commits March 5, 2026 16:41
- TigeraComponentTierName -> CalicoTierName
- TigeraComponentPolicyPrefix -> CalicoComponentPolicyPrefix
- TigeraComponentDefaultDenyPolicyName -> CalicoComponentDefaultDenyPolicyName
if err != nil {
return nil, err
}
var policies []client.Object
Copy link
Member

Choose a reason for hiding this comment

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

I think there's a bug here. For OSS, IncludeEgressNetworkPolicy will always be false (it's gated on the enterprise license having EgressAccessControlFeature), so policies will be empty and no CNP gets rendered for Guardian at all.

Meanwhile, the old k8s NetworkPolicy was removed from the Guardian component and added to deprecatedObjects(). So OSS Guardian ends up with zero network policy — the old one is deleted and the new one is never created.

It looks like ossNetworkPolicy() inside guardianCalicoSystemPolicy was intended to cover the OSS case, but it's dead code because it's behind this gate.

I think the fix is to always call guardianCalicoSystemPolicy when the tier is available, and use IncludeEgressNetworkPolicy (or variant) to control just the egress rules within the policy, rather than gating the entire policy creation.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Actually that it is how it was before, this code it was the most confusing one, you can see that I treated on a way to leave the Entreprise how it was, and created a v3.NetworkPolicy for OSS. About the way that the Enterprise was creating the rule I warned Operator team.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants