Configure Kubernetes dashboard using annotations on Kustomization/HelmRelease
Everyone can contribute. Help move this issue forward while earning points, leveling up and collecting rewards.
Release notes
Problem to solve
As a Platform Engineer, I want to simplify setting up a Kubernetes dashboards, so application operators can easily benefit from the dashboard.
Proposal
TBD
Use a series of annotations on a Flux Kustomization or HelmRelease to configure a Kubernetes dashboard dynamically.
apiVersion: helm.toolkit.fluxcd.io/v2
kind: HelmRelease
metadata:
name: my-app
namespace: my-namespace
annotations:
gitlab.com/project: my-group/my-project
gitlab.com/environment: production/my-app
Would configure the production/my-app in the my-group/my-project project to
- use the agent in the cluster that picked up the notification
- use
my-namespace - use the
my-appHelmRelease for Flux status
Update the environment settings every time the resource changes.
Caveats
- what to do when multiple agents are available in a cluster?
- Option 1: claim it to be not supported, related to Feedback issue: running multiple agents in a si... (#454110)
- Option 2: make it an agent configuration to specify for each agent which namespaces to watch, leave it unsupported otherwise
- Option 3: add an annotation to select the agent:
gitlab.com/agent: infra-group/agents:my-agentwould pick the specified agent by agent configuration project and name from the list of available agents in the "gitlab.com/project" project
- what to do when multiple resources want to configure the same environment?
- Let them race for it
- how to do cross-project configurations?
Implementation guide
To be refined
Intended users
Feature Usage Metrics
- Share (%) of Kubernetes dashboards configured through annotations by environment tier (and in total)
As a Kubernetes dashboard is not a resource in itself, a bit more explanation might be in order. By Kubernetes dashboards, we mean environments with an agent configured.
Numerical example:
- Having 100 environments in total, 20 being marked as production
- 60 of them having an agent, 20 of them in a production environment
- 40 of them being configured through annotations, 10 of them in a production environment
- the share of Kubernetes dashboards is 40/60 in total, and 10/20 in production environments
Does this feature require an audit event?
No new audit events are required.
Edited by 🤖 GitLab Bot 🤖