feat: allow running operator in dry-run mode#2038
Conversation
This would add `--dry-run` argument and `DRY_RUN` envvar, so that the operator would use a fake client, logging calls instead of executing them. This is useful on operator upgrades in order to ensure that the upgrade won't cause any mutating changes
There was a problem hiding this comment.
2 issues found across 6 files
Prompt for AI agents (unresolved issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name="docs/CHANGELOG.md">
<violation number="1" location="docs/CHANGELOG.md:34">
P3: The issue link text says #1887, but the URL points to issue 1832. Update the URL or the label so the reference is correct.
(Based on your team's feedback about keeping docs links accurate.) [FEEDBACK_USED]</violation>
<violation number="2" location="docs/CHANGELOG.md:34">
P2: Custom agent: **Changelog Review Agent**
Changelog entry is missing the mandatory user-centric before/after/user-impact explanation required by the rule.</violation>
</file>
Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review, or fix all with cubic.
| * FEATURE: [vmagent](https://docs.victoriametrics.com/operator/resources/vmagent/): support HPA in VMAgent CR and in VMAgent, which is a part of VMDistributed. See [#1961](https://github.com/VictoriaMetrics/operator/issues/1961). | ||
| * FEATURE: [vmagent](https://docs.victoriametrics.com/operator/resources/vmagent/): VMAgent CRs running in statefulSet mode, including VMAgent components in VMDistributed, now support configuring rolling update strategy behavior. See [#1987](https://github.com/VictoriaMetrics/operator/issues/1987). | ||
| * FEATURE: [vmagent](https://docs.victoriametrics.com/operator/resources/vmagent/): VMAgent CRs running in DaemonSet mode now support configuring rolling update strategy behavior. | ||
| * FEATURE: [vmoperator](https://docs.victoriametrics.com/operator/): Dry-run mode. See [#1887](https://github.com/VictoriaMetrics/operator/issues/1832). |
There was a problem hiding this comment.
P2: Custom agent: Changelog Review Agent
Changelog entry is missing the mandatory user-centric before/after/user-impact explanation required by the rule.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At docs/CHANGELOG.md, line 34:
<comment>Changelog entry is missing the mandatory user-centric before/after/user-impact explanation required by the rule.</comment>
<file context>
@@ -31,6 +31,7 @@ aliases:
* FEATURE: [vmagent](https://docs.victoriametrics.com/operator/resources/vmagent/): support HPA in VMAgent CR and in VMAgent, which is a part of VMDistributed. See [#1961](https://github.com/VictoriaMetrics/operator/issues/1961).
* FEATURE: [vmagent](https://docs.victoriametrics.com/operator/resources/vmagent/): VMAgent CRs running in statefulSet mode, including VMAgent components in VMDistributed, now support configuring rolling update strategy behavior. See [#1987](https://github.com/VictoriaMetrics/operator/issues/1987).
* FEATURE: [vmagent](https://docs.victoriametrics.com/operator/resources/vmagent/): VMAgent CRs running in DaemonSet mode now support configuring rolling update strategy behavior.
+* FEATURE: [vmoperator](https://docs.victoriametrics.com/operator/): Dry-run mode. See [#1887](https://github.com/VictoriaMetrics/operator/issues/1832).
* BUGFIX: [vmoperator](https://docs.victoriametrics.com/operator/): VMPodScrape for VLAgent and VMAgent now uses the correct port; previously it used the wrong port and could cause scrape failures. See [#1887](https://github.com/VictoriaMetrics/operator/issues/1887).
</file context>
|
i'm afraid with modification calls mocking operator will stick into loop in attempt to update with infinite logs. maybe reconciliation logic should be update as well to trigger it just once |
I think this is acceptable - we'll be showing that its persistent and basically just the first iteration matters. A CLI mode is more suitable for "one shot" type of output |
AndrewChubatiuk
left a comment
There was a problem hiding this comment.
LGTM! metrics with method, name and kind dimensions could be useful in a dry run mode
|
oh, good point, reverted that (I was thinking that metrics are useless in oneshot mode, but they are useful in standard run mode) |
* feat: allow running operator in dry-run mode This would add `--dry-run` argument and `DRY_RUN` envvar, so that the operator would use a fake client, logging calls instead of executing them. This is useful on operator upgrades in order to ensure that the upgrade won't cause any mutating changes * feat: add operator dry-run subcommand to reconcile existing objects * chore: bump default version to 0.68.3 * docs: update flags
This would add
--dry-runargument andDRY_RUNenvvar, so that the operator would use a fakeclient, logging calls instead of executing them. This is useful for operator upgrades in order to
ensure that the upgrade won't cause any mutating changes.
In addition to the new mode
operatorbin can be invoked separately instead of changing the operator deployment.Fixes #1832