Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
162 commits
Select commit Hold shift + click to select a range
4248688
VMDistributedCluster: initial commit
vrutkovs Oct 21, 2025
a9c5d36
Controller update
vrutkovs Oct 13, 2025
a7c3872
Generate v1alpha1 types
vrutkovs Oct 13, 2025
b0ac386
.golangci.yml: add alias for v1alpha1
vrutkovs Oct 13, 2025
f51c316
Regenerate manifests
vrutkovs Oct 13, 2025
7274325
Add 'install-slim' target, which installs CRD without description and…
vrutkovs Oct 13, 2025
12d6f99
Register v1alpha1 type in manager and e2e tests
vrutkovs Oct 13, 2025
6f60c59
Initial operator implementation
vrutkovs Oct 14, 2025
0da4022
Add tests for vmdistributedcluster controller
vrutkovs Oct 14, 2025
0b11de6
vmdistributedcluster tests: count actions that we do
vrutkovs Oct 14, 2025
5bac823
test/e2e: add vmdistributedcluster e2e tests
vrutkovs Oct 14, 2025
668df49
api/operator/v1alpha1: add missing Resource method
vrutkovs Oct 14, 2025
021e9de
Update e2e tests
vrutkovs Oct 15, 2025
a0189e6
Add delete cases
vrutkovs Oct 15, 2025
b2eb0a4
Get fresh vmcluster before update
vrutkovs Oct 15, 2025
94f06c3
Wait for VMCluster to become operational after upgrade again
vrutkovs Oct 15, 2025
5784fe9
vmdistributedcluster: add e2e tests
vrutkovs Oct 16, 2025
50235b9
vmdistributed: wait for vmclusters to become operational
vrutkovs Oct 16, 2025
1f8e432
cleanup e2e tests
vrutkovs Oct 16, 2025
58eea14
Rules are stored in VMUser, not VMAuth
vrutkovs Oct 16, 2025
a2ef843
implement findVMUserReadRuleForVMCluster
vrutkovs Oct 16, 2025
f976460
Record targetref in the status when scanning vmclusters
vrutkovs Oct 17, 2025
bb8a68d
Switch off targetRef for vmcluster before upgrade, switch it back on …
vrutkovs Oct 17, 2025
fb537dc
Fix unit and e2e tests
vrutkovs Oct 17, 2025
a8576cc
should wait for VMCluster upgrade completion test: use real versions
vrutkovs Oct 17, 2025
6c34cb3
unit tests: track each action we did
vrutkovs Oct 17, 2025
7f8245c
Add a test for real delayed check of vmcluster
vrutkovs Oct 17, 2025
dc20589
Even more unit tests
vrutkovs Oct 17, 2025
57ed10d
More unit tests
vrutkovs Oct 20, 2025
7df3059
Regroup unit tests
vrutkovs Oct 20, 2025
b315b7d
Add an option to pair vmcluster with vmagent writing data there
vrutkovs Oct 20, 2025
4fab946
tests for Paused
vrutkovs Oct 20, 2025
3b63a12
Wait for VMAgent to send all data before upgrade
vrutkovs Oct 20, 2025
9eac3ed
Add unit tests for VMAgent case
vrutkovs Oct 20, 2025
fed0e3f
Add e2e tests for VMAgent case
vrutkovs Oct 20, 2025
440ca8a
gci: format imports
vrutkovs Oct 21, 2025
7224d48
ginkgo: use HaveLen
vrutkovs Oct 21, 2025
97bf799
imports: use vmv1beta1/vmv1alpha1/k8serrors consistently
vrutkovs Oct 21, 2025
6331945
lint: more small code fixes
vrutkovs Oct 21, 2025
74f6b2a
gci: reorganize imports
vrutkovs Oct 21, 2025
136e4e8
Add RBAC rules
vrutkovs Oct 21, 2025
e6bb711
Remove additional RBAC roles
vrutkovs Oct 21, 2025
d39f55f
Swap VMAgent and VMUser
vrutkovs Oct 22, 2025
ba3d1a9
vmcluster: put localobjectreference under Ref
vrutkovs Oct 22, 2025
b3c0e93
spec: Use Zones instead of VMClusters
vrutkovs Oct 22, 2025
c38a309
update vmdistributedcluster tests
vrutkovs Oct 22, 2025
73659bb
Break down fetchVMClusters into smaller functions
vrutkovs Oct 22, 2025
ccb262c
vmdistributedcluster: implement overridespec for vmclusters controlle…
vrutkovs Oct 23, 2025
62ae0f7
vmdistributioncluster: remove ClusterVersion, reconcile clusters when…
vrutkovs Oct 23, 2025
9054ce8
tweaks
vrutkovs Oct 23, 2025
01e74ef
vmagent metrics should be checked after vmcluster is ready
vrutkovs Oct 24, 2025
aa1b3fb
Use vmagent which doesn't take in-memory data into account
vrutkovs Oct 24, 2025
1b017d3
test fixes
vrutkovs Oct 27, 2025
994f161
Fix "should handle rolling updates with VMAgent configuration changes…
vrutkovs Oct 27, 2025
1c67ae5
More e2e test fixes
vrutkovs Oct 27, 2025
8d97dae
Add unit tests for TestGetReferencedVMCluster
vrutkovs Oct 27, 2025
bbc0322
Add unit tests for reconcileInlineVMCluster
vrutkovs Oct 27, 2025
842916f
Add tests for findVMUserReadRuleForVMCluster
vrutkovs Oct 27, 2025
9cf01b0
Add unit test for waitForVMClusterReady
vrutkovs Oct 27, 2025
56c4fce
Fix some e2e tests
vrutkovs Oct 27, 2025
7cb0af6
Add reconciliation e2e
vrutkovs Oct 27, 2025
e2c9f0c
test fixes
vrutkovs Oct 27, 2025
1b015be
Fixes
vrutkovs Oct 27, 2025
5657783
Update vmdistributedcluster_test.go
vrutkovs Oct 29, 2025
fb95fbe
fix paused reconciliation test
vrutkovs Oct 29, 2025
57f8b6f
Fixes
vrutkovs Oct 29, 2025
6121c3b
Fix updateVMUserTargetRefs
vrutkovs Oct 29, 2025
a1bd68a
More test fixes
vrutkovs Oct 29, 2025
4145104
Fix waiting test
vrutkovs Oct 29, 2025
5514f58
gci
vrutkovs Oct 29, 2025
547891a
fetchVMClusters: rewrite as switch
vrutkovs Oct 29, 2025
cac5da8
Fix lint errors
vrutkovs Oct 29, 2025
9a48a75
tests: use real statuses for mockClientWithPollingResponse
vrutkovs Oct 29, 2025
6ddad07
Makefile: remove descriptions from CRDs
vrutkovs Oct 29, 2025
51444b0
Add Changelog entry
vrutkovs Nov 5, 2025
bc8362f
vmAgent / vmUsers: use lowercased names
vrutkovs Nov 5, 2025
ffe0997
Rearrange fields in VMClusterRefOrSpec for clarity
vrutkovs Nov 5, 2025
35cefae
validateVMClusterRefOrSpec: fix error message when both ref and spec …
vrutkovs Nov 5, 2025
018b432
Set ownerRef to managed VMClusters
vrutkovs Nov 5, 2025
7f8a295
e2e test fix
vrutkovs Nov 6, 2025
5d121df
vmdistributedcluster paused: use eventually to avoid conflicts
vrutkovs Nov 11, 2025
8ba5341
vmdistributedcluster: don't switch off cluster in vmuser unless it ha…
vrutkovs Nov 11, 2025
08c1eb9
vmdistributedcluster: create a real vmagent
vrutkovs Nov 11, 2025
baba7aa
Properly retry vmdistributedcluster metrics
vrutkovs Nov 12, 2025
f727a90
Check vmdistributedcluster status if the entry from vmuser has alread…
vrutkovs Nov 12, 2025
dc1c9a3
Refactor vmclusterinfo fetching, add unit tests
vrutkovs Nov 12, 2025
53c14b8
e2e tests: don't delete vmagent
vrutkovs Nov 12, 2025
4ae1ece
Better diff on generations
vrutkovs Nov 13, 2025
e834625
f
vrutkovs Nov 13, 2025
96e3c87
Fix cleanups
vrutkovs Nov 13, 2025
d20d875
vmdistributedcluster: disable vmauth before applying changes to vmclu…
vrutkovs Nov 14, 2025
49161f2
Add documentation for VMDistributedCluster
vrutkovs Nov 14, 2025
5cc7332
VMDistributedCluster: add a stub for VMSingles support it spec
vrutkovs Nov 14, 2025
5198196
Allow tweaking vmcluster ready duration
vrutkovs Nov 19, 2025
1bba0f5
Implement a pause between zone updates
vrutkovs Nov 19, 2025
d906eab
e2e tests: use shorter duration for vmcluster update and zone update …
vrutkovs Nov 19, 2025
2d2f37f
Add more examples
vrutkovs Nov 19, 2025
3fce7f8
vmdistributedcluster: throw error if any other found
vrutkovs Nov 21, 2025
60f0b74
VMAgent spec instead of vmagent ref
vrutkovs Nov 24, 2025
3428792
Set custom URL in VMAgent
vrutkovs Nov 24, 2025
ff8da92
Test fixes
vrutkovs Nov 24, 2025
2a578e5
Replace VMUser pointers with a single VMUser object
vrutkovs Nov 25, 2025
6218bb4
Replace VMUser with VMAuth object
vrutkovs Nov 25, 2025
a16ba0b
Update vmdistributedcluster_test.go
vrutkovs Nov 25, 2025
a16d83b
Add e2e tests for vmauth
vrutkovs Nov 25, 2025
1fa1974
Check every vmagent metrics by looking into endpointslices
vrutkovs Nov 26, 2025
05e4c2e
add unit tests
vrutkovs Nov 26, 2025
8f128f4
Cleanup
vrutkovs Nov 26, 2025
95ba097
Remove extra license header
vrutkovs Nov 27, 2025
22ecee2
e2e: don't remove vmusers and vmauth
vrutkovs Nov 27, 2025
ed6a99a
Clean up e2e tests
vrutkovs Nov 27, 2025
7ca454c
Fix endpointslice listing
vrutkovs Nov 27, 2025
a90f9c2
Fix unit tests, use a single vmuser for vmauth
vrutkovs Nov 28, 2025
398456d
Fix wait for cluster to complete upgrade
vrutkovs Nov 28, 2025
8c1b496
e2e test refactoring
vrutkovs Nov 28, 2025
ba1261e
Tweak timeouts to make sure vmagent errors are skipped
vrutkovs Nov 28, 2025
9d24d67
Ignore vmagent metrics error when E2E_TEST env var is set
vrutkovs Nov 28, 2025
8579701
Add more remove cases for vmdistributedcluster
vrutkovs Nov 28, 2025
b6dd6a4
Custom VMAgent spec
vrutkovs Dec 1, 2025
3817fea
e2e tests: create agent with fake remote write
vrutkovs Dec 1, 2025
67d7947
vmdistributedcluster: update examples
vrutkovs Dec 1, 2025
c951329
Regenerate CRD
vrutkovs Dec 1, 2025
f5b778e
Fix vmagent write URLs
vrutkovs Dec 1, 2025
497d874
Deploy VMAuthLB instead of full VMAuth
vrutkovs Dec 1, 2025
8fb773c
vmauthlb: create serviceaccount
vrutkovs Dec 1, 2025
818e964
vmauthlb: no prefixed name
vrutkovs Dec 1, 2025
61e4c90
Make sure non-override clusters can be updated too
vrutkovs Dec 1, 2025
9393099
Remove vmuser handling
vrutkovs Dec 1, 2025
f73c6a5
Update VMCluster generations when syncing
vrutkovs Dec 1, 2025
78a5f77
Remove TargetRef from status
vrutkovs Dec 1, 2025
a0c71d2
Run createOrUpdateVMAuthLB when VMCluster read needs to be toggled
vrutkovs Dec 1, 2025
f774995
vmdistributed: move vmauthLB code into a separate file
vrutkovs Dec 1, 2025
80434f1
move vmagent bits
vrutkovs Dec 1, 2025
27a9d47
move vmcluster handling in a separate file
vrutkovs Dec 1, 2025
f51495b
Comments, flow reshuffling
vrutkovs Dec 2, 2025
a307f02
Remove vmAgentAdapter
vrutkovs Dec 2, 2025
d4aebb5
gci
vrutkovs Dec 2, 2025
3cf089f
e2e: no need for extra vmauth
vrutkovs Dec 2, 2025
c4e290b
Delete vmauthlb artifacts when vmdistributedcluster is being delete
vrutkovs Dec 2, 2025
8e88ef2
Set finalizer for vmdistributedcluster
vrutkovs Dec 2, 2025
670686e
Tweak e2e tests
vrutkovs Dec 2, 2025
86e4150
Update VMAuth secret only, vmagent metrics should not be checked in e…
vrutkovs Dec 2, 2025
fb0299b
Set correct defaults for vmauth spec
vrutkovs Dec 2, 2025
6d573b3
Labels fix
vrutkovs Dec 2, 2025
5d7d0f7
Remove unused var
vrutkovs Dec 2, 2025
0c3152d
Cleanup
vrutkovs Dec 2, 2025
8b752e7
test_e2e explanation
vrutkovs Dec 3, 2025
236c470
Rework finalizer, create vmagent on every test
vrutkovs Dec 3, 2025
19ceebf
Revert vmextra change
vrutkovs Dec 3, 2025
a176791
Default vmauth params correctly
vrutkovs Dec 3, 2025
aad102e
Fix addVMDistributedClusterDefaults comparison
vrutkovs Dec 4, 2025
018eeff
Remove storing generations / names in vmdistributedcluster status
vrutkovs Dec 4, 2025
e4056d9
Add VMAgentFlushDeadline
vrutkovs Dec 4, 2025
0319f94
Remove extra status update
vrutkovs Dec 4, 2025
8e363cb
Fix vmauth spec fetching
vrutkovs Dec 4, 2025
320e155
Rework resource finalization
vrutkovs Dec 4, 2025
5f479ca
Add global override for vmcluster
vrutkovs Dec 4, 2025
f497461
fetchVMClusters: sort clusters by ObservedGeneration (descending order)
vrutkovs Dec 11, 2025
df34292
vmdistributedcluster tests: set ReadyDeadline
vrutkovs Dec 11, 2025
560f6d1
Correctly continue to vmauthlb deploy when cluster is created
vrutkovs Dec 11, 2025
c1f876f
finalize: remove vmauth even when spec is not set
vrutkovs Dec 11, 2025
030e308
Remove "invalid globaloverridespec" testcase
vrutkovs Dec 11, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@ linters:
importas:
no-unaliased: true
alias:
- pkg: github.com/VictoriaMetrics/operator/api/operator/v1alpha1
alias: vmv1alpha1
- pkg: github.com/VictoriaMetrics/operator/api/operator/v1beta1
alias: vmv1beta1
- pkg: github.com/VictoriaMetrics/operator/api/operator/v1
Expand Down
4 changes: 3 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -84,9 +84,10 @@ help: ## Display this help.
##@ Development

.PHONY: manifests
manifests: controller-gen kustomize ## Generate WebhookConfiguration, ClusterRole and CustomResourceDefinition objects.
manifests: controller-gen yq kustomize ## Generate WebhookConfiguration, ClusterRole and CustomResourceDefinition objects.
$(CONTROLLER_GEN) rbac:roleName=manager-role crd webhook paths="./..." output:crd:artifacts:config=config/crd/bases
$(KUSTOMIZE) build config/crd > config/crd/overlay/crd.yaml
$(YQ) -r 'del(.. | .description?)' -i config/crd/overlay/crd.yaml
$(KUSTOMIZE) build config/crd-specless > config/crd/overlay/crd.specless.yaml

.PHONY: generate
Expand All @@ -105,6 +106,7 @@ api-gen: client-gen lister-gen informer-gen
--output-pkg github.com/VictoriaMetrics/operator/api/client \
--output-dir ./api/client \
--go-header-file hack/boilerplate.go.txt \
--input github.com/VictoriaMetrics/operator/api/operator/v1alpha1 \
--input github.com/VictoriaMetrics/operator/api/operator/v1beta1 \
--input github.com/VictoriaMetrics/operator/api/operator/v1
@echo ">> generating with lister-gen"
Expand Down
9 changes: 9 additions & 0 deletions PROJECT
Original file line number Diff line number Diff line change
Expand Up @@ -273,4 +273,13 @@ resources:
webhooks:
validation: true
webhookVersion: v1
- api:
crdVersion: v1
namespaced: true
controller: true
domain: victoriametrics.com
group: operator
kind: VMDistributedCluster
path: github.com/VictoriaMetrics/operator/api/operator/v1alpha1
version: v1alpha1
version: "3"
2 changes: 2 additions & 0 deletions api/.golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@ linters:
importas:
no-unaliased: true
alias:
- pkg: github.com/VictoriaMetrics/operator/api/operator/v1alpha1
alias: vmv1alpha1
- pkg: github.com/VictoriaMetrics/operator/api/operator/v1beta1
alias: vmv1beta1
- pkg: github.com/VictoriaMetrics/operator/api/operator/v1
Expand Down
5 changes: 5 additions & 0 deletions api/client/informers/externalversions/generic.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions api/client/informers/externalversions/operator/interface.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

26 changes: 26 additions & 0 deletions api/client/listers/operator/v1alpha1/expansion_generated.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

69 changes: 69 additions & 0 deletions api/client/listers/operator/v1alpha1/vmdistributedcluster.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

17 changes: 15 additions & 2 deletions api/client/versioned/clientset.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading
Loading