Ethtool support for HCO

Change-Id: Ied5c05776e68625951b130b817966fb0777a6892
This commit is contained in:
esurlak 2021-04-12 12:24:41 -05:00
parent 5e346e7be4
commit 94ae103934
3 changed files with 29 additions and 0 deletions

View File

@ -0,0 +1,6 @@
#!/bin/bash
set -e
echo script name: ${BASH_SOURCE[0]}
eth=`which ethtool`
echo command: $eth $@
$eth $@

View File

@ -0,0 +1,19 @@
# In this example we are executing sample ethtool
# script on kubernetes host using exec config.
apiVersion: hostconfig.airshipit.org/v1alpha1
kind: HostConfig
metadata:
name: example-exec-ethtool
spec:
host_groups:
- name: "kubernetes.io/role"
values:
- "master"
- "worker"
config:
exec:
- name: ethtool.sh
args: "-h"
- name: ethtool.sh
args: "--version"

View File

@ -127,3 +127,7 @@ check_status example7 '[ "hostconfig-control-plane", "hostconfig-control-plane2"
# Executing sample sysctl and ulimit configuration on the kubernetes nodes
kubectl apply -f $AIRSHIP_HOSTCONFIG/demo_examples/example_sysctl_ulimit.yaml
check_status example8 '[ "hostconfig-control-plane", "hostconfig-control-plane2", "hostconfig-control-plane3" ]' false
# Executing sample ethtool commands on the kubernetes nodes
kubectl apply -f $AIRSHIP_HOSTCONFIG/demo_examples/example_ethtool.yaml
check_status example-exec-ethtool '[ "hostconfig-control-plane", "hostconfig-control-plane2", "hostconfig-control-plane3", "hostconfig-worker", "hostconfig-worker2" ]' false