Skip to content

fix(helm): roll the operator when the trivy-operator ConfigMap changes - #3085

Open
ahauserv wants to merge 1 commit into
aquasecurity:mainfrom
ahauserv:fix/helm-roll-on-operator-configmap
Open

ahauserv wants to merge 1 commit into
aquasecurity:mainfrom
ahauserv:fix/helm-roll-on-operator-configmap

Conversation

@ahauserv

Copy link
Copy Markdown

Description

The operator reads the trivy-operator ConfigMap once, at startup (configManager.Read in pkg/operator/operator.go). The Deployment's checksum annotation only covers trivy-operator-config, so changing any trivyOperator.* value through the chart, e.g. scanJobAutomountServiceAccountToken, updates the ConfigMap but not the running operator until its pod restarts for some other reason.

This adds a second checksum annotation for configmaps/operator.yaml, so those changes roll the Deployment the same way #2760 does for trivy-operator-config. The plugin ConfigMap is re-read on every GetConfig call and needs none. deploy/static/trivy-operator.yaml carries the rendered annotation.

Related issues

Checklist

  • I've read the guidelines for contributing to this repository.
  • I've added tests that prove my fix is effective or that my feature works.
  • I've updated the documentation with the relevant information (if needed).
  • I've added usage information (if the PR introduces new options)
  • I've included a "before" and "after" example to the description (if the PR is a user interface change).

@ahauserv
ahauserv force-pushed the fix/helm-roll-on-operator-configmap branch from 6aa63f1 to 3d36770 Compare October 13, 2026 10:01
The operator reads the trivy-operator ConfigMap once, at startup
(configManager.Read in pkg/operator/operator.go), so a change to any
trivyOperator.* value, such as scanJobAutomountServiceAccountToken,
takes effect only after the pod is restarted by something else. The
Deployment's checksum annotation covers only trivy-operator-config.
Add a second one for configmaps/operator.yaml. The plugin ConfigMap is
re-read on every GetConfig call and needs none.

This branch has not been deployed

No deployments
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

Successfully merging this pull request may close these issues.

1 participant