Skip to content

Upd: victoria-metrics operator to v0.55.0 - #792

Merged
Andrei Kvapil (kvaps) merged 1 commit into
mainfrom
upd-vm
Apr 10, 2025
Merged

Upd: victoria-metrics operator to v0.55.0#792
Andrei Kvapil (kvaps) merged 1 commit into
mainfrom
upd-vm

Conversation

@kvaps

@kvaps Andrei Kvapil (kvaps) commented Apr 10, 2025

Copy link
Copy Markdown
Member

Signed-off-by: Andrei Kvapil kvapss@gmail.com

Summary by CodeRabbit

  • New Features

    • Upgraded operator and chart versions with additional configuration options for enhanced metrics scraping, security, and resource management.
    • Introduced new settings to fine-tune monitoring endpoints and resource definitions.
  • Documentation

    • Updated release notes and metadata for clearer change tracking.
    • Streamlined user documentation by removing legacy files.
  • Improvements

    • Enhanced error handling and validation logic for smoother deployments.

Signed-off-by: Andrei Kvapil <kvapss@gmail.com>
@coderabbitai

coderabbitai Bot commented Apr 10, 2025

Copy link
Copy Markdown
Contributor

Walkthrough

This pull request updates various Helm chart files for the Victoria Metrics Operator and related Prometheus Operator CRDs. The changes include version upgrades in Chart metadata, addition of new CRD fields and configuration options, and extensive refactoring of template helper functions and variable usage in Helm templates. Several documentation files have been removed or replaced and new configuration keys have been introduced into the values file. Minor error handling improvements and structural consistency changes are also present across multiple template files.

Changes

File(s) Change Summary
packages/system/victoria-metrics-operator/charts/prometheus-operator-crds/Chart.yaml
.../charts/crds/templates/crd-podmonitors.yaml
.../crd-probes.yaml
.../crd-prometheusrules.yaml
.../crd-servicemonitors.yaml
Upgraded appVersion and operator version; updated annotations (controller-gen, operator versions); added new CRD fields (e.g. fallbackScrapeProtocol, nativeHistogramBucketLimit, etc.)
packages/system/victoria-metrics-operator/charts/victoria-metrics-operator/Chart.yaml
.../CHANGELOG.md
.../README.md
.../README.md.gotmpl
.../RELEASE_NOTES.md
.../_changelog.md
.../_index.md
.../RELEASE_NOTES
Updated chart version and metadata links; added new release notes file; removed extensive changelog and documentation files
packages/system/victoria-metrics-operator/charts/victoria-metrics-operator/.helmignore
packages/system/victoria-metrics-operator/charts/victoria-metrics-operator/charts/victoria-metrics-common/.helmignore
Added ignore patterns for Markdown files (*.md, *.md.gotmpl)
packages/system/victoria-metrics-operator/charts/victoria-metrics-operator/templates/...
packages/system/victoria-metrics-operator/charts/victoria-metrics-operator/charts/victoria-metrics-common/templates/...
Extensive refactoring of Helm templates: updated variable usage (e.g. introduction of $fullname, $ns, $ctx), removal of deprecated helper functions, improved error handling, and consolidation of naming logic across deployment, cleanup, RBAC, webhook, service, and other resources
packages/system/victoria-metrics-operator/charts/victoria-metrics-operator/values.yaml Introduced new configuration keys: allowedMetricsEndpoints, automountServiceAccountToken, priorityClassName, hostNetwork, updates in crds, new security context options, and certManager parameters

Sequence Diagram(s)

sequenceDiagram
    participant U as User/Values
    participant H as Helm Renderer
    participant T as Template Helpers
    participant O as Generated YAML

    U->>H: Supply values.yaml and Chart.yaml
    H->>T: Invoke validation & helper functions (e.g., vm.validate.args, vm.fullname)
    T-->>H: Return computed context variables and processed values
    H->>H: Evaluate conditional logic (CRD cleanup, service account naming, etc.)
    H->>O: Render final Kubernetes manifests
Loading

Suggested reviewers

  • xy2
  • lllamnyp

Poem

I'm a rabbit, hopping with cheer,
As code fields bloom and versions appear.
New keys and functions make my heart race,
In templated hops through each file's space.
With each refactored line, I bound with glee,
Celebrating changes in this code-filled spree!
🐇💻


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai plan to trigger planning for file edits and PR creation.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

🧹 Nitpick comments (6)
packages/system/victoria-metrics-operator/charts/victoria-metrics-operator/charts/victoria-metrics-common/values.yaml (1)

1-1: New configuration option added.

The new key unitTest is set to false by default, which increases the chart's configurability. Consider adding a brief comment describing its purpose or expected behavior to aid future maintenance.

packages/system/victoria-metrics-operator/charts/victoria-metrics-operator/templates/NOTES.txt (1)

1-6: Dynamic inclusion improves template consistency.

Replacing {{ $.Chart.Name }} with the helper call {{ include "vm.name" . }} enhances flexibility and maintainability of the Helm chart templates. A minor note from static analysis flagged loose punctuation—verify that the punctuation in the installation message meets your style guidelines.

🧰 Tools
🪛 LanguageTool

[uncategorized] ~1-~1: Loose punctuation mark.
Context: {{ include "vm.name" . }} has been installed. Check its status b...

(UNLIKELY_OPENING_PUNCTUATION)


[uncategorized] ~2-~2: Loose punctuation mark.
Context: ...--namespace {{ include "vm.namespace" . }} get pods -l "app.kubernetes.io/instanc...

(UNLIKELY_OPENING_PUNCTUATION)


[style] ~4-~4: Consider using a more formal alternative.
Context: ....io/instance={{ $.Release.Name }}" Get more information on https://github.com/VictoriaMetrics/h...

(MORE_INFO)

packages/system/victoria-metrics-operator/charts/victoria-metrics-operator/templates/extra-objects.yaml (1)

1-5: Enhanced conditional rendering in extra-objects.yaml.

Using tpl (ternary . (toYaml .) (typeIs "string" .)) $ refines the template logic by conditionally rendering objects: if the value is a string, it remains unchanged; otherwise, it is converted to YAML. Adding an inline comment describing this behavior could be beneficial for future maintainers.

🧰 Tools
🪛 YAMLlint (1.35.1)

[error] 4-4: syntax error: expected '', but found '{'

(syntax)

packages/system/victoria-metrics-operator/charts/victoria-metrics-operator/templates/crd.yaml (1)

15-19: Iterative CRD Attribute Rendering
The loop that iterates over each attribute of the merged CRD and outputs them in JSON format is unconventional compared to standard YAML templating. Please confirm that the resulting output is acceptable to Kubernetes and adheres to any special formatting requirements for CRDs.

🧰 Tools
🪛 YAMLlint (1.35.1)

[warning] 15-15: wrong indentation: expected 0 but found 4

(indentation)


[warning] 16-16: wrong indentation: expected 0 but found 4

(indentation)


[warning] 17-17: wrong indentation: expected 0 but found 6

(indentation)

packages/system/victoria-metrics-operator/charts/victoria-metrics-operator/templates/service_account.yaml (1)

9-11: Cleanly referencing user-provided values for ServiceAccount creation.
Using $sa.name | default $fullname allows flexibility in naming, while setting automountServiceAccountToken from values is a nice addition. However, consider documenting that excessive token mounting may pose security risks and can be disabled if not needed.

Also applies to: 16-16

packages/system/victoria-metrics-operator/charts/victoria-metrics-operator/templates/role.yaml (1)

200-200: Remove trailing whitespace.

There are trailing spaces on this line that should be removed.

---- 
+---
🧰 Tools
🪛 YAMLlint (1.35.1)

[error] 200-200: trailing spaces

(trailing-spaces)

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between fa7c98b and bbdde79.

⛔ Files ignored due to path filters (3)
  • packages/system/victoria-metrics-operator/charts/prometheus-operator-crds/Chart.lock is excluded by !**/*.lock
  • packages/system/victoria-metrics-operator/charts/victoria-metrics-operator/Chart.lock is excluded by !**/*.lock
  • packages/system/victoria-metrics-operator/charts/victoria-metrics-operator/charts/victoria-metrics-common/Chart.lock is excluded by !**/*.lock
📒 Files selected for processing (41)
  • packages/system/victoria-metrics-operator/charts/prometheus-operator-crds/Chart.yaml (2 hunks)
  • packages/system/victoria-metrics-operator/charts/prometheus-operator-crds/charts/crds/templates/crd-podmonitors.yaml (10 hunks)
  • packages/system/victoria-metrics-operator/charts/prometheus-operator-crds/charts/crds/templates/crd-probes.yaml (6 hunks)
  • packages/system/victoria-metrics-operator/charts/prometheus-operator-crds/charts/crds/templates/crd-prometheusrules.yaml (4 hunks)
  • packages/system/victoria-metrics-operator/charts/prometheus-operator-crds/charts/crds/templates/crd-servicemonitors.yaml (8 hunks)
  • packages/system/victoria-metrics-operator/charts/victoria-metrics-operator/.helmignore (1 hunks)
  • packages/system/victoria-metrics-operator/charts/victoria-metrics-operator/CHANGELOG.md (0 hunks)
  • packages/system/victoria-metrics-operator/charts/victoria-metrics-operator/Chart.yaml (2 hunks)
  • packages/system/victoria-metrics-operator/charts/victoria-metrics-operator/README.md (0 hunks)
  • packages/system/victoria-metrics-operator/charts/victoria-metrics-operator/README.md.gotmpl (0 hunks)
  • packages/system/victoria-metrics-operator/charts/victoria-metrics-operator/RELEASE_NOTES (1 hunks)
  • packages/system/victoria-metrics-operator/charts/victoria-metrics-operator/RELEASE_NOTES.md (0 hunks)
  • packages/system/victoria-metrics-operator/charts/victoria-metrics-operator/_changelog.md (0 hunks)
  • packages/system/victoria-metrics-operator/charts/victoria-metrics-operator/_index.md (0 hunks)
  • packages/system/victoria-metrics-operator/charts/victoria-metrics-operator/charts/victoria-metrics-common/.helmignore (1 hunks)
  • packages/system/victoria-metrics-operator/charts/victoria-metrics-operator/charts/victoria-metrics-common/CHANGELOG.md (0 hunks)
  • packages/system/victoria-metrics-operator/charts/victoria-metrics-operator/charts/victoria-metrics-common/Chart.yaml (2 hunks)
  • packages/system/victoria-metrics-operator/charts/victoria-metrics-operator/charts/victoria-metrics-common/RELEASE_NOTES (1 hunks)
  • packages/system/victoria-metrics-operator/charts/victoria-metrics-operator/charts/victoria-metrics-common/RELEASE_NOTES.md (0 hunks)
  • packages/system/victoria-metrics-operator/charts/victoria-metrics-operator/charts/victoria-metrics-common/templates/_enterprise.tpl (2 hunks)
  • packages/system/victoria-metrics-operator/charts/victoria-metrics-operator/charts/victoria-metrics-common/templates/_helpers.tpl (6 hunks)
  • packages/system/victoria-metrics-operator/charts/victoria-metrics-operator/charts/victoria-metrics-common/templates/_image.tpl (2 hunks)
  • packages/system/victoria-metrics-operator/charts/victoria-metrics-operator/charts/victoria-metrics-common/templates/_pod.tpl (4 hunks)
  • packages/system/victoria-metrics-operator/charts/victoria-metrics-operator/charts/victoria-metrics-common/templates/_service.tpl (3 hunks)
  • packages/system/victoria-metrics-operator/charts/victoria-metrics-operator/charts/victoria-metrics-common/values.yaml (1 hunks)
  • packages/system/victoria-metrics-operator/charts/victoria-metrics-operator/templates/NOTES.txt (1 hunks)
  • packages/system/victoria-metrics-operator/charts/victoria-metrics-operator/templates/_helpers.tpl (2 hunks)
  • packages/system/victoria-metrics-operator/charts/victoria-metrics-operator/templates/cleanup.yaml (1 hunks)
  • packages/system/victoria-metrics-operator/charts/victoria-metrics-operator/templates/crb.yaml (1 hunks)
  • packages/system/victoria-metrics-operator/charts/victoria-metrics-operator/templates/crd.yaml (1 hunks)
  • packages/system/victoria-metrics-operator/charts/victoria-metrics-operator/templates/deployment.yaml (4 hunks)
  • packages/system/victoria-metrics-operator/charts/victoria-metrics-operator/templates/extra-objects.yaml (1 hunks)
  • packages/system/victoria-metrics-operator/charts/victoria-metrics-operator/templates/monitor.yaml (1 hunks)
  • packages/system/victoria-metrics-operator/charts/victoria-metrics-operator/templates/pdb.yaml (1 hunks)
  • packages/system/victoria-metrics-operator/charts/victoria-metrics-operator/templates/rb.yaml (1 hunks)
  • packages/system/victoria-metrics-operator/charts/victoria-metrics-operator/templates/role.yaml (5 hunks)
  • packages/system/victoria-metrics-operator/charts/victoria-metrics-operator/templates/service.yaml (1 hunks)
  • packages/system/victoria-metrics-operator/charts/victoria-metrics-operator/templates/service_account.yaml (1 hunks)
  • packages/system/victoria-metrics-operator/charts/victoria-metrics-operator/templates/service_scrape.yaml (0 hunks)
  • packages/system/victoria-metrics-operator/charts/victoria-metrics-operator/templates/webhook.yaml (3 hunks)
  • packages/system/victoria-metrics-operator/charts/victoria-metrics-operator/values.yaml (9 hunks)
💤 Files with no reviewable changes (9)
  • packages/system/victoria-metrics-operator/charts/victoria-metrics-operator/_index.md
  • packages/system/victoria-metrics-operator/charts/victoria-metrics-operator/_changelog.md
  • packages/system/victoria-metrics-operator/charts/victoria-metrics-operator/charts/victoria-metrics-common/RELEASE_NOTES.md
  • packages/system/victoria-metrics-operator/charts/victoria-metrics-operator/README.md.gotmpl
  • packages/system/victoria-metrics-operator/charts/victoria-metrics-operator/RELEASE_NOTES.md
  • packages/system/victoria-metrics-operator/charts/victoria-metrics-operator/templates/service_scrape.yaml
  • packages/system/victoria-metrics-operator/charts/victoria-metrics-operator/CHANGELOG.md
  • packages/system/victoria-metrics-operator/charts/victoria-metrics-operator/README.md
  • packages/system/victoria-metrics-operator/charts/victoria-metrics-operator/charts/victoria-metrics-common/CHANGELOG.md
🧰 Additional context used
🪛 LanguageTool
packages/system/victoria-metrics-operator/charts/victoria-metrics-operator/templates/NOTES.txt

[uncategorized] ~1-~1: Loose punctuation mark.
Context: {{ include "vm.name" . }} has been installed. Check its status b...

(UNLIKELY_OPENING_PUNCTUATION)

🪛 YAMLlint (1.35.1)
packages/system/victoria-metrics-operator/charts/victoria-metrics-operator/templates/crd.yaml

[warning] 6-6: cannot infer indentation: unexpected token

(indentation)


[warning] 9-9: wrong indentation: expected 0 but found 2

(indentation)


[warning] 10-10: wrong indentation: expected 0 but found 2

(indentation)


[warning] 11-11: wrong indentation: expected 0 but found 2

(indentation)


[warning] 12-12: wrong indentation: expected 0 but found 2

(indentation)


[warning] 13-13: wrong indentation: expected 0 but found 2

(indentation)


[warning] 14-14: wrong indentation: expected 0 but found 2

(indentation)


[warning] 15-15: wrong indentation: expected 0 but found 4

(indentation)


[warning] 16-16: wrong indentation: expected 0 but found 4

(indentation)


[warning] 17-17: wrong indentation: expected 0 but found 6

(indentation)

packages/system/victoria-metrics-operator/charts/victoria-metrics-operator/templates/service_account.yaml

[error] 1-1: syntax error: expected the node content, but found '-'

(syntax)

packages/system/victoria-metrics-operator/charts/victoria-metrics-operator/templates/crb.yaml

[error] 1-1: syntax error: expected the node content, but found '-'

(syntax)

packages/system/victoria-metrics-operator/charts/victoria-metrics-operator/templates/monitor.yaml

[error] 1-1: syntax error: expected the node content, but found '-'

(syntax)

packages/system/victoria-metrics-operator/charts/victoria-metrics-operator/templates/service.yaml

[error] 1-1: syntax error: expected the node content, but found '-'

(syntax)

packages/system/victoria-metrics-operator/charts/victoria-metrics-operator/templates/cleanup.yaml

[error] 1-1: syntax error: expected the node content, but found '-'

(syntax)


[warning] 5-5: wrong indentation: expected 0 but found 2

(indentation)


[warning] 7-7: wrong indentation: expected 0 but found 2

(indentation)

packages/system/victoria-metrics-operator/charts/victoria-metrics-operator/templates/pdb.yaml

[error] 1-1: syntax error: expected the node content, but found '-'

(syntax)

packages/system/victoria-metrics-operator/charts/victoria-metrics-operator/templates/deployment.yaml

[error] 1-1: syntax error: expected the node content, but found '-'

(syntax)

packages/system/victoria-metrics-operator/charts/victoria-metrics-operator/templates/role.yaml

[error] 200-200: trailing spaces

(trailing-spaces)

🔇 Additional comments (130)
packages/system/victoria-metrics-operator/charts/victoria-metrics-operator/.helmignore (1)

23-24: Consistent Exclusion of Markdown Files

The addition of the patterns *.md and *.md.gotmpl is appropriate and consistent with best practices. These patterns will ensure that unnecessary documentation files are excluded from the Helm package build process, preventing package bloat.

packages/system/victoria-metrics-operator/charts/victoria-metrics-operator/charts/victoria-metrics-common/.helmignore (1)

23-24: Uniform Update to Ignore Documentation Files

The added patterns *.md and *.md.gotmpl effectively streamline the packaging process by excluding markdown files and templates. This change mirrors the update in the parent chart’s .helmignore, ensuring consistency across the repository.

packages/system/victoria-metrics-operator/charts/victoria-metrics-operator/charts/victoria-metrics-common/RELEASE_NOTES (1)

1-8: Release notes for common chart are clear.

The release notes for version 0.0.42 are formatted well; the release date and notes (i.e. support for custom handling of an empty argument) are clearly specified. Please verify that this version number aligns with the corresponding chart metadata in Chart.yaml if applicable.

packages/system/victoria-metrics-operator/charts/victoria-metrics-operator/RELEASE_NOTES (1)

1-8: Operator release notes are accurate.

The release notes for version 0.44.0 correctly reflect the update to the Victoria Metrics Operator with the new app version v0.55.0 and include clear release date and badge information. Ensure that all links (e.g., the GitHub release link and badge URLs) are up-to-date.

packages/system/victoria-metrics-operator/charts/victoria-metrics-operator/charts/victoria-metrics-common/Chart.yaml (3)

3-4: Custom Annotation Update
The updated artifacthub.io/changes now documents support for a custom case for an empty argument in lists. This concise message improves clarity.


7-8: Improved Sources URL
The Sources URL has been updated to a more targeted path (ending with /charts/victoria-metrics-common), which helps users quickly locate the relevant chart resources.


28-28: Version Bump Confirmation
Version has been bumped to 0.0.42. Please ensure that any dependent charts or documentation (e.g. the RELEASE_NOTES) are updated accordingly.

packages/system/victoria-metrics-operator/charts/victoria-metrics-operator/Chart.yaml (5)

3-4: Operator Version Annotation Update
The changes annotation now clearly specifies the operator update to v0.55.0. This enhances traceability of the update.


7-8: Updated Sources URL for Operator
The Sources URL now points to the /charts/victoria-metrics-operator directory in the helm-charts repository, which is more specific and useful for users.


11-14: Addition of Documentation Links
Including direct links for Docs and Changelog improves user access to detailed release information. This is a welcome addition for transparency and ease of use.


17-17: appVersion Update
The appVersion field has been updated to v0.55.0, which is consistent with the operator version update.


45-45: Chart Version Update
The chart version has been bumped to 0.44.0. Please verify that this versioning aligns with project conventions and that dependent components (such as CRDs) are also version‐aligned.

packages/system/victoria-metrics-operator/charts/victoria-metrics-operator/templates/crb.yaml (4)

1-3: Use of Context Variables
Introducing the context dictionary ($ctx) along with $fullname and $ns improves readability and maintainability across the template.

🧰 Tools
🪛 YAMLlint (1.35.1)

[error] 1-1: syntax error: expected the node content, but found '-'

(syntax)


8-11: Handling Extra Labels
Setting and later unsetting extraLabels within the metadata ensures that any extra labels from values are applied only where needed, avoiding unintended propagation.


17-18: ServiceAccount Fallback Logic
Defaulting the ServiceAccount name to $fullname when not explicitly provided is a good practice that supports customization.


24-30: Cleanup Hook Conditional & Namespace Field Caution
The new conditional block for the cleanup hook (rendered only when both .Values.crds.enabled and .Values.crds.cleanup.enabled are true) is well implemented.
However, the inclusion of a namespace under metadata in a ClusterRoleBinding (lines 29-30) is atypical since ClusterRoleBindings are cluster-scoped. Please verify if this is intentional—if it’s required for the cleanup hook logic, ensure that the target Kubernetes version tolerates it.

packages/system/victoria-metrics-operator/charts/victoria-metrics-operator/templates/rb.yaml (3)

2-4: Consistent Context Usage in RoleBinding
Defining the context variables ($ctx, $fullname, $ns) at the beginning aids in reducing duplication and increases template clarity.


8-9: Namespace and Labels in Metadata
Setting the RoleBinding metadata with the proper name, namespace, and managed extraLabels supports clear resource definition, ensuring that custom annotations and labels are correctly applied.


17-19: ServiceAccount Configuration in Subjects
Fetching the ServiceAccount name from .Values.serviceAccount.name with a fallback to $fullname is a reliable method to allow user customization while providing sensible defaults.

packages/system/victoria-metrics-operator/charts/victoria-metrics-operator/templates/crd.yaml (4)

4-7: Enforcing CRD Flag Consistency
Introducing the context variable and validating that if plain CRD rendering is enabled then crds.enabled must be true is a robust safeguard. The fail directive ensures misconfigurations are caught early.

🧰 Tools
🪛 YAMLlint (1.35.1)

[warning] 6-6: cannot infer indentation: unexpected token

(indentation)


8-10: CRD File Extraction and Processing
Extracting the CRDs from the embedded crd.yaml file and splitting on the document separator is a standard technique for handling multi-CRD files within a Helm chart.

🧰 Tools
🪛 YAMLlint (1.35.1)

[warning] 9-9: wrong indentation: expected 0 but found 2

(indentation)


[warning] 10-10: wrong indentation: expected 0 but found 2

(indentation)


11-12: Merging Labels and Annotations
Merging labels and annotations using mergeOverwrite ensures that user-specified values in .Values.crds.annotations correctly override defaults. Verify that the resulting structure meets the expected CRD metadata format.

🧰 Tools
🪛 YAMLlint (1.35.1)

[warning] 11-11: wrong indentation: expected 0 but found 2

(indentation)


[warning] 12-12: wrong indentation: expected 0 but found 2

(indentation)


4-19: YAML Indentation Warnings Context
Some static analysis tools report indentation warnings (e.g. “unexpected token” or indentation mismatches). These are likely false positives caused by Helm templating logic. It would be beneficial to document or suppress these warnings to avoid confusion in future reviews.

🧰 Tools
🪛 YAMLlint (1.35.1)

[warning] 6-6: cannot infer indentation: unexpected token

(indentation)


[warning] 9-9: wrong indentation: expected 0 but found 2

(indentation)


[warning] 10-10: wrong indentation: expected 0 but found 2

(indentation)


[warning] 11-11: wrong indentation: expected 0 but found 2

(indentation)


[warning] 12-12: wrong indentation: expected 0 but found 2

(indentation)


[warning] 13-13: wrong indentation: expected 0 but found 2

(indentation)


[warning] 14-14: wrong indentation: expected 0 but found 2

(indentation)


[warning] 15-15: wrong indentation: expected 0 but found 4

(indentation)


[warning] 16-16: wrong indentation: expected 0 but found 4

(indentation)


[warning] 17-17: wrong indentation: expected 0 but found 6

(indentation)

packages/system/victoria-metrics-operator/charts/victoria-metrics-operator/templates/pdb.yaml (3)

1-5: Improved template structure with variable definitions

The variable assignments at the beginning of the template improve readability and maintainability by eliminating repetitive function calls throughout the template. This is a good practice in Helm templates.

🧰 Tools
🪛 YAMLlint (1.35.1)

[error] 1-1: syntax error: expected the node content, but found '-'

(syntax)


9-13: Good use of context manipulation for labels

Using temporary context modification with set and unset operations for the labels is a clean approach. This ensures that the extra labels are only applied to this specific resource without affecting other template includes.


15-22: Clean variable referencing in spec section

Using $pdb instead of directly accessing .Values.podDisruptionBudget throughout the template makes the code more concise and reduces the chance of typos in path references.

packages/system/victoria-metrics-operator/charts/victoria-metrics-operator/templates/monitor.yaml (4)

1-7: Well-structured variable initialization

The template starts with clear variable definitions and context setup, making the rest of the template more readable. The use of mustMerge for annotations and labels ensures proper combination of values from different sources.

🧰 Tools
🪛 YAMLlint (1.35.1)

[error] 1-1: syntax error: expected the node content, but found '-'

(syntax)


8-9: Dynamic API version and kind selection

Using the ternary function to dynamically select between Victoria Metrics and Prometheus Operator APIs based on $monitor.vm is a flexible approach that allows users to choose their preferred monitoring system.


20-44: Comprehensive endpoint configuration with dynamic field names

The endpoint configuration is thorough and properly handles optional settings. The template intelligently uses different field names based on the selected monitoring system:

  • relabelConfigs vs relabelings (line 37)
  • proxyURL vs proxyUrl (line 43)

This ensures compatibility with both monitoring systems.


45-47: Proper namespace scoping

The namespaceSelector configuration ensures that the monitoring is correctly scoped to the specific namespace where the Victoria Metrics operator is deployed.

packages/system/victoria-metrics-operator/charts/victoria-metrics-operator/charts/victoria-metrics-common/templates/_enterprise.tpl (3)

3-9: Improved license key handling

The refactored template introduces separate variables $plain and $managed for different ways to specify the license key, making the code more readable and maintainable. The if-else structure provides a clear precedence order for determining the output.


14-20: Consistent pattern for license secret name

This change follows the same pattern as the license key handling, providing consistency in the template design and making it easier to understand and maintain.


32-32:

Details

❓ Verification inconclusive

Verify logic change in enterprise disabled check

The condition has changed from a nested and condition to include an or check for .noEnterprise. This changes when enterprise features are considered disabled.

Please verify that this change is intentional and doesn't unintentionally disable enterprise features in some scenarios. The new logic will consider enterprise disabled if either:

  1. .noEnterprise is true, OR
  2. All license-related fields are empty

🏁 Script executed:

#!/bin/bash
# Check for usage of the vm.enterprise.disabled template in the codebase
echo "Checking for vm.enterprise.disabled usage:"
rg -A 3 -B 3 'vm\.enterprise\.disabled' --type yaml --type tpl

# Check if .noEnterprise is set anywhere in the values files
echo "Checking for .noEnterprise usage in values files:"
rg 'noEnterprise:' --type yaml

Length of output: 327


Action: Verify Enterprise Feature Toggle Logic

The updated condition in the file

packages/system/victoria-metrics-operator/charts/victoria-metrics-operator/charts/victoria-metrics-common/templates/_enterprise.tpl

now disables enterprise features if either:

  • the .noEnterprise flag is true, or
  • all license-related fields ($licenseKey, $licenseSecretName, and $licenseSecretKey) are empty.

Please manually verify that this logic change is intentional. In particular, ensure that:

  • The inclusion of .noEnterprise correctly reflects a deliberate switch to disable enterprise features, even if license data is later provided.
  • There are no scenarios where an unintended setting of .noEnterprise (or its absence) could lead to unexpected disabling of enterprise features.

Once you confirm that the conditional behavior is as designed, please proceed accordingly.


🏁 Script executed:

#!/bin/bash
echo "Displaying snippet from _enterprise.tpl (lines 28-36):"
sed -n '28,36p' packages/system/victoria-metrics-operator/charts/victoria-metrics-operator/charts/victoria-metrics-common/templates/_enterprise.tpl

echo ""
echo "Searching for '.noEnterprise' usage in _enterprise.tpl (with custom tpl type):"
rg --type-add 'tpl:*.tpl' "noEnterprise" packages/system/victoria-metrics-operator/charts/victoria-metrics-operator/charts/victoria-metrics-common/templates/_enterprise.tpl

echo ""
echo "Searching for license-related fields in _enterprise.tpl:"
rg "licenseKey" -n packages/system/victoria-metrics-operator/charts/victoria-metrics-operator/charts/victoria-metrics-common/templates/_enterprise.tpl
rg "licenseSecretName" -n packages/system/victoria-metrics-operator/charts/victoria-metrics-operator/charts/victoria-metrics-common/templates/_enterprise.tpl
rg "licenseSecretKey" -n packages/system/victoria-metrics-operator/charts/victoria-metrics-operator/charts/victoria-metrics-common/templates/_enterprise.tpl

echo ""
echo "Searching for '.noEnterprise' in values files:"
rg "noEnterprise:" -n .

Length of output: 3605


Action Required: Verify Updated Enterprise Feature Toggle Logic

The template in
packages/system/victoria-metrics-operator/charts/victoria-metrics-operator/charts/victoria-metrics-common/templates/_enterprise.tpl
(now defined between lines 28–36) has been updated so that enterprise features are disabled if either:

  • The .noEnterprise flag evaluates to true, or
  • All license-related fields ($licenseKey, $licenseSecretName, and $licenseSecretKey) are empty.

Please verify that this revised conditional behavior is intentional. In particular, ensure that:

  • Setting .noEnterprise is a deliberate option to disable enterprise features even when license data might otherwise enable these features.
  • There are no unintended scenarios where an incorrectly set (or unset) .noEnterprise flag or misconfiguration might disable enterprise functionality unexpectedly.
  • The configuration and documentation for .noEnterprise reflect its intended usage, especially since your current values files don’t show an explicit definition for it.

Once you confirm that this logic change meets the design requirements, you can proceed with confidence.

packages/system/victoria-metrics-operator/charts/victoria-metrics-operator/charts/victoria-metrics-common/templates/_service.tpl (5)

5-5: Added input validation for style parameter

Adding the explicit error message for invalid .style values improves error handling and provides clear guidance to users. Initializing $nameTpl to an empty string is more explicit than initializing with a default value that will be overwritten.

Also applies to: 10-11


53-53: Enhanced port fallback logic

The port determination now includes an additional fallback to $spec.service.port, making the template more robust by supporting more configuration patterns.


87-87: Improved URL path handling

Using trimSuffix to ensure the path doesn't end with a trailing slash is a good practice that prevents double slashes in the final URL. This makes the generated URLs more consistent and reliable.


37-48:

Details

❓ Verification inconclusive

Complex refactoring of spec determination logic

The logic for determining $spec from context and values has been significantly refactored. While the new implementation is more flexible, the complexity has increased. Both $values and $ctx are now processed independently and the conditional assignment of $spec has been updated accordingly.

Ensure this refactored logic maintains the same behavior as before for all edge cases. The complexity introduces potential for subtle bugs.


🏁 Script executed:

#!/bin/bash
# Check for usage of vm.host template
echo "Checking for vm.host usage in templates:"
rg "include \"vm\.host\"" --type yaml --type tpl -A 2 -B 2

Length of output: 177


#!/bin/bash
# Adding '.tpl' file type support for ripgrep and verifying vm.host usage
rg --type-add 'tpl:*.tpl' --type tpl "include \"vm\.host\"" -A 2 -B 2

Please re-run the above command to verify that the refactoring does not inadvertently affect any usage of vm.host in the .tpl files.
Since the initial script encountered a file type issue, manual confirmation of the output is required to ensure edge-case behavior remains intact.


69-80:

Details

❓ Verification inconclusive

Reversed order in vm.url spec determination

Note that the order of checks for $values and $ctx in the vm.url template (lines 76-80) is reversed compared to the vm.host template (lines 44-48). In vm.host, $ctx is checked first, while in vm.url, $values is checked first.

Verify that this difference in order is intentional and doesn't lead to inconsistent behavior between the two templates.


🏁 Script executed:

#!/bin/bash
# Check for usage of vm.url template
echo "Checking for vm.url usage in templates:"
rg "include \"vm\.url\"" --type yaml --type tpl -A 2 -B 2

Length of output: 174


Action: Verify vm.url vs. vm.host Ordering Rationale

The vm.url template (lines 76–80) prioritizes $values over $ctx, which is the reverse of what we see in the vm.host template (lines 44–48) where $ctx is checked first. Our initial automated search encountered an issue due to file type filtering (“unrecognized file type: tpl”), so we couldn’t retrieve the expected context for vm.url usage.

  • Please manually verify that this reversed order is intentional and doesn’t lead to inconsistent behavior between vm.url and vm.host.

  • If needed, re-run the following modified search command to inspect vm.url usage in template files:

    #!/bin/bash
    echo "Searching for vm.url usage in all .tpl templates:"
    rg "include \"vm\.url\"" -g '*.tpl' -A 2 -B 2
packages/system/victoria-metrics-operator/charts/victoria-metrics-operator/templates/service_account.yaml (2)

1-5: Good use of context variables for improved clarity.
These lines correctly introduce and reference $ctx, $fullname, $ns, and $sa for more modular templating.

🧰 Tools
🪛 YAMLlint (1.35.1)

[error] 1-1: syntax error: expected the node content, but found '-'

(syntax)


18-24: Correct conditional logic for cleanup-hook creation.
Restricting creation to when both CRDs and CRD cleanup are enabled is a clear and maintainable approach. The naming and labels for the cleanup ServiceAccount also follow a consistent convention.

packages/system/victoria-metrics-operator/charts/victoria-metrics-operator/templates/service.yaml (4)

1-4: Straightforward assignment of chart variables for service configuration.
Defining $service, $ctx, $fullname, and $ns helps keep the template logic consistent and readable.

🧰 Tools
🪛 YAMLlint (1.35.1)

[error] 1-1: syntax error: expected the node content, but found '-'

(syntax)


8-14: Well-organized metadata section with label injection.
Using $service.annotations conditionally, then injecting extra labels, keeps the template flexible. Unsetting extraLabels afterward avoids accidental leakage across resources.


17-39: Comprehensive handling of various Service fields.
The template correctly applies the user-provided values for clusterIP, externalIPs, loadBalancerIP, and more. This approach provides a clear, modular structure for customizing the service.


44-44: Consistent port definitions and selector usage.
Referencing $service.servicePort and $service.webhookPort ensures easy configuration. Using vm.selectorLabels aligns with the chart’s label strategy.

Also applies to: 48-48, 50-50

packages/system/victoria-metrics-operator/charts/prometheus-operator-crds/Chart.yaml (2)

13-13: Version updates align with dependency changes.
Incrementing appVersion to v0.81.0 and chart version to 19.0.0 is consistent with the rest of the upgrade.

Also applies to: 42-42


28-28: Maintainers section extended with proper URLs.
Adding GitHub links and adjusting the maintainer’s name to “Jan-Otto Kröpke” looks correct and improves chart metadata.

Also applies to: 31-31, 34-34, 36-36, 37-37

packages/system/victoria-metrics-operator/charts/victoria-metrics-operator/templates/cleanup.yaml (4)

1-1: Conditional logic ensures cleanup job is only created when needed.
Checking both .Values.crds.enabled and .Values.crds.cleanup.enabled prevents unnecessary resources. Defining $ctx, $fullname, and $ns clarifies resource naming.

Also applies to: 9-11

🧰 Tools
🪛 YAMLlint (1.35.1)

[error] 1-1: syntax error: expected the node content, but found '-'

(syntax)


16-18: Consistent naming and labeling for the cleanup job.
Appending “-cleanup-hook” is descriptive, and using vm.labels provides uniform labeling.


23-24: Straightforward job template configuration.
Properly referencing $fullname for naming and ensuring the serviceAccount matches the newly created cleanup-hook ServiceAccount.

Also applies to: 26-27


32-33: Robust approach to container image retrieval.
By setting appKey and using vm.image, the cleanup container’s image is drawn from a consistent source, helping avoid misconfiguration.

packages/system/victoria-metrics-operator/charts/victoria-metrics-operator/charts/victoria-metrics-common/templates/_image.tpl (3)

5-15: Clear repository and registry handling.
Failing on missing .repository is helpful to catch misconfigurations early, and conditionally prepending the registry if defined is a clean approach.


17-36: Flexible tag resolution logic with optional variants.
Falling back to the chart’s AppVersion if no tag is provided, and optionally appending an enterprise variant, is a well-structured pattern.


38-60: Robust vm.internal.image function with fail-fast checks.
Traversing the appKey, ensuring data exists, and optionally pulling in a global registry are well-executed. This design prevents subtle misconfigurations in image references.

packages/system/victoria-metrics-operator/charts/victoria-metrics-operator/charts/victoria-metrics-common/templates/_helpers.tpl (16)

2-2: Validate Helm version early
Invoking "vm.validate.args" at this point ensures that a suitable Helm version is enforced before proceeding with any logic that depends on it.


10-13: Minimum Helm version requirement
Failing immediately when the Helm version is below 3.14.0 is a reliable way to prevent potential incompatibilities during chart installation or upgrades.


24-28: Conditional name truncation
The logic here dynamically truncates or preserves names based on the disableNameTruncation setting, helping avoid DNS label length limits.


43-50: Flexible fullname overrides
This block cleanly checks fullnameOverride and global.fullnameOverride, falling back to release-based naming when no overrides are set.

Also applies to: 52-52


55-60: Evaluate fullname as a template
Using tpl on $fullname ensures any template references are expanded properly, while still honoring the truncate logic.


63-77: Consistent CR naming
Defining "vm.cr.fullname" provides a specific naming scheme for custom resources, reusing preexisting logic or falling back to "vm.fullname".


80-95: Managed naming scheme
"vm.managed.fullname" includes a conditional prefix for resources that require a “vm” prefix. This ensures clarity and alignment with the rest of the naming conventions.


100-116: Plain naming variant
"vm.plain.fullname" provides a more minimal naming mode, still leveraging the internal key logic and the standard truncate approach.


118-144: Dynamic key lookup
"vm.internal.key" correctly handles nested definitions and fallback logic, ensuring that any override or fallback is consistently applied across the chart.


146-150: Default key extraction
Ignoring "spec" and extracting the final relevant segment is an effective way to define a default name component.


156-163: Chart name and version labeling
Replacing the plus sign in the version string to prevent invalid DNS-like labeling is a common best practice.


186-193: Pod labels merging
Merging selectorLabels with additional labels ensures standardization across pods while still allowing custom labeling.


200-201: Regex cleanup of image tag
Striping out @sha256 in the app.kubernetes.io/version label clarifies version references in Kubernetes object labels.


210-215: Argo CD release overrides
Accommodating a release override for Argo CD users, with optional truncation, is a tidy solution that keeps naming manageable.


218-223: Compute the “app” name
Building on "vm.internal.key" logic gives a uniform method to retrieve or override the app name, for improved maintainability.


232-236: Conditional labeling for managed components
Distinguishing "app.kubernetes.io/component" versus "app" based on the style helps keep labeling consistent for managed deployments.

packages/system/victoria-metrics-operator/charts/victoria-metrics-operator/charts/victoria-metrics-common/templates/_pod.tpl (4)

27-27: Adaptive security context in OpenShift
Using omit to remove keys like fsGroup when on OpenShift (or in forced mode) helps ensure compatibility with stricter security constraints.

Also applies to: 31-31, 33-33


75-79: Switching between HTTP and HTTPS
Capturing the TLS flag in $isSecure before emitting the protocol string reads clearly and prevents confusion about inline conditions.


90-90: Flexible CLI argument formatting
Distinguishing empty strings from booleans and objects ensures that flags are correctly represented on the command line.

Also applies to: 92-92, 95-95


110-110: Appending slice elements individually
Transforming each slice item into a separate argument is a robust approach to handle repeated flags.

packages/system/victoria-metrics-operator/charts/victoria-metrics-operator/templates/webhook.yaml (10)

2-7: Use of a context dictionary
Gathering Helm references and extra labels into $ctx reduces repetitive lookups, and centralizing $fullname, $domain, $ns, and $certManager makes the template more readable.


12-13: Admission webhook metadata
Forming the webhook’s name from $fullname and selectively including CA annotations only when cert-manager is in use is a thoughtful configuration pattern.

Also applies to: 15-16, 18-18


24-25: Namespace, service name, and CA fallback
Setting the service namespace and name from $ns and $fullname ensures tight integration with the chart’s naming logic, while manually injecting the caBundle if cert-manager is disabled covers all deployment scenarios.

Also applies to: 28-28


39-39: Exclude operator resources by name
Using an objectSelector to avoid hooking the operator’s own resources can reduce misconfigurations and self-interference.


52-52: Cert-manager toggle
Wrapping the cert-manager configuration in a condition ensures these resources are only created when explicitly enabled, saving cluster resources otherwise.


53-53: Self-signed fallback
Defining a selfSigned Issuer when no issuer is specified gives a simpler “just works” path for environments that need local certificates.


58-58: Creating a root CA
Generating and storing a root CA certificate and issuer ensures that subsequent subordinate certificates will have a valid chain of trust within the cluster.

Also applies to: 66-66, 68-79


85-89: Referencing the root CA
Linking the new Issuer to the {{ $fullname }}-root-ca secret ensures that subordinate certificates sign with the correct CA chain.


96-121: Subordinate certificate for validation
Populating multiple DNS names ensures the webhook can be accessed using the various service addresses. This cluster-aware approach supports flexible resolution within and across namespaces.


127-129: Manual TLS secret handling
Providing a conventional tls.key, tls.crt, and ca.crt secret with base64 data covers the scenario where cert-manager is unavailable.

packages/system/victoria-metrics-operator/charts/victoria-metrics-operator/templates/role.yaml (5)

23-24: Good refactoring: Added reusable variables for naming consistency.

The introduction of $fullname and $ns variables improves readability and maintainability by centralizing name and namespace references throughout the template.


61-61: Improved configurability for metrics endpoints.

Replacing hardcoded nonResourceURLs with a configurable .Values.allowedMetricsEndpoints enhances flexibility and allows for customization without modifying the template.


100-101: Added DaemonSet permissions to ClusterRole.

Adding daemonsets and daemonsets/finalizers to the resources list ensures the operator can manage these resources properly.


182-182: Enhanced condition check for CRD cleanup.

The condition now properly checks both crds.enabled and crds.cleanup.enabled, ensuring cleanup hook creation only when both are true.


208-208: Defensive programming with default empty lists.

Using ($rules.admin | default list) and ($rules.view | default list) ensures the template doesn't fail if the rules are undefined, improving robustness.

Also applies to: 217-217

packages/system/victoria-metrics-operator/charts/victoria-metrics-operator/templates/_helpers.tpl (2)

25-26: Good naming consistency with fullname variable.

Replacing $serviceName with $fullname maintains consistency with the variable naming pattern used in other templates, making the codebase more coherent.


38-43: Consistent naming pattern for certificate generation.

Using $fullname consistently throughout the certificate generation logic improves maintainability and reduces the risk of naming mismatches.

packages/system/victoria-metrics-operator/charts/prometheus-operator-crds/charts/crds/templates/crd-prometheusrules.yaml (3)

1-1: Updated Prometheus operator and controller-gen versions.

The CRD is now sourced from Prometheus operator v0.81.0 and uses controller-gen v0.17.2, keeping it in sync with the latest API definitions.

Also applies to: 10-11


65-74: Added support for rule group labels in Prometheus >= 3.0.0.

The new labels property in rule groups allows adding or overwriting labels before storing results, which enhances the flexibility of rule definitions.


92-99: Added support for query_offset in Prometheus >= v2.53.0.

The new query_offset property allows defining an offset for rule evaluation timestamps, providing more control over evaluation timing.

packages/system/victoria-metrics-operator/charts/prometheus-operator-crds/charts/crds/templates/crd-servicemonitors.yaml (6)

1-1: Updated Prometheus operator and controller-gen versions.

The CRD is now sourced from Prometheus operator v0.81.0 and uses controller-gen v0.17.2, keeping it in sync with the latest API definitions.

Also applies to: 10-11


823-823: Added clarification about scrapeTimeout constraints.

The description now clearly states that the scrapeTimeout value cannot exceed the scrape interval, which helps users avoid configuration errors.


1018-1029: Added fallbackScrapeProtocol support for Prometheus >= v3.0.0.

This new field allows specifying the protocol to use when a scrape returns invalid content type, providing more robust scrape behavior.


1088-1104: Added native histogram configuration options.

The new nativeHistogramBucketLimit and nativeHistogramMinBucketFactor fields provide fine-grained control over native histogram behavior in Prometheus >= v2.45.0 and v2.50.0.


1122-1126: Enhanced support for histogram types and protocols.

Added scrapeClassicHistograms option and PrometheusText1.0.0 protocol support, improving compatibility with different metric formats.

Also applies to: 1143-1143, 1149-1149


1200-1211: Added selectorMechanism for improved target selection.

This new field allows choosing between relabel configurations and role selectors for endpoint selection, which can improve efficiency in large clusters with Prometheus >= v2.17.0.

packages/system/victoria-metrics-operator/charts/victoria-metrics-operator/templates/deployment.yaml (11)

1-3: Context Initialization and Setup
The template now creates a dedicated context ($ctx) with useful keys (including "helm" and "noEnterprise") for downstream includes. This ensures consistent variable resolution across the template.

🧰 Tools
🪛 YAMLlint (1.35.1)

[error] 1-1: syntax error: expected the node content, but found '-'

(syntax)


8-12: Deployment Metadata Modernization
The metadata section is updated to use the new context variables: the deployment name is now set via {{ $fullname }} and the namespace via {{ $ns }}. In addition, extra labels are temporarily injected into the context (using set and later removed with unset), which improves the modular reuse of label templates. Everything appears consistent and clean.


17-17: Dynamic Replica Count
The replicas are now set with {{.Values.replicaCount}}. This dynamic assignment improves flexibility; just ensure that the corresponding value is maintained in the values file.


19-19: Selector Labels Update
The selector’s match labels are now pulled using {{ include "vm.selectorLabels" $ctx | nindent 6 }}. This change consolidates label configuration and aligns with the new naming conventions.


25-27: Pod Template Labels via Extra Context
The pod template now temporarily injects podLabels into $ctx and then uses {{ include "vm.podLabels" $ctx | nindent 8 }} – a similar pattern as with the metadata labels. This approach promotes consistency between different label sets within the template.


29-29: Automounting Service Account Token
Adding the line
  automountServiceAccountToken: {{ .Values.serviceAccount.automountServiceAccountToken }}
ensures that the operator’s pod automatically mounts the token when appropriate. This is clear—just verify that the values file provides the desired boolean.


33-35: Optional Host Network Configuration
The new conditional block for hostNetwork sets it to true when specified. This addition allows users to opt in if necessary. Make sure the documentation in the values file explains the implications appropriately.


36-38: Service Account Name Resolution
The service account name is now determined conditionally using
  serviceAccountName: {{ (.Values.serviceAccount).name | default $fullname }}
when either a name is already defined or creation is enabled. This dynamic fallback is a clear improvement over a hardcoded name.


44-44: Container Image Reference Update
Updating the image reference to use the new helper ({{ include "vm.image" $ctx }}) centralizes image configuration. This makes future maintenance easier and avoids duplications in image settings.


139-141: Priority Class Integration
A new conditional block adds a priorityClassName field to the pod spec if defined. This extra knob enables finer pod scheduling control. Verify that any consumers of this field in your cluster environment can handle an empty value.


167-167: Secret Name Update for Validation Volume
Changing the secret name to use the new $fullname variable (resulting in {{ $fullname }}-validation) is consistent with the naming convention updates. This should help avoid conflicts with legacy references.

packages/system/victoria-metrics-operator/charts/prometheus-operator-crds/charts/crds/templates/crd-probes.yaml (4)

10-11: Annotation Version Bump in CRD
The annotations for the CRD metadata have been updated to include:
  controller-gen.kubebuilder.io/version: v0.17.2
  operator.prometheus.io/version: 0.81.0
These correctly reflect the new versions and maintain consistency with the chart.


180-191: New Fallback Scrape Protocol Field
A new property fallbackScrapeProtocol has been added. Its description details what happens if a scrape returns an invalid Content-Type and notes the Prometheus version requirement (>= v3.0.0). The enum values (including both OpenMetrics and Prometheus text formats) provide flexibility. Be sure that the documentation elsewhere explains when to use each protocol.


319-325: Native Histogram Bucket Limit Field
The field nativeHistogramBucketLimit lets users cap the number of buckets in a native histogram, merging them if over the limit. The accompanying description notes the Prometheus version dependency (>= v2.45.0) and uses a clean int64 format. This addition is clear and useful.


326-335: Native Histogram Minimum Bucket Factor
The new nativeHistogramMinBucketFactor field accepts either an integer or a string and is validated by a regex pattern. Its description clarifies that buckets will be merged if the growth factor is too small, with a minimum version requirement of Prometheus >= v2.50.0. The dual-type approach (with x-kubernetes-int-or-string) is a good choice for flexibility.

packages/system/victoria-metrics-operator/charts/prometheus-operator-crds/charts/crds/templates/crd-podmonitors.yaml (5)

10-11: Annotation Version Update in PodMonitor CRD
Similar to the probes CRD, the metadata annotations have been bumped to:
  controller-gen.kubebuilder.io/version: v0.17.2
  operator.prometheus.io/version: 0.81.0
This update is consistent across CRDs.


84-95: Fallback Scrape Protocol for PodMonitor
The new fallbackScrapeProtocol field is introduced here as well, mirroring the probes CRD. It lets users specify which protocol to use when a scrape fails due to an invalid content type. The enum values and version note are consistent and clear.


154-160: Native Histogram Bucket Limit in PodMonitor
This section adds the nativeHistogramBucketLimit field for PodMonitors, enforcing a maximum bucket count and merging excess buckets. The description is concise and notes the Prometheus version requirement (>= v2.45.0).


161-170: Native Histogram Min Bucket Factor in PodMonitor
Following the bucket limit, the nativeHistogramMinBucketFactor field lets users dictate the minimum growth factor between buckets. The field accepts either an integer or a string and includes a pattern for validation. The version requirement (>= v2.50.0) is clear.


1186-1196: Selector Mechanism Option
A new selectorMechanism field is introduced for PodMonitors, offering a choice between using relabel configurations (default) and role selectors. The description explains that role selectors may offer better efficiency in large clusters, along with the required Prometheus version (>= v2.17.0). The enum values are clear.

packages/system/victoria-metrics-operator/charts/victoria-metrics-operator/values.yaml (11)

12-13: Kubernetes Cluster Domain Suffix
The comment now explains the dnsDomain field’s purpose and the value has been updated to include a trailing period (cluster.local.). This change ensures that the FQDN is correctly constructed.


32-41: CRD Management Configuration
Under the crds section the following updates were made:
• enabled: true – indicating that CRDs will be managed by the chart.
• annotations: {} – allowing for additional metadata.
These changes add clarity and improve control over CRD creation and lifecycle.


65-70: Chart Naming Overrides
The addition of keys like nameOverride and fullnameOverride provides users the flexibility to control resource names. These optional overrides help integrate with external naming conventions.


74-77: Allowed Metrics Endpoints
A new section allowedMetricsEndpoints has been added to define endpoints such as /metrics and /metrics/resources. This clarifies which metrics endpoints are permitted and aligns with recent CRD enhancements.


101-104: Enhanced Pod Security Context
New fields under podSecurityContext (like fsGroup: 2000, runAsNonRoot: true and runAsUser: 1000) strengthen the security posture of pods. This aligns well with recommended Kubernetes security best practices.


108-112: Refined Container Security Context
The additional security settings—disabling privilege escalation, dropping all capabilities, and making the root filesystem read-only—improve the container’s security. These changes are in line with least-privilege principles.


137-139: Automount Service Account Token
Adding the key automountServiceAccountToken: true under the serviceAccount section ensures that the operator’s pods will automatically mount their service account tokens as needed. This is particularly important if custom security settings are used.


194-196: Priority Class Configuration
The new priorityClassName field (set to an empty string by default) permits users to assign a priority class to the pods. This is crucial for scheduling and resource allocation in larger clusters.


250-251: Host Network Option
The newly added hostNetwork: false field clarifies that, by default, the operator does not use the host network. This can be overridden by users if required.


275-286: CertManager TLS Configuration Enhancements
Within the certManager section, new settings for both the Certificate Authority (ca) and the certificate (cert) have been added. Fields such as duration, subject, and commonName allow detailed control over certificate generation. These changes improve the operator’s security posture when external certificate management is not used.


295-298: ServiceMonitor Mode Selection
The update under serviceMonitor now includes a new key vm: true, allowing the chart to create a VMServiceScrape resource instead of a ServiceMonitor by default. This change aligns with the recent CRD and deployment updates and offers better flexibility.

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.

2 participants