Merge pull request 'disable-multus' (#117) from disable-multus into main
Reviewed-on: #117
This commit is contained in:
commit
33307fccce
@ -2,7 +2,10 @@
|
|||||||
|
|
||||||
# All things BEFORE the first controller / control plane upgrade
|
# All things BEFORE the first controller / control plane upgrade
|
||||||
pre_control_plane_upgrade_cluster() {
|
pre_control_plane_upgrade_cluster() {
|
||||||
echo
|
if [ "$PLATFORM" != "gke" ];then
|
||||||
|
# patch multus DS to ONLY run pods on 1.31 controllers
|
||||||
|
kubectl patch ds kube-multus-ds -n kube-system -p '{"spec": {"template": {"spec": {"nodeSelector": {"node.kubernetes.io/kubezero.version": "v1.31.6"}}}}}' || true
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -16,7 +19,16 @@ post_control_plane_upgrade_cluster() {
|
|||||||
pre_cluster_upgrade_final() {
|
pre_cluster_upgrade_final() {
|
||||||
set +e
|
set +e
|
||||||
|
|
||||||
echo
|
if [ "$PLATFORM" != "gke" ];then
|
||||||
|
# cleanup multus
|
||||||
|
kubectl delete clusterrolebinding multus
|
||||||
|
kubectl delete clusterrole multus
|
||||||
|
kubectl delete serviceaccount multus -n kube-system
|
||||||
|
kubectl delete cm multus-cni-config -n kube-system
|
||||||
|
kubectl delete ds kube-multus-ds -n kube-system
|
||||||
|
kubectl delete NetworkAttachmentDefinition cilium
|
||||||
|
kubectl delete crd network-attachment-definitions.k8s.cni.cncf.io
|
||||||
|
fi
|
||||||
|
|
||||||
set -e
|
set -e
|
||||||
}
|
}
|
||||||
|
@ -95,6 +95,20 @@ function ensure_kubezero_secret_key() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
function ensure_kubezero_secret_key() {
|
||||||
|
local secret="$(kubectl get secret -n $ns $secret -o yaml)"
|
||||||
|
local key
|
||||||
|
local val
|
||||||
|
|
||||||
|
for key in $1; do
|
||||||
|
val=$(echo $secret | yq ".data.\"$key\""
|
||||||
|
if [ "$val" == "null" ]; then
|
||||||
|
set_kubezero_secret $key ""
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
function set_kubezero_secret() {
|
function set_kubezero_secret() {
|
||||||
local key="$1"
|
local key="$1"
|
||||||
local val="$2"
|
local val="$2"
|
||||||
|
@ -43,7 +43,7 @@ cilium:
|
|||||||
binPath: "/usr/libexec/cni"
|
binPath: "/usr/libexec/cni"
|
||||||
logFile: /var/log/cilium-cni.log
|
logFile: /var/log/cilium-cni.log
|
||||||
#-- Ensure this is false if multus is enabled
|
#-- Ensure this is false if multus is enabled
|
||||||
exclusive: false
|
exclusive: true
|
||||||
|
|
||||||
cluster:
|
cluster:
|
||||||
# This should match the second octet of clusterPoolIPv4PodCIDRList
|
# This should match the second octet of clusterPoolIPv4PodCIDRList
|
||||||
@ -91,9 +91,11 @@ cilium:
|
|||||||
- key: node-role.kubernetes.io/control-plane
|
- key: node-role.kubernetes.io/control-plane
|
||||||
effect: NoSchedule
|
effect: NoSchedule
|
||||||
# the operator removes the taints,
|
# the operator removes the taints,
|
||||||
# so we need to break chicken egg on single controller
|
# so we need to break chicken egg
|
||||||
- key: node.cilium.io/agent-not-ready
|
- key: node.cilium.io/agent-not-ready
|
||||||
effect: NoSchedule
|
effect: NoSchedule
|
||||||
|
- key: node.kubernetes.io/not-ready
|
||||||
|
effect: NoSchedule
|
||||||
|
|
||||||
nodeSelector:
|
nodeSelector:
|
||||||
node-role.kubernetes.io/control-plane: ""
|
node-role.kubernetes.io/control-plane: ""
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{{- define "network-values" }}
|
{{- define "network-values" }}
|
||||||
multus:
|
multus:
|
||||||
enabled: true
|
enabled: false
|
||||||
clusterNetwork: "cilium"
|
clusterNetwork: "cilium"
|
||||||
|
|
||||||
# {{- if eq .Values.global.platform "aws" }}
|
# {{- if eq .Values.global.platform "aws" }}
|
||||||
|
@ -32,7 +32,7 @@ addons:
|
|||||||
network:
|
network:
|
||||||
enabled: true
|
enabled: true
|
||||||
retain: true
|
retain: true
|
||||||
targetRevision: 0.5.8
|
targetRevision: 0.5.9
|
||||||
cilium:
|
cilium:
|
||||||
cluster: {}
|
cluster: {}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user