diff --git a/bindata/network/additional-networks/crd/001-crd.yaml b/bindata/network/additional-networks/crd/001-crd.yaml index a4472208b2..d77b7b7e18 100644 --- a/bindata/network/additional-networks/crd/001-crd.yaml +++ b/bindata/network/additional-networks/crd/001-crd.yaml @@ -172,3 +172,82 @@ spec: type: object served: true storage: true +--- +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + annotations: + controller-gen.kubebuilder.io/version: v0.14.0 + name: nodeslicepools.whereabouts.cni.cncf.io +spec: + group: whereabouts.cni.cncf.io + names: + kind: NodeSlicePool + listKind: NodeSlicePoolList + plural: nodeslicepools + singular: nodeslicepool + scope: Namespaced + versions: + - name: v1alpha1 + schema: + openAPIV3Schema: + description: NodeSlicePool is the Schema for the nodesliceippools API + properties: + apiVersion: + description: |- + APIVersion defines the versioned schema of this representation of an object. + Servers should convert recognized schemas to the latest internal value, and + may reject unrecognized values. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources + type: string + kind: + description: |- + Kind is a string value representing the REST resource this object represents. + Servers may infer this from the endpoint the client submits requests to. + Cannot be updated. + In CamelCase. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + type: string + metadata: + type: object + spec: + description: NodeSlicePoolSpec defines the desired state of NodeSlicePool + properties: + range: + description: |- + Range is a RFC 4632/4291-style string that represents an IP address and prefix length in CIDR notation + this refers to the entire range where the node is allocated a subset + type: string + sliceSize: + description: SliceSize is the size of subnets or slices of the range + that each node will be assigned + type: string + required: + - range + - sliceSize + type: object + status: + description: NodeSlicePoolStatus defines the desired state of NodeSlicePool + properties: + allocations: + description: Allocations holds the allocations of nodes to slices + items: + properties: + nodeName: + description: NodeName is the name of the node assigned to this + slice, empty node name is an available slice for assignment + type: string + sliceRange: + description: SliceRange is the subnet of this slice + type: string + required: + - nodeName + - sliceRange + type: object + type: array + required: + - allocations + type: object + type: object + served: true + storage: true \ No newline at end of file diff --git a/bindata/network/multus/002-rbac.yaml b/bindata/network/multus/002-rbac.yaml index 5f166888af..c0fefa1945 100644 --- a/bindata/network/multus/002-rbac.yaml +++ b/bindata/network/multus/002-rbac.yaml @@ -235,6 +235,7 @@ rules: resources: - ippools - overlappingrangeipreservations + - nodesliceippools verbs: - get - list diff --git a/pkg/network/additional_networks_test.go b/pkg/network/additional_networks_test.go index 1adec9ac54..09ccacdec9 100644 --- a/pkg/network/additional_networks_test.go +++ b/pkg/network/additional_networks_test.go @@ -76,7 +76,7 @@ func TestRenderAdditionalNetworksCRD(t *testing.T) { objs, err := renderAdditionalNetworksCRD(manifestDir) g.Expect(err).NotTo(HaveOccurred()) - g.Expect(objs).To(HaveLen(3)) + g.Expect(objs).To(HaveLen(4)) } func TestRenderRawCNIConfig(t *testing.T) { diff --git a/pkg/network/multus_test.go b/pkg/network/multus_test.go index 716ebfb560..2b76b2e482 100644 --- a/pkg/network/multus_test.go +++ b/pkg/network/multus_test.go @@ -46,7 +46,7 @@ func TestRenderMultus(t *testing.T) { g.Expect(objs).To(ContainElement(HaveKubernetesID("DaemonSet", "openshift-multus", "multus"))) // It's important that the namespace is first - g.Expect(len(objs)).To(Equal(30), "Expected 30 multus related objects") + g.Expect(len(objs)).To(Equal(31), "Expected 31 multus related objects") //this seems like not a great test imo g.Expect(objs[0]).To(HaveKubernetesID("CustomResourceDefinition", "", "network-attachment-definitions.k8s.cni.cncf.io")) g.Expect(objs).To(ContainElement(HaveKubernetesID("Namespace", "", "openshift-multus"))) g.Expect(objs).To(ContainElement(HaveKubernetesID("ServiceAccount", "openshift-multus", "multus-ancillary-tools"))) diff --git a/pkg/network/network_metrics_test.go b/pkg/network/network_metrics_test.go index 834bff7f6b..4c79326dbf 100644 --- a/pkg/network/network_metrics_test.go +++ b/pkg/network/network_metrics_test.go @@ -46,7 +46,7 @@ func TestRenderNetworkMetricsDaemon(t *testing.T) { // Check rendered object - g.Expect(len(objs)).To(Equal(30), "Expected 30 multus related objects") + g.Expect(len(objs)).To(Equal(31), "Expected 31 multus related objects") g.Expect(objs).To(ContainElement(HaveKubernetesID("DaemonSet", "openshift-multus", "network-metrics-daemon"))) g.Expect(objs).To(ContainElement(HaveKubernetesID("Service", "openshift-multus", "network-metrics-service"))) g.Expect(objs).To(ContainElement(HaveKubernetesID("ClusterRole", "", "metrics-daemon-role")))