File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -83,16 +83,11 @@ func (ssc *StackSetContainer) NewStack() (*StackContainer, string) {
8383 spec .RouteGroup = ssc .StackSet .Spec .RouteGroup .DeepCopy ()
8484 }
8585
86- stackAnnotations := make (map [string ]string )
87- if a := ssc .StackSet .Spec .StackTemplate .Annotations ; a != nil {
88- stackAnnotations = a
89- }
90-
9186 if forwardMigration {
92- stackAnnotations [ forwardBackendAnnotation ] = forwardBackendName
93- }
94- if len ( stackAnnotations ) == 0 {
95- stackAnnotations = nil
87+ if ssc . StackSet . Spec . StackTemplate . Annotations == nil {
88+ ssc . StackSet . Spec . StackTemplate . Annotations = make ( map [ string ] string )
89+ }
90+ ssc . StackSet . Spec . StackTemplate . Annotations [ forwardBackendAnnotation ] = forwardBackendName
9691 }
9792
9893 return & StackContainer {
@@ -115,7 +110,7 @@ func (ssc *StackSetContainer) NewStack() (*StackContainer, string) {
115110 ssc .StackSet .Labels ,
116111 map [string ]string {StackVersionLabelKey : stackVersion },
117112 ),
118- Annotations : stackAnnotations ,
113+ Annotations : ssc . StackSet . Spec . StackTemplate . Annotations ,
119114 },
120115 Spec : * spec ,
121116 },
You can’t perform that action at this time.
0 commit comments