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

v1.13 Backports 2023-09-04 #27925

Merged
merged 17 commits into from
Sep 7, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
17 changes: 15 additions & 2 deletions .github/actions/cilium-config/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,12 @@ inputs:
host-fw:
description: 'Enable host firewall'
default: false
devices:
description: 'List of native devices to attach datapath programs'
default: ''
misc:
description: 'Misc helm rarely set by a user coma separated values'
default: ''
outputs:
config:
description: 'Cilium installation config'
Expand All @@ -63,15 +69,22 @@ runs:
--helm-set=hubble.relay.image.useDigest=false \
--helm-set=hubble.eventBufferCapacity=65535 \
--helm-set=bpf.monitorAggregation=none \
--helm-set=cluster.name=default \
--nodes-without-cilium=kind-worker3 \
--helm-set-string=kubeProxyReplacement=${{ inputs.kpr }}"
--helm-set-string=kubeProxyReplacement=${{ inputs.kpr }} \
--set='${{ inputs.misc }}'"

TUNNEL="--helm-set-string=tunnel=${{ inputs.tunnel }}"
if [ "${{ inputs.tunnel }}" == "disabled" ]; then
TUNNEL="--helm-set-string=tunnel=disabled --helm-set-string=autoDirectNodeRoutes=true --helm-set-string=ipv4NativeRoutingCIDR=10.244.0.0/16 --helm-set-string=tunnel=disabled"
TUNNEL="${TUNNEL} --helm-set-string=ipv6NativeRoutingCIDR=fd00:10:244::/56"
fi

DEVICES=""
if [ "${{ inputs.devices }}" != "" ]; then
DEVICES="--helm-set=devices='${{ inputs.devices }}'"
fi

LB_MODE=""
if [ "${{ inputs.lb-mode }}" != "" ]; then
LB_MODE="--helm-set-string=loadBalancer.mode=${{ inputs.lb-mode }}"
Expand Down Expand Up @@ -122,5 +135,5 @@ runs:
L7="--helm-set=l7Proxy=false"
fi

CONFIG="${DEFAULTS} ${TUNNEL} ${LB_MODE} ${ENDPOINT_ROUTES} ${IPV6} ${MASQ} ${EGRESS_GATEWAY} ${ENCRYPT} ${HOST_FW} ${LB_ACCELERATION} ${L7}"
CONFIG="${DEFAULTS} ${TUNNEL} ${DEVICES} ${LB_MODE} ${ENDPOINT_ROUTES} ${IPV6} ${MASQ} ${EGRESS_GATEWAY} ${ENCRYPT} ${HOST_FW} ${LB_ACCELERATION} ${L7}"
echo "config=${CONFIG}" >> $GITHUB_OUTPUT
2 changes: 1 addition & 1 deletion .github/workflows/conformance-aks.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ jobs:
--name ${{ env.name }}

- name: Wait for images to be available
timeout-minutes: 10
timeout-minutes: 30
shell: bash
run: |
for image in cilium-ci operator-azure-ci hubble-relay-ci ; do
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/conformance-aws-cni.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ jobs:
kubectl apply -f https://raw.githubusercontent.com/aws/amazon-vpc-cni-k8s/release-1.11/config/master/aws-k8s-cni.yaml

- name: Wait for images to be available
timeout-minutes: 10
timeout-minutes: 30
shell: bash
run: |
for image in cilium-ci operator-generic-ci hubble-relay-ci ; do
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/conformance-clustermesh.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -316,7 +316,7 @@ jobs:
kubectl --context ${{ env.contextName2 }} patch deployment -n kube-system coredns --patch="$COREDNS_PATCH"

- name: Wait for images to be available
timeout-minutes: 10
timeout-minutes: 30
shell: bash
run: |
for image in cilium-ci operator-generic-ci hubble-relay-ci clustermesh-apiserver-ci ; do
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/conformance-e2e.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -298,7 +298,7 @@ jobs:
fi

- name: Wait for images to be available
timeout-minutes: 10
timeout-minutes: 30
shell: bash
run: |
for image in cilium-ci operator-generic-ci hubble-relay-ci ; do
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/conformance-eks.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ jobs:
kubectl -n kube-system delete daemonset aws-node

- name: Wait for images to be available
timeout-minutes: 10
timeout-minutes: 30
shell: bash
run: |
for image in cilium-ci operator-aws-ci hubble-relay-ci ; do
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/conformance-externalworkloads.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,7 @@ jobs:
gcloud container clusters get-credentials ${{ env.clusterName }} --zone ${{ matrix.zone }}

