diff --git a/config/samples/kamaji_v1alpha1_tenantcontrolplane.yaml b/config/samples/kamaji_v1alpha1_tenantcontrolplane.yaml index 3ac3967..26acad6 100644 --- a/config/samples/kamaji_v1alpha1_tenantcontrolplane.yaml +++ b/config/samples/kamaji_v1alpha1_tenantcontrolplane.yaml @@ -5,48 +5,20 @@ metadata: spec: controlPlane: deployment: - replicas: 2 - additionalMetadata: - annotations: - environment.clastix.io: test - tier.clastix.io: "0" - labels: - tenant.clastix.io: test - kind.clastix.io: deployment + replicas: 1 service: - additionalMetadata: - annotations: - environment.clastix.io: test - tier.clastix.io: "0" - labels: - tenant.clastix.io: test - kind.clastix.io: service serviceType: LoadBalancer ingress: - enabled: true - hostname: kamaji.local - ingressClassName: nginx - additionalMetadata: - annotations: - kubernetes.io/ingress.allow-http: "false" - nginx.ingress.kubernetes.io/secure-backends: "true" - nginx.ingress.kubernetes.io/ssl-passthrough: "true" + enabled: false kubernetes: version: "v1.23.1" kubelet: - cgroupfs: systemd + cgroupfs: cgroupfs admissionControllers: - ResourceQuota - LimitRanger networkProfile: - address: "127.0.0.1" port: 6443 - certSANs: - - "test.clastix.labs" - serviceCidr: "10.96.0.0/16" - podCidr: "10.244.0.0/16" - dnsServiceIPs: - - "10.96.0.10" addons: coreDNS: {} kubeProxy: {} diff --git a/deploy/kind/Makefile b/deploy/kind/Makefile index 2e5a3ff..e4b083b 100644 --- a/deploy/kind/Makefile +++ b/deploy/kind/Makefile @@ -2,7 +2,7 @@ kind_path := $(patsubst %/,%,$(dir $(abspath $(lastword $(MAKEFILE_LIST))))) include ../etcd/Makefile -.PHONY: kind ingress-nginx kamaji-kind-worker-build +.PHONY: kind ingress-nginx .DEFAULT_GOAL := kamaji @@ -29,14 +29,5 @@ ingress-nginx: ingress-nginx-install ingress-nginx-install: kubectl apply -f $(kind_path)/nginx-deploy.yaml -kamaji-kind-worker-build: - docker build -f $(kind_path)/kamaji-kind-worker.dockerfile -t clastix/kamaji-kind-worker:$${WORKER_VERSION:-latest} . - -kamaji-kind-worker-push: kamaji-kind-worker-build - docker push clastix/kamaji-kind-worker:$${WORKER_VERSION:-latest} - kamaji-kind-worker-join: $(kind_path)/join-node.bash - -kamaji-kind-worker-join-through-konnectivity: - $(kind_path)/join-node-konnectivity.bash diff --git a/deploy/kind/cni-kindnet-config.json b/deploy/kind/cni-kindnet-config.json deleted file mode 100644 index 957fae0..0000000 --- a/deploy/kind/cni-kindnet-config.json +++ /dev/null @@ -1,33 +0,0 @@ -{ - "cniVersion": "0.3.1", - "name": "kindnet", - "plugins": [ - { - "type": "ptp", - "ipMasq": false, - "ipam": { - "type": "host-local", - "dataDir": "/run/cni-ipam-state", - "routes": [ - { - "dst": "0.0.0.0/0" - } - ], - "ranges": [ - [ - { - "subnet": "10.244.0.0/24" - } - ] - ] - }, - "mtu": 1500 - }, - { - "type": "portmap", - "capabilities": { - "portMappings": true - } - } - ] - } diff --git a/deploy/kind/join-node-konnectivity.bash b/deploy/kind/join-node-konnectivity.bash deleted file mode 100755 index ed45b55..0000000 --- a/deploy/kind/join-node-konnectivity.bash +++ /dev/null @@ -1,35 +0,0 @@ -#!/bin/bash - -set -e - -# Constants -export DOCKER_IMAGE_NAME="clastix/kamaji-kind-worker" - -# Variables -export KUBERNETES_VERSION=${1:-latest} -export KUBECONFIG="${KUBECONFIG:-/tmp/kubeconfig}" - -if [ -z $2 ] -then - MAPPING_PORT="" -else - MAPPING_PORT="-p ${2}:80" -fi - -export KONNECTIVITY_PROXY_HOST=${3:-konnectiviy.local} - -clear -echo "Welcome to join a new node through Konnectivity" - -echo -ne "\nChecking right kubeconfig\n" -kubectl cluster-info -echo "Are you pointing to the right tenant control plane? (Type return to continue)" -read - -JOIN_CMD="$(kubeadm --kubeconfig=${KUBECONFIG} token create --print-join-command) --ignore-preflight-errors=SystemVerification" -echo "Deploying new node..." -KIND_IP=$(docker inspect kamaji-control-plane --format='{{.NetworkSettings.Networks.kind.IPAddress}}') -NODE=$(docker run -d --add-host $KONNECTIVITY_PROXY_HOST:$KIND_IP --privileged -v /lib/modules:/lib/modules:ro -v /var --net host $MAPPING_PORT $DOCKER_IMAGE_NAME:$KUBERNETES_VERSION) -sleep 10 -echo "Joining new node..." -docker exec -e JOIN_CMD="$JOIN_CMD" $NODE /bin/bash -c "$JOIN_CMD" diff --git a/deploy/kind/join-node.bash b/deploy/kind/join-node.bash index 8261bc5..6f1b485 100755 --- a/deploy/kind/join-node.bash +++ b/deploy/kind/join-node.bash @@ -3,11 +3,11 @@ set -e # Constants -export DOCKER_IMAGE_NAME="clastix/kamaji-kind-worker" +export DOCKER_IMAGE_NAME="kindest/node" export DOCKER_NETWORK="kind" # Variables -export KUBERNETES_VERSION=${1:-latest} +export KUBERNETES_VERSION=${1:-v1.23.5} export KUBECONFIG="${KUBECONFIG:-/tmp/kubeconfig}" if [ -z $2 ] @@ -31,3 +31,6 @@ NODE=$(docker run -d --privileged -v /lib/modules:/lib/modules:ro -v /var --net sleep 10 echo "Joining new node..." docker exec -e JOIN_CMD="$JOIN_CMD" $NODE /bin/bash -c "$JOIN_CMD" + +echo "Node has joined! Remember to install the kind-net CNI by issuing the following command:" +echo " $: kubectl apply -f https://raw.githubusercontent.com/aojea/kindnet/master/install-kindnet.yaml" diff --git a/deploy/kind/kamaji-kind-worker.dockerfile b/deploy/kind/kamaji-kind-worker.dockerfile deleted file mode 100644 index 846850c..0000000 --- a/deploy/kind/kamaji-kind-worker.dockerfile +++ /dev/null @@ -1,4 +0,0 @@ -ARG KUBERNETES_VERSION=v1.23.4 -FROM kindest/node:$KUBERNETES_VERSION - -COPY ./cni-kindnet-config.json /etc/cni/net.d/10-kindnet.conflist