Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replicate deployment labels to the pod spec template #114

Open
jfroy opened this issue Nov 13, 2024 · 1 comment
Open

Replicate deployment labels to the pod spec template #114

jfroy opened this issue Nov 13, 2024 · 1 comment

Comments

@jfroy
Copy link

jfroy commented Nov 13, 2024

The labels on operator-managed Deployments are not replicated in the pod spec template, which means the pods do not have them. This makes it difficult to select those pods for e.g. monitoring, policy enforcement, etc.

Using a kustomize patch is a partial workaround. Most of the labels can be added that way, but some are more difficult because of their dynamic nature (e.g. version).

Also, the app.kubernetes.io/name label is missing on the Deployment, and the app.kubernetes.io/instance label (in my deployment) is set to "flux-system", when it should arguably be set to "flux" (the name of the FluxInstance resource).

@stefanprodan
Copy link
Member

The way the operator sets up Flux is identical to the upstream procedure, the deployment spec and pod labels are the same as flux bootstrap so the operator can take over the management without triggering a rollout which could disrupt a production cluster.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants