Skip to content

Commit c39ee2e

Browse files
committed
Install MCS API CRDs before CoreDNS starts
Signed-off-by: kahirokunn <okinakahiro@gmail.com>
1 parent 74e45bd commit c39ee2e

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

scripts/up.sh

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ kind load docker-image "${controller_image}" --name "${c2}"
5050

5151
echo "Configuring CoreDNS"
5252
function update_coredns() {
53+
kubectl --kubeconfig ${1} apply -f ../config/crd
5354
kubectl --kubeconfig ${1} patch clusterrole system:coredns --type json --patch-file coredns-rbac.json
5455
# Patching Corefile based on Cilium documentation: https://docs.cilium.io/en/latest/network/clustermesh/mcsapi/#prerequisites
5556
kubectl --kubeconfig ${1} get configmap -n kube-system coredns -o yaml | \
@@ -87,8 +88,8 @@ add_routes "${c1}" "${c2}-control-plane" "${kubeconfig2}"
8788
add_routes "${c2}" "${c1}-control-plane" "${kubeconfig1}"
8889
echo "Cluster networks connected"
8990

90-
${k1} apply -f ../config/crd -f ../config/rbac
91-
${k2} apply -f ../config/crd -f ../config/rbac
91+
${k1} apply -f ../config/rbac
92+
${k2} apply -f ../config/rbac
9293

9394
${k1} create sa mcs-api-controller
9495
${k1} create clusterrolebinding mcs-api-binding --clusterrole=mcs-derived-service-manager --serviceaccount=default:mcs-api-controller

0 commit comments

Comments
 (0)