Skip to content

Instantly share code, notes, and snippets.

@alexandreroman
Last active October 14, 2020 14:34
Show Gist options
  • Save alexandreroman/abc670e4463ccce60b8e2b0279fa3e3a to your computer and use it in GitHub Desktop.
Save alexandreroman/abc670e4463ccce60b8e2b0279fa3e3a to your computer and use it in GitHub Desktop.
Replace Calico by Antrea in a TKG plan for vSphere
#!/bin/sh
# Use this script to create a TKG vSphere plan leveraging the Antrea CNI.
# Then you can create a new cluster with Antrea with this command:
# $ tkg create cluster foo -p dev-antrea
set -e
export TKG_PLAN=dev
export ANTREA_VERSION=0.7.0
export CAPV_VERSION=0.6.4
sed '/calico-config/,$d' $HOME/.tkg/providers/infrastructure-vsphere/v$CAPV_VERSION/cluster-template-$TKG_PLAN.yaml > $HOME/.tkg/providers/infrastructure-vsphere/v$CAPV_VERSION/cluster-template-$TKG_PLAN-antrea.yaml && \
curl -s https://raw.githubusercontent.com/vmware-tanzu/antrea/v$ANTREA_VERSION/build/yamls/antrea.yml | sed 's/^/ /' >> $HOME/.tkg/providers/infrastructure-vsphere/v${CAPV_VERSION}/cluster-template-$TKG_PLAN-antrea.yaml
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment