File tree Expand file tree Collapse file tree 1 file changed +26
-0
lines changed
Expand file tree Collapse file tree 1 file changed +26
-0
lines changed Original file line number Diff line number Diff line change 1+ #! /usr/bin/env bash
2+
3+ HERE=" $( dirname " $( readlink -f " ${0} " ) " ) "
4+ ROOT=" $( readlink -f " ${HERE} /../../../" ) "
5+
6+ # shellcheck source=scripts/migration/lib.sh
7+ source " ${ROOT} /scripts/migration/lib.sh"
8+
9+ update_falco_driver () {
10+ local -r cluster=" ${1} "
11+ local current_driver
12+ current_driver=" $( yq_dig " ${cluster} " ' .falco.driver.kind' ) "
13+
14+ if [[ " ${current_driver} " == " modern-bpf" ]] || [[ " ${current_driver} " == " kmod" ]]; then
15+ log_info " Updating falco driver from ${current_driver} to modern_ebpf in ${cluster} -config..."
16+ yq_add " ${cluster} " ' .falco.driver.kind' ' "modern_ebpf"'
17+ fi
18+ }
19+
20+ if [[ " ${CK8S_CLUSTER} " =~ ^(sc| both)$ ]]; then
21+ update_falco_driver sc
22+ fi
23+ if [[ " ${CK8S_CLUSTER} " =~ ^(wc| both)$ ]]; then
24+ update_falco_driver wc
25+ fi
26+ update_falco_driver common
You can’t perform that action at this time.
0 commit comments