diff --git a/cns/NetworkContainerContract.go b/cns/NetworkContainerContract.go index 6c49cde62c1..4255658aa1f 100644 --- a/cns/NetworkContainerContract.go +++ b/cns/NetworkContainerContract.go @@ -96,7 +96,7 @@ type CreateNetworkContainerRequest struct { AllowHostToNCCommunication bool AllowNCToHostCommunication bool EndpointPolicies []NetworkContainerRequestPolicies - NCStatus v1alpha.NetworkContainerStatus + NCStatus v1alpha.NCStatus } // CreateNetworkContainerRequest implements fmt.Stringer for logging @@ -104,9 +104,9 @@ func (req *CreateNetworkContainerRequest) String() string { return fmt.Sprintf("CreateNetworkContainerRequest"+ "{Version: %s, NetworkContainerType: %s, NetworkContainerid: %s, PrimaryInterfaceIdentifier: %s, "+ "LocalIPConfiguration: %+v, IPConfiguration: %+v, SecondaryIPConfigs: %+v, MultitenancyInfo: %+v, "+ - "AllowHostToNCCommunication: %t, AllowNCToHostCommunication: %t}", + "AllowHostToNCCommunication: %t, AllowNCToHostCommunication: %t, NCStatus: %s}", req.Version, req.NetworkContainerType, req.NetworkContainerid, req.PrimaryInterfaceIdentifier, req.LocalIPConfiguration, - req.IPConfiguration, req.SecondaryIPConfigs, req.MultiTenancyInfo, req.AllowHostToNCCommunication, req.AllowNCToHostCommunication) + req.IPConfiguration, req.SecondaryIPConfigs, req.MultiTenancyInfo, req.AllowHostToNCCommunication, req.AllowNCToHostCommunication, string(req.NCStatus)) } // NetworkContainerRequestPolicies - specifies policies associated with create network request diff --git a/cns/ipampool/monitor.go b/cns/ipampool/monitor.go index d78daf932ec..06a71054f47 100644 --- a/cns/ipampool/monitor.go +++ b/cns/ipampool/monitor.go @@ -121,7 +121,6 @@ func (pm *Monitor) Start(ctx context.Context) error { pm.metastate.subnet = nnc.Status.NetworkContainers[0].SubnetName pm.metastate.subnetCIDR = nnc.Status.NetworkContainers[0].SubnetAddressSpace pm.metastate.subnetARMID = GenerateARMID(&nnc.Status.NetworkContainers[0]) - pm.metastate.nncStatus = nnc.Status.NetworkContainers[0].UpdateStatus } pm.metastate.primaryIPAddresses = make(map[string]struct{}) // Add Primary IP to Map, if not present. diff --git a/cns/kubecontroller/nodenetworkconfig/conversion.go b/cns/kubecontroller/nodenetworkconfig/conversion.go index 8b65659ae2d..8f6346ce52b 100644 --- a/cns/kubecontroller/nodenetworkconfig/conversion.go +++ b/cns/kubecontroller/nodenetworkconfig/conversion.go @@ -66,7 +66,7 @@ func CreateNCRequestFromDynamicNC(nc v1alpha.NetworkContainer) (*cns.CreateNetwo IPSubnet: subnet, GatewayIPAddress: nc.DefaultGateway, }, - NCStatus: nc.UpdateStatus, + NCStatus: nc.Status, }, nil } diff --git a/cns/kubecontroller/nodenetworkconfig/conversion_linux.go b/cns/kubecontroller/nodenetworkconfig/conversion_linux.go index af024c2f9f8..a22dbd4bd87 100644 --- a/cns/kubecontroller/nodenetworkconfig/conversion_linux.go +++ b/cns/kubecontroller/nodenetworkconfig/conversion_linux.go @@ -56,6 +56,6 @@ func createNCRequestFromStaticNCHelper(nc v1alpha.NetworkContainer, primaryIPPre IPSubnet: subnet, GatewayIPAddress: nc.DefaultGateway, }, - NCStatus: nc.UpdateStatus, + NCStatus: nc.Status, }, nil } diff --git a/cns/kubecontroller/nodenetworkconfig/conversion_windows.go b/cns/kubecontroller/nodenetworkconfig/conversion_windows.go index ce66ba275a6..0a41ccd41cf 100644 --- a/cns/kubecontroller/nodenetworkconfig/conversion_windows.go +++ b/cns/kubecontroller/nodenetworkconfig/conversion_windows.go @@ -66,6 +66,6 @@ func createNCRequestFromStaticNCHelper(nc v1alpha.NetworkContainer, primaryIPPre IPSubnet: subnet, GatewayIPAddress: nc.DefaultGateway, }, - NCStatus: nc.UpdateStatus, + NCStatus: nc.Status, }, nil } diff --git a/crd/nodenetworkconfig/api/v1alpha/nodenetworkconfig.go b/crd/nodenetworkconfig/api/v1alpha/nodenetworkconfig.go index 2b6c8c653fb..4fca708fb36 100644 --- a/crd/nodenetworkconfig/api/v1alpha/nodenetworkconfig.go +++ b/crd/nodenetworkconfig/api/v1alpha/nodenetworkconfig.go @@ -77,13 +77,6 @@ type NodeNetworkConfigStatus struct { NetworkContainers []NetworkContainer `json:"networkContainers,omitempty"` } -// NetworkContainerStatus defines the status of the Network Containers -type NetworkContainerStatus struct { - Timestamp metav1.Time `json:"timestamp,omitempty"` - LatestStatus string `json:"latestStatus,omitempty"` - LatestErrorText string `json:"latestErrorText,omitempty"` -} - // Scaler groups IP request params together type Scaler struct { BatchSize int64 `json:"batchSize,omitempty"` diff --git a/crd/nodenetworkconfig/api/v1alpha/zz_generated.deepcopy.go b/crd/nodenetworkconfig/api/v1alpha/zz_generated.deepcopy.go index 7bf275c7506..ac4c0df1ec5 100644 --- a/crd/nodenetworkconfig/api/v1alpha/zz_generated.deepcopy.go +++ b/crd/nodenetworkconfig/api/v1alpha/zz_generated.deepcopy.go @@ -31,7 +31,6 @@ func (in *NetworkContainer) DeepCopyInto(out *NetworkContainer) { *out = make([]IPAssignment, len(*in)) copy(*out, *in) } - in.UpdateStatus.DeepCopyInto(&out.UpdateStatus) } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NetworkContainer. @@ -44,22 +43,6 @@ func (in *NetworkContainer) DeepCopy() *NetworkContainer { return out } -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *NetworkContainerStatus) DeepCopyInto(out *NetworkContainerStatus) { - *out = *in - in.Timestamp.DeepCopyInto(&out.Timestamp) -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NetworkContainerStatus. -func (in *NetworkContainerStatus) DeepCopy() *NetworkContainerStatus { - if in == nil { - return nil - } - out := new(NetworkContainerStatus) - in.DeepCopyInto(out) - return out -} - // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *NodeNetworkConfig) DeepCopyInto(out *NodeNetworkConfig) { *out = *in diff --git a/crd/nodenetworkconfig/manifests/acn.azure.com_nodenetworkconfigs.yaml b/crd/nodenetworkconfig/manifests/acn.azure.com_nodenetworkconfigs.yaml index 0adb8410f99..c9a8949715a 100644 --- a/crd/nodenetworkconfig/manifests/acn.azure.com_nodenetworkconfigs.yaml +++ b/crd/nodenetworkconfig/manifests/acn.azure.com_nodenetworkconfigs.yaml @@ -133,18 +133,6 @@ spec: description: NCType is the specific type of network this NC represents. type: string - updateStatus: - description: NetworkContainerStatus defines the status of the - Network Containers - properties: - latestErrorText: - type: string - latestStatus: - type: string - timestamp: - format: date-time - type: string - type: object version: default: 0 format: int64