Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save sridhargaddam/4408ca0ac9513910c6192910d1826677 to your computer and use it in GitHub Desktop.
Save sridhargaddam/4408ca0ac9513910c6192910d1826677 to your computer and use it in GitHub Desktop.
Spawn a DaemonSet pod to disable tx/rx offload on vxlan interfaces
# @sridhargaddam
# this script spawns a daemonSet pod in a k8s cluster to disable tx/rx offloading
# on vx-submariner interface created by Submariner route-agents
---
apiVersion: apps/v1
kind: DaemonSet
metadata:
name: disable-offload
namespace: submariner-operator
spec:
selector:
matchLabels:
app: disable-offload
template:
metadata:
labels:
app: disable-offload
spec:
tolerations:
- operator: Exists
containers:
- name: disable-offload
image: quay.io/sridhargaddam/netshoot:latest
imagePullPolicy: IfNotPresent
securityContext:
allowPrivilegeEscalation: true
capabilities:
add:
- net_admin
drop:
- all
privileged: true
readOnlyRootFilesystem: false
runAsNonRoot: false
command: ["/bin/sh", "-c"]
args:
- ethtool --offload vx-submariner rx off tx off;
ethtool --offload vxlan-tunnel rx off tx off;
sleep infinity
restartPolicy: Always
securityContext: {}
serviceAccount: submariner-routeagent
serviceAccountName: submariner-routeagent
hostNetwork: true
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment