Skip to content

Commit

Permalink
add tiltfile to support azure cni dev effort
Browse files Browse the repository at this point in the history
  • Loading branch information
nawazkh committed Jun 8, 2023
1 parent ef6ec6d commit 84731da
Showing 1 changed file with 15 additions and 10 deletions.
25 changes: 15 additions & 10 deletions Tiltfile
Original file line number Diff line number Diff line change
Expand Up @@ -382,21 +382,26 @@ def get_addons(flavor_name):
if "aks" in flavor_name:
return ""

# install calico
if "ipv6" in flavor_name:
calico_values = "./templates/addons/calico-ipv6/values.yaml"
elif "dual-stack" in flavor_name:
calico_values = "./templates/addons/calico-dual-stack/values.yaml"
else:
calico_values = "./templates/addons/calico/values.yaml"

addon_cmd = "; " + helm_cmd + " --kubeconfig ./${CLUSTER_NAME}.kubeconfig install --repo https://docs.tigera.io/calico/charts --version ${CALICO_VERSION} calico tigera-operator -f " + calico_values + " --namespace tigera-operator --create-namespace"

addon_cmd = ""
if "intree-cloud-provider" not in flavor_name:
addon_cmd += "; " + helm_cmd + " --kubeconfig ./${CLUSTER_NAME}.kubeconfig install --repo https://raw.githubusercontent.com/kubernetes-sigs/cloud-provider-azure/master/helm/repo cloud-provider-azure --generate-name --set infra.clusterName=${CLUSTER_NAME}"
if "flatcar" in flavor_name: # append caCetDir location to the cloud-provider-azure helm install command for flatcar flavor
addon_cmd += " --set-string cloudControllerManager.caCertDir=/usr/share/ca-certificates"

addon_cmd += "; " + helm_cmd + " --kubeconfig ./${CLUSTER_NAME}.kubeconfig install --repo https://raw.githubusercontent.com/kubernetes-sigs/azuredisk-csi-driver/master/charts azuredisk-csi-driver-oot azuredisk-csi-driver --set controller.replicas=1,controller.runOnControlPlane=true --namespace kube-system"

if "azure-cni-v1" in flavor_name:
addon_cmd += "; " + kubectl_cmd + " apply -f ./templates/addons/azure-cni-v1/cni-installer-v1.yaml --kubeconfig ./${CLUSTER_NAME}.kubeconfig"
else:
# install calico
if "ipv6" in flavor_name:
calico_values = "./templates/addons/calico-ipv6/values.yaml"
elif "dual-stack" in flavor_name:
calico_values = "./templates/addons/calico-dual-stack/values.yaml"
else:
calico_values = "./templates/addons/calico/values.yaml"
addon_cmd += "; " + helm_cmd + " --kubeconfig ./${CLUSTER_NAME}.kubeconfig install --repo https://docs.tigera.io/calico/charts --version ${CALICO_VERSION} calico tigera-operator -f " + calico_values + " --namespace tigera-operator --create-namespace"

return addon_cmd

def base64_encode(to_encode):
Expand Down

0 comments on commit 84731da

Please sign in to comment.