Skip to content

Commit

Permalink
Fix dns
Browse files Browse the repository at this point in the history
  • Loading branch information
nsklikas committed Apr 20, 2023
1 parent bfe6ecb commit c72be88
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/k8s_network_policies.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,10 +81,14 @@ def apply_ingress_policy(
metadata=ObjectMeta(name=name),
spec=NetworkPolicySpec(
podSelector=LabelSelector(
matchLabels={"app.kubernetes.io/name": self._charm.app.name}
matchLabels={
"app.kubernetes.io/name": self._charm.app.name,
"kubernetes.io/metadata.name": self._charm.model.name,
}
),
policyTypes=["Ingress"],
policyTypes=["Ingress", "Egress"],
ingress=ingress,
egress=[{}]
),
)

Expand Down

0 comments on commit c72be88

Please sign in to comment.