From a83c7a70a7cc5a259c3b7d4d22712c558767c4d1 Mon Sep 17 00:00:00 2001
From: Philipp Matthes
Date: Wed, 21 May 2025 13:02:58 +0200
Subject: [PATCH] Configure features through CRD
---
Tiltfile | 9 +-
extractor/api/v1/feature.go | 53 +++++++
extractor/main.go | 85 +++++++++++
{internal/features => extractor}/monitor.go | 4 +-
.../features => extractor}/monitor_test.go | 4 +-
{internal/features => extractor}/pipeline.go | 24 ++-
.../features => extractor}/pipeline_test.go | 4 +-
.../features => extractor}/plugins/base.go | 0
.../plugins/base_test.go | 0
.../plugins/interface.go | 0
.../kvm/node_exporter_host_cpu_usage.go | 2 +-
.../kvm/node_exporter_host_cpu_usage.sql | 0
.../kvm/node_exporter_host_cpu_usage_test.go | 0
.../kvm/node_exporter_host_memory_active.go | 2 +-
.../kvm/node_exporter_host_memory_active.sql | 0
.../node_exporter_host_memory_active_test.go | 0
.../plugins/shared/flavor_host_space.go | 2 +-
.../plugins/shared/flavor_host_space.sql | 0
.../plugins/shared/flavor_host_space_test.go | 0
.../plugins/shared/vm_host_residency.go | 2 +-
.../plugins/shared/vm_host_residency.sql | 0
.../plugins/shared/vm_host_residency_test.go | 0
.../plugins/shared/vm_life_span.go | 2 +-
.../plugins/shared/vm_life_span.sql | 0
.../plugins/shared/vm_life_span_test.go | 0
.../vmware/vrops_hostsystem_contention.go | 2 +-
.../vmware/vrops_hostsystem_contention.sql | 0
.../vrops_hostsystem_contention_test.go | 0
.../vmware/vrops_hostsystem_resolver.go | 2 +-
.../vmware/vrops_hostsystem_resolver.sql | 0
.../vmware/vrops_hostsystem_resolver_test.go | 0
.../plugins/vmware/vrops_project_noisiness.go | 2 +-
.../vmware/vrops_project_noisiness.sql | 0
.../vmware/vrops_project_noisiness_test.go | 0
go.mod | 49 ++++++-
go.sum | 137 +++++++++++++++++-
helm/cortex/templates/crds/feature.yaml | 113 +++++++++++++++
helm/cortex/templates/deployment.yaml | 4 +
helm/cortex/values.yaml | 1 +
helm/features/.helmignore | 27 ++++
helm/features/Chart.lock | 6 +
helm/features/Chart.yaml | 16 ++
helm/features/charts/.gitignore | 5 +
helm/features/templates/features.yaml | 6 +
helm/features/values.yaml | 9 ++
internal/kpis/plugins/histogram.go | 2 +-
internal/kpis/plugins/shared/vm_life_span.go | 2 +-
.../kpis/plugins/shared/vm_life_span_test.go | 2 +-
.../plugins/shared/vm_migration_statistics.go | 2 +-
.../shared/vm_migration_statistics_test.go | 2 +-
.../kpis/plugins/vmware/host_contention.go | 2 +-
.../plugins/vmware/host_contention_test.go | 2 +-
.../kpis/plugins/vmware/project_noisiness.go | 2 +-
.../plugins/vmware/project_noisiness_test.go | 2 +-
.../plugins/kvm/avoid_overloaded_hosts_cpu.go | 2 +-
.../kvm/avoid_overloaded_hosts_cpu_test.go | 2 +-
.../kvm/avoid_overloaded_hosts_memory.go | 2 +-
.../kvm/avoid_overloaded_hosts_memory_test.go | 2 +-
.../plugins/shared/flavor_binpacking.go | 2 +-
.../plugins/shared/flavor_binpacking_test.go | 2 +-
.../vmware/anti_affinity_noisy_projects.go | 2 +-
.../anti_affinity_noisy_projects_test.go | 2 +-
.../plugins/vmware/avoid_contended_hosts.go | 2 +-
.../vmware/avoid_contended_hosts_test.go | 2 +-
main.go | 20 +--
65 files changed, 566 insertions(+), 64 deletions(-)
create mode 100644 extractor/api/v1/feature.go
create mode 100644 extractor/main.go
rename {internal/features => extractor}/monitor.go (98%)
rename {internal/features => extractor}/monitor_test.go (97%)
rename {internal/features => extractor}/pipeline.go (90%)
rename {internal/features => extractor}/pipeline_test.go (98%)
rename {internal/features => extractor}/plugins/base.go (100%)
rename {internal/features => extractor}/plugins/base_test.go (100%)
rename {internal/features => extractor}/plugins/interface.go (100%)
rename {internal/features => extractor}/plugins/kvm/node_exporter_host_cpu_usage.go (96%)
rename {internal/features => extractor}/plugins/kvm/node_exporter_host_cpu_usage.sql (100%)
rename {internal/features => extractor}/plugins/kvm/node_exporter_host_cpu_usage_test.go (100%)
rename {internal/features => extractor}/plugins/kvm/node_exporter_host_memory_active.go (96%)
rename {internal/features => extractor}/plugins/kvm/node_exporter_host_memory_active.sql (100%)
rename {internal/features => extractor}/plugins/kvm/node_exporter_host_memory_active_test.go (100%)
rename {internal/features => extractor}/plugins/shared/flavor_host_space.go (97%)
rename {internal/features => extractor}/plugins/shared/flavor_host_space.sql (100%)
rename {internal/features => extractor}/plugins/shared/flavor_host_space_test.go (100%)
rename {internal/features => extractor}/plugins/shared/vm_host_residency.go (97%)
rename {internal/features => extractor}/plugins/shared/vm_host_residency.sql (100%)
rename {internal/features => extractor}/plugins/shared/vm_host_residency_test.go (100%)
rename {internal/features => extractor}/plugins/shared/vm_life_span.go (96%)
rename {internal/features => extractor}/plugins/shared/vm_life_span.sql (100%)
rename {internal/features => extractor}/plugins/shared/vm_life_span_test.go (100%)
rename {internal/features => extractor}/plugins/vmware/vrops_hostsystem_contention.go (96%)
rename {internal/features => extractor}/plugins/vmware/vrops_hostsystem_contention.sql (100%)
rename {internal/features => extractor}/plugins/vmware/vrops_hostsystem_contention_test.go (100%)
rename {internal/features => extractor}/plugins/vmware/vrops_hostsystem_resolver.go (96%)
rename {internal/features => extractor}/plugins/vmware/vrops_hostsystem_resolver.sql (100%)
rename {internal/features => extractor}/plugins/vmware/vrops_hostsystem_resolver_test.go (100%)
rename {internal/features => extractor}/plugins/vmware/vrops_project_noisiness.go (97%)
rename {internal/features => extractor}/plugins/vmware/vrops_project_noisiness.sql (100%)
rename {internal/features => extractor}/plugins/vmware/vrops_project_noisiness_test.go (100%)
create mode 100755 helm/cortex/templates/crds/feature.yaml
create mode 100644 helm/features/.helmignore
create mode 100644 helm/features/Chart.lock
create mode 100644 helm/features/Chart.yaml
create mode 100644 helm/features/charts/.gitignore
create mode 100644 helm/features/templates/features.yaml
create mode 100644 helm/features/values.yaml
diff --git a/Tiltfile b/Tiltfile
index 39a90169..405e178f 100644
--- a/Tiltfile
+++ b/Tiltfile
@@ -34,7 +34,7 @@ def synced_helm(path_to_chart, name, values=[]):
"""
# Build the chart dependencies from the Chart.lock.
- local('helm dep build ' + path_to_chart)
+ # local('helm dep build ' + path_to_chart)
# Build the command to get the rendered kubernetes yaml.
cmd = 'helm template'
@@ -54,7 +54,8 @@ def synced_helm(path_to_chart, name, values=[]):
########### Cortex Core Services
tilt_values = os.getenv('TILT_VALUES_PATH')
docker_build('ghcr.io/cobaltcore-dev/cortex', '.', only=[
- 'internal/', 'commands/', 'main.go', 'go.mod', 'go.sum', 'Makefile', tilt_values,
+ 'internal/', 'extractor/', 'commands/',
+ 'main.go', 'go.mod', 'go.sum', 'Makefile', tilt_values,
])
k8s_yaml(synced_helm('./helm/cortex', name='cortex', values=[tilt_values]))
k8s_resource('cortex-syncer', port_forwards=[
@@ -79,6 +80,10 @@ k8s_resource('cortex-kpis', port_forwards=[
link('localhost:8004/metrics', '/metrics'),
], labels=['Core-Services'])
+########### Cortex Features
+
+k8s_yaml(synced_helm('./helm/features', name='cortex-features'))
+
########### Cortex Commands
k8s_resource('cortex-cli', labels=['Commands'])
local_resource(
diff --git a/extractor/api/v1/feature.go b/extractor/api/v1/feature.go
new file mode 100644
index 00000000..ded63153
--- /dev/null
+++ b/extractor/api/v1/feature.go
@@ -0,0 +1,53 @@
+// Copyright 2025 SAP SE
+// SPDX-License-Identifier: Apache-2.0
+
+package v1
+
+import (
+ metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+ "k8s.io/apimachinery/pkg/runtime"
+)
+
+// FeatureSpec defines the desired state of Feature.
+type FeatureSpec struct {
+ Foo string `json:"foo,omitempty"`
+}
+
+// FeatureStatus defines the observed state of Feature.
+type FeatureStatus struct {
+}
+
+// Feature is the Schema for the features API.
+type Feature struct {
+ metav1.TypeMeta `json:",inline"`
+ metav1.ObjectMeta `json:"metadata,omitempty"`
+
+ Spec FeatureSpec `json:"spec,omitempty"`
+ Status FeatureStatus `json:"status,omitempty"`
+}
+
+// Conform to the runtime.Object interface.
+func (in *Feature) DeepCopyObject() runtime.Object {
+ return &Feature{
+ TypeMeta: in.TypeMeta,
+ ObjectMeta: in.ObjectMeta,
+ Spec: in.Spec,
+ Status: in.Status,
+ }
+}
+
+// FeatureList contains a list of Feature.
+type FeatureList struct {
+ metav1.TypeMeta `json:",inline"`
+ metav1.ListMeta `json:"metadata,omitempty"`
+ Items []Feature `json:"items"`
+}
+
+// Conform to the runtime.Object interface.
+func (in *FeatureList) DeepCopyObject() runtime.Object {
+ return &FeatureList{
+ TypeMeta: in.TypeMeta,
+ ListMeta: in.ListMeta,
+ Items: in.Items,
+ }
+}
diff --git a/extractor/main.go b/extractor/main.go
new file mode 100644
index 00000000..bad208f6
--- /dev/null
+++ b/extractor/main.go
@@ -0,0 +1,85 @@
+// Copyright 2025 SAP SE
+// SPDX-License-Identifier: Apache-2.0
+
+package extractor
+
+import (
+ "crypto/tls"
+ "log/slog"
+
+ "github.com/cobaltcore-dev/cortex/internal/conf"
+ "github.com/cobaltcore-dev/cortex/internal/db"
+ "github.com/cobaltcore-dev/cortex/internal/monitoring"
+ "github.com/cobaltcore-dev/cortex/internal/mqtt"
+ "k8s.io/apimachinery/pkg/runtime/schema"
+ ctrl "sigs.k8s.io/controller-runtime"
+ "sigs.k8s.io/controller-runtime/pkg/scheme"
+ "sigs.k8s.io/controller-runtime/pkg/webhook"
+
+ extractorv1 "github.com/cobaltcore-dev/cortex/extractor/api/v1"
+ metricsserver "sigs.k8s.io/controller-runtime/pkg/metrics/server"
+)
+
+func Run(registry *monitoring.Registry, config conf.FeaturesConfig, db db.DB) {
+ // Set up the kubernetes operator.
+ schemeBuilder := &scheme.Builder{GroupVersion: schema.GroupVersion{
+ Group: "extractor.cortex.sap",
+ Version: "v1",
+ }}
+ schemeBuilder.Register(&extractorv1.Feature{}, &extractorv1.FeatureList{})
+ slog.Info("Registering scheme for feature CRD")
+ scheme, err := schemeBuilder.Build()
+ if err != nil {
+ panic("failed to build scheme: " + err.Error())
+ }
+ // If the enable-http2 flag is false (the default), http/2 should be disabled
+ // due to its vulnerabilities. More specifically, disabling http/2 will
+ // prevent from being vulnerable to the HTTP/2 Stream Cancellation and
+ // Rapid Reset CVEs. For more information see:
+ // - https://github.com/advisories/GHSA-qppj-fm5r-hxr3
+ // - https://github.com/advisories/GHSA-4374-p667-p6c8
+ webhookServer := webhook.NewServer(webhook.Options{
+ TLSOpts: []func(*tls.Config){
+ func(c *tls.Config) {
+ slog.Info("Setting up TLS for webhook server")
+ c.NextProtos = []string{"http/1.1"}
+ },
+ },
+ })
+ mgr, err := ctrl.NewManager(ctrl.GetConfigOrDie(), ctrl.Options{
+ Metrics: metricsserver.Options{BindAddress: ":8081"}, // TODO: Conf + port + svcmonitor
+ Scheme: scheme,
+ WebhookServer: webhookServer,
+ })
+ if err != nil {
+ panic("failed to create controller manager: " + err.Error())
+ }
+ slog.Info("Created controller manager")
+
+ // Setup the feature extractor.
+ monitor := NewPipelineMonitor(registry)
+
+ mqttClient := mqtt.NewClient(mqtt.NewMQTTMonitor(registry))
+ if err := mqttClient.Connect(); err != nil {
+ panic("failed to connect to mqtt broker: " + err.Error())
+ }
+ defer mqttClient.Disconnect()
+
+ pipeline := NewPipeline(config, db, monitor, mqttClient)
+ // Selects the extractors to run based on the config.
+ pipeline.Init(SupportedExtractors)
+ go pipeline.ExtractOnTrigger() // blocking
+
+ // Bind the reconciliation loop.
+ ctrl.NewControllerManagedBy(mgr).
+ For(&extractorv1.Feature{}).
+ Named("feature").
+ Complete(&pipeline)
+
+ slog.Info("starting manager")
+ go func() {
+ if err := mgr.Start(ctrl.SetupSignalHandler()); err != nil {
+ panic("failed to start controller manager: " + err.Error())
+ }
+ }()
+}
diff --git a/internal/features/monitor.go b/extractor/monitor.go
similarity index 98%
rename from internal/features/monitor.go
rename to extractor/monitor.go
index e743e0c0..adc2f228 100644
--- a/internal/features/monitor.go
+++ b/extractor/monitor.go
@@ -1,14 +1,14 @@
// Copyright 2025 SAP SE
// SPDX-License-Identifier: Apache-2.0
-package features
+package extractor
import (
"log/slog"
+ "github.com/cobaltcore-dev/cortex/extractor/plugins"
"github.com/cobaltcore-dev/cortex/internal/conf"
"github.com/cobaltcore-dev/cortex/internal/db"
- "github.com/cobaltcore-dev/cortex/internal/features/plugins"
"github.com/cobaltcore-dev/cortex/internal/monitoring"
"github.com/prometheus/client_golang/prometheus"
)
diff --git a/internal/features/monitor_test.go b/extractor/monitor_test.go
similarity index 97%
rename from internal/features/monitor_test.go
rename to extractor/monitor_test.go
index 2a5b5b9c..5d964e8d 100644
--- a/internal/features/monitor_test.go
+++ b/extractor/monitor_test.go
@@ -1,12 +1,12 @@
// Copyright 2025 SAP SE
// SPDX-License-Identifier: Apache-2.0
-package features
+package extractor
import (
"strings"
"testing"
- "github.com/cobaltcore-dev/cortex/internal/features/plugins"
+ "github.com/cobaltcore-dev/cortex/extractor/plugins"
"github.com/cobaltcore-dev/cortex/internal/monitoring"
"github.com/prometheus/client_golang/prometheus"
"github.com/prometheus/client_golang/prometheus/testutil"
diff --git a/internal/features/pipeline.go b/extractor/pipeline.go
similarity index 90%
rename from internal/features/pipeline.go
rename to extractor/pipeline.go
index a3018fe5..7df93773 100644
--- a/internal/features/pipeline.go
+++ b/extractor/pipeline.go
@@ -1,20 +1,24 @@
// Copyright 2025 SAP SE
// SPDX-License-Identifier: Apache-2.0
-package features
+package extractor
import (
+ "context"
"log/slog"
"slices"
"sync"
+ "github.com/cobaltcore-dev/cortex/extractor/plugins"
+ "github.com/cobaltcore-dev/cortex/extractor/plugins/kvm"
+ "github.com/cobaltcore-dev/cortex/extractor/plugins/shared"
+ "github.com/cobaltcore-dev/cortex/extractor/plugins/vmware"
"github.com/cobaltcore-dev/cortex/internal/conf"
"github.com/cobaltcore-dev/cortex/internal/db"
- "github.com/cobaltcore-dev/cortex/internal/features/plugins"
- "github.com/cobaltcore-dev/cortex/internal/features/plugins/kvm"
- "github.com/cobaltcore-dev/cortex/internal/features/plugins/shared"
- "github.com/cobaltcore-dev/cortex/internal/features/plugins/vmware"
"github.com/cobaltcore-dev/cortex/internal/mqtt"
+ "k8s.io/apimachinery/pkg/runtime"
+ ctrl "sigs.k8s.io/controller-runtime"
+ "sigs.k8s.io/controller-runtime/pkg/client"
pahomqtt "github.com/eclipse/paho.mqtt.golang"
)
@@ -36,6 +40,11 @@ var SupportedExtractors = []plugins.FeatureExtractor{
// Pipeline that contains multiple feature extractors and executes them.
type FeatureExtractorPipeline struct {
+ // Client for the kubernetes API.
+ client.Client
+ // Kubernetes scheme to use for the feature extractors.
+ Scheme *runtime.Scheme
+
// The dependency graph of the feature extractors, which is used to
// determine the execution order of the feature extractors.
//
@@ -203,3 +212,8 @@ func (p *FeatureExtractorPipeline) extract(order [][]plugins.FeatureExtractor) {
wg.Wait()
}
}
+
+func (r *FeatureExtractorPipeline) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error) {
+ slog.Info("reconciling feature extractor", "name", req.Name, "namespace", req.Namespace)
+ return ctrl.Result{}, nil
+}
diff --git a/internal/features/pipeline_test.go b/extractor/pipeline_test.go
similarity index 98%
rename from internal/features/pipeline_test.go
rename to extractor/pipeline_test.go
index d6d7dab8..ba2a6770 100644
--- a/internal/features/pipeline_test.go
+++ b/extractor/pipeline_test.go
@@ -1,7 +1,7 @@
// Copyright 2025 SAP SE
// SPDX-License-Identifier: Apache-2.0
-package features
+package extractor
import (
"errors"
@@ -9,9 +9,9 @@ import (
"sync"
"testing"
+ "github.com/cobaltcore-dev/cortex/extractor/plugins"
"github.com/cobaltcore-dev/cortex/internal/conf"
"github.com/cobaltcore-dev/cortex/internal/db"
- "github.com/cobaltcore-dev/cortex/internal/features/plugins"
"github.com/cobaltcore-dev/cortex/internal/mqtt"
"github.com/cobaltcore-dev/cortex/testlib/mqtt/containers"
)
diff --git a/internal/features/plugins/base.go b/extractor/plugins/base.go
similarity index 100%
rename from internal/features/plugins/base.go
rename to extractor/plugins/base.go
diff --git a/internal/features/plugins/base_test.go b/extractor/plugins/base_test.go
similarity index 100%
rename from internal/features/plugins/base_test.go
rename to extractor/plugins/base_test.go
diff --git a/internal/features/plugins/interface.go b/extractor/plugins/interface.go
similarity index 100%
rename from internal/features/plugins/interface.go
rename to extractor/plugins/interface.go
diff --git a/internal/features/plugins/kvm/node_exporter_host_cpu_usage.go b/extractor/plugins/kvm/node_exporter_host_cpu_usage.go
similarity index 96%
rename from internal/features/plugins/kvm/node_exporter_host_cpu_usage.go
rename to extractor/plugins/kvm/node_exporter_host_cpu_usage.go
index f63e7bcc..ccb4444a 100644
--- a/internal/features/plugins/kvm/node_exporter_host_cpu_usage.go
+++ b/extractor/plugins/kvm/node_exporter_host_cpu_usage.go
@@ -6,8 +6,8 @@ package kvm
import (
_ "embed"
+ "github.com/cobaltcore-dev/cortex/extractor/plugins"
"github.com/cobaltcore-dev/cortex/internal/db"
- "github.com/cobaltcore-dev/cortex/internal/features/plugins"
"github.com/cobaltcore-dev/cortex/internal/sync/prometheus"
)
diff --git a/internal/features/plugins/kvm/node_exporter_host_cpu_usage.sql b/extractor/plugins/kvm/node_exporter_host_cpu_usage.sql
similarity index 100%
rename from internal/features/plugins/kvm/node_exporter_host_cpu_usage.sql
rename to extractor/plugins/kvm/node_exporter_host_cpu_usage.sql
diff --git a/internal/features/plugins/kvm/node_exporter_host_cpu_usage_test.go b/extractor/plugins/kvm/node_exporter_host_cpu_usage_test.go
similarity index 100%
rename from internal/features/plugins/kvm/node_exporter_host_cpu_usage_test.go
rename to extractor/plugins/kvm/node_exporter_host_cpu_usage_test.go
diff --git a/internal/features/plugins/kvm/node_exporter_host_memory_active.go b/extractor/plugins/kvm/node_exporter_host_memory_active.go
similarity index 96%
rename from internal/features/plugins/kvm/node_exporter_host_memory_active.go
rename to extractor/plugins/kvm/node_exporter_host_memory_active.go
index 57f6af49..a49ea969 100644
--- a/internal/features/plugins/kvm/node_exporter_host_memory_active.go
+++ b/extractor/plugins/kvm/node_exporter_host_memory_active.go
@@ -6,8 +6,8 @@ package kvm
import (
_ "embed"
+ "github.com/cobaltcore-dev/cortex/extractor/plugins"
"github.com/cobaltcore-dev/cortex/internal/db"
- "github.com/cobaltcore-dev/cortex/internal/features/plugins"
"github.com/cobaltcore-dev/cortex/internal/sync/prometheus"
)
diff --git a/internal/features/plugins/kvm/node_exporter_host_memory_active.sql b/extractor/plugins/kvm/node_exporter_host_memory_active.sql
similarity index 100%
rename from internal/features/plugins/kvm/node_exporter_host_memory_active.sql
rename to extractor/plugins/kvm/node_exporter_host_memory_active.sql
diff --git a/internal/features/plugins/kvm/node_exporter_host_memory_active_test.go b/extractor/plugins/kvm/node_exporter_host_memory_active_test.go
similarity index 100%
rename from internal/features/plugins/kvm/node_exporter_host_memory_active_test.go
rename to extractor/plugins/kvm/node_exporter_host_memory_active_test.go
diff --git a/internal/features/plugins/shared/flavor_host_space.go b/extractor/plugins/shared/flavor_host_space.go
similarity index 97%
rename from internal/features/plugins/shared/flavor_host_space.go
rename to extractor/plugins/shared/flavor_host_space.go
index 5b658cd3..685270ac 100644
--- a/internal/features/plugins/shared/flavor_host_space.go
+++ b/extractor/plugins/shared/flavor_host_space.go
@@ -6,8 +6,8 @@ package shared
import (
_ "embed"
+ "github.com/cobaltcore-dev/cortex/extractor/plugins"
"github.com/cobaltcore-dev/cortex/internal/db"
- "github.com/cobaltcore-dev/cortex/internal/features/plugins"
"github.com/cobaltcore-dev/cortex/internal/sync/openstack"
)
diff --git a/internal/features/plugins/shared/flavor_host_space.sql b/extractor/plugins/shared/flavor_host_space.sql
similarity index 100%
rename from internal/features/plugins/shared/flavor_host_space.sql
rename to extractor/plugins/shared/flavor_host_space.sql
diff --git a/internal/features/plugins/shared/flavor_host_space_test.go b/extractor/plugins/shared/flavor_host_space_test.go
similarity index 100%
rename from internal/features/plugins/shared/flavor_host_space_test.go
rename to extractor/plugins/shared/flavor_host_space_test.go
diff --git a/internal/features/plugins/shared/vm_host_residency.go b/extractor/plugins/shared/vm_host_residency.go
similarity index 97%
rename from internal/features/plugins/shared/vm_host_residency.go
rename to extractor/plugins/shared/vm_host_residency.go
index 4ea9b8ba..fe026c8f 100644
--- a/internal/features/plugins/shared/vm_host_residency.go
+++ b/extractor/plugins/shared/vm_host_residency.go
@@ -6,8 +6,8 @@ package shared
import (
_ "embed"
+ "github.com/cobaltcore-dev/cortex/extractor/plugins"
"github.com/cobaltcore-dev/cortex/internal/db"
- "github.com/cobaltcore-dev/cortex/internal/features/plugins"
"github.com/cobaltcore-dev/cortex/internal/sync/openstack"
)
diff --git a/internal/features/plugins/shared/vm_host_residency.sql b/extractor/plugins/shared/vm_host_residency.sql
similarity index 100%
rename from internal/features/plugins/shared/vm_host_residency.sql
rename to extractor/plugins/shared/vm_host_residency.sql
diff --git a/internal/features/plugins/shared/vm_host_residency_test.go b/extractor/plugins/shared/vm_host_residency_test.go
similarity index 100%
rename from internal/features/plugins/shared/vm_host_residency_test.go
rename to extractor/plugins/shared/vm_host_residency_test.go
diff --git a/internal/features/plugins/shared/vm_life_span.go b/extractor/plugins/shared/vm_life_span.go
similarity index 96%
rename from internal/features/plugins/shared/vm_life_span.go
rename to extractor/plugins/shared/vm_life_span.go
index 01fb256c..01f8d00d 100644
--- a/internal/features/plugins/shared/vm_life_span.go
+++ b/extractor/plugins/shared/vm_life_span.go
@@ -6,8 +6,8 @@ package shared
import (
_ "embed"
+ "github.com/cobaltcore-dev/cortex/extractor/plugins"
"github.com/cobaltcore-dev/cortex/internal/db"
- "github.com/cobaltcore-dev/cortex/internal/features/plugins"
"github.com/cobaltcore-dev/cortex/internal/sync/openstack"
)
diff --git a/internal/features/plugins/shared/vm_life_span.sql b/extractor/plugins/shared/vm_life_span.sql
similarity index 100%
rename from internal/features/plugins/shared/vm_life_span.sql
rename to extractor/plugins/shared/vm_life_span.sql
diff --git a/internal/features/plugins/shared/vm_life_span_test.go b/extractor/plugins/shared/vm_life_span_test.go
similarity index 100%
rename from internal/features/plugins/shared/vm_life_span_test.go
rename to extractor/plugins/shared/vm_life_span_test.go
diff --git a/internal/features/plugins/vmware/vrops_hostsystem_contention.go b/extractor/plugins/vmware/vrops_hostsystem_contention.go
similarity index 96%
rename from internal/features/plugins/vmware/vrops_hostsystem_contention.go
rename to extractor/plugins/vmware/vrops_hostsystem_contention.go
index 9b6c2054..85756146 100644
--- a/internal/features/plugins/vmware/vrops_hostsystem_contention.go
+++ b/extractor/plugins/vmware/vrops_hostsystem_contention.go
@@ -6,8 +6,8 @@ package vmware
import (
_ "embed"
+ "github.com/cobaltcore-dev/cortex/extractor/plugins"
"github.com/cobaltcore-dev/cortex/internal/db"
- "github.com/cobaltcore-dev/cortex/internal/features/plugins"
"github.com/cobaltcore-dev/cortex/internal/sync/prometheus"
)
diff --git a/internal/features/plugins/vmware/vrops_hostsystem_contention.sql b/extractor/plugins/vmware/vrops_hostsystem_contention.sql
similarity index 100%
rename from internal/features/plugins/vmware/vrops_hostsystem_contention.sql
rename to extractor/plugins/vmware/vrops_hostsystem_contention.sql
diff --git a/internal/features/plugins/vmware/vrops_hostsystem_contention_test.go b/extractor/plugins/vmware/vrops_hostsystem_contention_test.go
similarity index 100%
rename from internal/features/plugins/vmware/vrops_hostsystem_contention_test.go
rename to extractor/plugins/vmware/vrops_hostsystem_contention_test.go
diff --git a/internal/features/plugins/vmware/vrops_hostsystem_resolver.go b/extractor/plugins/vmware/vrops_hostsystem_resolver.go
similarity index 96%
rename from internal/features/plugins/vmware/vrops_hostsystem_resolver.go
rename to extractor/plugins/vmware/vrops_hostsystem_resolver.go
index f78961a0..b6c0cc2e 100644
--- a/internal/features/plugins/vmware/vrops_hostsystem_resolver.go
+++ b/extractor/plugins/vmware/vrops_hostsystem_resolver.go
@@ -6,8 +6,8 @@ package vmware
import (
_ "embed"
+ "github.com/cobaltcore-dev/cortex/extractor/plugins"
"github.com/cobaltcore-dev/cortex/internal/db"
- "github.com/cobaltcore-dev/cortex/internal/features/plugins"
"github.com/cobaltcore-dev/cortex/internal/sync/openstack"
"github.com/cobaltcore-dev/cortex/internal/sync/prometheus"
)
diff --git a/internal/features/plugins/vmware/vrops_hostsystem_resolver.sql b/extractor/plugins/vmware/vrops_hostsystem_resolver.sql
similarity index 100%
rename from internal/features/plugins/vmware/vrops_hostsystem_resolver.sql
rename to extractor/plugins/vmware/vrops_hostsystem_resolver.sql
diff --git a/internal/features/plugins/vmware/vrops_hostsystem_resolver_test.go b/extractor/plugins/vmware/vrops_hostsystem_resolver_test.go
similarity index 100%
rename from internal/features/plugins/vmware/vrops_hostsystem_resolver_test.go
rename to extractor/plugins/vmware/vrops_hostsystem_resolver_test.go
diff --git a/internal/features/plugins/vmware/vrops_project_noisiness.go b/extractor/plugins/vmware/vrops_project_noisiness.go
similarity index 97%
rename from internal/features/plugins/vmware/vrops_project_noisiness.go
rename to extractor/plugins/vmware/vrops_project_noisiness.go
index 8f9d34d6..fd7a17de 100644
--- a/internal/features/plugins/vmware/vrops_project_noisiness.go
+++ b/extractor/plugins/vmware/vrops_project_noisiness.go
@@ -6,8 +6,8 @@ package vmware
import (
_ "embed"
+ "github.com/cobaltcore-dev/cortex/extractor/plugins"
"github.com/cobaltcore-dev/cortex/internal/db"
- "github.com/cobaltcore-dev/cortex/internal/features/plugins"
"github.com/cobaltcore-dev/cortex/internal/sync/openstack"
"github.com/cobaltcore-dev/cortex/internal/sync/prometheus"
)
diff --git a/internal/features/plugins/vmware/vrops_project_noisiness.sql b/extractor/plugins/vmware/vrops_project_noisiness.sql
similarity index 100%
rename from internal/features/plugins/vmware/vrops_project_noisiness.sql
rename to extractor/plugins/vmware/vrops_project_noisiness.sql
diff --git a/internal/features/plugins/vmware/vrops_project_noisiness_test.go b/extractor/plugins/vmware/vrops_project_noisiness_test.go
similarity index 100%
rename from internal/features/plugins/vmware/vrops_project_noisiness_test.go
rename to extractor/plugins/vmware/vrops_project_noisiness_test.go
diff --git a/go.mod b/go.mod
index 6d034c3d..4e2b247f 100644
--- a/go.mod
+++ b/go.mod
@@ -1,6 +1,8 @@
module github.com/cobaltcore-dev/cortex
-go 1.24
+go 1.24.0
+
+toolchain go1.24.2
replace github.com/cobaltcore-dev/cortex/commands => ./commands
@@ -19,6 +21,8 @@ require (
github.com/sapcc/go-api-declarations v1.15.0
github.com/sapcc/go-bits v0.0.0-20250515130238-da3a0812fc4b
go.uber.org/automaxprocs v1.6.0
+ k8s.io/apimachinery v0.33.1
+ sigs.k8s.io/controller-runtime v0.20.4
)
require (
@@ -46,18 +50,59 @@ require (
github.com/Azure/go-ansiterm v0.0.0-20250102033503-faa5f7b0171c // indirect
github.com/beorn7/perks v1.0.1 // indirect
github.com/cespare/xxhash/v2 v2.3.0 // indirect
+ github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect
+ github.com/emicklei/go-restful/v3 v3.11.0 // indirect
+ github.com/evanphx/json-patch/v5 v5.9.11 // indirect
+ github.com/fsnotify/fsnotify v1.7.0 // indirect
+ github.com/fxamacker/cbor/v2 v2.7.0 // indirect
+ github.com/go-logr/logr v1.4.2 // indirect
+ github.com/go-openapi/jsonpointer v0.21.0 // indirect
+ github.com/go-openapi/jsonreference v0.20.2 // indirect
+ github.com/go-openapi/swag v0.23.0 // indirect
+ github.com/gogo/protobuf v1.3.2 // indirect
github.com/golang-migrate/migrate/v4 v4.18.3 // indirect
- github.com/gorilla/websocket v1.5.3 // indirect
+ github.com/google/btree v1.1.3 // indirect
+ github.com/google/gnostic-models v0.6.9 // indirect
+ github.com/google/go-cmp v0.7.0 // indirect
+ github.com/google/uuid v1.6.0 // indirect
+ github.com/gorilla/websocket v1.5.4-0.20250319132907-e064f32e3674 // indirect
github.com/hashicorp/errwrap v1.1.0 // indirect
github.com/hashicorp/go-multierror v1.1.1 // indirect
+ github.com/josharian/intern v1.0.0 // indirect
+ github.com/json-iterator/go v1.1.12 // indirect
github.com/kylelemons/godebug v1.1.0 // indirect
+ github.com/mailru/easyjson v0.7.7 // indirect
+ github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
+ github.com/modern-go/reflect2 v1.0.2 // indirect
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect
+ github.com/onsi/ginkgo/v2 v2.23.4 // indirect
+ github.com/onsi/gomega v1.36.3 // indirect
github.com/prometheus/common v0.63.0 // indirect
github.com/prometheus/procfs v0.16.1 // indirect
+ github.com/spf13/pflag v1.0.5 // indirect
+ github.com/x448/float16 v0.8.4 // indirect
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.60.0 // indirect
go.opentelemetry.io/otel/trace v1.35.0 // indirect
go.uber.org/atomic v1.11.0 // indirect
+ golang.org/x/oauth2 v0.27.0 // indirect
golang.org/x/sync v0.14.0 // indirect
golang.org/x/sys v0.33.0 // indirect
+ golang.org/x/term v0.32.0 // indirect
+ golang.org/x/text v0.25.0 // indirect
+ golang.org/x/time v0.9.0 // indirect
+ gomodules.xyz/jsonpatch/v2 v2.4.0 // indirect
google.golang.org/protobuf v1.36.6 // indirect
+ gopkg.in/evanphx/json-patch.v4 v4.12.0 // indirect
+ gopkg.in/inf.v0 v0.9.1 // indirect
+ gopkg.in/yaml.v3 v3.0.1 // indirect
+ k8s.io/api v0.33.1 // indirect
+ k8s.io/apiextensions-apiserver v0.32.1 // indirect
+ k8s.io/client-go v0.33.1 // indirect
+ k8s.io/klog/v2 v2.130.1 // indirect
+ k8s.io/kube-openapi v0.0.0-20250318190949-c8a335a9a2ff // indirect
+ k8s.io/utils v0.0.0-20241104100929-3ea5e8cea738 // indirect
+ sigs.k8s.io/json v0.0.0-20241010143419-9aa6b5e7a4b3 // indirect
+ sigs.k8s.io/randfill v1.0.0 // indirect
+ sigs.k8s.io/structured-merge-diff/v4 v4.6.0 // indirect
+ sigs.k8s.io/yaml v1.4.0 // indirect
)
diff --git a/go.sum b/go.sum
index 2941760e..99e10c65 100644
--- a/go.sum
+++ b/go.sum
@@ -34,9 +34,11 @@ github.com/coreos/go-semver v0.2.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3Ee
github.com/coreos/go-systemd v0.0.0-20190321100706-95778dfbb74e/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4=
github.com/coreos/pkg v0.0.0-20180928190104-399ea9e2e55f/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA=
github.com/cpuguy83/go-md2man/v2 v2.0.0/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU=
+github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E=
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
-github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
+github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc h1:U9qPSI2PIWSS1VwoXQT9A3Wy9MM3WgvqSxFWenqJduM=
+github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ=
github.com/dgryski/go-sip13 v0.0.0-20181026042036-e10d5fee7954/go.mod h1:vAd38F8PWV+bWy6jNmig1y/TA+kYO4g3RSRF0IAv0no=
github.com/dhui/dktest v0.4.5 h1:uUfYBIVREmj/Rw6MvgmqNAYzTiKOHJak+enB5Di73MM=
@@ -53,10 +55,20 @@ github.com/docker/go-units v0.5.0 h1:69rxXcBk27SvSaaxTtLh/8llcHD8vYHT7WSdRZ/jvr4
github.com/docker/go-units v0.5.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk=
github.com/eclipse/paho.mqtt.golang v1.5.0 h1:EH+bUVJNgttidWFkLLVKaQPGmkTUfQQqjOsyvMGvD6o=
github.com/eclipse/paho.mqtt.golang v1.5.0/go.mod h1:du/2qNQVqJf/Sqs4MEL77kR8QTqANF7XU7Fk0aOTAgk=
+github.com/emicklei/go-restful/v3 v3.11.0 h1:rAQeMHw1c7zTmncogyy8VvRZwtkmkZ4FxERmMY4rD+g=
+github.com/emicklei/go-restful/v3 v3.11.0/go.mod h1:6n3XBCmQQb25CM2LCACGz8ukIrRry+4bhvbpWn3mrbc=
+github.com/evanphx/json-patch v0.5.2 h1:xVCHIVMUu1wtM/VkR9jVZ45N3FhZfYMMYGorLCR8P3k=
+github.com/evanphx/json-patch v0.5.2/go.mod h1:ZWS5hhDbVDyob71nXKNL0+PWn6ToqBHMikGIFbs31qQ=
+github.com/evanphx/json-patch/v5 v5.9.11 h1:/8HVnzMq13/3x9TPvjG08wUGqBTmZBsCWzjTM0wiaDU=
+github.com/evanphx/json-patch/v5 v5.9.11/go.mod h1:3j+LviiESTElxA4p3EMKAB9HXj3/XEtnUf6OZxqIQTM=
github.com/fatih/color v1.9.0/go.mod h1:eQcE1qtQxscV5RaZvpXrrb8Drkc3/DdQ+uUYCNjL+zU=
github.com/felixge/httpsnoop v1.0.4 h1:NFTV2Zj1bL4mc9sqWACXbQFVBBg2W3GPvqp8/ESS2Wg=
github.com/felixge/httpsnoop v1.0.4/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U=
github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo=
+github.com/fsnotify/fsnotify v1.7.0 h1:8JEhPFa5W2WU7YfeZzPNqzMP6Lwt7L2715Ggo0nosvA=
+github.com/fsnotify/fsnotify v1.7.0/go.mod h1:40Bi/Hjc2AVfZrqy+aj+yEI+/bRxZnMJyTJwOpGvigM=
+github.com/fxamacker/cbor/v2 v2.7.0 h1:iM5WgngdRBanHcxugY4JySA0nk1wZorNOpTgCMedv5E=
+github.com/fxamacker/cbor/v2 v2.7.0/go.mod h1:pxXPTn3joSm21Gbwsv0w9OSA2y1HFR9qXEeXQVeNoDQ=
github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04=
github.com/go-gorp/gorp v2.2.0+incompatible h1:xAUh4QgEeqPPhK3vxZN+bzrim1z5Av6q837gtjUlshc=
github.com/go-gorp/gorp v2.2.0+incompatible/go.mod h1:7IfkAQnO7jfT/9IQ3R9wL1dFhukN6aQxzKTHnkxzA/E=
@@ -68,9 +80,21 @@ github.com/go-logr/logr v1.4.2 h1:6pFjapn8bFcIbiKo3XT4j/BhANplGihG6tvd+8rYgrY=
github.com/go-logr/logr v1.4.2/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY=
github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag=
github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE=
+github.com/go-logr/zapr v1.3.0 h1:XGdV8XW8zdwFiwOA2Dryh1gj2KRQyOOoNmBy4EplIcQ=
+github.com/go-logr/zapr v1.3.0/go.mod h1:YKepepNBd1u/oyhd/yQmtjVXmm9uML4IXUgMOwR8/Gg=
+github.com/go-openapi/jsonpointer v0.19.6/go.mod h1:osyAmYz/mB/C3I+WsTTSgw1ONzaLJoLCyoi6/zppojs=
+github.com/go-openapi/jsonpointer v0.21.0 h1:YgdVicSA9vH5RiHs9TZW5oyafXZFc6+2Vc1rr/O9oNQ=
+github.com/go-openapi/jsonpointer v0.21.0/go.mod h1:IUyH9l/+uyhIYQ/PXVA41Rexl+kOkAPDdXEYns6fzUY=
+github.com/go-openapi/jsonreference v0.20.2 h1:3sVjiK66+uXK/6oQ8xgcRKcFgQ5KXa2KvnJRumpMGbE=
+github.com/go-openapi/jsonreference v0.20.2/go.mod h1:Bl1zwGIM8/wsvqjsOQLJ/SH+En5Ap4rVB5KVcIDZG2k=
+github.com/go-openapi/swag v0.22.3/go.mod h1:UzaqsxGiab7freDnrUUra0MwWfN/q7tE4j+VcZ0yl14=
+github.com/go-openapi/swag v0.23.0 h1:vsEVJDUo2hPJ2tu0/Xc+4noaxyEffXNIs3cOULZ+GrE=
+github.com/go-openapi/swag v0.23.0/go.mod h1:esZ8ITTYEsH1V2trKHjAN8Ai7xHb8RV+YSZ577vPjgQ=
github.com/go-sql-driver/mysql v1.9.2 h1:4cNKDYQ1I84SXslGddlsrMhc8k4LeDVj6Ad6WRjiHuU=
github.com/go-sql-driver/mysql v1.9.2/go.mod h1:qn46aNg1333BRMNU69Lq93t8du/dwxI64Gl8i5p1WMU=
github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY=
+github.com/go-task/slim-sprig/v3 v3.0.0 h1:sUs3vkvUymDpBKi3qH1YSqBQk9+9D/8M2mN1vB6EwHI=
+github.com/go-task/slim-sprig/v3 v3.0.0/go.mod h1:W848ghGpv3Qj3dhTPRyJypKRiqCdHZiAzKg9hl15HA8=
github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ=
github.com/gogo/protobuf v1.2.1/go.mod h1:hp+jE20tsWTFYpLwKvXlhS1hjn+gTNwPg2I6zVXpSg4=
github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q=
@@ -84,16 +108,27 @@ github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5y
github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ=
+github.com/google/btree v1.1.3 h1:CVpQJjYgC4VbzxeGVHfvZrv1ctoYCAI8vbl07Fcxlyg=
+github.com/google/btree v1.1.3/go.mod h1:qOPhT0dTNdNzV6Z/lhRX0YXUafgPLFUh+gZMl761Gm4=
+github.com/google/gnostic-models v0.6.9 h1:MU/8wDLif2qCXZmzncUQ/BOfxWfthHi63KqpoNbWqVw=
+github.com/google/gnostic-models v0.6.9/go.mod h1:CiWsm0s6BSQd1hRn8/QmxqB6BesYcbSZxsz9b0KuDBw=
github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M=
github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU=
+github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
github.com/google/go-cmp v0.7.0 h1:wk8382ETsv4JYUZwIsn6YpYiWiBsYLSJiTsyBybVuN8=
github.com/google/go-cmp v0.7.0/go.mod h1:pXiqmnSA92OHEEa9HXL2W4E7lf9JzCmGVUdgjX3N/iU=
github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg=
+github.com/google/gofuzz v1.2.0 h1:xRy4A+RhZaiKjJ1bPfwQ8sedCA+YS2YcCHW6ec7JMi0=
+github.com/google/gofuzz v1.2.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg=
+github.com/google/pprof v0.0.0-20250403155104-27863c87afa6 h1:BHT72Gu3keYf3ZEu2J0b1vyeLSOYI8bm5wbJM/8yDe8=
+github.com/google/pprof v0.0.0-20250403155104-27863c87afa6/go.mod h1:boTsfXsheKC2y+lKOCMpSfarhxDeIzfZG1jqGcPl3cA=
+github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0=
+github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
github.com/gophercloud/gophercloud/v2 v2.7.0 h1:o0m4kgVcPgHlcXiWAjoVxGd8QCmvM5VU+YM71pFbn0E=
github.com/gophercloud/gophercloud/v2 v2.7.0/go.mod h1:Ki/ILhYZr/5EPebrPL9Ej+tUg4lqx71/YH2JWVeU+Qk=
github.com/gorilla/websocket v1.4.0/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ=
-github.com/gorilla/websocket v1.5.3 h1:saDtZ6Pbx/0u+bgYQ3q96pZgCzfhKXGPqt7kZ72aNNg=
-github.com/gorilla/websocket v1.5.3/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE=
+github.com/gorilla/websocket v1.5.4-0.20250319132907-e064f32e3674 h1:JeSE6pjso5THxAzdVpqr6/geYxZytqFMBCOtn/ujyeo=
+github.com/gorilla/websocket v1.5.4-0.20250319132907-e064f32e3674/go.mod h1:r4w70xmWCQKmi1ONH4KIaBptdivuRPyosB9RmPlGEwA=
github.com/gotestyourself/gotestyourself v2.2.0+incompatible h1:AQwinXlbQR2HvPjQZOmDhRqsv5mZf+Jb1RnSLxcqZcI=
github.com/gotestyourself/gotestyourself v2.2.0+incompatible/go.mod h1:zZKM6oeNM8k+FRljX1mnzVYeS8wiGgQyvST1/GafPbY=
github.com/grpc-ecosystem/go-grpc-middleware v1.0.0/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs=
@@ -107,23 +142,35 @@ github.com/hashicorp/go-multierror v1.1.1/go.mod h1:iw975J/qwKPdAO1clOe2L8331t/9
github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ=
github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8=
github.com/jonboulle/clockwork v0.1.0/go.mod h1:Ii8DK3G1RaLaWxj9trq07+26W01tbo22gdxWY5EU2bo=
+github.com/josharian/intern v1.0.0 h1:vlS4z54oSdjm0bgjRigI+G1HpF+tI+9rE5LLzOg8HmY=
+github.com/josharian/intern v1.0.0/go.mod h1:5DoeVV0s6jJacbCEi61lwdGj/aVlrQvzHFFd8Hwg//Y=
github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU=
github.com/json-iterator/go v1.1.8/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4=
+github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM=
+github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo=
github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w=
github.com/kisielk/errcheck v1.1.0/go.mod h1:EZBBE59ingxPouuu3KfxchcWSUPOHkagtvWXihfKN4Q=
+github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8=
github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck=
github.com/klauspost/compress v1.18.0 h1:c/Cqfb0r+Yi+JtIEq73FWXVkRonBlf0CRNYc8Zttxdo=
github.com/klauspost/compress v1.18.0/go.mod h1:2Pp+KzxcywXVXMr50+X0Q/Lsb43OQHYWRCY2AiWywWQ=
github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ=
github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc=
github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo=
+github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI=
+github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE=
+github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk=
github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ=
github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI=
+github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY=
+github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE=
github.com/kylelemons/godebug v1.1.0 h1:RPNrshWIDI6G2gRW9EHilWtl7Z6Sb1BR0xunSBf0SNc=
github.com/kylelemons/godebug v1.1.0/go.mod h1:9/0rRGxNHcop5bhtWyNeEfOS8JIWk580+fNqagV/RAw=
github.com/lib/pq v1.10.9 h1:YXG7RB+JIjhP29X+OtkiDnYaXQwpS4JEWq7dtCCRUEw=
github.com/lib/pq v1.10.9/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o=
github.com/magiconair/properties v1.8.0/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ=
+github.com/mailru/easyjson v0.7.7 h1:UGYAvKxe3sBsEDzO8ZeWOSlIQfWFlxbzLZe7hwFURr0=
+github.com/mailru/easyjson v0.7.7/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc=
github.com/mattn/go-colorable v0.1.4/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE=
github.com/mattn/go-isatty v0.0.8/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s=
github.com/mattn/go-isatty v0.0.11/go.mod h1:PhnuNfih5lzO57/f3n+odYbM4JtupLOxQOAqxQCu2WE=
@@ -140,9 +187,12 @@ github.com/moby/sys/user v0.4.0/go.mod h1:bG+tYYYJgaMtRKgEmuueC0hJEAZWwtIbZTB+85
github.com/moby/term v0.5.0 h1:xt8Q1nalod/v7BqbG21f8mQPqH+xAaC9C3N3wfWbVP0=
github.com/moby/term v0.5.0/go.mod h1:8FzsFHVUBGZdbDsJw/ot+X+d5HLUbvklYLJ9uGfcI3Y=
github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q=
+github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg=
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q=
github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0=
github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0=
+github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M=
+github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk=
github.com/morikuni/aec v1.0.0 h1:nP9CBfwrvYnBRgY6qfDQkygYDmYwOilePFkwzv4dU8A=
github.com/morikuni/aec v1.0.0/go.mod h1:BbKIizmSmc5MMPqRYbxO4ZU0S0+P200+tUnFx7PXmsc=
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 h1:C3w9PqII01/Oq1c1nUAm88MOHcQC9l5mIlSMApZMrHA=
@@ -150,6 +200,10 @@ github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822/go.mod h1:+n7T8m
github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U=
github.com/nelsam/hel/v2 v2.3.2/go.mod h1:1ZTGfU2PFTOd5mx22i5O0Lc2GY933lQ2wb/ggy+rL3w=
github.com/oklog/ulid v1.3.1/go.mod h1:CirwcVhetQ6Lv90oh/F+FBtV6XMibvdAFo93nm5qn4U=
+github.com/onsi/ginkgo/v2 v2.23.4 h1:ktYTpKJAVZnDT4VjxSbiBenUjmlL/5QkBEocaWXiQus=
+github.com/onsi/ginkgo/v2 v2.23.4/go.mod h1:Bt66ApGPBFzHyR+JO10Zbt0Gsp4uWxu5mIOTusL46e8=
+github.com/onsi/gomega v1.36.3 h1:hID7cr8t3Wp26+cYnfcjR6HpJ00fdogN6dqZ1t6IylU=
+github.com/onsi/gomega v1.36.3/go.mod h1:8D9+Txp43QWKhM24yyOBEdpkzN8FvJyAwecBgsU4KU0=
github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8Oi/yOhh5U=
github.com/opencontainers/go-digest v1.0.0/go.mod h1:0JzlMkj0TRzQZfJkVvzbP0HBR3IKzErnv2BNG4W4MAM=
github.com/opencontainers/image-spec v1.1.1 h1:y0fUlFfIZhPF1W537XOLg0/fcx6zcHCJwooC2xJA040=
@@ -163,8 +217,9 @@ github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINE
github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4=
github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
-github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
+github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 h1:Jamvg5psRIccs7FGNTlIRMkT8wgtp5eCXdBlqhYGL6U=
+github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/poy/onpar v0.0.0-20200406201722-06f95a1c68e8/go.mod h1:nSbFQvMj97ZyhFRSJYtut+msi4sOY6zJDGCdSc+/rZU=
github.com/poy/onpar v1.1.2 h1:QaNrNiZx0+Nar5dLgTVp5mXkyoVFIbepjyEoGSnhbAY=
github.com/poy/onpar v1.1.2/go.mod h1:6X8FLNoxyr9kkmnlqpK6LSoiOtrO6MICtWwEuWkLjzg=
@@ -195,6 +250,8 @@ github.com/prometheus/procfs v0.16.1 h1:hZ15bTNuirocR6u0JZ6BAHHmwS1p8B4P6MRqxtzM
github.com/prometheus/procfs v0.16.1/go.mod h1:teAbpZRB1iIAJYREa1LsoWUXykVXA1KlTmWl8x/U+Is=
github.com/prometheus/tsdb v0.7.1/go.mod h1:qhTCs0VvXwvX/y3TZrWD7rabWM+ijKTux40TwIPHuXU=
github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6SoW27p1b0cqNHllgS5HIMJraePCO15w5zCzIWYg=
+github.com/rogpeppe/go-internal v1.13.1 h1:KvO1DLK/DRN07sQ1LQKScxyZJuNnedQ5/wKSR38lUII=
+github.com/rogpeppe/go-internal v1.13.1/go.mod h1:uMEvuHeurkdAXX61udpOXGD/AzZDWNMNyH2VO9fmH0o=
github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM=
github.com/sapcc/go-api-declarations v1.15.0 h1:41i1YnHaUq6HGzXtuCd5NqjJsWl8Pav3MSfMlPOYJuQ=
github.com/sapcc/go-api-declarations v1.15.0/go.mod h1:WIT/BvApD9klcDb9aQbNgOr6sx0hGwd8NUnmGhNVuQQ=
@@ -214,19 +271,32 @@ github.com/spf13/cast v1.3.0/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkU
github.com/spf13/cobra v0.0.6/go.mod h1:/6GTrnGXV9HjY+aR4k0oJ5tcvakLuG6EuKReYlHNrgE=
github.com/spf13/jwalterweatherman v1.0.0/go.mod h1:cQK4TGJAtQXfYWX+Ddv3mKDzgVb68N+wFjFa4jdeBTo=
github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4=
+github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA=
+github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg=
github.com/spf13/viper v1.4.0/go.mod h1:PTJ7Z/lr49W6bUbkmS1V3by4uWynFiR9p7+dSq/yZzE=
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
+github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw=
+github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo=
+github.com/stretchr/objx v0.5.2 h1:xuMeJ0Sdp5ZMRXx/aWO6RZxdr3beISkG5/G/aIRr3pY=
+github.com/stretchr/objx v0.5.2/go.mod h1:FRsXN1f5AsAjCGJKqEizvkpNtU+EGNCLh3NxZ/8L+MA=
github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs=
github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI=
github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
+github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
+github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU=
+github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4=
github.com/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA=
github.com/stretchr/testify v1.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY=
github.com/tmc/grpc-websocket-proxy v0.0.0-20190109142713-0ad062ec5ee5/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U=
github.com/ugorji/go v1.1.4/go.mod h1:uQMGLiO92mf5W77hV/PUCpI3pbzQx3CRekS0kk+RGrc=
+github.com/x448/float16 v0.8.4 h1:qLwI1I70+NjRFUR3zs1JPUCgaCXSh3SW62uAKT1mSBM=
+github.com/x448/float16 v0.8.4/go.mod h1:14CWIYCyZA/cWjXOioeEpHeN/83MdbZDRQHoFcYsOfg=
github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2/go.mod h1:UETIi67q53MR2AWcXfiuqkDkRtnGDLqkBTpCHuJHxtU=
github.com/xordataexchange/crypt v0.0.3-0.20170626215501-b2862e3d0a77/go.mod h1:aYKd//L2LvnjZzWKhF00oedf4jCCReLcmhLdhm1A27Q=
github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
+github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
+github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
github.com/ziutek/mymysql v1.5.4 h1:GB0qdRGsTwQSBVYuVShFBKaXSnSnYYC2d9knnE1LHFs=
github.com/ziutek/mymysql v1.5.4/go.mod h1:LMSpPZ6DbqWFxNCHW77HeMg9I646SAhApZ/wKdgO/C0=
go.etcd.io/bbolt v1.3.2/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU=
@@ -245,14 +315,22 @@ go.uber.org/atomic v1.11.0 h1:ZvwS0R+56ePWxUNi+Atn9dWONBPp/AUETXlHW0DxSjE=
go.uber.org/atomic v1.11.0/go.mod h1:LUxbIzbOniOlMKjJjyPfpl4v+PKK2cNJn91OQbhoJI0=
go.uber.org/automaxprocs v1.6.0 h1:O3y2/QNTOdbF+e/dpXNNW7Rx2hZ4sTIPyybbxyNqTUs=
go.uber.org/automaxprocs v1.6.0/go.mod h1:ifeIMSnPZuznNm6jmdzmU3/bfk01Fe2fotchwEFJ8r8=
+go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto=
+go.uber.org/goleak v1.3.0/go.mod h1:CoHD4mav9JJNrW/WLlf7HGZPjdw8EucARQHekz1X6bE=
go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0=
+go.uber.org/multierr v1.11.0 h1:blXXJkSxSSfBVBlC76pxqeO+LN3aDfLQo+309xJstO0=
+go.uber.org/multierr v1.11.0/go.mod h1:20+QtiLqy0Nd6FdQB9TLXag12DsQkrbs3htMFfDN80Y=
go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q=
+go.uber.org/zap v1.27.0 h1:aJMhYGrd5QSmlpLMr2MftRKl7t8J8PTZPA732ud/XR8=
+go.uber.org/zap v1.27.0/go.mod h1:GB2qFLM7cTU87MWRP2mPIjqfIDnGu+VIO4V/SdhGo2E=
golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4=
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
+golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE=
golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc=
golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
+golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
golang.org/x/net v0.0.0-20181220203305-927f97764cc3/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
@@ -262,14 +340,18 @@ golang.org/x/net v0.0.0-20190522155817-f3200d17e092/go.mod h1:HSz+uSET+XFnRR8LxR
golang.org/x/net v0.0.0-20190613194153-d28f0bde5980/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
+golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU=
golang.org/x/net v0.40.0 h1:79Xs7wF06Gbdcg4kdCCIQArK11Z1hr5POQ6+fIYHNuY=
golang.org/x/net v0.40.0/go.mod h1:y0hY0exeL2Pku80/zKK7tpntoX23cqL3Oa6njdgRtds=
golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=
+golang.org/x/oauth2 v0.27.0 h1:da9Vo7/tDv5RH/7nZDz1eMGS/q1Vv1N/7FCrBhI9I3M=
+golang.org/x/oauth2 v0.27.0/go.mod h1:onh5ek6nERTohokkhCD/y2cV4Do3fxFHFuAejCkRWT8=
golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
+golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.14.0 h1:woo0S4Yywslg6hp4eUFjTVOyKt0RookbpAHG4c1HmhQ=
golang.org/x/sync v0.14.0/go.mod h1:1dzgHSNfp02xaA81J2MS99Qcpr2w7fw1gpm99rleRqA=
golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
@@ -282,20 +364,36 @@ golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7w
golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20191220142924-d4481acd189f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20210616094352-59db8d763f22/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.33.0 h1:q3i8TbbEz+JRD9ywIRlyRAQbM0qF7hu24q3teo2hbuw=
golang.org/x/sys v0.33.0/go.mod h1:BJP2sWEmIv4KK5OTEluFJCKSidICx8ciO85XgH3Ak8k=
+golang.org/x/term v0.32.0 h1:DR4lr0TjUs3epypdhTOkMmuF5CDFJ/8pOnbzMZPQ7bg=
+golang.org/x/term v0.32.0/go.mod h1:uZG1FhGx848Sqfsq4/DlJr3xGGsYMu/L5GW4abiaEPQ=
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
+golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
+golang.org/x/text v0.25.0 h1:qVyWApTSYLk/drJRO5mDlNYskwQznZmkpV2c8q9zls4=
+golang.org/x/text v0.25.0/go.mod h1:WEdwpYrmk1qmdHvhkSTNPm3app7v4rsT8F2UD6+VHIA=
golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
+golang.org/x/time v0.9.0 h1:EsRrnYcQiGH+5FfbgvV4AP7qEZstoyrHB0DzarOQ4ZY=
+golang.org/x/time v0.9.0/go.mod h1:3BpzKBy/shNhVucY/MWOyx10tF3SFh9QdLuxbVysPQM=
golang.org/x/tools v0.0.0-20180221164845-07fd8470d635/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
+golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs=
golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
golang.org/x/tools v0.0.0-20200313205530-4303120df7d8/go.mod h1:Sl4aGygMT6LrqrWclx+PTx3U+LnKx/seiNR+3G19Ar8=
+golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE=
+golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA=
+golang.org/x/tools v0.31.0 h1:0EedkvKDbh+qistFTd0Bcwe/YLh4vHwWEkiI0toFIBU=
+golang.org/x/tools v0.31.0/go.mod h1:naFTU+Cev749tSJRXJlna0T3WxKvb1kWEx15xA4SdmQ=
golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
+golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
+gomodules.xyz/jsonpatch/v2 v2.4.0 h1:Ci3iUJyx9UeRx7CeFN8ARgGbkESwJK+KB9lLcWxY/Zw=
+gomodules.xyz/jsonpatch/v2 v2.4.0/go.mod h1:AH3dM2RI6uoBZxn3LVrfvJ3E0/9dG4cSrbuBJT4moAY=
google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM=
google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc=
google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c=
@@ -305,6 +403,12 @@ google.golang.org/protobuf v1.36.6/go.mod h1:jduwjTPXsFjZGTmRluh+L6NjiWu7pchiJ2/
gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
+gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk=
+gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q=
+gopkg.in/evanphx/json-patch.v4 v4.12.0 h1:n6jtcsulIzXPJaxegRbvFNNrZDjbij7ny3gmSPG+6V4=
+gopkg.in/evanphx/json-patch.v4 v4.12.0/go.mod h1:p8EYWUEYMpynmqDbY58zCKCFZw8pRWMG4EsWvDvM72M=
+gopkg.in/inf.v0 v0.9.1 h1:73M5CoZyi3ZLMOyDlQh031Cx6N9NDJ2Vvfl76EDAgDc=
+gopkg.in/inf.v0 v0.9.1/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw=
gopkg.in/resty.v1 v1.12.0/go.mod h1:mDo4pnntr5jdWRML875a/NmxYqAlA73dVijT2AXvQQo=
gopkg.in/yaml.v2 v2.0.0-20170812160011-eb3733d160e7/go.mod h1:JAlM8MvJe8wmxCU4Bli9HhUf9+ttbYbLASfIpnQbh74=
gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
@@ -315,3 +419,28 @@ gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
gotest.tools v2.2.0+incompatible h1:VsBPFP1AI068pPrMxtb/S8Zkgf9xEmTLJjfM+P5UIEo=
gotest.tools v2.2.0+incompatible/go.mod h1:DsYFclhRJ6vuDpmuTbkuFWG+y2sxOXAzmJt81HFBacw=
honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
+k8s.io/api v0.33.1 h1:tA6Cf3bHnLIrUK4IqEgb2v++/GYUtqiu9sRVk3iBXyw=
+k8s.io/api v0.33.1/go.mod h1:87esjTn9DRSRTD4fWMXamiXxJhpOIREjWOSjsW1kEHw=
+k8s.io/apiextensions-apiserver v0.32.1 h1:hjkALhRUeCariC8DiVmb5jj0VjIc1N0DREP32+6UXZw=
+k8s.io/apiextensions-apiserver v0.32.1/go.mod h1:sxWIGuGiYov7Io1fAS2X06NjMIk5CbRHc2StSmbaQto=
+k8s.io/apimachinery v0.33.1 h1:mzqXWV8tW9Rw4VeW9rEkqvnxj59k1ezDUl20tFK/oM4=
+k8s.io/apimachinery v0.33.1/go.mod h1:BHW0YOu7n22fFv/JkYOEfkUYNRN0fj0BlvMFWA7b+SM=
+k8s.io/client-go v0.33.1 h1:ZZV/Ks2g92cyxWkRRnfUDsnhNn28eFpt26aGc8KbXF4=
+k8s.io/client-go v0.33.1/go.mod h1:JAsUrl1ArO7uRVFWfcj6kOomSlCv+JpvIsp6usAGefA=
+k8s.io/klog/v2 v2.130.1 h1:n9Xl7H1Xvksem4KFG4PYbdQCQxqc/tTUyrgXaOhHSzk=
+k8s.io/klog/v2 v2.130.1/go.mod h1:3Jpz1GvMt720eyJH1ckRHK1EDfpxISzJ7I9OYgaDtPE=
+k8s.io/kube-openapi v0.0.0-20250318190949-c8a335a9a2ff h1:/usPimJzUKKu+m+TE36gUyGcf03XZEP0ZIKgKj35LS4=
+k8s.io/kube-openapi v0.0.0-20250318190949-c8a335a9a2ff/go.mod h1:5jIi+8yX4RIb8wk3XwBo5Pq2ccx4FP10ohkbSKCZoK8=
+k8s.io/utils v0.0.0-20241104100929-3ea5e8cea738 h1:M3sRQVHv7vB20Xc2ybTt7ODCeFj6JSWYFzOFnYeS6Ro=
+k8s.io/utils v0.0.0-20241104100929-3ea5e8cea738/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0=
+sigs.k8s.io/controller-runtime v0.20.4 h1:X3c+Odnxz+iPTRobG4tp092+CvBU9UK0t/bRf+n0DGU=
+sigs.k8s.io/controller-runtime v0.20.4/go.mod h1:xg2XB0K5ShQzAgsoujxuKN4LNXR2LfwwHsPj7Iaw+XY=
+sigs.k8s.io/json v0.0.0-20241010143419-9aa6b5e7a4b3 h1:/Rv+M11QRah1itp8VhT6HoVx1Ray9eB4DBr+K+/sCJ8=
+sigs.k8s.io/json v0.0.0-20241010143419-9aa6b5e7a4b3/go.mod h1:18nIHnGi6636UCz6m8i4DhaJ65T6EruyzmoQqI2BVDo=
+sigs.k8s.io/randfill v0.0.0-20250304075658-069ef1bbf016/go.mod h1:XeLlZ/jmk4i1HRopwe7/aU3H5n1zNUcX6TM94b3QxOY=
+sigs.k8s.io/randfill v1.0.0 h1:JfjMILfT8A6RbawdsK2JXGBR5AQVfd+9TbzrlneTyrU=
+sigs.k8s.io/randfill v1.0.0/go.mod h1:XeLlZ/jmk4i1HRopwe7/aU3H5n1zNUcX6TM94b3QxOY=
+sigs.k8s.io/structured-merge-diff/v4 v4.6.0 h1:IUA9nvMmnKWcj5jl84xn+T5MnlZKThmUW1TdblaLVAc=
+sigs.k8s.io/structured-merge-diff/v4 v4.6.0/go.mod h1:dDy58f92j70zLsuZVuUX5Wp9vtxXpaZnkPGWeqDfCps=
+sigs.k8s.io/yaml v1.4.0 h1:Mk1wCc2gy/F0THH0TAp1QYyJNzRm2KCLy3o5ASXVI5E=
+sigs.k8s.io/yaml v1.4.0/go.mod h1:Ejl7/uTz7PSA4eKMyQCUTnhZYNmLIl+5c2lQPGR2BPY=
diff --git a/helm/cortex/templates/crds/feature.yaml b/helm/cortex/templates/crds/feature.yaml
new file mode 100755
index 00000000..efe950c4
--- /dev/null
+++ b/helm/cortex/templates/crds/feature.yaml
@@ -0,0 +1,113 @@
+apiVersion: apiextensions.k8s.io/v1
+kind: CustomResourceDefinition
+metadata:
+ name: features.extractor.cortex.sap
+spec:
+ group: extractor.cortex.sap
+ names:
+ kind: Feature
+ listKind: FeatureList
+ plural: features
+ singular: feature
+ scope: Namespaced
+ versions:
+ - name: v1
+ schema:
+ openAPIV3Schema:
+ description: Feature is the Schema for the features API.
+ properties:
+ apiVersion:
+ description: |-
+ APIVersion defines the versioned schema of this representation of an object.
+ Servers should convert recognized schemas to the latest internal value, and
+ may reject unrecognized values.
+ More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
+ type: string
+ kind:
+ description: |-
+ Kind is a string value representing the REST resource this object represents.
+ Servers may infer this from the endpoint the client submits requests to.
+ Cannot be updated.
+ In CamelCase.
+ More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
+ type: string
+ metadata:
+ type: object
+ spec:
+ description: FeatureSpec defines the desired state of Feature.
+ properties:
+ foo:
+ description: Foo is an example field of Feature. Edit feature_types.go
+ to remove/update
+ type: string
+ type: object
+ status:
+ description: FeatureStatus defines the observed state of Feature.
+ type: object
+ type: object
+ served: true
+ storage: true
+ subresources:
+ status: {}
+---
+apiVersion: rbac.authorization.k8s.io/v1
+kind: ClusterRole
+metadata:
+ name: cortex-feature-manager-role
+rules:
+- apiGroups:
+ - extractor.cortex.sap
+ resources:
+ - features
+ verbs:
+ - create
+ - delete
+ - get
+ - list
+ - patch
+ - update
+ - watch
+- apiGroups:
+ - extractor.cortex.sap
+ resources:
+ - features/finalizers
+ verbs:
+ - update
+- apiGroups:
+ - extractor.cortex.sap
+ resources:
+ - features/status
+ verbs:
+ - get
+ - patch
+ - update
+- apiGroups:
+ - extractor.cortex.sap
+ resources:
+ - pods
+ verbs:
+ - create
+ - delete
+ - get
+ - list
+ - patch
+ - update
+ - watch
+---
+apiVersion: rbac.authorization.k8s.io/v1
+kind: ClusterRoleBinding
+metadata:
+ name: cortex-feature-manager-role-binding
+roleRef:
+ apiGroup: rbac.authorization.k8s.io
+ kind: ClusterRole
+ name: cortex-feature-manager-role
+subjects:
+- kind: ServiceAccount
+ name: cortex-feature-manager
+ namespace: {{ .Release.Namespace }}
+---
+apiVersion: v1
+kind: ServiceAccount
+metadata:
+ name: cortex-feature-manager
diff --git a/helm/cortex/templates/deployment.yaml b/helm/cortex/templates/deployment.yaml
index 84feb1d5..c11e9802 100644
--- a/helm/cortex/templates/deployment.yaml
+++ b/helm/cortex/templates/deployment.yaml
@@ -10,6 +10,7 @@ metadata:
annotations:
# Roll the service when its configmap changes.
checksum/config: {{ include (print $.Template.BasePath "/configmap.yaml") $ | sha256sum }}
+ kubectl.kubernetes.io/default-container: {{ $.Chart.Name }}-{{ .name }}
labels:
app: {{ $.Chart.Name }}-{{ .name }}
{{- include "cortex.labels" $ | nindent 4 }}
@@ -37,6 +38,9 @@ spec:
{{- end }}
securityContext:
{{- toYaml $.Values.podSecurityContext | nindent 8 }}
+ {{- if .serviceAccountName }}
+ serviceAccountName: {{ .serviceAccountName }}
+ {{- end }}
containers:
- name: {{ $.Chart.Name }}-{{ .name }}
args: {{ .args | toJson }}
diff --git a/helm/cortex/values.yaml b/helm/cortex/values.yaml
index a9b84165..b8bee752 100644
--- a/helm/cortex/values.yaml
+++ b/helm/cortex/values.yaml
@@ -50,6 +50,7 @@ modes:
- name: extractor
args: ["extractor"]
replicas: 1
+ serviceAccountName: cortex-feature-manager
# Scheduler exposes the scheduler API and modifies the Nova scheduler weights.
- name: scheduler
diff --git a/helm/features/.helmignore b/helm/features/.helmignore
new file mode 100644
index 00000000..afc4d1c7
--- /dev/null
+++ b/helm/features/.helmignore
@@ -0,0 +1,27 @@
+# Copyright 2025 SAP SE
+# SPDX-License-Identifier: Apache-2.0
+
+# Patterns to ignore when building packages.
+# This supports shell glob matching, relative path matching, and
+# negation (prefixed with !). Only one pattern per line.
+.DS_Store
+# Common VCS dirs
+.git/
+.gitignore
+charts/.gitignore
+.bzr/
+.bzrignore
+.hg/
+.hgignore
+.svn/
+# Common backup files
+*.swp
+*.bak
+*.tmp
+*.orig
+*~
+# Various IDEs
+.project
+.idea/
+*.tmproj
+.vscode/
diff --git a/helm/features/Chart.lock b/helm/features/Chart.lock
new file mode 100644
index 00000000..86c0f197
--- /dev/null
+++ b/helm/features/Chart.lock
@@ -0,0 +1,6 @@
+dependencies:
+- name: owner-info
+ repository: oci://ghcr.io/sapcc/helm-charts
+ version: 1.0.0
+digest: sha256:7643f231cc4ebda347fd12ec62fe4445c280e2b71d27eec555f3025290f5038f
+generated: "2025-05-16T09:57:38.255759+02:00"
diff --git a/helm/features/Chart.yaml b/helm/features/Chart.yaml
new file mode 100644
index 00000000..b706b563
--- /dev/null
+++ b/helm/features/Chart.yaml
@@ -0,0 +1,16 @@
+# Copyright 2025 SAP SE
+# SPDX-License-Identifier: Apache-2.0
+
+apiVersion: v2
+name: cortex-features
+description: Features for Cortex
+type: application
+version: 0.0.1
+appVersion: 0.1.0
+dependencies:
+ # Owner info adds a configmap to the kubernetes cluster with information on
+ # the service owner. This makes it easier to find out who to contact in case
+ # of issues. See: https://github.com/sapcc/helm-charts/pkgs/container/helm-charts%2Fowner-info
+ - name: owner-info
+ repository: oci://ghcr.io/sapcc/helm-charts
+ version: 1.0.0
diff --git a/helm/features/charts/.gitignore b/helm/features/charts/.gitignore
new file mode 100644
index 00000000..66c707d9
--- /dev/null
+++ b/helm/features/charts/.gitignore
@@ -0,0 +1,5 @@
+# Copyright 2025 SAP SE
+# SPDX-License-Identifier: Apache-2.0
+
+*
+!.gitignore
\ No newline at end of file
diff --git a/helm/features/templates/features.yaml b/helm/features/templates/features.yaml
new file mode 100644
index 00000000..af156f58
--- /dev/null
+++ b/helm/features/templates/features.yaml
@@ -0,0 +1,6 @@
+apiVersion: extractor.cortex.sap/v1
+kind: Feature
+metadata:
+ name: feature
+spec:
+ foo: blablobib
\ No newline at end of file
diff --git a/helm/features/values.yaml b/helm/features/values.yaml
new file mode 100644
index 00000000..7a48e741
--- /dev/null
+++ b/helm/features/values.yaml
@@ -0,0 +1,9 @@
+# Copyright 2025 SAP SE
+# SPDX-License-Identifier: Apache-2.0
+
+owner-info:
+ helm-chart-url: "https://github.com/cobaltcore-dev/cortex/helm/cortex"
+ maintainers:
+ - "p.matthes@sap.com"
+ support-group: "cobaltcore-dev"
+ enabled: true
diff --git a/internal/kpis/plugins/histogram.go b/internal/kpis/plugins/histogram.go
index 1879c883..4e109faa 100644
--- a/internal/kpis/plugins/histogram.go
+++ b/internal/kpis/plugins/histogram.go
@@ -3,7 +3,7 @@
package plugins
-import "github.com/cobaltcore-dev/cortex/internal/features/plugins"
+import "github.com/cobaltcore-dev/cortex/extractor/plugins"
// Create a histogram from features.
func Histogram[O plugins.Feature](
diff --git a/internal/kpis/plugins/shared/vm_life_span.go b/internal/kpis/plugins/shared/vm_life_span.go
index 413e9690..ed253a74 100644
--- a/internal/kpis/plugins/shared/vm_life_span.go
+++ b/internal/kpis/plugins/shared/vm_life_span.go
@@ -7,9 +7,9 @@ import (
"log/slog"
"strings"
+ "github.com/cobaltcore-dev/cortex/extractor/plugins/shared"
"github.com/cobaltcore-dev/cortex/internal/conf"
"github.com/cobaltcore-dev/cortex/internal/db"
- "github.com/cobaltcore-dev/cortex/internal/features/plugins/shared"
"github.com/cobaltcore-dev/cortex/internal/kpis/plugins"
"github.com/prometheus/client_golang/prometheus"
)
diff --git a/internal/kpis/plugins/shared/vm_life_span_test.go b/internal/kpis/plugins/shared/vm_life_span_test.go
index f778d5ec..924a8102 100644
--- a/internal/kpis/plugins/shared/vm_life_span_test.go
+++ b/internal/kpis/plugins/shared/vm_life_span_test.go
@@ -6,9 +6,9 @@ package shared
import (
"testing"
+ "github.com/cobaltcore-dev/cortex/extractor/plugins/shared"
"github.com/cobaltcore-dev/cortex/internal/conf"
"github.com/cobaltcore-dev/cortex/internal/db"
- "github.com/cobaltcore-dev/cortex/internal/features/plugins/shared"
testlibDB "github.com/cobaltcore-dev/cortex/testlib/db"
"github.com/prometheus/client_golang/prometheus"
)
diff --git a/internal/kpis/plugins/shared/vm_migration_statistics.go b/internal/kpis/plugins/shared/vm_migration_statistics.go
index d2c95216..0cb54d6b 100644
--- a/internal/kpis/plugins/shared/vm_migration_statistics.go
+++ b/internal/kpis/plugins/shared/vm_migration_statistics.go
@@ -8,9 +8,9 @@ import (
"log/slog"
"strings"
+ "github.com/cobaltcore-dev/cortex/extractor/plugins/shared"
"github.com/cobaltcore-dev/cortex/internal/conf"
"github.com/cobaltcore-dev/cortex/internal/db"
- "github.com/cobaltcore-dev/cortex/internal/features/plugins/shared"
"github.com/cobaltcore-dev/cortex/internal/kpis/plugins"
"github.com/prometheus/client_golang/prometheus"
)
diff --git a/internal/kpis/plugins/shared/vm_migration_statistics_test.go b/internal/kpis/plugins/shared/vm_migration_statistics_test.go
index 9a401192..f0230e6b 100644
--- a/internal/kpis/plugins/shared/vm_migration_statistics_test.go
+++ b/internal/kpis/plugins/shared/vm_migration_statistics_test.go
@@ -6,9 +6,9 @@ package shared
import (
"testing"
+ "github.com/cobaltcore-dev/cortex/extractor/plugins/shared"
"github.com/cobaltcore-dev/cortex/internal/conf"
"github.com/cobaltcore-dev/cortex/internal/db"
- "github.com/cobaltcore-dev/cortex/internal/features/plugins/shared"
testlibDB "github.com/cobaltcore-dev/cortex/testlib/db"
"github.com/prometheus/client_golang/prometheus"
)
diff --git a/internal/kpis/plugins/vmware/host_contention.go b/internal/kpis/plugins/vmware/host_contention.go
index 80bd1f3e..425abd0d 100644
--- a/internal/kpis/plugins/vmware/host_contention.go
+++ b/internal/kpis/plugins/vmware/host_contention.go
@@ -6,9 +6,9 @@ package vmware
import (
"log/slog"
+ "github.com/cobaltcore-dev/cortex/extractor/plugins/vmware"
"github.com/cobaltcore-dev/cortex/internal/conf"
"github.com/cobaltcore-dev/cortex/internal/db"
- "github.com/cobaltcore-dev/cortex/internal/features/plugins/vmware"
"github.com/cobaltcore-dev/cortex/internal/kpis/plugins"
"github.com/prometheus/client_golang/prometheus"
)
diff --git a/internal/kpis/plugins/vmware/host_contention_test.go b/internal/kpis/plugins/vmware/host_contention_test.go
index 9f2940e1..a0b8ed9e 100644
--- a/internal/kpis/plugins/vmware/host_contention_test.go
+++ b/internal/kpis/plugins/vmware/host_contention_test.go
@@ -6,9 +6,9 @@ package vmware
import (
"testing"
+ "github.com/cobaltcore-dev/cortex/extractor/plugins/vmware"
"github.com/cobaltcore-dev/cortex/internal/conf"
"github.com/cobaltcore-dev/cortex/internal/db"
- "github.com/cobaltcore-dev/cortex/internal/features/plugins/vmware"
testlibDB "github.com/cobaltcore-dev/cortex/testlib/db"
"github.com/prometheus/client_golang/prometheus"
)
diff --git a/internal/kpis/plugins/vmware/project_noisiness.go b/internal/kpis/plugins/vmware/project_noisiness.go
index a7a004e4..0d6b618b 100644
--- a/internal/kpis/plugins/vmware/project_noisiness.go
+++ b/internal/kpis/plugins/vmware/project_noisiness.go
@@ -6,9 +6,9 @@ package vmware
import (
"log/slog"
+ "github.com/cobaltcore-dev/cortex/extractor/plugins/vmware"
"github.com/cobaltcore-dev/cortex/internal/conf"
"github.com/cobaltcore-dev/cortex/internal/db"
- "github.com/cobaltcore-dev/cortex/internal/features/plugins/vmware"
"github.com/cobaltcore-dev/cortex/internal/kpis/plugins"
"github.com/prometheus/client_golang/prometheus"
)
diff --git a/internal/kpis/plugins/vmware/project_noisiness_test.go b/internal/kpis/plugins/vmware/project_noisiness_test.go
index 47063ba5..030c021e 100644
--- a/internal/kpis/plugins/vmware/project_noisiness_test.go
+++ b/internal/kpis/plugins/vmware/project_noisiness_test.go
@@ -6,9 +6,9 @@ package vmware
import (
"testing"
+ "github.com/cobaltcore-dev/cortex/extractor/plugins/vmware"
"github.com/cobaltcore-dev/cortex/internal/conf"
"github.com/cobaltcore-dev/cortex/internal/db"
- "github.com/cobaltcore-dev/cortex/internal/features/plugins/vmware"
testlibDB "github.com/cobaltcore-dev/cortex/testlib/db"
"github.com/prometheus/client_golang/prometheus"
)
diff --git a/internal/scheduler/plugins/kvm/avoid_overloaded_hosts_cpu.go b/internal/scheduler/plugins/kvm/avoid_overloaded_hosts_cpu.go
index b4d65798..2884736d 100644
--- a/internal/scheduler/plugins/kvm/avoid_overloaded_hosts_cpu.go
+++ b/internal/scheduler/plugins/kvm/avoid_overloaded_hosts_cpu.go
@@ -7,7 +7,7 @@ import (
"errors"
"log/slog"
- "github.com/cobaltcore-dev/cortex/internal/features/plugins/kvm"
+ "github.com/cobaltcore-dev/cortex/extractor/plugins/kvm"
"github.com/cobaltcore-dev/cortex/internal/scheduler/api"
"github.com/cobaltcore-dev/cortex/internal/scheduler/plugins"
)
diff --git a/internal/scheduler/plugins/kvm/avoid_overloaded_hosts_cpu_test.go b/internal/scheduler/plugins/kvm/avoid_overloaded_hosts_cpu_test.go
index 3123e93e..7d9a9c2d 100644
--- a/internal/scheduler/plugins/kvm/avoid_overloaded_hosts_cpu_test.go
+++ b/internal/scheduler/plugins/kvm/avoid_overloaded_hosts_cpu_test.go
@@ -7,9 +7,9 @@ import (
"log/slog"
"testing"
+ "github.com/cobaltcore-dev/cortex/extractor/plugins/kvm"
"github.com/cobaltcore-dev/cortex/internal/conf"
"github.com/cobaltcore-dev/cortex/internal/db"
- "github.com/cobaltcore-dev/cortex/internal/features/plugins/kvm"
testlibDB "github.com/cobaltcore-dev/cortex/testlib/db"
"github.com/cobaltcore-dev/cortex/testlib/scheduler/api"
)
diff --git a/internal/scheduler/plugins/kvm/avoid_overloaded_hosts_memory.go b/internal/scheduler/plugins/kvm/avoid_overloaded_hosts_memory.go
index 025cad11..68b0c1d1 100644
--- a/internal/scheduler/plugins/kvm/avoid_overloaded_hosts_memory.go
+++ b/internal/scheduler/plugins/kvm/avoid_overloaded_hosts_memory.go
@@ -7,7 +7,7 @@ import (
"errors"
"log/slog"
- "github.com/cobaltcore-dev/cortex/internal/features/plugins/kvm"
+ "github.com/cobaltcore-dev/cortex/extractor/plugins/kvm"
"github.com/cobaltcore-dev/cortex/internal/scheduler/api"
"github.com/cobaltcore-dev/cortex/internal/scheduler/plugins"
)
diff --git a/internal/scheduler/plugins/kvm/avoid_overloaded_hosts_memory_test.go b/internal/scheduler/plugins/kvm/avoid_overloaded_hosts_memory_test.go
index 5ec83916..e013506d 100644
--- a/internal/scheduler/plugins/kvm/avoid_overloaded_hosts_memory_test.go
+++ b/internal/scheduler/plugins/kvm/avoid_overloaded_hosts_memory_test.go
@@ -7,9 +7,9 @@ import (
"log/slog"
"testing"
+ "github.com/cobaltcore-dev/cortex/extractor/plugins/kvm"
"github.com/cobaltcore-dev/cortex/internal/conf"
"github.com/cobaltcore-dev/cortex/internal/db"
- "github.com/cobaltcore-dev/cortex/internal/features/plugins/kvm"
testlibDB "github.com/cobaltcore-dev/cortex/testlib/db"
"github.com/cobaltcore-dev/cortex/testlib/scheduler/api"
)
diff --git a/internal/scheduler/plugins/shared/flavor_binpacking.go b/internal/scheduler/plugins/shared/flavor_binpacking.go
index 44589945..dbf8e83b 100644
--- a/internal/scheduler/plugins/shared/flavor_binpacking.go
+++ b/internal/scheduler/plugins/shared/flavor_binpacking.go
@@ -8,7 +8,7 @@ import (
"log/slog"
"slices"
- "github.com/cobaltcore-dev/cortex/internal/features/plugins/shared"
+ "github.com/cobaltcore-dev/cortex/extractor/plugins/shared"
"github.com/cobaltcore-dev/cortex/internal/scheduler/api"
"github.com/cobaltcore-dev/cortex/internal/scheduler/plugins"
)
diff --git a/internal/scheduler/plugins/shared/flavor_binpacking_test.go b/internal/scheduler/plugins/shared/flavor_binpacking_test.go
index cba4cd07..3e82d5e4 100644
--- a/internal/scheduler/plugins/shared/flavor_binpacking_test.go
+++ b/internal/scheduler/plugins/shared/flavor_binpacking_test.go
@@ -7,9 +7,9 @@ import (
"log/slog"
"testing"
+ "github.com/cobaltcore-dev/cortex/extractor/plugins/shared"
"github.com/cobaltcore-dev/cortex/internal/conf"
"github.com/cobaltcore-dev/cortex/internal/db"
- "github.com/cobaltcore-dev/cortex/internal/features/plugins/shared"
"github.com/cobaltcore-dev/cortex/internal/scheduler/api"
testlibDB "github.com/cobaltcore-dev/cortex/testlib/db"
testlibAPI "github.com/cobaltcore-dev/cortex/testlib/scheduler/api"
diff --git a/internal/scheduler/plugins/vmware/anti_affinity_noisy_projects.go b/internal/scheduler/plugins/vmware/anti_affinity_noisy_projects.go
index 34d6d1f4..76573a64 100644
--- a/internal/scheduler/plugins/vmware/anti_affinity_noisy_projects.go
+++ b/internal/scheduler/plugins/vmware/anti_affinity_noisy_projects.go
@@ -7,7 +7,7 @@ import (
"errors"
"log/slog"
- "github.com/cobaltcore-dev/cortex/internal/features/plugins/vmware"
+ "github.com/cobaltcore-dev/cortex/extractor/plugins/vmware"
"github.com/cobaltcore-dev/cortex/internal/scheduler/api"
"github.com/cobaltcore-dev/cortex/internal/scheduler/plugins"
)
diff --git a/internal/scheduler/plugins/vmware/anti_affinity_noisy_projects_test.go b/internal/scheduler/plugins/vmware/anti_affinity_noisy_projects_test.go
index d741a7aa..67117612 100644
--- a/internal/scheduler/plugins/vmware/anti_affinity_noisy_projects_test.go
+++ b/internal/scheduler/plugins/vmware/anti_affinity_noisy_projects_test.go
@@ -7,9 +7,9 @@ import (
"log/slog"
"testing"
+ "github.com/cobaltcore-dev/cortex/extractor/plugins/vmware"
"github.com/cobaltcore-dev/cortex/internal/conf"
"github.com/cobaltcore-dev/cortex/internal/db"
- "github.com/cobaltcore-dev/cortex/internal/features/plugins/vmware"
"github.com/cobaltcore-dev/cortex/internal/scheduler/api"
testlibDB "github.com/cobaltcore-dev/cortex/testlib/db"
testlibAPI "github.com/cobaltcore-dev/cortex/testlib/scheduler/api"
diff --git a/internal/scheduler/plugins/vmware/avoid_contended_hosts.go b/internal/scheduler/plugins/vmware/avoid_contended_hosts.go
index 465c4eaa..26720f2a 100644
--- a/internal/scheduler/plugins/vmware/avoid_contended_hosts.go
+++ b/internal/scheduler/plugins/vmware/avoid_contended_hosts.go
@@ -7,7 +7,7 @@ import (
"errors"
"log/slog"
- "github.com/cobaltcore-dev/cortex/internal/features/plugins/vmware"
+ "github.com/cobaltcore-dev/cortex/extractor/plugins/vmware"
"github.com/cobaltcore-dev/cortex/internal/scheduler/api"
"github.com/cobaltcore-dev/cortex/internal/scheduler/plugins"
)
diff --git a/internal/scheduler/plugins/vmware/avoid_contended_hosts_test.go b/internal/scheduler/plugins/vmware/avoid_contended_hosts_test.go
index c04d816e..23f03f04 100644
--- a/internal/scheduler/plugins/vmware/avoid_contended_hosts_test.go
+++ b/internal/scheduler/plugins/vmware/avoid_contended_hosts_test.go
@@ -7,9 +7,9 @@ import (
"log/slog"
"testing"
+ "github.com/cobaltcore-dev/cortex/extractor/plugins/vmware"
"github.com/cobaltcore-dev/cortex/internal/conf"
"github.com/cobaltcore-dev/cortex/internal/db"
- "github.com/cobaltcore-dev/cortex/internal/features/plugins/vmware"
testlibDB "github.com/cobaltcore-dev/cortex/testlib/db"
testlibAPI "github.com/cobaltcore-dev/cortex/testlib/scheduler/api"
)
diff --git a/main.go b/main.go
index 10ecd9d5..211fc9f2 100644
--- a/main.go
+++ b/main.go
@@ -12,9 +12,9 @@ import (
"time"
"github.com/cobaltcore-dev/cortex/commands/checks"
+ "github.com/cobaltcore-dev/cortex/extractor"
"github.com/cobaltcore-dev/cortex/internal/conf"
"github.com/cobaltcore-dev/cortex/internal/db"
- "github.com/cobaltcore-dev/cortex/internal/features"
"github.com/cobaltcore-dev/cortex/internal/kpis"
"github.com/cobaltcore-dev/cortex/internal/monitoring"
"github.com/cobaltcore-dev/cortex/internal/mqtt"
@@ -47,22 +47,6 @@ func runSyncer(ctx context.Context, registry *monitoring.Registry, config conf.S
go pipeline.SyncPeriodic(ctx) // blocking
}
-// Periodically extract features from the database.
-func runExtractor(registry *monitoring.Registry, config conf.FeaturesConfig, db db.DB) {
- monitor := features.NewPipelineMonitor(registry)
-
- mqttClient := mqtt.NewClient(mqtt.NewMQTTMonitor(registry))
- if err := mqttClient.Connect(); err != nil {
- panic("failed to connect to mqtt broker: " + err.Error())
- }
- defer mqttClient.Disconnect()
-
- pipeline := features.NewPipeline(config, db, monitor, mqttClient)
- // Selects the extractors to run based on the config.
- pipeline.Init(features.SupportedExtractors)
- go pipeline.ExtractOnTrigger() // blocking
-}
-
// Run a webserver that listens for external scheduling requests.
func runScheduler(mux *http.ServeMux, registry *monitoring.Registry, config conf.SchedulerConfig, db db.DB) {
monitor := scheduler.NewSchedulerMonitor(registry)
@@ -188,7 +172,7 @@ func main() {
case "syncer":
runSyncer(ctx, registry, config.GetSyncConfig(), database)
case "extractor":
- runExtractor(registry, config.GetFeaturesConfig(), database)
+ extractor.Run(registry, config.GetFeaturesConfig(), database)
case "scheduler":
runScheduler(mux, registry, config.GetSchedulerConfig(), database)
case "kpis":