Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Proxy: Dedicated DaemonSet for Envoy Proxy #25081

Merged
merged 22 commits into from
May 12, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
356b740
envoy proxy: separate directory for envoy proxy sockets
mhofstetter Apr 12, 2023
7f7903b
envoy proxy: introduce configuration for starting Envoy in embedded mode
mhofstetter Apr 12, 2023
1f1399b
envoy proxy: envoy admin client refactoring
mhofstetter Apr 13, 2023
b3d5a3d
helm: add Cilium Envoy DaemonSet to Cilium Helm Chart
mhofstetter Apr 12, 2023
ab4fbd6
helm & envoy proxy: metrics listener as static resource for Envoy Dae…
mhofstetter Apr 17, 2023
d2c7156
envoy proxy: Envoy version check via admin interface during initializ…
mhofstetter Apr 17, 2023
a178916
helm: use /ready from Envoy admin iface for healthprobes on daemonset
mhofstetter Apr 17, 2023
f8059cf
helm: Adapt envoy log path for Envoy DaemonSet
mhofstetter Apr 17, 2023
21cecff
helm: Configurable Envoy log format
mhofstetter Apr 17, 2023
ee3324e
helm: Adapt envoy log level to Envoy DaemonSet
mhofstetter Apr 17, 2023
2f60c07
envoy proxy: move embedded envoy aspects into dedicated file
mhofstetter Apr 18, 2023
314e37b
envoy proxy: generate bootstrap.pb into /var/run/cilium/envoy
mhofstetter Apr 26, 2023
c53388f
bugtool: change socket path for envoy admin socket
mhofstetter Apr 14, 2023
bfa7aa6
ci: temporary GHA Conformance Kind test with envoy daemonset
mhofstetter Apr 24, 2023
c2b5701
status/cli: add envoy deployment mode to proxy status
mhofstetter Apr 27, 2023
7367bcb
envoy proxy: replace pseudo ip with envoy-admin in EnvoyAdminClient
mhofstetter Apr 28, 2023
81bf114
helm: deprecate proxy.prometheus in favor of envoy.prometheus
mhofstetter Apr 28, 2023
cb991f7
helm: decouple operator & envoy prometheus config from agent
mhofstetter Apr 28, 2023
4f1aae6
docs: document envoy as daemonset changes
mhofstetter May 1, 2023
ae58b8f
helm: use daemon.runPath for envoy socket paths
mhofstetter May 9, 2023
81bfd72
daemon: create envoy socket directory if missing at startup
mhofstetter May 10, 2023
dfc4a88
helm: span preflight.enabled condition over whole cilium configmap
mhofstetter May 10, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
141 changes: 141 additions & 0 deletions .github/workflows/conformance-kind-proxy-daemonset.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,141 @@
name: ConformanceKindEnvoyDaemonSet
sayboras marked this conversation as resolved.
Show resolved Hide resolved

