From c76cd0a2e5767f2d094d29962f71be9ad94acee8 Mon Sep 17 00:00:00 2001 From: Robert Volkmann Date: Thu, 23 Jan 2025 20:58:25 +0100 Subject: [PATCH 1/2] Put kind into mini_lab_ext --- Makefile | 2 +- README.md | 2 +- capi-lab/Makefile | 15 +++++++++++---- capi-lab/firewall-rules.yaml | 3 +-- capi-lab/mini-lab | 2 +- capi-lab/mini-lab-overrides/extra-vars.yaml | 11 ++++++++++- config/clusterctl-templates/example_variables.rc | 2 +- 7 files changed, 26 insertions(+), 11 deletions(-) diff --git a/Makefile b/Makefile index 51b42f8..8e73bda 100644 --- a/Makefile +++ b/Makefile @@ -166,7 +166,7 @@ ifndef ignore-not-found endif # this is configured to work with the capi-lab -export METAL_API_URL := "http://metal.172.17.0.1.nip.io:8080" +export METAL_API_URL := "http://metal.203.0.113.1.nip.io:8080" export METAL_API_HMAC := "metal-admin" .PHONY: install diff --git a/README.md b/README.md index ce12825..eac3926 100644 --- a/README.md +++ b/README.md @@ -37,7 +37,7 @@ providers: Now you are able to install the CAPMS into your cluster: ```bash -export METALCTL_API_URL=http://metal.172.17.0.1.nip.io:8080 +export METALCTL_API_URL=http://metal.203.0.113.1.nip.io:8080 export METALCTL_API_HMAC=metal-admin export EXP_KUBEADM_BOOTSTRAP_FORMAT_IGNITION=true diff --git a/capi-lab/Makefile b/capi-lab/Makefile index cdc1919..72cac37 100644 --- a/capi-lab/Makefile +++ b/capi-lab/Makefile @@ -1,6 +1,13 @@ .DEFAULT_GOAL := up +.EXPORT_ALL_VARIABLES: +ANSIBLE_EXTRA_VARS_FILE=$(shell pwd)/mini-lab-overrides/extra-vars.yaml +KIND_EXPERIMENTAL_DOCKER_NETWORK=mini_lab_ext KUBECONFIG := $(shell pwd)/mini-lab/.kubeconfig +MINI_LAB_FLAVOR=capms +METALCTL_API_URL=http://metal.203.0.113.1.nip.io:8080 +METALCTL_HMAC=metal-admin + IMG ?= ghcr.io/metal-stack/cluster-api-metal-stack-controller:latest .PHONY: up @@ -8,7 +15,7 @@ up: bake deploy-capi .PHONY: bake bake: - cd mini-lab && make up MINI_LAB_FLAVOR=capms ANSIBLE_EXTRA_VARS_FILE=../mini-lab-overrides/extra-vars.yaml + cd mini-lab && make external_network up # change directory required for gen-certs .PHONY: deploy-capi deploy-capi: @@ -23,9 +30,9 @@ cleanup: .PHONY: dev-env dev-env: - @echo "export METALCTL_API_URL=http://metal.172.17.0.1.nip.io:8080" - @echo "export METALCTL_HMAC=metal-admin" - @echo "export KUBECONFIG=$(shell pwd)/mini-lab/.kubeconfig" + @echo "export METALCTL_API_URL=${METALCTL_API_URL}" + @echo "export METALCTL_HMAC=${METALCTL_HMAC}" + @echo "export KUBECONFIG=${KUBECONFIG}" .PHONY: controller controller: diff --git a/capi-lab/firewall-rules.yaml b/capi-lab/firewall-rules.yaml index a912622..62e27a9 100644 --- a/capi-lab/firewall-rules.yaml +++ b/capi-lab/firewall-rules.yaml @@ -27,7 +27,6 @@ ingress: - 443 protocol: TCP from: - - 172.16.0.0/12 # Docker Networks - - 203.0.113.0/24 # metal_lab_ext + - 203.0.113.0/24 to: - 203.0.113.128/25 diff --git a/capi-lab/mini-lab b/capi-lab/mini-lab index 3348f45..529ed30 160000 --- a/capi-lab/mini-lab +++ b/capi-lab/mini-lab @@ -1 +1 @@ -Subproject commit 3348f45125f1e09ef691a6c1c1afb820ef97db5c +Subproject commit 529ed305acb2eb4e83b3d62b1439fc28e39d23ba diff --git a/capi-lab/mini-lab-overrides/extra-vars.yaml b/capi-lab/mini-lab-overrides/extra-vars.yaml index 1fabb05..afe306e 100644 --- a/capi-lab/mini-lab-overrides/extra-vars.yaml +++ b/capi-lab/mini-lab-overrides/extra-vars.yaml @@ -1,12 +1,14 @@ --- +metal_control_plane_ingress_dns: 203.0.113.1.nip.io metal_check_api_health_endpoint: http://metal.{{ metal_control_plane_ingress_dns }}:8080/v1/health metal_api_base_path: "/" metal_ingress_dns: metal.{{ metal_control_plane_ingress_dns }} -metal_partition_metal_api_addr: metal.172.17.0.1.nip.io +metal_partition_metal_api_addr: metal.{{ metal_control_plane_ingress_dns }} metal_partition_metal_api_basepath: "/" +metal_partition_mgmt_gateway: 203.0.113.1 metal_api_images: - id: firewall-ubuntu-3.0 @@ -21,3 +23,10 @@ metal_api_images: url: https://images.metal-stack.io/metal-os/pull_requests/273-cluster-api-k8s-v1.30.6/cluster-api/cluster-api-k8s-1.30.6/img.tar.lz4 features: - machine + +sonic_mgmtif_gateway: "203.0.113.1" + +sonic_nameservers: + - "203.0.113.1" + - "1.1.1.1" + - "1.0.0.1" \ No newline at end of file diff --git a/config/clusterctl-templates/example_variables.rc b/config/clusterctl-templates/example_variables.rc index f7c54d0..1cdb814 100644 --- a/config/clusterctl-templates/example_variables.rc +++ b/config/clusterctl-templates/example_variables.rc @@ -1,4 +1,4 @@ -export METAL_API_URL=http://metal.172.17.0.1.nip.io:8080 +export METAL_API_URL=http://metal.203.0.113.1.nip.io:8080 export METAL_API_HMAC=metal-admin export METAL_PROJECT_ID=00000000-0000-0000-0000-000000000001 From faa716da346ffd32e767c1a7db4ac4a10b4199d7 Mon Sep 17 00:00:00 2001 From: Robert Volkmann Date: Mon, 27 Jan 2025 12:43:54 +0100 Subject: [PATCH 2/2] Use master branch of mini-lab --- capi-lab/mini-lab | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/capi-lab/mini-lab b/capi-lab/mini-lab index 529ed30..72acbfb 160000 --- a/capi-lab/mini-lab +++ b/capi-lab/mini-lab @@ -1 +1 @@ -Subproject commit 529ed305acb2eb4e83b3d62b1439fc28e39d23ba +Subproject commit 72acbfbffce1866ea6ac8352f38506c5e2f95291