mirror of https://github.com/kubernetes/kops.git
				
				
				
			Merge pull request #10918 from spotinst/fix-list-igs
Spotinst: Prevent instance groups with the same suffix from being deleted
This commit is contained in:
		
						commit
						cc4f37df4b
					
				| 
						 | 
				
			
			@ -99,7 +99,7 @@ func listInstanceGroups(svc InstanceGroupService, clusterName string) ([]*resour
 | 
			
		|||
 | 
			
		||||
	var resourceTrackers []*resources.Resource
 | 
			
		||||
	for _, group := range groups {
 | 
			
		||||
		if strings.HasSuffix(group.Name(), clusterName) &&
 | 
			
		||||
		if strings.HasSuffix(group.Name(), fmt.Sprintf(".%s", clusterName)) &&
 | 
			
		||||
			!strings.HasPrefix(strings.ToLower(group.Name()), "spotinst::ocean::") {
 | 
			
		||||
			resource := &resources.Resource{
 | 
			
		||||
				ID:      group.Id(),
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue