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

Use mini lab ext for kind #49

Merged
merged 2 commits into from
Jan 27, 2025
Merged
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
15 changes: 11 additions & 4 deletions capi-lab/Makefile
Original file line number Diff line number Diff line change
@@ -1,14 +1,21 @@
.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
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:
Expand All @@ -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:
Expand Down
3 changes: 1 addition & 2 deletions capi-lab/firewall-rules.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
11 changes: 10 additions & 1 deletion capi-lab/mini-lab-overrides/extra-vars.yaml
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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"
2 changes: 1 addition & 1 deletion config/clusterctl-templates/example_variables.rc
Original file line number Diff line number Diff line change
@@ -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
Expand Down
Loading