Skip to content

Commit 18bdf1e

Browse files
authored
Merge pull request #119 from kiranmeduri/cloudmap-1
Stop using status field to sync cloudmap service for virtual-node
2 parents 7d7a273 + c071f78 commit 18bdf1e

File tree

1 file changed

+2
-7
lines changed

1 file changed

+2
-7
lines changed

pkg/controller/virtualnode.go

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -404,12 +404,7 @@ func (c *Controller) handleVNodeMeshDeleting(ctx context.Context, vnode *appmesh
404404
// to setup external resources. For now only Cloud Map _service_ is setup
405405
func (c *Controller) handleServiceDiscovery(ctx context.Context, vnode *appmeshv1beta1.VirtualNode, copyForUpdate *appmeshv1beta1.VirtualNode) error {
406406
if vnode.Spec.ServiceDiscovery == nil || vnode.Spec.ServiceDiscovery.CloudMap == nil {
407-
klog.V(4).Infof("CloudMap service is already created")
408-
return nil
409-
}
410-
411-
if vnode.Status.CloudMapService != nil && vnode.Status.CloudMapService.ServiceID != nil {
412-
klog.V(4).Infof("CloudMap service is already created for virtual-node %s", vnode.Name)
407+
klog.V(4).Infof("Virtual-node %s is not using Cloud Map as servicediscovery", vnode.Name)
413408
return nil
414409
}
415410

@@ -436,7 +431,7 @@ func (c *Controller) handleServiceDiscovery(ctx context.Context, vnode *appmeshv
436431
return err
437432
}
438433

439-
klog.Infof("Created CloudMap service %s (id:%s)", cloudmapServiceName, cloudmapService.ServiceID)
434+
klog.V(4).Infof("Created CloudMap service %s (id:%s)", cloudmapServiceName, cloudmapService.ServiceID)
440435

441436
statusErr := c.setVirtualNodeStatusCloudMapService(copyForUpdate, &appmeshv1beta1.CloudMapServiceStatus{
442437
NamespaceID: awssdk.String(cloudmapService.NamespaceID),

0 commit comments

Comments
 (0)