From ab1b54b335852e2edb357413f52d993bcb309bec Mon Sep 17 00:00:00 2001 From: Brian Downs Date: Thu, 2 Feb 2023 14:17:57 -0700 Subject: [PATCH] add doc comments Signed-off-by: Brian Downs --- pkg/controller/cluster/cidr_allocation.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pkg/controller/cluster/cidr_allocation.go b/pkg/controller/cluster/cidr_allocation.go index e3e4cb4..dccbf98 100644 --- a/pkg/controller/cluster/cidr_allocation.go +++ b/pkg/controller/cluster/cidr_allocation.go @@ -59,6 +59,7 @@ func generateSubnets(cidr string) ([]string, error) { return subnets, nil } +// nextCIDR retrieves the next available CIDR address from the given pool. func (c *ClusterReconciler) nextCIDR(ctx context.Context, namespace, cidrAllocationPoolName, clusterName string) (*net.IPNet, error) { var cidrPool v1alpha1.CIDRAllocationPool @@ -93,6 +94,7 @@ func (c *ClusterReconciler) nextCIDR(ctx context.Context, namespace, cidrAllocat return ipNet, nil } +// releaseCIDR updates the given CIDR pool by marking the address as available. func (c *ClusterReconciler) releaseCIDR(ctx context.Context, namespace, cidrAllocationPoolName, clusterName string) error { var cidrPool v1alpha1.CIDRAllocationPool