Skip to content

Commit f082f51

Browse files
committed
Allow default authorizations to work with native sidecars
Signed-off-by: TJ Miller <[email protected]>
1 parent 6cb451d commit f082f51

File tree

1 file changed

+6
-1
lines changed
  • policy-controller/k8s/index/src/inbound

1 file changed

+6
-1
lines changed

policy-controller/k8s/index/src/inbound/pod.rs

+6-1
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,12 @@ pub(crate) fn tcp_ports_by_name(spec: &k8s::PodSpec) -> HashMap<String, PortSet>
4343
/// Pod and the paths for which probes are expected.
4444
pub(crate) fn pod_http_probes(pod: &k8s::PodSpec) -> PortMap<BTreeSet<String>> {
4545
let mut probes = PortMap::<BTreeSet<String>>::default();
46-
for (port, path) in pod.containers.iter().flat_map(container_http_probe_paths) {
46+
for (port, path) in pod
47+
.containers
48+
.iter()
49+
.chain(pod.init_containers.iter().flatten())
50+
.flat_map(container_http_probe_paths)
51+
{
4752
probes.entry(port).or_default().insert(path);
4853
}
4954
probes

0 commit comments

Comments
 (0)