Revision 00b7717d3564059b10ff3cdeca2290004b1f8e16 authored by Jarno Rajahalme on 08 June 2024, 11:13:30 UTC, committed by Jarno Rajahalme on 14 June 2024, 10:12:59 UTC
Clear proxy port on failure so that we'll try another random port next
time.

We have two failure cases for creating new redirects:

- syncronous, for DNS proxy. Simply zero the proxy port in the retry
  loop.

- asynchronous, for Envoy proxy. Clear proxy port state on revert
  callback.

Noticed the need for this change when accidentally trying to use port 1
for Envoy when developing another feature. In this case Envoy can't bind
the port, and all further tries were also trying the same port, as the
proxy port was not cleared on revert.

Signed-off-by: Jarno Rajahalme <jarno@isovalent.com>
1 parent b30a3a9
Raw File
install-runtime-deps.sh
#!/usr/bin/env bash

# Copyright Authors of Cilium
# SPDX-License-Identifier: Apache-2.0

set -o xtrace
set -o errexit
set -o pipefail
set -o nounset

packages=(
  # Bash completion for Cilium
  bash-completion
  # Additional misc runtime dependencies
  iproute2
  iptables
  ipset
  kmod
  ca-certificates
)

export DEBIAN_FRONTEND=noninteractive

apt-get update

# tzdata is one of the dependencies and a timezone must be set
# to avoid interactive prompt when it is being installed
ln -fs /usr/share/zoneinfo/UTC /etc/localtime

apt-get install -y --no-install-recommends "${packages[@]}"

apt-get purge --auto-remove
apt-get clean
rm -rf /var/lib/apt/lists/*
back to top