p2p
This commit is contained in:
@@ -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 %}
|
||||
|
||||
Reference in New Issue
Block a user