File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -97,8 +97,12 @@ func (r *cloudMapReconciler) reconcileVirtualNodeWithCloudMap(ctx context.Contex
9797
9898func (r * cloudMapReconciler ) cleanupCloudMapResources (ctx context.Context , vNode * appmesh.VirtualNode ) error {
9999 if k8s .HasFinalizer (vNode , k8s .FinalizerAWSCloudMapResources ) {
100- if err := r .cloudMapResourceManager .Cleanup (ctx , vNode ); err != nil {
101- return err
100+ // TODO: choose one of the approach in https://github.com/aws/aws-app-mesh-controller-for-k8s/issues/305#issuecomment-654374069
101+ // to completely fix the issue
102+ if vNode .Spec .ServiceDiscovery != nil && vNode .Spec .ServiceDiscovery .AWSCloudMap != nil {
103+ if err := r .cloudMapResourceManager .Cleanup (ctx , vNode ); err != nil {
104+ return err
105+ }
102106 }
103107 if err := r .finalizerManager .RemoveFinalizers (ctx , vNode , k8s .FinalizerAWSCloudMapResources ); err != nil {
104108 return err
You can’t perform that action at this time.
0 commit comments