Skip to content

Commit ea116a7

Browse files
committed
Allow public dns requests and imrpove calico config readme
1 parent 952b976 commit ea116a7

File tree

2 files changed

+24
-5
lines changed

2 files changed

+24
-5
lines changed

charts/adminer/templates/networkpolicy.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,3 +18,9 @@ spec:
1818
destination:
1919
ports:
2020
- 5432
21+
# allow dns requests to public dns servers
22+
- action: Allow
23+
protocol: UDP
24+
destination:
25+
ports:
26+
- 53

charts/calico-configuration/README.md

Lines changed: 18 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,31 @@
11
## How to add network policy (local deployment)
22

33
How to discover ports / networks that are used by application
4-
* enable and observe traffic via
5-
- https://docs.tigera.io/calico/3.30/observability/enable-whisker
6-
- https://docs.tigera.io/calico/3.30/observability/view-flow-logs
4+
* observe existing traffic (see `Debug network policies` below)
75
* add staged policies to make sure all cases are included https://docs.tigera.io/calico/3.30/network-policy/staged-network-policies
8-
* transform staged policies to "normal" policies
6+
- make sure deployed calico version supports it
7+
* based on observations, create a needed network policy
98

109
## Debug network policies
10+
11+
if calico version 3.30+ is installed
1112
* observe traffic and check `policies` field in whisker logs
1213
- https://docs.tigera.io/calico/3.30/observability/enable-whisker
1314
- https://docs.tigera.io/calico/3.30/observability/view-flow-logs
1415

15-
Warning: make sure that calico version being used support Whisker (first introduced in v3.30)
16+
if calico version <= 3.29
17+
* create network policy with action log
18+
```yaml
19+
apiVersion: projectcalico.org/v3
20+
kind: NetworkPolicy
21+
metadata:
22+
name: log ingress requests
23+
spec:
24+
selector: app == 'db'
25+
ingress:
26+
- action: Log
27+
```
28+
* apply policy and see logs via journalctl (you can grep with `calico-packet`)
1629

1730
## Known issues
1831

0 commit comments

Comments
 (0)