From ed157fed430a944a86468352f4f9c0033cf03132 Mon Sep 17 00:00:00 2001 From: aggarwal0009 <127549148+aggarwal0009@users.noreply.github.com> Date: Wed, 9 Aug 2023 16:16:29 +0000 Subject: [PATCH 01/13] Add PN CRD --- crd/external/podnetwork/Makefile | 19 ++++ crd/external/podnetwork/README.md | 8 ++ .../api/v1alpha1/groupversion_info.go | 23 ++++ .../podnetwork/api/v1alpha1/podnetwork.go | 71 ++++++++++++ .../api/v1alpha1/zz_generated.deepcopy.go | 104 ++++++++++++++++++ .../networking.azure.com_podnetworks.yaml | 90 +++++++++++++++ 6 files changed, 315 insertions(+) create mode 100644 crd/external/podnetwork/Makefile create mode 100644 crd/external/podnetwork/README.md create mode 100644 crd/external/podnetwork/api/v1alpha1/groupversion_info.go create mode 100644 crd/external/podnetwork/api/v1alpha1/podnetwork.go create mode 100644 crd/external/podnetwork/api/v1alpha1/zz_generated.deepcopy.go create mode 100644 crd/external/podnetwork/manifests/networking.azure.com_podnetworks.yaml diff --git a/crd/external/podnetwork/Makefile b/crd/external/podnetwork/Makefile new file mode 100644 index 0000000000..6b91fd5c9a --- /dev/null +++ b/crd/external/podnetwork/Makefile @@ -0,0 +1,19 @@ +.DEFAULT_GOAL: all + +REPO_ROOT = $(shell git rev-parse --show-toplevel) +TOOLS_DIR = $(REPO_ROOT)/build/tools +TOOLS_BIN_DIR = $(REPO_ROOT)/build/tools/bin +CONTROLLER_GEN = $(TOOLS_BIN_DIR)/controller-gen + +all: generate manifests + +generate: $(CONTROLLER_GEN) + $(CONTROLLER_GEN) object paths="./..." + +.PHONY: manifests +manifests: $(CONTROLLER_GEN) + mkdir -p manifests + $(CONTROLLER_GEN) crd paths="./..." output:crd:artifacts:config=manifests/ + +$(CONTROLLER_GEN): + @make -C $(REPO_ROOT) $(CONTROLLER_GEN) diff --git a/crd/external/podnetwork/README.md b/crd/external/podnetwork/README.md new file mode 100644 index 0000000000..abec3c2a12 --- /dev/null +++ b/crd/external/podnetwork/README.md @@ -0,0 +1,8 @@ +# PodNetwork CRDs + +This CRD is added to enable SWIFT multitenancy – which will be watched and managed by the MT-DNC-RC controller. + +PodNetwork objects need to be created by Orchestrator RP in the subnet delegation flow (see Scenarios). +These represent a Cx subnet already delegated by the customer to the Orchestrator RP and locked with a Service Association Link (SAL) on NRP. + +Orchestrator RP will map the Swift MT deployments to the PN object, and the subnet to use for IP allocations, through labels on the pod spec pointing to this object identifier. diff --git a/crd/external/podnetwork/api/v1alpha1/groupversion_info.go b/crd/external/podnetwork/api/v1alpha1/groupversion_info.go new file mode 100644 index 0000000000..4a373bbd0b --- /dev/null +++ b/crd/external/podnetwork/api/v1alpha1/groupversion_info.go @@ -0,0 +1,23 @@ +//go:build !ignore_uncovered +// +build !ignore_uncovered + +// Package v1alpha1 contains API Schema definitions for the networking v1alpha1 API group +// +kubebuilder:object:generate=true +// +groupName=networking.azure.com +package v1alpha + +import ( + "k8s.io/apimachinery/pkg/runtime/schema" + "sigs.k8s.io/controller-runtime/pkg/scheme" +) + +var ( + // GroupVersion is group version used to register these objects + GroupVersion = schema.GroupVersion{Group: "networking.azure.com", Version: "v1alpha1"} + + // SchemeBuilder is used to add go types to the GroupVersionKind scheme + SchemeBuilder = &scheme.Builder{GroupVersion: GroupVersion} + + // AddToScheme adds the types in this group-version to the given scheme. + AddToScheme = SchemeBuilder.AddToScheme +) diff --git a/crd/external/podnetwork/api/v1alpha1/podnetwork.go b/crd/external/podnetwork/api/v1alpha1/podnetwork.go new file mode 100644 index 0000000000..02fd52d630 --- /dev/null +++ b/crd/external/podnetwork/api/v1alpha1/podnetwork.go @@ -0,0 +1,71 @@ +//go:build !ignore_uncovered +// +build !ignore_uncovered + +package v1alpha + +import ( + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" +) + +// Important: Run "make" to regenerate code after modifying this file + +// +kubebuilder:object:root=true + +// PodNetwork is the Schema for the PodNetworks API +// +kubebuilder:resource:scope=Namespaced +// +kubebuilder:resource:shortName=pn +// +kubebuilder:subresource:status +// +kubebuilder:printcolumn:name="Status",type=string,priority=1,JSONPath=`.status.status` +// +kubebuilder:printcolumn:name="Error Message",type=string,priority=1,JSONPath=`.status.errorMessage` +// +kubebuilder:printcolumn:name="Address Prefixes",type=string,priority=1,JSONPath=`.status.addressPrefixes` +// +kubebuilder:printcolumn:name="Network",type=string,priority=1,JSONPath=`.spec.network` +// +kubebuilder:printcolumn:name="Subnet",type=string,priority=1,JSONPath=`.spec.subnet` +type PodNetwork struct { + metav1.TypeMeta `json:",inline"` + metav1.ObjectMeta `json:"metadata,omitempty"` + + Spec PodNetworkSpec `json:"spec,omitempty"` + Status PodNetworkStatus `json:"status,omitempty"` +} + +// +kubebuilder:object:root=true + +// PodNetworkList contains a list of PodNetwork +type PodNetworkList struct { + metav1.TypeMeta `json:",inline"` + metav1.ListMeta `json:"metadata,omitempty"` + Items []PodNetwork `json:"items"` +} + +// PodNetworkSpec defines the desired state of PodNetwork +type PodNetworkSpec struct { + // +kubebuilder:validation:Optional + // customer vnet guid + network string `json:"network,omitempty"` + // customer subnet name + subnet string `json:"subnet,omitempty"` +} + +// Status indicates the status of PN +// +kubebuilder:default=Nil +// +kubebuilder:validation:Enum=Nil;Ready;InUse;SubnetNotDelegated +type Status string + +const ( + Nil Status = "Nil" + Ready Status = "Ready" + InUse Status = "InUse" + SubnetNotDelegated Status = "SubnetNotDelegated" +) + +// PodNetworkStatus defines the observed state of PodNetwork +type PodNetworkStatus struct { + // +kubebuilder:validation:Optional + Status Status `json:"status,omitempty"` + ErrorMessage string `json:"errorMessage,omitempty"` + AddressPrefixes []string `json:"addressPrefixes,omitempty"` +} + +func init() { + SchemeBuilder.Register(&PodNetwork{}, &PodNetworkList{}) +} diff --git a/crd/external/podnetwork/api/v1alpha1/zz_generated.deepcopy.go b/crd/external/podnetwork/api/v1alpha1/zz_generated.deepcopy.go new file mode 100644 index 0000000000..24aa735c9c --- /dev/null +++ b/crd/external/podnetwork/api/v1alpha1/zz_generated.deepcopy.go @@ -0,0 +1,104 @@ +//go:build !ignore_autogenerated +// +build !ignore_autogenerated + +// Code generated by controller-gen. DO NOT EDIT. + +package v1alpha + +import ( + runtime "k8s.io/apimachinery/pkg/runtime" +) + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *PodNetwork) DeepCopyInto(out *PodNetwork) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + out.Spec = in.Spec + in.Status.DeepCopyInto(&out.Status) +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PodNetwork. +func (in *PodNetwork) DeepCopy() *PodNetwork { + if in == nil { + return nil + } + out := new(PodNetwork) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *PodNetwork) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *PodNetworkList) DeepCopyInto(out *PodNetworkList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]PodNetwork, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PodNetworkList. +func (in *PodNetworkList) DeepCopy() *PodNetworkList { + if in == nil { + return nil + } + out := new(PodNetworkList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *PodNetworkList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *PodNetworkSpec) DeepCopyInto(out *PodNetworkSpec) { + *out = *in +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PodNetworkSpec. +func (in *PodNetworkSpec) DeepCopy() *PodNetworkSpec { + if in == nil { + return nil + } + out := new(PodNetworkSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *PodNetworkStatus) DeepCopyInto(out *PodNetworkStatus) { + *out = *in + if in.AddressPrefixes != nil { + in, out := &in.AddressPrefixes, &out.AddressPrefixes + *out = make([]string, len(*in)) + copy(*out, *in) + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PodNetworkStatus. +func (in *PodNetworkStatus) DeepCopy() *PodNetworkStatus { + if in == nil { + return nil + } + out := new(PodNetworkStatus) + in.DeepCopyInto(out) + return out +} diff --git a/crd/external/podnetwork/manifests/networking.azure.com_podnetworks.yaml b/crd/external/podnetwork/manifests/networking.azure.com_podnetworks.yaml new file mode 100644 index 0000000000..250fb1a125 --- /dev/null +++ b/crd/external/podnetwork/manifests/networking.azure.com_podnetworks.yaml @@ -0,0 +1,90 @@ +--- +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + annotations: + controller-gen.kubebuilder.io/version: v0.11.3 + creationTimestamp: null + name: podnetworks.networking.azure.com +spec: + group: networking.azure.com + names: + kind: PodNetwork + listKind: PodNetworkList + plural: podnetworks + shortNames: + - pn + singular: podnetwork + scope: Namespaced + versions: + - additionalPrinterColumns: + - jsonPath: .status.status + name: Status + priority: 1 + type: string + - jsonPath: .status.errorMessage + name: Error Message + priority: 1 + type: string + - jsonPath: .status.addressPrefixes + name: Address Prefixes + priority: 1 + type: string + - jsonPath: .spec.network + name: Network + priority: 1 + type: string + - jsonPath: .spec.subnet + name: Subnet + priority: 1 + type: string + name: v1alpha + schema: + openAPIV3Schema: + description: PodNetwork is the Schema for the PodNetworks 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: PodNetworkSpec defines the desired state of PodNetwork + properties: + network: + description: customer vnet guid + type: string + subnet: + description: customer subnet name + type: string + type: object + status: + description: PodNetworkStatus defines the observed state of PodNetwork + properties: + addressPrefixes: + items: + type: string + type: array + errorMessage: + type: string + status: + description: Status indicates the status of PN + enum: + - Nil + - Ready + - InUse + - SubnetNotDelegated + type: string + type: object + type: object + served: true + storage: true + subresources: + status: {} From 771cc521fa5ae0bf4f2a854b08ac6271bad8422e Mon Sep 17 00:00:00 2001 From: aggarwal0009 <127549148+aggarwal0009@users.noreply.github.com> Date: Wed, 9 Aug 2023 16:46:29 +0000 Subject: [PATCH 02/13] fix push error --- crd/external/podnetwork/README.md | 2 +- crd/external/podnetwork/api/v1alpha1/podnetwork.go | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/crd/external/podnetwork/README.md b/crd/external/podnetwork/README.md index abec3c2a12..77aecb43d6 100644 --- a/crd/external/podnetwork/README.md +++ b/crd/external/podnetwork/README.md @@ -2,7 +2,7 @@ This CRD is added to enable SWIFT multitenancy – which will be watched and managed by the MT-DNC-RC controller. -PodNetwork objects need to be created by Orchestrator RP in the subnet delegation flow (see Scenarios). +PodNetwork objects need to be created by Orchestrator RP in the subnet delegation flow. These represent a Cx subnet already delegated by the customer to the Orchestrator RP and locked with a Service Association Link (SAL) on NRP. Orchestrator RP will map the Swift MT deployments to the PN object, and the subnet to use for IP allocations, through labels on the pod spec pointing to this object identifier. diff --git a/crd/external/podnetwork/api/v1alpha1/podnetwork.go b/crd/external/podnetwork/api/v1alpha1/podnetwork.go index 02fd52d630..6abce4b426 100644 --- a/crd/external/podnetwork/api/v1alpha1/podnetwork.go +++ b/crd/external/podnetwork/api/v1alpha1/podnetwork.go @@ -41,9 +41,9 @@ type PodNetworkList struct { type PodNetworkSpec struct { // +kubebuilder:validation:Optional // customer vnet guid - network string `json:"network,omitempty"` + Network string `json:"network,omitempty"` // customer subnet name - subnet string `json:"subnet,omitempty"` + Subnet string `json:"subnet,omitempty"` } // Status indicates the status of PN From 5914dd7794dd08785b26d39996d5391264924e77 Mon Sep 17 00:00:00 2001 From: aggarwal0009 <127549148+aggarwal0009@users.noreply.github.com> Date: Wed, 9 Aug 2023 22:39:11 +0000 Subject: [PATCH 03/13] minor updates --- .../api/v1alpha1/groupversion_info.go | 6 +- .../podnetwork/api/v1alpha1/podnetwork.go | 2 +- .../api/v1alpha1/zz_generated.deepcopy.go | 2 +- .../manifests/acn.azure.com_podnetworks.yaml | 90 +++++++++++++++++++ 4 files changed, 95 insertions(+), 5 deletions(-) create mode 100644 crd/external/podnetwork/manifests/acn.azure.com_podnetworks.yaml diff --git a/crd/external/podnetwork/api/v1alpha1/groupversion_info.go b/crd/external/podnetwork/api/v1alpha1/groupversion_info.go index 4a373bbd0b..29d54de7b1 100644 --- a/crd/external/podnetwork/api/v1alpha1/groupversion_info.go +++ b/crd/external/podnetwork/api/v1alpha1/groupversion_info.go @@ -3,8 +3,8 @@ // Package v1alpha1 contains API Schema definitions for the networking v1alpha1 API group // +kubebuilder:object:generate=true -// +groupName=networking.azure.com -package v1alpha +// +groupName=acn.azure.com +package v1alpha1 import ( "k8s.io/apimachinery/pkg/runtime/schema" @@ -13,7 +13,7 @@ import ( var ( // GroupVersion is group version used to register these objects - GroupVersion = schema.GroupVersion{Group: "networking.azure.com", Version: "v1alpha1"} + GroupVersion = schema.GroupVersion{Group: "acn.azure.com", Version: "v1alpha1"} // SchemeBuilder is used to add go types to the GroupVersionKind scheme SchemeBuilder = &scheme.Builder{GroupVersion: GroupVersion} diff --git a/crd/external/podnetwork/api/v1alpha1/podnetwork.go b/crd/external/podnetwork/api/v1alpha1/podnetwork.go index 6abce4b426..427505444b 100644 --- a/crd/external/podnetwork/api/v1alpha1/podnetwork.go +++ b/crd/external/podnetwork/api/v1alpha1/podnetwork.go @@ -1,7 +1,7 @@ //go:build !ignore_uncovered // +build !ignore_uncovered -package v1alpha +package v1alpha1 import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" diff --git a/crd/external/podnetwork/api/v1alpha1/zz_generated.deepcopy.go b/crd/external/podnetwork/api/v1alpha1/zz_generated.deepcopy.go index 24aa735c9c..d8e0d8d270 100644 --- a/crd/external/podnetwork/api/v1alpha1/zz_generated.deepcopy.go +++ b/crd/external/podnetwork/api/v1alpha1/zz_generated.deepcopy.go @@ -3,7 +3,7 @@ // Code generated by controller-gen. DO NOT EDIT. -package v1alpha +package v1alpha1 import ( runtime "k8s.io/apimachinery/pkg/runtime" diff --git a/crd/external/podnetwork/manifests/acn.azure.com_podnetworks.yaml b/crd/external/podnetwork/manifests/acn.azure.com_podnetworks.yaml new file mode 100644 index 0000000000..c7f5923ecb --- /dev/null +++ b/crd/external/podnetwork/manifests/acn.azure.com_podnetworks.yaml @@ -0,0 +1,90 @@ +--- +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + annotations: + controller-gen.kubebuilder.io/version: v0.11.3 + creationTimestamp: null + name: podnetworks.acn.azure.com +spec: + group: acn.azure.com + names: + kind: PodNetwork + listKind: PodNetworkList + plural: podnetworks + shortNames: + - pn + singular: podnetwork + scope: Namespaced + versions: + - additionalPrinterColumns: + - jsonPath: .status.status + name: Status + priority: 1 + type: string + - jsonPath: .status.errorMessage + name: Error Message + priority: 1 + type: string + - jsonPath: .status.addressPrefixes + name: Address Prefixes + priority: 1 + type: string + - jsonPath: .spec.network + name: Network + priority: 1 + type: string + - jsonPath: .spec.subnet + name: Subnet + priority: 1 + type: string + name: v1alpha1 + schema: + openAPIV3Schema: + description: PodNetwork is the Schema for the PodNetworks 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: PodNetworkSpec defines the desired state of PodNetwork + properties: + network: + description: customer vnet guid + type: string + subnet: + description: customer subnet name + type: string + type: object + status: + description: PodNetworkStatus defines the observed state of PodNetwork + properties: + addressPrefixes: + items: + type: string + type: array + errorMessage: + type: string + status: + description: Status indicates the status of PN + enum: + - Nil + - Ready + - InUse + - SubnetNotDelegated + type: string + type: object + type: object + served: true + storage: true + subresources: + status: {} From 0e6762e0a4e547d7f8ad0d2cb3f698a6ac3732fd Mon Sep 17 00:00:00 2001 From: aggarwal0009 <127549148+aggarwal0009@users.noreply.github.com> Date: Thu, 10 Aug 2023 16:25:52 +0000 Subject: [PATCH 04/13] Add PN CRD --- crd/external/podnetwork/README.md | 6 +- crd/external/podnetwork/client.go | 84 +++++++++++++++++ crd/external/podnetwork/embed.go | 24 +++++ crd/external/podnetwork/embed_test.go | 21 +++++ .../manifests/acn.azure.com_podnetworks.yaml | 3 +- .../networking.azure.com_podnetworks.yaml | 90 ------------------- 6 files changed, 132 insertions(+), 96 deletions(-) create mode 100644 crd/external/podnetwork/client.go create mode 100644 crd/external/podnetwork/embed.go create mode 100644 crd/external/podnetwork/embed_test.go delete mode 100644 crd/external/podnetwork/manifests/networking.azure.com_podnetworks.yaml diff --git a/crd/external/podnetwork/README.md b/crd/external/podnetwork/README.md index 77aecb43d6..0c740bbd6d 100644 --- a/crd/external/podnetwork/README.md +++ b/crd/external/podnetwork/README.md @@ -1,8 +1,6 @@ # PodNetwork CRDs -This CRD is added to enable SWIFT multitenancy – which will be watched and managed by the MT-DNC-RC controller. +This CRD is added to enable VNET multitenancy – which will be watched and managed by the control plane. PodNetwork objects need to be created by Orchestrator RP in the subnet delegation flow. -These represent a Cx subnet already delegated by the customer to the Orchestrator RP and locked with a Service Association Link (SAL) on NRP. - -Orchestrator RP will map the Swift MT deployments to the PN object, and the subnet to use for IP allocations, through labels on the pod spec pointing to this object identifier. +These represent a Cx subnet already delegated by the customer to the Orchestrator RP and locked with a Service Association Link (SAL) on network RP. diff --git a/crd/external/podnetwork/client.go b/crd/external/podnetwork/client.go new file mode 100644 index 0000000000..679cb8b351 --- /dev/null +++ b/crd/external/podnetwork/client.go @@ -0,0 +1,84 @@ +package podnetwork + +import ( + "context" + "reflect" + + "github.com/Azure/azure-container-networking/crd" + "github.com/Azure/azure-container-networking/crd/external/podnetwork/api/v1alpha1" + "github.com/pkg/errors" + v1 "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1" + typedv1 "k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset/typed/apiextensions/v1" + apierrors "k8s.io/apimachinery/pkg/api/errors" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/client-go/kubernetes/scheme" + "k8s.io/client-go/rest" +) + +// Scheme is a runtime scheme containing the client-go scheme and the PodNetwork scheme. +var Scheme = runtime.NewScheme() + +func init() { + _ = scheme.AddToScheme(Scheme) + _ = v1alpha1.AddToScheme(Scheme) +} + +// Installer provides methods to manage the lifecycle of the PodNetwork resource definition. +type Installer struct { + cli typedv1.CustomResourceDefinitionInterface +} + +func NewInstaller(c *rest.Config) (*Installer, error) { + cli, err := crd.NewCRDClientFromConfig(c) + if err != nil { + return nil, errors.Wrap(err, "failed to init crd client") + } + return &Installer{ + cli: cli, + }, nil +} + +func (i *Installer) create(ctx context.Context, res *v1.CustomResourceDefinition) (*v1.CustomResourceDefinition, error) { + res, err := i.cli.Create(ctx, res, metav1.CreateOptions{}) + if err != nil { + return nil, errors.Wrap(err, "failed to create podnetwork crd") + } + return res, nil +} + +// Install installs the embedded PodNetwork CRD definition in the cluster. +func (i *Installer) Install(ctx context.Context) (*v1.CustomResourceDefinition, error) { + podnetwork, err := GetPodNetworks() + if err != nil { + return nil, errors.Wrap(err, "failed to get embedded podnetwork crd") + } + return i.create(ctx, podnetwork) +} + +// InstallOrUpdate installs the embedded PodNetwork CRD definition in the cluster or updates it if present. +func (i *Installer) InstallOrUpdate(ctx context.Context) (*v1.CustomResourceDefinition, error) { + podNetwork, err := GetPodNetworks() + if err != nil { + return nil, errors.Wrap(err, "failed to get embedded podnetwork crd") + } + current, err := i.create(ctx, podNetwork) + if !apierrors.IsAlreadyExists(err) { + return current, err + } + if current == nil { + current, err = i.cli.Get(ctx, podNetwork.Name, metav1.GetOptions{}) + if err != nil { + return nil, errors.Wrap(err, "failed to get existing podnetwork crd") + } + } + if !reflect.DeepEqual(podNetwork.Spec.Versions, current.Spec.Versions) { + podNetwork.SetResourceVersion(current.GetResourceVersion()) + previous := *current + current, err = i.cli.Update(ctx, podNetwork, metav1.UpdateOptions{}) + if err != nil { + return &previous, errors.Wrap(err, "failed to update existing podnetwork crd") + } + } + return current, nil +} diff --git a/crd/external/podnetwork/embed.go b/crd/external/podnetwork/embed.go new file mode 100644 index 0000000000..39d6dbbf5c --- /dev/null +++ b/crd/external/podnetwork/embed.go @@ -0,0 +1,24 @@ +package podnetwork + +import ( + _ "embed" + + "github.com/pkg/errors" + apiextensionsv1 "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1" + "sigs.k8s.io/yaml" +) + +// PodNetworkYAML embeds the CRD YAML for downstream consumers. +// +//go:embed manifests/acn.azure.com_podnetworks.yaml +var PodNetworkYAML []byte + +// GetPodNetworksDefinition parses the raw []byte PodNetwork in +// to a CustomResourceDefinition and returns it or an unmarshalling error. +func GetPodNetworks() (*apiextensionsv1.CustomResourceDefinition, error) { + podNetworks := &apiextensionsv1.CustomResourceDefinition{} + if err := yaml.Unmarshal(PodNetworkYAML, &podNetworks); err != nil { + return nil, errors.Wrap(err, "error unmarshalling embedded PodNetwork") + } + return podNetworks, nil +} diff --git a/crd/external/podnetwork/embed_test.go b/crd/external/podnetwork/embed_test.go new file mode 100644 index 0000000000..3d36147d25 --- /dev/null +++ b/crd/external/podnetwork/embed_test.go @@ -0,0 +1,21 @@ +package podnetwork + +import ( + "os" + "testing" + + "github.com/stretchr/testify/assert" +) + +const filename = "manifests/acn.azure.com_podnetworks.yaml" + +func TestEmbed(t *testing.T) { + b, err := os.ReadFile(filename) + assert.NoError(t, err) + assert.Equal(t, b, PodNetworkYAML) +} + +func TestGetPodNetworks(t *testing.T) { + _, err := GetPodNetworks() + assert.NoError(t, err) +} diff --git a/crd/external/podnetwork/manifests/acn.azure.com_podnetworks.yaml b/crd/external/podnetwork/manifests/acn.azure.com_podnetworks.yaml index c7f5923ecb..6f492ffaf8 100644 --- a/crd/external/podnetwork/manifests/acn.azure.com_podnetworks.yaml +++ b/crd/external/podnetwork/manifests/acn.azure.com_podnetworks.yaml @@ -3,8 +3,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.11.3 - creationTimestamp: null + controller-gen.kubebuilder.io/version: v0.12.0 name: podnetworks.acn.azure.com spec: group: acn.azure.com diff --git a/crd/external/podnetwork/manifests/networking.azure.com_podnetworks.yaml b/crd/external/podnetwork/manifests/networking.azure.com_podnetworks.yaml deleted file mode 100644 index 250fb1a125..0000000000 --- a/crd/external/podnetwork/manifests/networking.azure.com_podnetworks.yaml +++ /dev/null @@ -1,90 +0,0 @@ ---- -apiVersion: apiextensions.k8s.io/v1 -kind: CustomResourceDefinition -metadata: - annotations: - controller-gen.kubebuilder.io/version: v0.11.3 - creationTimestamp: null - name: podnetworks.networking.azure.com -spec: - group: networking.azure.com - names: - kind: PodNetwork - listKind: PodNetworkList - plural: podnetworks - shortNames: - - pn - singular: podnetwork - scope: Namespaced - versions: - - additionalPrinterColumns: - - jsonPath: .status.status - name: Status - priority: 1 - type: string - - jsonPath: .status.errorMessage - name: Error Message - priority: 1 - type: string - - jsonPath: .status.addressPrefixes - name: Address Prefixes - priority: 1 - type: string - - jsonPath: .spec.network - name: Network - priority: 1 - type: string - - jsonPath: .spec.subnet - name: Subnet - priority: 1 - type: string - name: v1alpha - schema: - openAPIV3Schema: - description: PodNetwork is the Schema for the PodNetworks 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: PodNetworkSpec defines the desired state of PodNetwork - properties: - network: - description: customer vnet guid - type: string - subnet: - description: customer subnet name - type: string - type: object - status: - description: PodNetworkStatus defines the observed state of PodNetwork - properties: - addressPrefixes: - items: - type: string - type: array - errorMessage: - type: string - status: - description: Status indicates the status of PN - enum: - - Nil - - Ready - - InUse - - SubnetNotDelegated - type: string - type: object - type: object - served: true - storage: true - subresources: - status: {} From 6791604412748fd227dbf2ee8a8b523d209c9a55 Mon Sep 17 00:00:00 2001 From: aggarwal0009 <127549148+aggarwal0009@users.noreply.github.com> Date: Thu, 10 Aug 2023 16:40:46 +0000 Subject: [PATCH 05/13] update crdgen --- .github/workflows/crdgen.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/crdgen.yaml b/.github/workflows/crdgen.yaml index 8b9a0190fc..f8016889a5 100644 --- a/.github/workflows/crdgen.yaml +++ b/.github/workflows/crdgen.yaml @@ -26,5 +26,7 @@ jobs: run: make -C crd/nodenetworkconfig - name: Regenerate MultitenantNetworkContainer CRD run: make -C crd/multitenantnetworkcontainer + - name: Regenerate PodNetwork CRD + run: make -C crd/external/podnetwork - name: Fail if the tree is dirty run: test -z "$(git status --porcelain)" From 18df7d4756158e6b337b5e125c8a2227e886ad4c Mon Sep 17 00:00:00 2001 From: aggarwal0009 <127549148+aggarwal0009@users.noreply.github.com> Date: Thu, 10 Aug 2023 17:01:41 +0000 Subject: [PATCH 06/13] update network to VnetGuid --- crd/external/podnetwork/api/v1alpha1/podnetwork.go | 4 ++-- .../podnetwork/manifests/acn.azure.com_podnetworks.yaml | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/crd/external/podnetwork/api/v1alpha1/podnetwork.go b/crd/external/podnetwork/api/v1alpha1/podnetwork.go index 427505444b..e501c7947a 100644 --- a/crd/external/podnetwork/api/v1alpha1/podnetwork.go +++ b/crd/external/podnetwork/api/v1alpha1/podnetwork.go @@ -18,7 +18,7 @@ import ( // +kubebuilder:printcolumn:name="Status",type=string,priority=1,JSONPath=`.status.status` // +kubebuilder:printcolumn:name="Error Message",type=string,priority=1,JSONPath=`.status.errorMessage` // +kubebuilder:printcolumn:name="Address Prefixes",type=string,priority=1,JSONPath=`.status.addressPrefixes` -// +kubebuilder:printcolumn:name="Network",type=string,priority=1,JSONPath=`.spec.network` +// +kubebuilder:printcolumn:name="Network",type=string,priority=1,JSONPath=`.spec.vnetGuid` // +kubebuilder:printcolumn:name="Subnet",type=string,priority=1,JSONPath=`.spec.subnet` type PodNetwork struct { metav1.TypeMeta `json:",inline"` @@ -41,7 +41,7 @@ type PodNetworkList struct { type PodNetworkSpec struct { // +kubebuilder:validation:Optional // customer vnet guid - Network string `json:"network,omitempty"` + VnetGuid string `json:"vnetGuid,omitempty"` // customer subnet name Subnet string `json:"subnet,omitempty"` } diff --git a/crd/external/podnetwork/manifests/acn.azure.com_podnetworks.yaml b/crd/external/podnetwork/manifests/acn.azure.com_podnetworks.yaml index 6f492ffaf8..78d6a9c02c 100644 --- a/crd/external/podnetwork/manifests/acn.azure.com_podnetworks.yaml +++ b/crd/external/podnetwork/manifests/acn.azure.com_podnetworks.yaml @@ -29,7 +29,7 @@ spec: name: Address Prefixes priority: 1 type: string - - jsonPath: .spec.network + - jsonPath: .spec.vnetGuid name: Network priority: 1 type: string @@ -57,12 +57,12 @@ spec: spec: description: PodNetworkSpec defines the desired state of PodNetwork properties: - network: - description: customer vnet guid - type: string subnet: description: customer subnet name type: string + vnetGuid: + description: customer vnet guid + type: string type: object status: description: PodNetworkStatus defines the observed state of PodNetwork From d6125145a47dcf53d94ae62c19eda87d14d283f0 Mon Sep 17 00:00:00 2001 From: aggarwal0009 <127549148+aggarwal0009@users.noreply.github.com> Date: Thu, 10 Aug 2023 17:03:36 +0000 Subject: [PATCH 07/13] minor update --- crd/external/podnetwork/api/v1alpha1/podnetwork.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crd/external/podnetwork/api/v1alpha1/podnetwork.go b/crd/external/podnetwork/api/v1alpha1/podnetwork.go index e501c7947a..111ef8e681 100644 --- a/crd/external/podnetwork/api/v1alpha1/podnetwork.go +++ b/crd/external/podnetwork/api/v1alpha1/podnetwork.go @@ -41,7 +41,7 @@ type PodNetworkList struct { type PodNetworkSpec struct { // +kubebuilder:validation:Optional // customer vnet guid - VnetGuid string `json:"vnetGuid,omitempty"` + VnetGUID string `json:"vnetGuid,omitempty"` // customer subnet name Subnet string `json:"subnet,omitempty"` } From aa0761d9bd6b70c5c43ee9cb4042e92619d49d97 Mon Sep 17 00:00:00 2001 From: aggarwal0009 <127549148+aggarwal0009@users.noreply.github.com> Date: Thu, 10 Aug 2023 22:05:08 +0000 Subject: [PATCH 08/13] add doc.go --- crd/external/podnetwork/api/v1alpha1/podnetwork.go | 4 ++-- crd/external/podnetwork/embed.go | 2 +- .../podnetwork/manifests/acn.azure.com_podnetworks.yaml | 4 ++-- crd/external/podnetwork/manifests/doc.go | 3 +++ 4 files changed, 8 insertions(+), 5 deletions(-) create mode 100644 crd/external/podnetwork/manifests/doc.go diff --git a/crd/external/podnetwork/api/v1alpha1/podnetwork.go b/crd/external/podnetwork/api/v1alpha1/podnetwork.go index 111ef8e681..596df97e46 100644 --- a/crd/external/podnetwork/api/v1alpha1/podnetwork.go +++ b/crd/external/podnetwork/api/v1alpha1/podnetwork.go @@ -19,7 +19,7 @@ import ( // +kubebuilder:printcolumn:name="Error Message",type=string,priority=1,JSONPath=`.status.errorMessage` // +kubebuilder:printcolumn:name="Address Prefixes",type=string,priority=1,JSONPath=`.status.addressPrefixes` // +kubebuilder:printcolumn:name="Network",type=string,priority=1,JSONPath=`.spec.vnetGuid` -// +kubebuilder:printcolumn:name="Subnet",type=string,priority=1,JSONPath=`.spec.subnet` +// +kubebuilder:printcolumn:name="Subnet",type=string,priority=1,JSONPath=`.spec.subnetResourceID` type PodNetwork struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` @@ -43,7 +43,7 @@ type PodNetworkSpec struct { // customer vnet guid VnetGUID string `json:"vnetGuid,omitempty"` // customer subnet name - Subnet string `json:"subnet,omitempty"` + SubnetResourceID string `json:"subnetResourceID,omitempty"` } // Status indicates the status of PN diff --git a/crd/external/podnetwork/embed.go b/crd/external/podnetwork/embed.go index 39d6dbbf5c..fedbd4ee40 100644 --- a/crd/external/podnetwork/embed.go +++ b/crd/external/podnetwork/embed.go @@ -13,7 +13,7 @@ import ( //go:embed manifests/acn.azure.com_podnetworks.yaml var PodNetworkYAML []byte -// GetPodNetworksDefinition parses the raw []byte PodNetwork in +// GetPodNetworks parses the raw []byte PodNetwork in // to a CustomResourceDefinition and returns it or an unmarshalling error. func GetPodNetworks() (*apiextensionsv1.CustomResourceDefinition, error) { podNetworks := &apiextensionsv1.CustomResourceDefinition{} diff --git a/crd/external/podnetwork/manifests/acn.azure.com_podnetworks.yaml b/crd/external/podnetwork/manifests/acn.azure.com_podnetworks.yaml index 78d6a9c02c..b5614b5584 100644 --- a/crd/external/podnetwork/manifests/acn.azure.com_podnetworks.yaml +++ b/crd/external/podnetwork/manifests/acn.azure.com_podnetworks.yaml @@ -33,7 +33,7 @@ spec: name: Network priority: 1 type: string - - jsonPath: .spec.subnet + - jsonPath: .spec.subnetResourceID name: Subnet priority: 1 type: string @@ -57,7 +57,7 @@ spec: spec: description: PodNetworkSpec defines the desired state of PodNetwork properties: - subnet: + subnetResourceID: description: customer subnet name type: string vnetGuid: diff --git a/crd/external/podnetwork/manifests/doc.go b/crd/external/podnetwork/manifests/doc.go new file mode 100644 index 0000000000..b08acc397f --- /dev/null +++ b/crd/external/podnetwork/manifests/doc.go @@ -0,0 +1,3 @@ +// Package manifests exists to allow the rendered CRD manifests to be +// packaged in to dependent components. +package manifests From 7d37430480478f9d77138a2b2a1bb995322b3a95 Mon Sep 17 00:00:00 2001 From: aggarwal0009 <127549148+aggarwal0009@users.noreply.github.com> Date: Fri, 11 Aug 2023 00:10:21 +0000 Subject: [PATCH 09/13] update readme --- crd/external/podnetwork/README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/crd/external/podnetwork/README.md b/crd/external/podnetwork/README.md index 0c740bbd6d..986f283759 100644 --- a/crd/external/podnetwork/README.md +++ b/crd/external/podnetwork/README.md @@ -2,5 +2,5 @@ This CRD is added to enable VNET multitenancy – which will be watched and managed by the control plane. -PodNetwork objects need to be created by Orchestrator RP in the subnet delegation flow. -These represent a Cx subnet already delegated by the customer to the Orchestrator RP and locked with a Service Association Link (SAL) on network RP. +PodNetwork objects need to be created by Orchestrator in the subnet delegation flow. +These represent a Cx subnet already delegated by the customer to the Orchestrator and locked with a Service Association Link (SAL) on network RP. From 9d38eede86983aecc2c60876eb8500cbae1e2765 Mon Sep 17 00:00:00 2001 From: aggarwal0009 <127549148+aggarwal0009@users.noreply.github.com> Date: Fri, 11 Aug 2023 21:12:31 +0000 Subject: [PATCH 10/13] update crd fields --- crd/external/podnetwork/api/v1alpha1/podnetwork.go | 6 +----- .../podnetwork/manifests/acn.azure.com_podnetworks.yaml | 7 ------- 2 files changed, 1 insertion(+), 12 deletions(-) diff --git a/crd/external/podnetwork/api/v1alpha1/podnetwork.go b/crd/external/podnetwork/api/v1alpha1/podnetwork.go index 596df97e46..abe987dad7 100644 --- a/crd/external/podnetwork/api/v1alpha1/podnetwork.go +++ b/crd/external/podnetwork/api/v1alpha1/podnetwork.go @@ -16,7 +16,6 @@ import ( // +kubebuilder:resource:shortName=pn // +kubebuilder:subresource:status // +kubebuilder:printcolumn:name="Status",type=string,priority=1,JSONPath=`.status.status` -// +kubebuilder:printcolumn:name="Error Message",type=string,priority=1,JSONPath=`.status.errorMessage` // +kubebuilder:printcolumn:name="Address Prefixes",type=string,priority=1,JSONPath=`.status.addressPrefixes` // +kubebuilder:printcolumn:name="Network",type=string,priority=1,JSONPath=`.spec.vnetGuid` // +kubebuilder:printcolumn:name="Subnet",type=string,priority=1,JSONPath=`.spec.subnetResourceID` @@ -47,12 +46,10 @@ type PodNetworkSpec struct { } // Status indicates the status of PN -// +kubebuilder:default=Nil -// +kubebuilder:validation:Enum=Nil;Ready;InUse;SubnetNotDelegated +// +kubebuilder:validation:Enum=Ready;InUse;SubnetNotDelegated type Status string const ( - Nil Status = "Nil" Ready Status = "Ready" InUse Status = "InUse" SubnetNotDelegated Status = "SubnetNotDelegated" @@ -62,7 +59,6 @@ const ( type PodNetworkStatus struct { // +kubebuilder:validation:Optional Status Status `json:"status,omitempty"` - ErrorMessage string `json:"errorMessage,omitempty"` AddressPrefixes []string `json:"addressPrefixes,omitempty"` } diff --git a/crd/external/podnetwork/manifests/acn.azure.com_podnetworks.yaml b/crd/external/podnetwork/manifests/acn.azure.com_podnetworks.yaml index b5614b5584..5b678b70ac 100644 --- a/crd/external/podnetwork/manifests/acn.azure.com_podnetworks.yaml +++ b/crd/external/podnetwork/manifests/acn.azure.com_podnetworks.yaml @@ -21,10 +21,6 @@ spec: name: Status priority: 1 type: string - - jsonPath: .status.errorMessage - name: Error Message - priority: 1 - type: string - jsonPath: .status.addressPrefixes name: Address Prefixes priority: 1 @@ -71,12 +67,9 @@ spec: items: type: string type: array - errorMessage: - type: string status: description: Status indicates the status of PN enum: - - Nil - Ready - InUse - SubnetNotDelegated From 1d78feba1751eabb4d0c6ab10a724f7243478716 Mon Sep 17 00:00:00 2001 From: aggarwal0009 <127549148+aggarwal0009@users.noreply.github.com> Date: Thu, 10 Aug 2023 16:40:46 +0000 Subject: [PATCH 11/13] update crdgen --- .github/workflows/crdgen.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/crdgen.yaml b/.github/workflows/crdgen.yaml index 9885ad64f0..1c13faf91b 100644 --- a/.github/workflows/crdgen.yaml +++ b/.github/workflows/crdgen.yaml @@ -32,5 +32,7 @@ jobs: run: make -C crd/nodeinfo - name: Regenerate MultitenantPodNetworkConfig CRD run: make -C crd/multitenantpodnetworkconfig + - name: Regenerate PodNetwork CRD + run: make -C crd/external/podnetwork - name: Fail if the tree is dirty run: test -z "$(git status --porcelain)" From 237b8624006fd1854437e05c5c503a1129e22e59 Mon Sep 17 00:00:00 2001 From: aggarwal0009 <127549148+aggarwal0009@users.noreply.github.com> Date: Mon, 14 Aug 2023 10:27:57 -0700 Subject: [PATCH 12/13] Update crd/external/podnetwork/api/v1alpha1/podnetwork.go Co-authored-by: Evan Baker Signed-off-by: aggarwal0009 <127549148+aggarwal0009@users.noreply.github.com> --- crd/external/podnetwork/api/v1alpha1/podnetwork.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crd/external/podnetwork/api/v1alpha1/podnetwork.go b/crd/external/podnetwork/api/v1alpha1/podnetwork.go index abe987dad7..6332aa975e 100644 --- a/crd/external/podnetwork/api/v1alpha1/podnetwork.go +++ b/crd/external/podnetwork/api/v1alpha1/podnetwork.go @@ -40,7 +40,7 @@ type PodNetworkList struct { type PodNetworkSpec struct { // +kubebuilder:validation:Optional // customer vnet guid - VnetGUID string `json:"vnetGuid,omitempty"` + VnetGUID string `json:"vnetGUID,omitempty"` // customer subnet name SubnetResourceID string `json:"subnetResourceID,omitempty"` } From 4bd1bd59925a036f17dcd08a2fcb6a701a4d22b0 Mon Sep 17 00:00:00 2001 From: aggarwal0009 <127549148+aggarwal0009@users.noreply.github.com> Date: Mon, 14 Aug 2023 18:59:54 +0000 Subject: [PATCH 13/13] address pr comments --- .github/workflows/crdgen.yaml | 2 -- crd/external/podnetwork/api/v1alpha1/podnetwork.go | 4 ++-- .../podnetwork/manifests/acn.azure.com_podnetworks.yaml | 6 +++--- 3 files changed, 5 insertions(+), 7 deletions(-) diff --git a/.github/workflows/crdgen.yaml b/.github/workflows/crdgen.yaml index 1c13faf91b..9885ad64f0 100644 --- a/.github/workflows/crdgen.yaml +++ b/.github/workflows/crdgen.yaml @@ -32,7 +32,5 @@ jobs: run: make -C crd/nodeinfo - name: Regenerate MultitenantPodNetworkConfig CRD run: make -C crd/multitenantpodnetworkconfig - - name: Regenerate PodNetwork CRD - run: make -C crd/external/podnetwork - name: Fail if the tree is dirty run: test -z "$(git status --porcelain)" diff --git a/crd/external/podnetwork/api/v1alpha1/podnetwork.go b/crd/external/podnetwork/api/v1alpha1/podnetwork.go index 6332aa975e..273bdfcbc7 100644 --- a/crd/external/podnetwork/api/v1alpha1/podnetwork.go +++ b/crd/external/podnetwork/api/v1alpha1/podnetwork.go @@ -17,7 +17,7 @@ import ( // +kubebuilder:subresource:status // +kubebuilder:printcolumn:name="Status",type=string,priority=1,JSONPath=`.status.status` // +kubebuilder:printcolumn:name="Address Prefixes",type=string,priority=1,JSONPath=`.status.addressPrefixes` -// +kubebuilder:printcolumn:name="Network",type=string,priority=1,JSONPath=`.spec.vnetGuid` +// +kubebuilder:printcolumn:name="Network",type=string,priority=1,JSONPath=`.spec.vnetGUID` // +kubebuilder:printcolumn:name="Subnet",type=string,priority=1,JSONPath=`.spec.subnetResourceID` type PodNetwork struct { metav1.TypeMeta `json:",inline"` @@ -41,7 +41,7 @@ type PodNetworkSpec struct { // +kubebuilder:validation:Optional // customer vnet guid VnetGUID string `json:"vnetGUID,omitempty"` - // customer subnet name + // customer subnet id SubnetResourceID string `json:"subnetResourceID,omitempty"` } diff --git a/crd/external/podnetwork/manifests/acn.azure.com_podnetworks.yaml b/crd/external/podnetwork/manifests/acn.azure.com_podnetworks.yaml index 5b678b70ac..7e17cf65ad 100644 --- a/crd/external/podnetwork/manifests/acn.azure.com_podnetworks.yaml +++ b/crd/external/podnetwork/manifests/acn.azure.com_podnetworks.yaml @@ -25,7 +25,7 @@ spec: name: Address Prefixes priority: 1 type: string - - jsonPath: .spec.vnetGuid + - jsonPath: .spec.vnetGUID name: Network priority: 1 type: string @@ -54,9 +54,9 @@ spec: description: PodNetworkSpec defines the desired state of PodNetwork properties: subnetResourceID: - description: customer subnet name + description: customer subnet id type: string - vnetGuid: + vnetGUID: description: customer vnet guid type: string type: object