Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WIP Flannel- TBM after Cilium change #190

Closed
wants to merge 4 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions clr-k8s-examples/README.md
Original file line number Diff line number Diff line change
@@ -63,6 +63,10 @@ you need to setup other cluster wide properties.
There are different flavors to install, run `./create_stack.sh help` to get
more information.

> NOTE: Before running [`create_stack.sh`](create_stack.sh) script, make sure to export
the necessary environment variables if needed to be changed. By default it will use
CNI to be canal, and RUNNER to be crio.

```bash
# default shows help
./create_stack.sh <subcommand>
34 changes: 33 additions & 1 deletion clr-k8s-examples/create_stack.sh
Original file line number Diff line number Diff line change
@@ -10,6 +10,9 @@ SCRIPT_DIR="$(dirname "${BASH_SOURCE[0]}")"
: ${MASTER_IP:=}
HIGH_POD_COUNT=${HIGH_POD_COUNT:-""}

CNI=${CNI:-"canal"}
RUNNER=${RUNNER:-"crio"}

function print_usage_exit() {
exit_code=${1:-0}
cat <<EOT
@@ -85,7 +88,10 @@ function kata() {

}


function cni() {
case "$CNI" in
canal)
# note version is not semver
CANAL_VER=${1:-v3.3}
CANAL_URL="https://docs.projectcalico.org/$CANAL_VER/getting-started/kubernetes/installation/hosted/canal"
@@ -97,7 +103,33 @@ function cni() {
curl -o "${CANAL_DIR}/overlays/${CANAL_VER}/canal/rbac.yaml" "$CANAL_URL/rbac.yaml"
# canal doesnt pass kustomize validation
kubectl apply -k "${CANAL_DIR}/overlays/${CANAL_VER}" --validate=false

;;
flannel)
FLANNEL_URL="https://raw.githubusercontent.com/coreos/flannel/62e44c867a2846fefb68bd5f178daf4da3095ccb/Documentation/kube-flannel.yml"

sudo ln -sfn /usr/libexec/cni/* /opt/cni/bin/
kubectl apply -f "$FLANNEL_URL"
;;
cilium)
CILIUM_VER=${1:-v1.6}
CILIUM_URL="https://github.com/cilium/cilium/archive/$CILIUM_VER.tar.gz"
CILIUM_DIR="0-cilium"

mkdir -p "${CILIUM_DIR}/overlays/${CILIUM_VER}/cilium"
pushd "${CILIUM_DIR}/overlays/${CILIUM_VER}/cilium/"
wget -O "$CILIUM_VER.tar.gz" "$CILIUM_URL"
tar xzf "$CILIUM_VER.tar.gz"
pushd cilium-"${CILIUM_VER#*v}"/install/kubernetes
helm template cilium --namespace kube-system --set global.containerRuntime.integration="$RUNNER" > cilium.yaml
kubectl apply -f cilium.yaml
popd
popd
;;
*)
echo"Unknown cni $CNI"
exit 1
;;
esac
}

function metrics() {
2 changes: 2 additions & 0 deletions clr-k8s-examples/setup_system.sh
Original file line number Diff line number Diff line change
@@ -12,6 +12,8 @@ ADD_NO_PROXY="10.244.0.0/16,10.96.0.0/12"
ADD_NO_PROXY+=",$(hostname -I | sed 's/[[:space:]]/,/g')"
: "${RUNNER:=containerd}"



# update os version
function upate_os_version() {
sudo swupd update