- name: Wait for images to be available
timeout-minutes: 10
timeout-minutes: 30
shell: bash
run: |
for image in cilium-ci operator-generic-ci hubble-relay-ci clustermesh-apiserver-ci ; do
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/conformance-gke.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@ jobs:
gcloud container clusters get-credentials ${{ env.clusterName }}-${{ matrix.config.index }} --zone ${{ matrix.k8s.zone }}

- name: Wait for images to be available
timeout-minutes: 10
timeout-minutes: 30
shell: bash
run: |
for image in cilium-ci operator-generic-ci hubble-relay-ci ; do
Expand Down
170 changes: 49 additions & 121 deletions .github/workflows/tests-ipsec-upgrade.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -84,9 +84,6 @@ jobs:
kpr: 'disabled'
tunnel: 'disabled'
encryption: 'ipsec'
encryption-node: 'false'
debug: 'true'
test-flow-interrupts: 'true'
ipv6: 'false' # until https://github.com/cilium/cilium/issues/26944 resolved

- name: '2'
Expand All @@ -96,9 +93,7 @@ jobs:
kpr: 'disabled'
tunnel: 'disabled'
encryption: 'ipsec'
encryption-node: 'false'
endpoint-routes: 'true'
test-flow-interrupts: 'true'
ipv6: 'false' # until https://github.com/cilium/cilium/issues/26944 resolved

- name: '3'
Expand All @@ -108,9 +103,7 @@ jobs:
kpr: 'disabled'
tunnel: 'vxlan'
encryption: 'ipsec'
encryption-node: 'false'
endpoint-routes: 'false' # Due to https://github.com/cilium/cilium/pull/22333
test-flow-interrupts: 'true'
ipv6: 'false' # until https://github.com/cilium/cilium/issues/26944 resolved

timeout-minutes: 60
Expand All @@ -132,108 +125,46 @@ jobs:
else
SHA="${{ github.sha }}"
fi

# TODO(brb) move the settings derivation into a reusable GH workflow
CILIUM_STABLE_IMAGE_SETTINGS="--chart-directory=./cilium-${{ env.cilium_stable_version }}/install/kubernetes/cilium/ \
--helm-set=image.repository=quay.io/${{ env.QUAY_ORGANIZATION_DEV }}/cilium-ci \
--helm-set=image.useDigest=false \
--helm-set=image.tag=v${{ env.cilium_stable_version }} \
--helm-set=operator.image.repository=quay.io/${{ env.QUAY_ORGANIZATION_DEV }}/operator \
--helm-set=operator.image.suffix=-ci \
--helm-set=operator.image.tag=v${{ env.cilium_stable_version }} \
--helm-set=operator.image.useDigest=false \
--helm-set=hubble.relay.image.repository=quay.io/${{ env.QUAY_ORGANIZATION_DEV }}/hubble-relay-ci \
--helm-set=hubble.relay.image.tag=v${{ env.cilium_stable_version }}"
echo "cilium_stable_image_settings=${CILIUM_STABLE_IMAGE_SETTINGS}" >> $GITHUB_OUTPUT

CILIUM_MAIN_IMAGE_SETTINGS="--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=hubble.relay.image.repository=quay.io/${{ env.QUAY_ORGANIZATION_DEV }}/hubble-relay-ci \
--helm-set=hubble.relay.image.tag=${SHA}"
echo "cilium_main_image_settings=${CILIUM_MAIN_IMAGE_SETTINGS}" >> $GITHUB_OUTPUT

CILIUM_INSTALL_DEFAULTS="--wait \
--helm-set=debug.enabled=true \
--helm-set=cni.uninstall=false \
--helm-set=cluster.name=default \
--helm-set=hubble.eventBufferCapacity=65535 \
--helm-set=bpf.monitorAggregation=none \
--nodes-without-cilium=kind-worker3 \
--helm-set=bpfClockProbe=false \
--helm-set-string=kubeProxyReplacement=${{ matrix.kpr }}"