# Any change in triggers needs to be reflected in the concurrency group.
on:
pull_request:
paths-ignore:
- 'Documentation/**'
- 'test/**'
push:
branches:
- main
- ft/main/**
paths-ignore:
- 'Documentation/**'
- 'test/**'

permissions: read-all

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.event.after }}
cancel-in-progress: true

env:
kind_version: v0.17.0
kind_config: .github/kind-config.yaml
# renovate: datasource=github-releases depName=cilium/cilium-cli
cilium_cli_version: v0.14.0

jobs:
installation-and-connectivity:
runs-on: ubuntu-latest
timeout-minutes: 45
steps:
- name: Checkout main branch to access local actions
uses: actions/checkout@24cb9080177205b6e8c946b17badbe402adc938f # v3.4.0
with:
ref: ${{ github.event.repository.default_branch }}
persist-credentials: false
- name: Set Environment Variables
uses: ./.github/actions/set-env-variables

- name: Set up job variables
id: vars
run: |
if [ ${{ github.event.pull_request }} ]; then
SHA=${{ github.event.pull_request.head.sha }}
else
SHA=${{ github.sha }}
fi

# Note: On Kind, we install Cilium with HostPort (portmap CNI chaining) enabled,
# to ensure coverage of that feature in cilium connectivity test
CILIUM_INSTALL_DEFAULTS="--chart-directory=install/kubernetes/cilium \
--helm-set=image.repository=quay.io/${{ env.QUAY_ORGANIZATION_DEV }}/cilium-ci \
--helm-set=image.useDigest=false \
--helm-set=image.tag=${SHA} \
--helm-set=operator.image.repository=quay.io/${{ env.QUAY_ORGANIZATION_DEV }}/operator \
--helm-set=operator.image.suffix=-ci \
--helm-set=operator.image.tag=${SHA} \
--helm-set=operator.image.useDigest=false \
--helm-set=clustermesh.apiserver.image.repository=quay.io/${{ env.QUAY_ORGANIZATION_DEV }}/clustermesh-apiserver-ci \
--helm-set=clustermesh.apiserver.image.tag=${SHA} \
--helm-set=clustermesh.apiserver.image.useDigest=false \
--helm-set hubble.relay.enabled=true \
--helm-set=hubble.relay.image.repository=quay.io/${{ env.QUAY_ORGANIZATION_DEV }}/hubble-relay-ci \
--helm-set=hubble.relay.image.tag=${SHA} \
--helm-set cni.chainingMode=portmap \
--helm-set loadBalancer.l7.backend=envoy \
--helm-set tls.secretsBackend=k8s \
--helm-set envoy.enabled=true \
--helm-set bpf.monitorAggregation="none" \
--wait=false \
--version="
CONNECTIVITY_TEST_DEFAULTS="--flow-validation=disabled --hubble=false --collect-sysdump-on-failure \
--external-target bing.com --external-cidr 8.0.0.0/8 --external-ip 8.8.8.8 --external-other-ip 8.8.4.4"
echo cilium_install_defaults=${CILIUM_INSTALL_DEFAULTS} >> $GITHUB_OUTPUT
echo connectivity_test_defaults=${CONNECTIVITY_TEST_DEFAULTS} >> $GITHUB_OUTPUT
echo sha=${SHA} >> $GITHUB_OUTPUT

- name: Install Cilium CLI
run: |
curl -sSL --remote-name-all https://github.com/cilium/cilium-cli/releases/download/${{ env.cilium_cli_version }}/cilium-linux-amd64.tar.gz{,.sha256sum}
sha256sum --check cilium-linux-amd64.tar.gz.sha256sum
sudo tar xzvfC cilium-linux-amd64.tar.gz /usr/local/bin
rm cilium-linux-amd64.tar.gz{,.sha256sum}
cilium version

- name: Checkout code
uses: actions/checkout@24cb9080177205b6e8c946b17badbe402adc938f # v3.4.0
with:
ref: ${{ steps.vars.outputs.sha }}
persist-credentials: false

- name: Create kind cluster
uses: helm/kind-action@d8ccf8fb623ce1bb360ae2f45f323d9d5c5e9f00 # v1.5.0
with:
version: ${{ env.kind_version }}
config: ${{ env.kind_config }}

- name: Wait for images to be available
timeout-minutes: 30
shell: bash
run: |
for image in cilium-ci operator-generic-ci hubble-relay-ci ; do
until docker manifest inspect quay.io/${{ env.QUAY_ORGANIZATION_DEV }}/$image:${{ steps.vars.outputs.sha }} &> /dev/null; do sleep 45s; done
done

- name: Install Cilium
run: |
CILIUM_CLI_MODE=helm cilium install ${{ steps.vars.outputs.cilium_install_defaults }}
jrajahalme marked this conversation as resolved.
Show resolved Hide resolved

- name: Wait for Cilium status to be ready
run: |
cilium status --wait
kubectl -n kube-system get pods

- name: Port forward Relay
run: |
cilium hubble port-forward&
sleep 10s
[[ $(pgrep -f "cilium.*hubble.*port-forward|kubectl.*port-forward.*hubble-relay" | wc -l) == 2 ]]

- name: Run connectivity test
run: |
cilium connectivity test ${{ steps.vars.outputs.connectivity_test_defaults }}

- name: Post-test information gathering
if: ${{ !success() }}
run: |
kubectl get pods --all-namespaces -o wide
cilium status
cilium sysdump --output-filename cilium-sysdump-final
shell: bash {0} # Disable default fail-fast behaviour so that all commands run independently

- name: Upload artifacts
if: ${{ !success() }}
uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce # v3.1.2
with:
name: cilium-sysdumps
path: cilium-sysdump-*.zip
retention-days: 5
1 change: 1 addition & 0 deletions Documentation/cmdref/cilium-agent.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

150 changes: 149 additions & 1 deletion Documentation/helm-values.rst

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Documentation/observability/metrics.rst
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ use ``operator.prometheus.enabled=true``.
--set operator.prometheus.enabled=true

The ports can be configured via ``prometheus.port``,
``proxy.prometheus.port``, or ``operator.prometheus.port`` respectively.
``envoy.prometheus.port``, or ``operator.prometheus.port`` respectively.
squeed marked this conversation as resolved.
Show resolved Hide resolved

When metrics are enabled, all Cilium components will have the following
annotations. They can be used to signal Prometheus whether to scrape metrics:
Expand Down
3 changes: 2 additions & 1 deletion Documentation/operations/system_requirements.rst
Original file line number Diff line number Diff line change
Expand Up @@ -419,14 +419,15 @@ Port Range / Protocol Description
6060/tcp cilium-agent pprof server (listening on 127.0.0.1)
6061/tcp cilium-operator pprof server (listening on 127.0.0.1)
6062/tcp Hubble Relay pprof server (listening on 127.0.0.1)
9878/tcp cilium-envoy health listener (listening on 127.0.0.1)
9879/tcp cilium-agent health status API (listening on 127.0.0.1 and/or ::1)
9890/tcp cilium-agent gops server (listening on 127.0.0.1)
9891/tcp operator gops server (listening on 127.0.0.1)
9892/tcp clustermesh-apiserver gops server (listening on 127.0.0.1)
9893/tcp Hubble Relay gops server (listening on 127.0.0.1)
9962/tcp cilium-agent Prometheus metrics
9963/tcp cilium-operator Prometheus metrics
9964/tcp cilium-proxy Prometheus metrics
9964/tcp cilium-envoy Prometheus metrics
51871/udp WireGuard encryption tunnel endpoint
======================== ==================================================================

Expand Down
2 changes: 2 additions & 0 deletions Documentation/operations/upgrade.rst
Original file line number Diff line number Diff line change
Expand Up @@ -410,6 +410,8 @@ Helm Options
* Values ``clustermesh.apiserver.tls.ca.cert`` and ``clustermesh.apiserver.tls.ca.key``
are deprecated in favor of ``tls.ca.cert`` and ``tls.ca.key`` respectively, and
will be removed in v1.15.
* Values ``proxy.prometheus.enabled`` and ``proxy.prometheus.port`` are deprecated in favor of
their ``envoy.prometheus.*`` counterparts.
mhofstetter marked this conversation as resolved.
Show resolved Hide resolved

.. _earlier_upgrade_notes:

Expand Down
2 changes: 1 addition & 1 deletion Makefile.defs
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ endif
ifneq ($(wildcard $(dir $(lastword $(MAKEFILE_LIST)))/images/cilium/Dockerfile),)
CILIUM_ENVOY_REF=$(shell sed -E -e 's/^FROM (--[^ ]* )*([^ ]*) as cilium-envoy/\2/p;d' < $(ROOT_DIR)/images/cilium/Dockerfile)
CILIUM_ENVOY_SHA=$(shell echo $(CILIUM_ENVOY_REF) | sed -E -e 's/[^/]*\/[^:]*:(.*-)?([^:@]*).*/\2/p;d')
GO_BUILD_LDFLAGS += -X "github.com/cilium/cilium/pkg/envoy.RequiredEnvoyVersionSHA=$(CILIUM_ENVOY_SHA)"
GO_BUILD_LDFLAGS += -X "github.com/cilium/cilium/pkg/proxy.requiredEnvoyVersionSHA=$(CILIUM_ENVOY_SHA)"
endif

# Use git only if in a Git repo, otherwise find the files from the file system
Expand Down