feat: networkPolicy.ingress.ambientMesh in all 30 charts, with a checked exception in the render test #144
No files matched your search
@@ -23,7 +23,7 @@ type: application
|
|||||||
# continuously, so a pod restart could pull a different image than the last one
|
# continuously, so a pod restart could pull a different image than the last one
|
||||||
# without anything being recorded anywhere. The dated tags are immutable, so the
|
# without anything being recorded anywhere. The dated tags are immutable, so the
|
||||||
# image is now pinned by the chart version like every other chart in this repo.
|
# image is now pinned by the chart version like every other chart in this repo.
|
||||||
version: 7.0.0+up2026.8.2.java25
|
version: 7.1.0+up2026.8.2.java25
|
||||||
appVersion: "2026.8.2-java25"
|
appVersion: "2026.8.2-java25"
|
||||||
|
|
||||||
maintainers:
|
maintainers:
|
||||||
|
|||||||
@@ -53,6 +53,11 @@ selects.
|
|||||||
{{- $np := .Values.networkPolicy }}
|
{{- $np := .Values.networkPolicy }}
|
||||||
{{- $ns := .Release.Namespace }}
|
{{- $ns := .Release.Namespace }}
|
||||||
{{- $allowedNs := $np.allowedNamespaces | default list }}
|
{{- $allowedNs := $np.allowedNamespaces | default list }}
|
||||||
|
{{- /* networkPolicy.ingress - the policy's INBOUND side, and not the same
|
||||||
|
thing as the top-level .Values.ingress (the Ingress object) - both match
|
||||||
|
a search for "ingress". */}}
|
||||||
|
{{- $npIngress := $np.ingress | default dict }}
|
||||||
|
{{- $ambientMesh := $npIngress.ambientMesh }}
|
||||||
apiVersion: networking.k8s.io/v1
|
apiVersion: networking.k8s.io/v1
|
||||||
kind: NetworkPolicy
|
kind: NetworkPolicy
|
||||||
metadata:
|
metadata:
|
||||||
@@ -92,6 +97,38 @@ spec:
|
|||||||
- ports:
|
- ports:
|
||||||
- protocol: TCP
|
- protocol: TCP
|
||||||
port: {{ .Values.server.port | int64 }}
|
port: {{ .Values.server.port | int64 }}
|
||||||
|
{{- if $ambientMesh }}
|
||||||
|
{{- /* networkPolicy.ingress.ambientMesh (Gitea #143). 15008/TCP is ztunnel's
|
||||||
|
HBONE tunnel, the port every inbound connection arrives on once the
|
||||||
|
namespace carries istio.io/dataplane-mode - ambient "does not and will
|
||||||
|
never bypass Kubernetes NetworkPolicy enforcement", so without it a pod
|
||||||
|
in the mesh is unreachable.
|
||||||
|
|
||||||
|
It is the one port here that is NOT a containerPort of the selected pod
|
||||||
|
spec: ztunnel terminates it, not the application. ci/run-networkpolicy-
|
||||||
|
test.sh holds a NAMED exception for exactly this number, gated on exactly
|
||||||
|
this value, and proves on a second render that it stays the only such
|
||||||
|
port and that it is absent while the value is false.
|
||||||
|
|
||||||
|
THE PORT HALF ONLY, and that is not an omission. Elsewhere this switch
|
||||||
|
also adds 169.254.7.127/32 as a probe source, because inside the mesh the
|
||||||
|
kubelet's probes are redirected away from the worker node's address.
|
||||||
|
This chart offers no networkPolicy.probeSources at all, so the rule
|
||||||
|
carrying the probe port is never restricted by source - and an
|
||||||
|
unrestricted rule needs no probe address. Measured in the render: three
|
||||||
|
exec probes, which put no packet on the network at all.
|
||||||
|
WHICH RULE IT JOINS:
|
||||||
|
the game-port rule, in BOTH of its branches. That rule is open when the
|
||||||
|
Service is a NodePort (players arrive from outside, already masqueraded)
|
||||||
|
and restricted to the namespace otherwise, and the two branches are
|
||||||
|
separate rules in this template - so the port is added twice, or it
|
||||||
|
would be missing from whichever branch a release happens to render.
|
||||||
|
NOT MEASURED: that 15008 alone suffices comes from Istio's
|
||||||
|
documentation. Measured on this cluster is only which listeners ztunnel
|
||||||
|
opens. Provable at the first namespace to join the mesh; none has. */}}
|
||||||
|
- protocol: TCP
|
||||||
|
port: 15008
|
||||||
|
{{- end }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- if not (eq .Values.server.service.type "NodePort") }}
|
{{- if not (eq .Values.server.service.type "NodePort") }}
|
||||||
{{- /*
|
{{- /*
|
||||||
@@ -107,6 +144,38 @@ spec:
|
|||||||
- ports:
|
- ports:
|
||||||
- protocol: TCP
|
- protocol: TCP
|
||||||
port: {{ .Values.server.port | int64 }}
|
port: {{ .Values.server.port | int64 }}
|
||||||
|
{{- if $ambientMesh }}
|
||||||
|
{{- /* networkPolicy.ingress.ambientMesh (Gitea #143). 15008/TCP is ztunnel's
|
||||||
|
HBONE tunnel, the port every inbound connection arrives on once the
|
||||||
|
namespace carries istio.io/dataplane-mode - ambient "does not and will
|
||||||
|
never bypass Kubernetes NetworkPolicy enforcement", so without it a pod
|
||||||
|
in the mesh is unreachable.
|
||||||
|
|
||||||
|
It is the one port here that is NOT a containerPort of the selected pod
|
||||||
|
spec: ztunnel terminates it, not the application. ci/run-networkpolicy-
|
||||||
|
test.sh holds a NAMED exception for exactly this number, gated on exactly
|
||||||
|
this value, and proves on a second render that it stays the only such
|
||||||
|
port and that it is absent while the value is false.
|
||||||
|
|
||||||
|
THE PORT HALF ONLY, and that is not an omission. Elsewhere this switch
|
||||||
|
also adds 169.254.7.127/32 as a probe source, because inside the mesh the
|
||||||
|
kubelet's probes are redirected away from the worker node's address.
|
||||||
|
This chart offers no networkPolicy.probeSources at all, so the rule
|
||||||
|
carrying the probe port is never restricted by source - and an
|
||||||
|
unrestricted rule needs no probe address. Measured in the render: three
|
||||||
|
exec probes, which put no packet on the network at all.
|
||||||
|
WHICH RULE IT JOINS:
|
||||||
|
the game-port rule, in BOTH of its branches. That rule is open when the
|
||||||
|
Service is a NodePort (players arrive from outside, already masqueraded)
|
||||||
|
and restricted to the namespace otherwise, and the two branches are
|
||||||
|
separate rules in this template - so the port is added twice, or it
|
||||||
|
would be missing from whichever branch a release happens to render.
|
||||||
|
NOT MEASURED: that 15008 alone suffices comes from Istio's
|
||||||
|
documentation. Measured on this cluster is only which listeners ztunnel
|
||||||
|
opens. Provable at the first namespace to join the mesh; none has. */}}
|
||||||
|
- protocol: TCP
|
||||||
|
port: 15008
|
||||||
|
{{- end }}
|
||||||
from:
|
from:
|
||||||
- namespaceSelector:
|
- namespaceSelector:
|
||||||
matchLabels:
|
matchLabels:
|
||||||
|
|||||||
@@ -24,6 +24,17 @@
|
|||||||
"type": "string"
|
"type": "string"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"ingress": {
|
||||||
|
"description": "The policy's INBOUND side. Three names here overlap as substrings and are not the same thing: the top-level ingress is the Ingress OBJECT this chart renders, networkPolicy.ingress is this block, and networkPolicy.ingressController is the SOURCE SELECTOR for the ingress controller's pods - a SIBLING of this block and no part of it.",
|
||||||
|
"type": ["object", "null"],
|
||||||
|
"additionalProperties": false,
|
||||||
|
"properties": {
|
||||||
|
"ambientMesh": {
|
||||||
|
"description": "Opens the pod for Istio's ambient mesh; off by default and additive, so the render is byte-identical while it is false. Renders 15008/TCP inbound - ztunnel's HBONE tunnel, which ambient explicitly does not let bypass NetworkPolicy enforcement - AND, where probeSources is non-empty, 169.254.7.127/32 as an additional probe source, because inside the mesh the kubelet's probes are redirected away from the worker node's address. The two halves are inseparable on purpose: whoever opens 15008 by hand has not added the probe address, and the first narrowed probeSources then drops every probe, so the pod never becomes Ready and the symptom reads as a broken application rather than as a policy. Unproven in operation: that 15008 alone suffices comes from Istio's documentation, and no namespace of this cluster carries istio.io/dataplane-mode yet.",
|
||||||
|
"type": ["boolean", "null"]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
"egress": {
|
"egress": {
|
||||||
"type": ["object", "null"],
|
"type": ["object", "null"],
|
||||||
"additionalProperties": false,
|
"additionalProperties": false,
|
||||||
|
|||||||
@@ -352,6 +352,42 @@ networkPolicy:
|
|||||||
# matches nothing and is silently ineffective. Note the granularity: an entry
|
# matches nothing and is silently ineffective. Note the granularity: an entry
|
||||||
# opens the port to EVERY pod in that namespace.
|
# opens the port to EVERY pod in that namespace.
|
||||||
allowedNamespaces: []
|
allowedNamespaces: []
|
||||||
|
|
||||||
|
# The policy's INBOUND side. Mind the three names that overlap as substrings,
|
||||||
|
# because a search for "ingress" matches all of them and they are different
|
||||||
|
# things:
|
||||||
|
#
|
||||||
|
# ingress (top level) the Ingress OBJECT this chart
|
||||||
|
# renders - host, TLS, className
|
||||||
|
# networkPolicy.ingress this block: what the policy lets IN
|
||||||
|
# networkPolicy.ingressController the SOURCE SELECTOR for the ingress
|
||||||
|
# controller's pods. A SIBLING of this block
|
||||||
|
# and NO PART OF IT, despite the name.
|
||||||
|
ingress:
|
||||||
|
# Opens the pod for Istio's ambient mesh (Gitea #143). OFF by default and
|
||||||
|
# additive: while it is false this chart renders byte for byte as it did
|
||||||
|
# before the value existed.
|
||||||
|
#
|
||||||
|
# It renders 15008/TCP inbound - ztunnel's HBONE tunnel. Every inbound mesh
|
||||||
|
# connection arrives on it, and ambient "does not and will never bypass
|
||||||
|
# Kubernetes NetworkPolicy enforcement", so without this port a pod whose
|
||||||
|
# namespace has joined the mesh is unreachable.
|
||||||
|
#
|
||||||
|
# ONE HALF SHORTER THAN ELSEWHERE, deliberately. In other charts this switch
|
||||||
|
# also adds 169.254.7.127/32 as a probe source, because inside the mesh the
|
||||||
|
# kubelet's probes are redirected away from the worker node's address. This
|
||||||
|
# chart has no networkPolicy.probeSources at all, so the rule carrying the
|
||||||
|
# probe port is never restricted by source - and an unrestricted rule needs
|
||||||
|
# no probe address. An ipBlock for one would match nothing while making the
|
||||||
|
# rule look like it did something, which is the kind of strict-looking empty
|
||||||
|
# rule ci/run-networkpolicy-test.sh exists to catch; that script ties the
|
||||||
|
# exemption to the absence of probeSources rather than to a chart name.
|
||||||
|
#
|
||||||
|
# NOT PROVEN: that 15008 alone is enough comes from Istio's documentation;
|
||||||
|
# measured on this cluster is only which listeners ztunnel opens, and no
|
||||||
|
# namespace carries istio.io/dataplane-mode yet.
|
||||||
|
ambientMesh: false
|
||||||
|
|
||||||
egress:
|
egress:
|
||||||
# Additional outbound TCP ports. DNS (UDP and TCP 53) is always allowed and
|
# Additional outbound TCP ports. DNS (UDP and TCP 53) is always allowed and
|
||||||
# has no switch - a knob whose only other setting breaks every name lookup
|
# has no switch - a knob whose only other setting breaks every name lookup
|
||||||
|
|||||||
Reference in new issue
Block a user