devfile / devworkspace-operator

Apache License 2.0
67 stars 55 forks source link

Add Service Annotations to the DevWorkspaceRouting CRD #1293

Open AObuchow opened 3 months ago

AObuchow commented 3 months ago

In order to resolve https://github.com/devfile/devworkspace-operator/issues/1023 we need to allow DevWorkspaceRouting objects to contain annotations which should be applied to the service created for a workspace.

Based on https://github.com/devfile/api/issues/632#issuecomment-957784891, it seems like the service annotations from all of the devworkspace's container components should be aggregated and added as annotations to the workspace's service:

As discussed in today's call, we changed the proposal to have container level annotation defines deployment & service annotation, and move ingress/route annotation to endpoint level. Since currently we have all containers defined within same pod share the same service. In the future, if we want to have multiple services for a same pod, we can add service annotation to endpoint level, which takes priority to container level service annotation and overwrites it when generating the service resource spec.

AObuchow commented 3 weeks ago

Once this issue is resolved, a follow-up issue would be to support component.annotations.service from the devfile API. Another issue should be made for that topic.