TUNNEL="--helm-set-string=tunnelProtocol=${{ matrix.tunnel }}"
if [ "${{ matrix.tunnel }}" == "disabled" ]; then
TUNNEL="--helm-set-string=routingMode=native --helm-set-string=autoDirectNodeRoutes=true --helm-set-string=ipv4NativeRoutingCIDR=10.244.0.0/16 --helm-set-string=tunnel=disabled"
TUNNEL="${TUNNEL} --helm-set-string=ipv6NativeRoutingCIDR=fd00:10:244::/56"
fi
LB_MODE=""
if [ "${{ matrix.lb-mode }}" != "" ]; then
LB_MODE="--helm-set-string=loadBalancer.mode=${{ matrix.lb-mode }}"
fi
ENDPOINT_ROUTES=""
if [ "${{ matrix.endpoint-routes }}" == "true" ]; then
ENDPOINT_ROUTES="--helm-set-string=endpointRoutes.enabled=true"
fi
IPV6=""
if [ "${{ matrix.ipv6 }}" != "false" ]; then
IPV6="--helm-set=ipv6.enabled=true"
fi
MASQ=""
if [ "${{ matrix.kpr }}" == "true" ] || [ "${{ matrix.kpr }}" == "strict" ]; then
# BPF-masq requires KPR=true.
MASQ="--helm-set=bpf.masquerade=true"
if [ "${{ matrix.host-fw }}" == "true" ]; then
# BPF IPv6 masquerade not currently supported with host firewall - GH-26074
MASQ="${MASQ} --helm-set=enableIPv6Masquerade=false"
fi
fi
EGRESS_GATEWAY=""
if [ "${{ matrix.egress-gateway }}" == "true" ]; then
EGRESS_GATEWAY="--helm-set=egressGateway.enabled=true"
fi
LB_ACCELERATION=""
if [ "${{ matrix.lb-acceleration }}" != "" ]; then
LB_ACCELERATION="--helm-set=loadBalancer.acceleration=${{ matrix.lb-acceleration }}"
fi

ENCRYPT=""
if [ "${{ matrix.encryption }}" != "" ]; then
ENCRYPT="--helm-set=encryption.enabled=true --helm-set=encryption.type=${{ matrix.encryption }}"
if [ "${{ matrix.encryption-node }}" != "" ]; then
ENCRYPT+=" --helm-set=encryption.nodeEncryption=${{ matrix.encryption-node }}"
fi
fi

HOST_FW=""
if [ "${{ matrix.host-fw }}" == "true" ]; then
HOST_FW="--helm-set=hostFirewall.enabled=true"
fi

CONFIG="${CILIUM_INSTALL_DEFAULTS} ${TUNNEL} ${LB_MODE} ${ENDPOINT_ROUTES} ${IPV6} ${MASQ} ${EGRESS_GATEWAY} ${ENCRYPT} ${HOST_FW} ${LB_ACCELERATION}"
echo "cilium_install_defaults=${CONFIG}" >> $GITHUB_OUTPUT

JUNIT=""
for NAME in ${{ matrix.kube-proxy }} ${{ matrix.tunnel }} ${{ matrix.lb-mode }} ${{ matrix.encryption }} ${{ matrix.endpoint-routes }}; do
if [[ "${NAME}" != "" ]] && [[ "${NAME}" != "disabled" ]] && [[ "${NAME}" != "none" ]]; then
if [[ "${JUNIT}" != "" ]]; then
JUNIT+="-"
fi
if [[ "${NAME}" == "true" ]];then
NAME="endpoint-routes"
fi
JUNIT+="${NAME}"
fi
done
echo junit_type="${JUNIT}" >> $GITHUB_OUTPUT
echo sha=${SHA} >> $GITHUB_OUTPUT

- name: Derive stable Cilium installation config
id: cilium-stable-config
uses: ./.github/actions/cilium-config
with:
image-tag: v${{ env.cilium_stable_version }}
chart-dir: './cilium-${{ env.cilium_stable_version }}/install/kubernetes/cilium/'
tunnel: ${{ matrix.tunnel }}
endpoint-routes: ${{ matrix.endpoint-routes }}
ipv6: ${{ matrix.ipv6 }}
kpr: ${{ matrix.kpr }}
lb-mode: ${{ matrix.lb-mode }}
lb-acceleration: ${{ matrix.lb-acceleration }}
encryption: ${{ matrix.encryption }}
encryption-node: ${{ matrix.encryption-node }}
egress-gateway: ${{ matrix.egress-gateway }}
host-fw: ${{ matrix.host-fw }}
mutual-auth: false
misc: 'bpfClockProbe=false,cni.uninstall=false'

- name: Derive newest Cilium installation config
id: cilium-newest-config
uses: ./.github/actions/cilium-config
with:
image-tag: ${{ steps.vars.outputs.sha }}
chart-dir: './install/kubernetes/cilium'
tunnel: ${{ matrix.tunnel }}
endpoint-routes: ${{ matrix.endpoint-routes }}
ipv6: ${{ matrix.ipv6 }}
kpr: ${{ matrix.kpr }}
lb-mode: ${{ matrix.lb-mode }}
lb-acceleration: ${{ matrix.lb-acceleration }}
encryption: ${{ matrix.encryption }}
encryption-node: ${{ matrix.encryption-node }}
egress-gateway: ${{ matrix.egress-gateway }}
host-fw: ${{ matrix.host-fw }}
mutual-auth: false
misc: 'bpfClockProbe=false,cni.uninstall=false'

