This commit is contained in:
2026-10-19 16:40:42 -04:00
parent 321f7d8c00
commit d038fe3bab
10 changed files with 411 additions and 46 deletions
+11 -3
View File
@@ -23,7 +23,8 @@ spec:
{% else %}
ingress: []
{% endif %}
{% if wikideck_network_policy_dns_to | length == 0 and (wikideck_offline or wikideck_network_policy_https_to | length == 0) %}
{% set public_egress = wikideck_peers | length > 0 and wikideck_network_policy_https_to | length > 0 and wikideck_network_policy_https_ports | length > 0 %}
{% if wikideck_network_policy_dns_to | length == 0 and not public_egress and (wikideck_peers | length == 0 or wikideck_network_policy_peer_egress | length == 0) %}
egress: []
{% else %}
egress:
@@ -35,10 +36,17 @@ spec:
- protocol: TCP
port: 53
{% endif %}
{% if not wikideck_offline and wikideck_network_policy_https_to | length > 0 %}
{% if public_egress %}
- to: {{ wikideck_network_policy_https_to | to_json }}
ports:
{% for port in wikideck_network_policy_https_ports %}
- protocol: TCP
port: 443
port: {{ port | int }}
{% endfor %}
{% endif %}
{% if wikideck_peers | length > 0 %}
{% for rule in wikideck_network_policy_peer_egress %}
- {{ rule | to_json }}
{% endfor %}
{% endif %}
{% endif %}