Skip to content

Commit 5633302

Browse files
committed
Adapt development docs.
1 parent 7dcd01e commit 5633302

File tree

2 files changed

+8
-44
lines changed

2 files changed

+8
-44
lines changed

DEVELOPMENT.md

Lines changed: 5 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -44,40 +44,8 @@ kubectl get secret metal-test-kubeconfig -o jsonpath='{.data.value}' | base64 -d
4444
clusterctl get kubeconfig metal-test > capi-lab/.capms-cluster-kubeconfig.yaml
4545
```
4646

47-
It is now expected to deploy a CNI to the cluster:
48-
49-
```bash
50-
kubectl --kubeconfig=capi-lab/.capms-cluster-kubeconfig.yaml create -f https://raw.githubusercontent.com/projectcalico/calico/v3.28.2/manifests/tigera-operator.yaml
51-
cat <<EOF | kubectl --kubeconfig=capi-lab/.capms-cluster-kubeconfig.yaml create -f -
52-
apiVersion: operator.tigera.io/v1
53-
kind: Installation
54-
metadata:
55-
name: default
56-
spec:
57-
# Configures Calico networking.
58-
calicoNetwork:
59-
bgp: Disabled
60-
ipPools:
61-
- name: default-ipv4-ippool
62-
blockSize: 26
63-
cidr: 10.240.0.0/12
64-
encapsulation: None
65-
mtu: 1440
66-
cni:
67-
ipam:
68-
type: HostLocal
69-
type: Calico
70-
EOF
71-
```
72-
73-
> [!note]
74-
> Actually, Calico should be configured using BGP (no overlay), eBPF and DSR. An example will be proposed in this repository at a later point in time.
75-
7647
The node's provider ID is provided by the [metal-ccm](https://github.com/metal-stack/metal-ccm), which needs to be deployed into the cluster:
7748

78-
```bash
79-
make -C capi-lab deploy-metal-ccm
80-
```
8149

8250
If you want to provide service's of type load balancer through MetalLB by the metal-ccm, you need to deploy MetalLB:
8351

@@ -244,7 +212,7 @@ export control_plane_machine_id=
244212
metalctl machine console --ipmi $control_plane_machine_id
245213
# ip r
246214
# sudo systemctl restart kubeadm
247-
# crictl ps
215+
# crictl ps
248216
# ~.
249217

250218
clusterctl get kubeconfig > capms-cluster.kubeconfig
@@ -279,12 +247,15 @@ watch kubectl -n $NAMESPACE --kubeconfig kind-bootstrap.kubeconfig get cluster,m
279247
# until everything is ready
280248
```
281249

250+
> [!note]
251+
> Actually, Calico should be configured using BGP (no overlay), eBPF and DSR. An example will be proposed in this repository at a later point in time.
252+
282253
Now you are able to move the cluster resources as you wish:
283254

284255
```bash
285256
clusterctl init --infrastructure metal-stack --kubeconfig capms-cluster.kubeconfig
286257

287-
clusterctl move -n $NAMESPACE --kubeconfig kind-bootstrap.kubeconfig --to-kubeconfig capms-cluster.kubeconfig
258+
clusterctl move -n $NAMESPACE --kubeconfig kind-bootstrap.kubeconfig --to-kubeconfig capms-cluster.kubeconfig
288259
# everything as expected
289260
kubectl --kubeconfig -n $NAMESPACE kind-bootstrap.kubeconfig get cluster,metalstackcluster,machine,metalstackmachine,kubeadmcontrolplanes,kubeadmconfigs
290261
kubectl --kubeconfig -n $NAMESPACE capms-cluster.kubeconfig get cluster,metalstackcluster,machine,metalstackmachine,kubeadmcontrolplanes,kubeadmconfigs

capi-lab/Makefile

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ bake:
3535

3636
.PHONY: deploy-capi
3737
deploy-capi:
38-
docker compose run --rm clusterctl init
38+
docker compose run --rm clusterctl init --addon helm
3939

4040
.PHONY: cleanup
4141
cleanup:
@@ -73,7 +73,7 @@ apply-sample-cluster:
7373
$(eval METAL_NODE_NETWORK_ID = $(shell metalctl network list --name $(CLUSTER_NAME) -o template --template '{{ .id }}'))
7474
$(eval CONTROL_PLANE_IP = $(shell metalctl network ip list --name "$(CLUSTER_NAME)-vip" -o template --template '{{ .ipaddress }}'))
7575
echo $(CLUSTER_NAME)
76-
clusterctl generate cluster $(CLUSTER_NAME) \
76+
clusterctl generate cluster --flavor calico $(CLUSTER_NAME) \
7777
--kubeconfig=$(KUBECONFIG) \
7878
--worker-machine-count 1 \
7979
--control-plane-machine-count 1 \
@@ -85,7 +85,7 @@ apply-sample-cluster:
8585
delete-sample-cluster:
8686
$(eval METAL_NODE_NETWORK_ID = $(shell metalctl network list --name $(CLUSTER_NAME) -o template --template '{{ .id }}'))
8787
$(eval CONTROL_PLANE_IP = $(shell metalctl network ip list --name "$(CLUSTER_NAME)-vip" -o template --template '{{ .ipaddress }}'))
88-
clusterctl generate cluster $(CLUSTER_NAME) \
88+
clusterctl generate cluster --flavor calico $(CLUSTER_NAME) \
8989
--kubeconfig=$(KUBECONFIG) \
9090
--worker-machine-count 1 \
9191
--control-plane-machine-count 1 \
@@ -97,10 +97,3 @@ delete-sample-cluster:
9797
mtu-fix:
9898
cd mini-lab && ssh -F files/ssh/config leaf01 'ip link set dev vtep-1001 mtu 9100 && echo done'
9999
cd mini-lab && ssh -F files/ssh/config leaf02 'ip link set dev vtep-1001 mtu 9100 && echo done'
100-
101-
.PHONY: deploy-metal-ccm
102-
deploy-metal-ccm:
103-
$(eval NAMESPACE = $(shell kubectl get metalstackclusters.infrastructure.cluster.x-k8s.io $(CLUSTER_NAME) -ojsonpath='{.metadata.namespace}'))
104-
$(eval METAL_NODE_NETWORK_ID = $(shell metalctl network list --name $(CLUSTER_NAME) -o template --template '{{ .id }}'))
105-
$(eval CONTROL_PLANE_IP = $(shell metalctl network ip list --name "$(CLUSTER_NAME)-vip" -o template --template '{{ .id }}'))
106-
cat metal-ccm.yaml | envsubst | kubectl --kubeconfig=.capms-cluster-kubeconfig.yaml apply -f -

0 commit comments

Comments
 (0)