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

Next release #210

Merged
merged 8 commits into from
Jan 20, 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
4 changes: 3 additions & 1 deletion .github/workflows/integration.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,12 @@ jobs:
flavors:
- name: sonic
- name: cumulus
- name: gardener

steps:
- name: Gain back workspace permissions # https://github.com/actions/checkout/issues/211
run: |
[ -d "${GITHUB_WORKSPACE}/mini-lab/.ansible/tmp/extension-provider-metal/.git" ] && sudo chown -R $USER:$USER ${GITHUB_WORKSPACE}/mini-lab/.ansible/tmp/extension-provider-metal/.git
[ -d "${GITHUB_WORKSPACE}" ] && sudo chown -R $USER:$USER ${GITHUB_WORKSPACE}

- name: Setup Containerlab
Expand All @@ -34,7 +36,7 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# we can remove desired version again after this fix was released: https://github.com/srl-labs/containerlab/pull/2000
DESIRED_VERSION: v0.56.0
# DESIRED_VERSION:

- name: Checkout
uses: actions/checkout@v4
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ prep:

.PHONY: mini-lab
mini-lab:
make -C $(MINI_LAB_PATH)
cd $(MINI_LAB_PATH) && make

.PHONY: wait-for-images
wait-for-images:
Expand Down
24 changes: 12 additions & 12 deletions release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ ansible-roles:
version: v0.2.9
metal-roles:
repository: https://github.com/metal-stack/metal-roles
version: v0.14.7
version: v0.14.8
binaries:
metal-stack:
kernel:
Expand Down Expand Up @@ -70,15 +70,15 @@ docker-images:
gardener-extension-backup-s3:
name: ghcr.io/metal-stack/gardener-extension-backup-s3
repository: https://github.com/metal-stack/gardener-extension-backup-s3
tag: v0.7.0
tag: v0.7.1
gardener-extension-csi-driver-lvm:
name: ghcr.io/metal-stack/gardener-extension-csi-driver-lvm
repository: https://github.com/metal-stack/gardener-extension-csi-driver-lvm
tag: v0.1.0
gardener-extension-dns-powerdns:
name: ghcr.io/metal-stack/gardener-extension-dns-powerdns
repository: https://github.com/metal-stack/gardener-extension-dns-powerdns
tag: v0.7.0
tag: v0.7.1
gardener-extension-provider-metal:
name: ghcr.io/metal-stack/gardener-extension-provider-metal
repository: https://github.com/metal-stack/gardener-extension-provider-metal
Expand Down Expand Up @@ -120,7 +120,7 @@ docker-images:
duros-controller:
name: ghcr.io/metal-stack/duros-controller
repository: https://github.com/metal-stack/duros-controller
tag: v0.11.1
tag: v0.11.2
metal-ccm:
name: ghcr.io/metal-stack/metal-ccm
repository: https://github.com/metal-stack/metal-ccm
Expand Down Expand Up @@ -195,19 +195,19 @@ docker-images:
tag: v1.4.0
admission-controller:
name: europe-docker.pkg.dev/gardener-project/releases/gardener/admission-controller
tag: v1.100.2
tag: v1.101.3
api-server:
name: europe-docker.pkg.dev/gardener-project/releases/gardener/apiserver
tag: v1.100.2
tag: v1.101.3
controller-manager:
name: europe-docker.pkg.dev/gardener-project/releases/gardener/controller-manager
tag: v1.100.2
tag: v1.101.3
extension-provider-gcp:
name: europe-docker.pkg.dev/gardener-project/releases/gardener/extensions/provider-gcp
tag: v1.37.2
gardenlet:
name: europe-docker.pkg.dev/gardener-project/releases/gardener/gardenlet
tag: v1.100.2
tag: v1.101.3
metrics-exporter:
name: europe-docker.pkg.dev/gardener-project/releases/gardener/metrics-exporter
tag: 0.30.0
Expand All @@ -219,10 +219,10 @@ docker-images:
tag: v1.36.0
operator:
name: europe-docker.pkg.dev/gardener-project/releases/gardener/operator
tag: v1.100.2
tag: v1.101.3
scheduler:
name: europe-docker.pkg.dev/gardener-project/releases/gardener/scheduler
tag: v1.100.2
tag: v1.101.3
shoot-cert-service:
name: europe-docker.pkg.dev/gardener-project/releases/gardener/extensions/shoot-cert-service
tag: v1.44.2
Expand Down Expand Up @@ -277,13 +277,13 @@ projects:
metal-stack:
mini-lab:
repository: https://github.com/metal-stack/mini-lab
version: v0.4.2
version: v0.4.3
repositories:
third-party:
gardener:
etcd-backup-restore:
ref: v0.15.4
url: https://github.com/gardener/etcd-backup-restore.git
gardener:
ref: v1.100.2
ref: v1.101.3
url: https://github.com/gardener/gardener.git
2 changes: 1 addition & 1 deletion test/integration/deployment/integration.sh
Original file line number Diff line number Diff line change
Expand Up @@ -33,4 +33,4 @@ pip install --root-user-action=ignore --upgrade pip \
# if you want to develop tests from within here, comment in the following line:
# bash

