Skip to content

Commit

Permalink
Remove Whereabouts installation (#5744)
Browse files Browse the repository at this point in the history
As we switched secondary network IPAM to Antrea native IPAM, Whereabouts
is no longer needed. So, this commit removes Whereabouts installation.
from the antrea-agent Helm charts and remove the Whereabouts CNI binary
from the antrea-agent Docker image.

Signed-off-by: Jianjun Shen <shenj@vmware.com>
  • Loading branch information
jianjuns authored Nov 28, 2023
1 parent ed80978 commit cf711c3
Show file tree
Hide file tree
Showing 13 changed files with 10 additions and 218 deletions.
1 change: 0 additions & 1 deletion build/charts/antrea/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,6 @@ Kubernetes: `>= 1.16.0-0`
| tunnelPort | int | `0` | TunnelPort is the destination port for UDP and TCP based tunnel protocols (Geneve, VXLAN, and STT). If zero, it will use the assigned IANA port for the protocol, i.e. 6081 for Geneve, 4789 for VXLAN, and 7471 for STT. |
| tunnelType | string | `"geneve"` | Tunnel protocol used for encapsulating traffic across Nodes. It must be one of "geneve", "vxlan", "gre", "stt". |
| webhooks.labelsMutator.enable | bool | `false` | Mutate all namespaces to add the "antrea.io/metadata.name" label. |
| whereabouts.enable | bool | `false` | Install and configure Whereabouts, for use by the antrea-agent. |
| wireGuard.port | int | `51820` | Port for WireGuard to send and receive traffic. |

----------------------------------------------
Expand Down
1 change: 1 addition & 0 deletions build/charts/antrea/templates/NOTES.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{{- include "validateValues" . }}
The Antrea CNI has been successfully installed

You are using version {{ .Chart.Version }}
Expand Down
6 changes: 6 additions & 0 deletions build/charts/antrea/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,9 @@
{{- define "antreaImage" -}}
{{- print .Values.image.repository ":" (include "antreaImageTag" .) -}}
{{- end -}}

{{- define "validateValues" -}}
{{- if (.Values.whereabouts).enable -}}
{{- fail "Whereabouts is no longer included with Antrea and whereabouts.enable must not be set" -}}
{{- end -}}
{{- end -}}
27 changes: 0 additions & 27 deletions build/charts/antrea/templates/agent/daemonset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -67,19 +67,6 @@ spec:
{{- end }}
serviceAccountName: antrea-agent
initContainers:
{{- if .Values.whereabouts.enable }}
- name: install-whereabouts-config
image: {{ include "antreaImage" . | quote }}
resources:
requests:
cpu: "100m"
command: ["install_whereabouts_config"]
volumeMounts:
- name: whereabouts-cni-conf
mountPath: /host/etc/cni/net.d/whereabouts.d
- name: whereabouts-secret
mountPath: /var/run/secrets/whereabouts
{{- end }}
{{- if eq .Values.trafficEncapMode "networkPolicyOnly" }}
containers:
{{- end }}
Expand Down Expand Up @@ -260,12 +247,6 @@ spec:
mountPropagation: HostToContainer
- name: xtables-lock
mountPath: /run/xtables.lock
{{- if .Values.whereabouts.enable }}
- name: whereabouts-cni-conf
mountPath: /host/etc/cni/net.d/whereabouts.d
- name: whereabouts-secret
mountPath: /var/run/secrets/whereabouts
{{- end }}
{{- with .Values.agent.antreaAgent.extraVolumeMounts }}
{{- toYaml . | trim | nindent 10 }}
{{- end }}
Expand Down Expand Up @@ -397,11 +378,3 @@ spec:
{{- with .Values.agent.extraVolumes }}
{{- toYaml . | trim | nindent 8 }}
{{- end }}
{{- if .Values.whereabouts.enable }}
- hostPath:
path: /host/etc/cni/net.d/whereabouts.d
name: whereabouts-cni-conf
- name: whereabouts-secret
secret:
secretName: whereabouts-cni-secret
{{- end }}
32 changes: 0 additions & 32 deletions build/charts/antrea/templates/whereabouts/clusterrole.yaml

This file was deleted.

16 changes: 0 additions & 16 deletions build/charts/antrea/templates/whereabouts/clusterrolebinding.yaml

This file was deleted.

12 changes: 0 additions & 12 deletions build/charts/antrea/templates/whereabouts/secret.yaml

This file was deleted.

9 changes: 0 additions & 9 deletions build/charts/antrea/templates/whereabouts/serviceaccount.yaml

This file was deleted.

4 changes: 0 additions & 4 deletions build/charts/antrea/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -393,10 +393,6 @@ webhooks:
# -- Global log verbosity switch for all Antrea components.
logVerbosity: 0

whereabouts:
# -- Install and configure Whereabouts, for use by the antrea-agent.
enable: false

# Configure Multicluster defaults for both Antrea Controller and Agent.
multicluster:
# -- Enable Antrea Multi-cluster Gateway to support cross-cluster traffic.
Expand Down
4 changes: 1 addition & 3 deletions build/images/base/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ ARG BUILD_TAG
FROM ubuntu:22.04 as cni-binaries

ARG CNI_BINARIES_VERSION
ARG WHEREABOUTS_VERSION=v0.6.1

RUN apt-get update && \
apt-get install -y --no-install-recommends wget ca-certificates
Expand All @@ -34,8 +33,7 @@ RUN set -eux; \
*) pluginsArch=''; echo >&2; echo >&2 "unsupported architecture '$dpkgArch'"; echo >&2 ; exit 1 ;; \
esac; \
mkdir -p /opt/cni/bin; \
wget -q -O - https://github.com/containernetworking/plugins/releases/download/$CNI_BINARIES_VERSION/cni-plugins-linux-${pluginsArch}-$CNI_BINARIES_VERSION.tgz | tar xz -C /opt/cni/bin $CNI_PLUGINS; \
wget -q -O /opt/cni/bin/whereabouts https://github.com/k8snetworkplumbingwg/whereabouts/releases/download/$WHEREABOUTS_VERSION/whereabouts-${pluginsArch} && chmod +x /opt/cni/bin/whereabouts
wget -q -O - https://github.com/containernetworking/plugins/releases/download/$CNI_BINARIES_VERSION/cni-plugins-linux-${pluginsArch}-$CNI_BINARIES_VERSION.tgz | tar xz -C /opt/cni/bin $CNI_PLUGINS

