File tree 1 file changed +3
-3
lines changed
controllers/workspace/provision 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -19,6 +19,7 @@ import (
19
19
20
20
devworkspace "github.com/devfile/api/pkg/apis/workspaces/v1alpha2"
21
21
"github.com/devfile/devworkspace-operator/apis/controller/v1alpha1"
22
+ maputils "github.com/devfile/devworkspace-operator/internal/map"
22
23
"github.com/devfile/devworkspace-operator/pkg/config"
23
24
"github.com/google/go-cmp/cmp"
24
25
"github.com/google/go-cmp/cmp/cmpopts"
@@ -144,15 +145,14 @@ func getSpecRouting(
144
145
145
146
var annotations map [string ]string
146
147
if val , ok := workspace .Annotations [config .WorkspaceRestrictedAccessAnnotation ]; ok {
147
- annotations = map [string ]string {}
148
- annotations [config .WorkspaceRestrictedAccessAnnotation ] = val
148
+ annotations = maputils .Append (annotations , config .WorkspaceRestrictedAccessAnnotation , val )
149
149
}
150
150
151
151
// copy the annotations for the specific routingClass from the workspace object to the routing
152
152
expectedAnnotationPrefix := workspace .Spec .RoutingClass + config .RoutingAnnotationInfix
153
153
for k , v := range workspace .GetAnnotations () {
154
154
if strings .HasPrefix (k , expectedAnnotationPrefix ) {
155
- annotations [ k ] = v
155
+ annotations = maputils . Append ( annotations , k , v )
156
156
}
157
157
}
158
158
You can’t perform that action at this time.
0 commit comments