diff --git a/pkg/config/sync.go b/pkg/config/sync.go index 3d26abf74..9a7aa5d6b 100644 --- a/pkg/config/sync.go +++ b/pkg/config/sync.go @@ -384,6 +384,15 @@ func mergeConfig(from, to *controller.OperatorConfiguration) { } to.Workspace.DefaultContainerResources = mergeResources(from.Workspace.DefaultContainerResources, to.Workspace.DefaultContainerResources) } + + if from.Workspace.Annotations != nil { + if to.Workspace.Annotations == nil { + to.Workspace.Annotations = make(map[string]string) + } + for key, value := range from.Workspace.Annotations { + to.Workspace.Annotations[key] = value + } + } } } diff --git a/pkg/provision/workspace/deployment.go b/pkg/provision/workspace/deployment.go index aa2b27f02..88563e088 100644 --- a/pkg/provision/workspace/deployment.go +++ b/pkg/provision/workspace/deployment.go @@ -197,6 +197,7 @@ func getSpecDeployment( constants.DevWorkspaceIDLabel: workspace.Status.DevWorkspaceId, constants.DevWorkspaceNameLabel: workspace.Name, }, + Annotations: workspace.Config.Workspace.Annotations, }, Spec: corev1.PodSpec{ InitContainers: podAdditions.InitContainers,