Remove 'app' label matching from Kubernetes deployment selector
Problem to solve
With the completion of https://gitlab.com/gitlab-org/gitlab-ee/issues/9221 deploy boards will match by app.gitlab.com/app
and app.gitlab.com/env
, or app
.
This is a great first step, however, if two applications have app=production
in the same namespace still, then the pods will still appear in deploy boards. Because some users deploy their apps via helm charts that already set the app
label value on releases, they then have to overwrite this manually to see it on the deploy board, otherwise all deployments will appear to be for the same app.
Intended users
Developers, operators
Further details
Proposal
Only match deployments by app.gitlab.com/app
and app.gitlab.com/env
.
- Result: only new chart will now appear on deploy board
Considerations:
- Communicate to users "why" their deployments may not be showing up on deploy boards. If users have configured their deployments so that matching on
app
takes place, they will no longer see that on deploy boards as we're matching onapp.example.com/app
andapp.example.com/env
only starting in 12.0. Something along the lines of "don't see your deployment? label selectors for deployments recently changed, click here for more info" (maybe not those exact words but something to that effect). And point to the updated docs https://docs.gitlab.com/ee/user/project/deploy_boards.html#enabling-deploy-boards
Solution
Present an alert for any deploy board that is not functioning because app
is being used. We should only present the alert if we know the user is using app
for that environment.
Copy:
Matching on the
app
label has been removed for deploy boards. To see your board, you must update your chart and redeploy. More information