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

vmuser: added vlogs support in targetRef.crd #1232

Merged
merged 3 commits into from
Feb 5, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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: 1 addition & 1 deletion api/operator/v1beta1/vmuser_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ type VMUserIPFilters struct {
type CRDRef struct {
// Kind one of:
// VMAgent,VMAlert, VMSingle, VMCluster/vmselect, VMCluster/vmstorage,VMCluster/vminsert or VMAlertManager
// +kubebuilder:validation:Enum=VMAgent;VMAlert;VMSingle;VMAlertManager;VMAlertmanager;VMCluster/vmselect;VMCluster/vmstorage;VMCluster/vminsert
// +kubebuilder:validation:Enum=VMAgent;VMAlert;VMSingle;VLogs;VMAlertManager;VMAlertmanager;VMCluster/vmselect;VMCluster/vmstorage;VMCluster/vminsert
Kind string `json:"kind"`
// Name target CRD object name
Name string `json:"name"`
Expand Down
1 change: 1 addition & 0 deletions config/crd/overlay/crd.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31857,6 +31857,7 @@ spec:
- VMAgent
- VMAlert
- VMSingle
- VLogs
- VMAlertManager
- VMAlertmanager
- VMCluster/vmselect
Expand Down
1 change: 1 addition & 0 deletions docs/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ aliases:
* Dependency: [vmoperator](https://docs.victoriametrics.com/operator/): Updated default versions for VM apps to v1.110.0 version

* FEATURE: [vmalertmanagerconfig](https://docs.victoriametrics.com/operator/resources/vmalertmanagerconfig/): add `thread_message_id` to `telegram_configs` definition. It's supported by [alertmanager v0.28.0+](https://github.com/prometheus/alertmanager/releases/tag/v0.28.0). See [this issue](https://github.com/VictoriaMetrics/operator/issues/1229) for details.
* FEATURE: [vlogs](https://docs.victoriametrics.com/operator/resources/vlogs): support VLogs in VMUser targetRefs.crd

* BUGFIX: [vmoperator](https://docs.victoriametrics.com/operator/): properly check `Pod` state during `StatefulSet` rolling upgrade procedure. See [this issue](https://github.com/VictoriaMetrics/operator/issues/1227) for details.
* BUGFIX: [vmagent](https://docs.victoriametrics.com/operator/resources/vmagent/): properly upscale on `shardCount` change. See [this issue](https://github.com/VictoriaMetrics/operator/issues/1224) for details.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -316,6 +316,7 @@ var crdNameToObject = map[string]objectWithURL{
"VMAgent": &vmv1beta1.VMAgent{},
"VMAlert": &vmv1beta1.VMAlert{},
"VMSingle": &vmv1beta1.VMSingle{},
"VLogs": &vmv1beta1.VLogs{},
// keep both variants for backward-compatibility
"VMAlertmanager": &vmv1beta1.VMAlertmanager{},
"VMAlertManager": &vmv1beta1.VMAlertmanager{},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,15 @@ bearer_token: secret-token
"/",
},
},
{
CRD: &vmv1beta1.CRDRef{
Kind: "VLogs",
Namespace: "monitoring",
Name: "db",
},
Paths: []string{"/logs/v1.*"},
},

{
CRD: &vmv1beta1.CRDRef{
Kind: "VMSingle",
Expand All @@ -154,6 +163,7 @@ bearer_token: secret-token
crdURLCache: map[string]string{
"VMAgent/monitoring/base": "http://vmagent-base.monitoring.svc:8429",
"VMSingle/monitoring/db": "http://vmsingle-b.monitoring.svc:8429",
"VLogs/monitoring/db": "http://vlogs-b.monitoring.svc:8482",
},
},
want: `url_map:
Expand All @@ -169,6 +179,10 @@ bearer_token: secret-token
- http://vmcluster-remote.mydomain.com:8401/insert/0/prometheus?extra_label=key%3Dvalue
src_paths:
- /.*
- url_prefix:
- http://vlogs-b.monitoring.svc:8482
src_paths:
- /logs/v1.*
- url_prefix:
- http://vmsingle-b.monitoring.svc:8429
src_paths:
Expand Down
Loading