FROM antrea/openvswitch:${BUILD_TAG}

Expand Down
4 changes: 1 addition & 3 deletions build/images/base/Dockerfile.ubi
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ ARG BUILD_TAG
FROM ubuntu:22.04 as cni-binaries

ARG CNI_BINARIES_VERSION
ARG WHEREABOUTS_VERSION=v0.6.1

RUN apt-get update && \
apt-get install -y --no-install-recommends wget ca-certificates
Expand All @@ -34,8 +33,7 @@ RUN set -eux; \
*) pluginsArch=''; echo >&2; echo >&2 "unsupported architecture '$dpkgArch'"; echo >&2 ; exit 1 ;; \
esac; \
mkdir -p /opt/cni/bin; \
wget -q -O - https://github.com/containernetworking/plugins/releases/download/$CNI_BINARIES_VERSION/cni-plugins-linux-${pluginsArch}-$CNI_BINARIES_VERSION.tgz | tar xz -C /opt/cni/bin $CNI_PLUGINS; \
wget -q -O /opt/cni/bin/whereabouts https://github.com/k8snetworkplumbingwg/whereabouts/releases/download/$WHEREABOUTS_VERSION/whereabouts-${pluginsArch} && chmod +x /opt/cni/bin/whereabouts
wget -q -O - https://github.com/containernetworking/plugins/releases/download/$CNI_BINARIES_VERSION/cni-plugins-linux-${pluginsArch}-$CNI_BINARIES_VERSION.tgz | tar xz -C /opt/cni/bin $CNI_PLUGINS

FROM antrea/openvswitch-ubi:${BUILD_TAG}

Expand Down
100 changes: 0 additions & 100 deletions build/images/scripts/install_whereabouts_config

This file was deleted.

12 changes: 1 addition & 11 deletions hack/generate-manifest.sh
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ Generate a YAML manifest for Antrea using Helm and print it to stdout.
--hw-offload Generates a manifest with hw-offload enabled in the antrea-ovs container.
--sriov Generates a manifest which enables use of Kubelet API for SR-IOV device info.
--flexible-ipam Generates a manifest with flexible IPAM enabled.
--whereabouts Generates a manifest which enables whereabouts configuration for secondary network IPAM.
--help, -h Print this message and exit
--multicast Generates a manifest for multicast.
--multicast-interfaces Multicast interface names (default is empty)
Expand Down Expand Up @@ -78,7 +77,6 @@ SIMULATOR=false
CUSTOM_ADM_CONTROLLER=false
HW_OFFLOAD=false
SRIOV=false
WHEREABOUTS=false
FLEXIBLE_IPAM=false
MULTICAST=false
MULTICAST_INTERFACES=""
Expand Down Expand Up @@ -155,15 +153,11 @@ case $key in
--sriov)
SRIOV=true
shift
;;
;;
--flexible-ipam)
FLEXIBLE_IPAM=true
shift
;;
--whereabouts)
WHEREABOUTS=true
shift
;;
--multicast)
MULTICAST=true
shift
Expand Down Expand Up @@ -328,10 +322,6 @@ EOF
HELM_VALUES_FILES+=("$TMP_DIR/sriov.yml")
fi

if $WHEREABOUTS; then
HELM_VALUES+=("whereabouts.enable=true")
fi

if [ "$MODE" == "dev" ]; then
if [[ -z "$IMG_NAME" ]]; then
if $COVERAGE; then
Expand Down

0 comments on commit cf711c3

Please sign in to comment.