Skip to content

support network policies configuration#2299

Merged
AndrewChubatiuk merged 2 commits into
masterfrom
network-policies
Jul 21, 2026
Merged

support network policies configuration#2299
AndrewChubatiuk merged 2 commits into
masterfrom
network-policies

Conversation

@AndrewChubatiuk

@AndrewChubatiuk AndrewChubatiuk commented Jun 16, 2026

Copy link
Copy Markdown
Contributor

fixes VictoriaMetrics/helm-charts#2977


Summary by cubic

Adds first‑class NetworkPolicy support across all operator CRDs via an optional networkPolicy field so the operator can create, update, and clean up Kubernetes NetworkPolicies for component pods. Also improves VMRule patching by defaulting record and alert to empty strings for safer strategic merges.

  • New Features
    • Optional networkPolicy on VMSingle, VMAgent, VMAlert, VMAlertmanager, VMAuth, VLSingle, VLAgent, VTSingle, VMAnomaly, and cluster sub-components (Insert, Select, Storage, Balancer). The operator builds a namespaced NetworkPolicy using the CR’s selector labels, infers policyTypes from ingress/egress rules, reconciles changes, and removes orphaned policies. Addresses feature: add network policies to charts helm-charts#2977.
    • VMRule rules now support strategic-merge patches using record and alert as merge keys (both default to ""), enabling clean JSON/YAML patches.

Written for commit e304951. Summary will update on new commits.

Review in cubic

@AndrewChubatiuk AndrewChubatiuk changed the title Network policies support network policies Jun 16, 2026
@AndrewChubatiuk AndrewChubatiuk changed the title support network policies support network policies configuration Jun 16, 2026

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

No issues found across 47 files

Re-trigger cubic

@AndrewChubatiuk
AndrewChubatiuk force-pushed the network-policies branch 2 times, most recently from 2c3d50e to e304951 Compare June 16, 2026 11:18
@YuryHrytsuk

Copy link
Copy Markdown

Thanks for working on this @AndrewChubatiuk

@AndrewChubatiuk
AndrewChubatiuk force-pushed the network-policies branch 2 times, most recently from 6d36480 to e051f30 Compare July 18, 2026 05:38

@vrutkovs vrutkovs left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Needs RBAC update for operator - I don't think it can manage network policies by default?

@AndrewChubatiuk

Copy link
Copy Markdown
Contributor Author

updated RBAC

@AndrewChubatiuk
AndrewChubatiuk enabled auto-merge (squash) July 21, 2026 10:01
@AndrewChubatiuk
AndrewChubatiuk merged commit 7cd2aec into master Jul 21, 2026
7 of 9 checks passed
@AndrewChubatiuk
AndrewChubatiuk deleted the network-policies branch July 21, 2026 10:07
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.

feature: add network policies to charts

3 participants