mirror of https://github.com/kubernetes/kops.git
				
				
				
			Merge pull request #5138 from justinsb/shared_instance_tags
Don't tag shared instances at all
This commit is contained in:
		
						commit
						1e4d7ab6a7
					
				|  | @ -270,7 +270,7 @@ func (b *NetworkModelBuilder) Build(c *fi.ModelBuilderContext) error { | ||||||
| 					Lifecycle: b.Lifecycle, | 					Lifecycle: b.Lifecycle, | ||||||
| 					ID:        s(b.Cluster.Spec.Subnets[i].Egress), | 					ID:        s(b.Cluster.Spec.Subnets[i].Egress), | ||||||
| 					Shared:    fi.Bool(true), | 					Shared:    fi.Bool(true), | ||||||
| 					Tags:      b.CloudTags(zone+"."+b.ClusterName(), true), | 					Tags:      nil, // We don't need to add tags here
 | ||||||
| 				} | 				} | ||||||
| 
 | 
 | ||||||
| 				c.AddTask(in) | 				c.AddTask(in) | ||||||
|  |  | ||||||
|  | @ -156,7 +156,7 @@ func (e *Instance) Find(c *fi.Context) (*Instance, error) { | ||||||
| 		actual.IAMInstanceProfile = &IAMInstanceProfile{Name: nameFromIAMARN(i.IamInstanceProfile.Arn)} | 		actual.IAMInstanceProfile = &IAMInstanceProfile{Name: nameFromIAMARN(i.IamInstanceProfile.Arn)} | ||||||
| 	} | 	} | ||||||
| 
 | 
 | ||||||
| 	actual.Tags = mapEC2TagsToMap(i.Tags) | 	actual.Tags = intersectTags(i.Tags, e.Tags) | ||||||
| 
 | 
 | ||||||
| 	actual.Lifecycle = e.Lifecycle | 	actual.Lifecycle = e.Lifecycle | ||||||
| 	actual.Shared = e.Shared | 	actual.Shared = e.Shared | ||||||
|  | @ -195,10 +195,6 @@ func nameFromIAMARN(arn *string) *string { | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| func (e *Instance) Run(c *fi.Context) error { | func (e *Instance) Run(c *fi.Context) error { | ||||||
| 	cloud := c.Cloud.(awsup.AWSCloud) |  | ||||||
| 
 |  | ||||||
| 	cloud.AddTags(e.Name, e.Tags) |  | ||||||
| 
 |  | ||||||
| 	return fi.DefaultDeltaRunMethod(e, c) | 	return fi.DefaultDeltaRunMethod(e, c) | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue