Skip to content

Commit

Permalink
Disable WatchList feature gate (#4773)
Browse files Browse the repository at this point in the history
  • Loading branch information
berkayoz authored Dec 5, 2024
1 parent e9b0a2c commit 40fce49
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 0 deletions.
3 changes: 3 additions & 0 deletions microk8s-resources/default-args/kube-apiserver
Original file line number Diff line number Diff line change
Expand Up @@ -29,3 +29,6 @@
--admission-control-config-file=${SNAP_DATA}/args/admission-control-config-file.yaml
--kubelet-certificate-authority=${SNAP_DATA}/certs/ca.crt
--kubelet-preferred-address-types=InternalIP,Hostname,InternalDNS,ExternalDNS,ExternalIP

# Disable the watchlist feature until k8s-dqlite can handle it
--feature-gates=WatchList=false
14 changes: 14 additions & 0 deletions snap/hooks/configure
Original file line number Diff line number Diff line change
Expand Up @@ -385,6 +385,20 @@ then
need_api_restart=true
fi

# Disable the watchlist feature until k8s-dqlite can handle it
if ! grep -e "WatchList" ${SNAP_DATA}/args/kube-apiserver
then
if ! grep -e "--feature-gates=" ${SNAP_DATA}/args/kube-apiserver
then
echo '--feature-gates=WatchList=false' >> ${SNAP_DATA}/args/kube-apiserver
else
# Find the line starting with --feature-gates= and append ,WatchList=false
"${SNAP}/bin/sed" -i '/^--feature-gates=/ s/$/,WatchList=false/' "$SNAP_DATA/args/kube-apiserver"
fi

need_api_restart=true
fi

# RemoveSelfLink feature flag is removed after 1.24
if grep -e "feature-gates=RemoveSelfLink" ${SNAP_DATA}/args/kube-apiserver
then
Expand Down

0 comments on commit 40fce49

Please sign in to comment.