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

Subnet should report the CIDR in IPAMRange Status in its own Status #216

Merged
merged 7 commits into from
Dec 10, 2021

Conversation

LimKianAn
Copy link
Contributor

Fixes #204

@LimKianAn LimKianAn self-assigned this Nov 24, 2021
@LimKianAn LimKianAn changed the title WIP Add the CIDR in IPAMRange Status to the related Subnet Status upon successful reconciliation WIP Add CIDR in IPAMRange Status to Subnet upon successful reconciliation Nov 24, 2021
…nished reconciliation

Signed-off-by: Lim, Kian-An <lim.kian.an@gmx.de>
@LimKianAn LimKianAn force-pushed the 204-fix-subnet-status-cidrs-reporting branch from 23c46f7 to 552181c Compare November 25, 2021 11:03
@LimKianAn LimKianAn force-pushed the 204-fix-subnet-status-cidrs-reporting branch from 9767232 to 874f36f Compare November 25, 2021 13:49
@LimKianAn LimKianAn changed the title WIP Add CIDR in IPAMRange Status to Subnet upon successful reconciliation Subnet should report the CIDR in IPAMRange Status in its own Status Nov 25, 2021
@LimKianAn
Copy link
Contributor Author

This test should have failed, but somehow it passed.

		parsedCIDR := commonv1alpha1.MustParseCIDR(fmt.Sprintf("%s/%d", cidrAddress, rangeSize))
		By("waiting for the status of the ipam range to have the correct allocations")
		Eventually(func(g Gomega) []networkv1alpha1.IPAMRangeAllocationStatus {
			err := k8sClient.Get(ctx, ipamRangeKey, ipamRange)
			Expect(client.IgnoreNotFound(err)).NotTo(HaveOccurred())
			g.Expect(err).NotTo(HaveOccurred())
			return ipamRange.Status.Allocations
		}, timeout, interval).Should(ContainElement(networkv1alpha1.IPAMRangeAllocationStatus{
			CIDR:  &parsedCIDR,
			State: networkv1alpha1.IPAMRangeAllocationFree,
			Request: &networkv1alpha1.IPAMRangeRequest{
				Size: int32(rangeSize),
			},
		}))

This issue will be addressed in the issue #218.

@LimKianAn LimKianAn requested a review from adracus November 25, 2021 15:13
@github-actions github-actions bot added size/L and removed size/M labels Dec 9, 2021
@LimKianAn LimKianAn requested a review from adracus December 9, 2021 08:18
@adracus adracus merged commit 6e86472 into main Dec 10, 2021
@adracus adracus deleted the 204-fix-subnet-status-cidrs-reporting branch December 10, 2021 09:02
@afritzler afritzler added the enhancement New feature or request label Jan 26, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request size/L
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Fix Subnet .status.cidrs reporting
3 participants