pytest --junitxml=/output/results_$(date "+%Y.%m.%d-%H.%M.%S").xml
pytest -o cache_dir=/tmp/.pytest-cache --junitxml=/output/results_$(date "+%Y.%m.%d-%H.%M.%S").xml
51 changes: 50 additions & 1 deletion test/integration/deployment/test/deployment_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,9 @@
from metal_python.driver import Driver
import pytest
import testinfra

import yaml
import common
import base64


class MetalControlPlaneDeployment(unittest.TestCase):
Expand Down Expand Up @@ -97,3 +98,51 @@ def test_dhcpd_service(self):
self.service_enabled_and_running(self.hosts[0], "isc-dhcp-server")
else:
self.service_enabled_and_running(self.hosts[0], "dhcpd")


def garden_namespace_exists():
config.load_kube_config()
v1 = client.CoreV1Api()
try:
res = v1.read_namespace("garden")
return True
except client.exceptions.ApiException:
return False


@unittest.skipUnless(garden_namespace_exists(), "test only if gardener flavor was used")
class GardenerControlPlaneDeployment(unittest.TestCase):
def __init__(self, *args, **kwargs):
super(GardenerControlPlaneDeployment, self).__init__(*args, **kwargs)
config.load_kube_config()
self.maxDiff = None

@pytest.mark.flaky(reruns=36, reruns_delay=10)
def test_deployment(self):
v1 = client.AppsV1Api()
for ns in ["garden", "istio-ingress", "istio-system"]:
res = v1.list_namespaced_deployment(ns)
for i in res.items:
self.assertIsNone(i.status.unavailable_replicas, f"deployment {i.metadata.name} in namespace {ns} has unavailable replicas")

@pytest.mark.flaky(reruns=36, reruns_delay=10)
def test_stateful_sets(self):
v1 = client.AppsV1Api()
for ns in ["garden", "istio-ingress", "istio-system"]:
res = v1.list_namespaced_stateful_set(ns)
for i in res.items:
self.assertEqual(i.status.current_replicas, i.status.replicas, f"stateful set {i.metadata.name} in namespace {ns} has unready replicas")

@pytest.mark.flaky(reruns=36, reruns_delay=10)
def test_seed_ready(self):
v1 = client.CoreV1Api()
secret = v1.read_namespaced_secret("garden-kubeconfig-for-admin", "garden")
garden_client = config.new_client_from_config_dict(yaml.safe_load(base64.b64decode(secret.data["kubeconfig"])))

custom = client.CustomObjectsApi(api_client=garden_client)

seeds = custom.list_cluster_custom_object("core.gardener.cloud", "v1beta1", "seeds")

self.assertTrue(len(seeds["items"]) == 1, "no seed object found")
self.assertEqual(seeds["items"][0]["status"]["lastOperation"]["state"], "Succeeded")
self.assertEqual(seeds["items"][0]["status"]["lastOperation"]["progress"], 100)