# Warning: since this is a privileged workflow, subsequent workflow job
# steps must take care not to execute untrusted code.
- name: Checkout pull request branch (NOT TRUSTED)
Expand Down Expand Up @@ -269,14 +200,6 @@ jobs:
cmd: |
git config --global --add safe.directory /host

- name: Wait for images to be available
timeout-minutes: 10
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: Setup K8s cluster (${{ matrix.name }})
uses: cilium/little-vm-helper@908ab1ff8a596a03cd5221a1f8602dc44c3f906d # v0.0.12
with:
Expand All @@ -296,6 +219,14 @@ jobs:

mkdir -p cilium-junits

- 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 ${{ env.cilium_stable_version }} (${{ matrix.name }})
uses: cilium/little-vm-helper@908ab1ff8a596a03cd5221a1f8602dc44c3f906d # v0.0.12
with:
Expand All @@ -304,8 +235,7 @@ jobs:
cd /host/

CILIUM_CLI_MODE=helm ./cilium-cli install \
${{ steps.vars.outputs.cilium_stable_image_settings }} \
${{ steps.vars.outputs.cilium_install_defaults }}
${{ steps.cilium-stable-config.outputs.config }}

./cilium-cli status --wait
kubectl get pods --all-namespaces -o wide
Expand Down Expand Up @@ -338,8 +268,7 @@ jobs:
cd /host/

CILIUM_CLI_MODE=helm ./cilium-cli upgrade \
${{ steps.vars.outputs.cilium_main_image_settings }} \
${{ steps.vars.outputs.cilium_install_defaults }}
${{ steps.cilium-newest-config.outputs.config }}

./cilium-cli status --wait
kubectl get pods --all-namespaces -o wide
Expand Down Expand Up @@ -374,8 +303,7 @@ jobs:
cd /host/

CILIUM_CLI_MODE=helm ./cilium-cli upgrade \
${{ steps.vars.outputs.cilium_stable_image_settings }} \
${{ steps.vars.outputs.cilium_install_defaults }}
${{ steps.cilium-stable-config.outputs.config }}

./cilium-cli status --wait
kubectl get pods --all-namespaces -o wide
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/tests-l4lb.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ jobs:
path: pull-request

- name: Wait for image to be available
timeout-minutes: 10
timeout-minutes: 30
shell: bash
run: |
until docker manifest inspect quay.io/${{ env.QUAY_ORGANIZATION_DEV }}/cilium-ci:${{ steps.vars.outputs.sha }} &> /dev/null; do sleep 45s; done
Expand Down
4 changes: 2 additions & 2 deletions Documentation/network/servicemesh/grpc.rst
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,14 @@ For this demo we will use `GCP's microservices demo app <https://github.com/Goog

.. code-block:: shell-session

$ kubectl apply -f https://raw.githubusercontent.com/GoogleCloudPlatform/microservices-demo/master/release/kubernetes-manifests.yaml
$ kubectl apply -f https://raw.githubusercontent.com/GoogleCloudPlatform/microservices-demo/main/release/kubernetes-manifests.yaml

Since gRPC is binary-encoded, you also need the proto definitions for the gRPC
services in order to make gRPC requests. Download this for the demo app:

.. code-block:: shell-session

$ curl -o demo.proto https://raw.githubusercontent.com/GoogleCloudPlatform/microservices-demo/master/pb/demo.proto
$ curl -o demo.proto https://raw.githubusercontent.com/GoogleCloudPlatform/microservices-demo/main/protos/demo.proto


Deploy GRPC Ingress
Expand Down
2 changes: 1 addition & 1 deletion Documentation/network/servicemesh/tls-termination.rst
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ Make HTTPS Requests
.. code-block:: shell-session

# Download demo.proto file if you have not done before
$ curl -o demo.proto https://raw.githubusercontent.com/GoogleCloudPlatform/microservices-demo/master/pb/demo.proto
$ curl -o demo.proto https://raw.githubusercontent.com/GoogleCloudPlatform/microservices-demo/main/protos/demo.proto
$ grpcurl -proto ./demo.proto -cacert minica.pem hipstershop.cilium.rocks:443 hipstershop.ProductCatalogService/ListProducts

.. group-tab:: Cert Manager
Expand Down