diff --git a/Makefile b/Makefile index e5f8b632..c097bc5d 100644 --- a/Makefile +++ b/Makefile @@ -207,16 +207,41 @@ e2e-test-bgp: awk '{print $$1}' | xargs -I {} env KUBECONFIG=$(KUBECONFIG_PATH) kubectl label nodes {} cilium-bgp-peering=true --overwrite # First patch: Add the necessary RBAC permissions - KUBECONFIG=$(KUBECONFIG_PATH) kubectl patch clusterrole ccm-linode-clusterrole --type='json'\ - -p='[{"op": "add", "path": "/rules/-", "value": {"apiGroups": ["cilium.io"], "resources": ["ciliumloadbalancerippools", "ciliumbgppeeringpolicies"], "verbs": ["get", "list", "watch", "create", "update", "patch", "delete"]}}]' - + KUBECONFIG=$(KUBECONFIG_PATH) kubectl patch clusterrole ccm-linode-clusterrole \ + --type='json' \ + -p='[\ + {\ + "op": "add",\ + "path": "/rules/-",\ + "value": {\ + "apiGroups": ["cilium.io"],\ + "resources": ["ciliumloadbalancerippools", "ciliumbgppeeringpolicies"],\ + "verbs": ["get", "list", "watch", "create", "update", "patch", "delete"]\ + }\ + }\ + ]' # Patch: Append new args to the existing ones - KUBECONFIG=$(KUBECONFIG_PATH) kubectl patch daemonset ccm-linode -n kube-system --type='json' \ - -p='[{"op": "add", "path": "/spec/template/spec/containers/0/args/-", "value": "--bgp-node-selector=cilium-bgp-peering=true"},\ - {"op": "add", "path": "/spec/template/spec/containers/0/args/-", "value": "--load-balancer-type=cilium-bgp"},\ - {"op": "add", "path": "/spec/template/spec/containers/0/args/-", "value": "--ip-holder-suffix=$(CLUSTER_NAME)"}]' - + KUBECONFIG=$(KUBECONFIG_PATH) kubectl patch daemonset ccm-linode -n kube-system \ + --type='json' \ + -p='[\ + {\ + "op": "add",\ + "path": "/spec/template/spec/containers/0/args/-",\ + "value": "--bgp-node-selector=cilium-bgp-peering=true"\ + },\ + {\ + "op": "add",\ + "path": "/spec/template/spec/containers/0/args/-",\ + "value": "--load-balancer-type=cilium-bgp"\ + },\ + {\ + "op": "add",\ + "path": "/spec/template/spec/containers/0/args/-",\ + "value": "--ip-holder-suffix=ccm-8039dcf"\ + }\ + ]' + # Wait for rollout KUBECONFIG=$(KUBECONFIG_PATH) kubectl -n kube-system rollout status daemonset/ccm-linode --timeout=300s