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

Function controller overwrites function's deployment's 3rd party annotations #1345

Closed
kwiatekus opened this issue Dec 24, 2024 · 0 comments
Closed
Assignees
Labels
kind/bug Categorizes issue or PR as related to a bug. priority/critical-urgent Highest priority. Must be actively worked on as someone's top priority right now.
Milestone

Comments

@kwiatekus
Copy link
Contributor

kwiatekus commented Dec 24, 2024

Description

Function controller is propagating annotations only from function spec into function's deployment object (spec.template.metadata.annotations.). It ignores any 3rd party annotations

Expected result

In case a 3rd party tool is adding annotations to workloads (for example to enforce workload restart to bump istio container version) function controller should merge existing annotations with user defined ones via function API.

Actual result

In case a 3rd party tool is adding annotations to workloads (for example to enforce workload restart to bump istio container version) function controller is not merging annotations coming from istio and user. It reconciles function deployment and keeps only user defined annotations originating from function crspec.annotaions

Steps to reproduce

  1. Install serverless on k3d
  2. Create a function
  3. Manually edit function's deployment to add a random "foo=bar" annotation in the spec.template.metadata.annotation
  4. Observe that function controller reverted the annotation on the target deployment
  5. Repeat the steps with serverless controller scaled down to 0 to see that annotation is propagated to pod correctly

Attachments
here is how istio uses annotations to enforce workload restart.

@kwiatekus kwiatekus added kind/bug Categorizes issue or PR as related to a bug. priority/critical-urgent Highest priority. Must be actively worked on as someone's top priority right now. labels Dec 24, 2024
@pPrecel pPrecel self-assigned this Dec 27, 2024
@kwiatekus kwiatekus added this to the 1.6.0 milestone Dec 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Categorizes issue or PR as related to a bug. priority/critical-urgent Highest priority. Must be actively worked on as someone's top priority right now.
Projects
None yet
Development

No branches or pull requests

2 participants