Add NetworkPolicy to allow mediawiki → mariadb traffic (port 3306)#38
Merged
Add NetworkPolicy to allow mediawiki → mariadb traffic (port 3306)#38
Conversation
Contributor
🏷️ Version RC publiée
Installation pour testhelm repo update ifpen
helm install filesender-rc ifpen/filesender --version 3.6.2-rc.2Vérificationhelm search repo ifpen/filesender --versions --devel
|
… drop on port 3306 Co-authored-by: velghea <70569153+velghea@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] [Network policy mediawiki] Fix dropped traffic between mediawiki pod and mariaDB
Add NetworkPolicy to allow mediawiki → mariadb traffic (port 3306)
Mar 18, 2026
Contributor
|
pourquoi ajouter des network policiy ? par défaut, le namespace est ouvert. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Cilium was dropping egress TCP/3306 from the mediawiki pod to the mariadb pod despite both being in the same namespace, due to an implicit deny policy with no explicit allow rules in the chart.
Changes
values.yaml: AddnetworkPolicy.enabled: truetoggledeployment.yaml: Addapp.kubernetes.io/component: mediawikilabel to pod template, enabling NetworkPolicy selectors to distinguish app pods from mariadb pods (which already carrycomponent: mariadb)templates/networkpolicy.yaml(new): NetworkPolicy for the mediawiki pod — ingress on 80, egress to mariadb on 3306, egress DNS on 53templates/mariadb-networkpolicy.yaml(new): NetworkPolicy for the mariadb pod — ingress from mediawiki on 3306 only, egress DNS on 53README.md: DocumentnetworkPolicyparametersRendered output (internal MariaDB)
When using an external database (
mariadb.internal.enabled: false), the mariadb NetworkPolicy is skipped and the mediawiki egress rule opens port 3306 to all destinations.Original prompt
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.