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

feat: remove OdigosConfig CRD #1405

Merged
merged 23 commits into from
Aug 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
760f66d
feat: replace odigosv1.OdigosConfiguration usage with common.OdigosCo…
rauno56 Jul 29, 2024
ae0f347
feat: set write permissions on odiglet generate for build step as well
rauno56 Jul 29, 2024
7aabd94
chore: adjust goreleaser config for the new version
rauno56 Jul 30, 2024
9dc99ec
chore: refactor envoverwriter tests to handle common.OdigosConfiguration
rauno56 Jul 30, 2024
4b338d7
fix: use sigs.k8s.io/yaml for yaml parsing
rauno56 Jul 30, 2024
17323fa
fix: assign OdigosConfiguration controllers to ConfigMaps
rauno56 Jul 30, 2024
274116e
chore: remove debug print
rauno56 Jul 30, 2024
5f41b13
fix: add metadata to created configmaps
rauno56 Jul 31, 2024
988625c
style: get rid of docker's warnings about "as" casing
rauno56 Aug 7, 2024
2900524
feat: grant permissions for CMs equivalent to OdigosConfig
rauno56 Aug 9, 2024
97f2ffe
feat: add CM to the helm chart
rauno56 Aug 9, 2024
1e13eed
feat: grant permissions for CMs equivalent to OdigosConfig in CLI
rauno56 Aug 9, 2024
4c3cea9
fix: give odiglet permission to read configmaps
rauno56 Aug 12, 2024
dee2abf
feat: remove OdigosConfiguration CR from helm
rauno56 Aug 12, 2024
c7cc08c
feat: fail if any command in release-charts.sh script errors
rauno56 Aug 12, 2024
5548e47
feat: migrate OdigosConfig CR to ConfigMap when upgrading
rauno56 Aug 12, 2024
28e4c44
feat: remove SupportedSDKs
rauno56 Aug 13, 2024
c20b461
docs: update docs and add deprecation notices
rauno56 Aug 13, 2024
2a91bee
refactor: rename GetCurrentOdigosConfig -> GetDeprecatedConfig
rauno56 Aug 14, 2024
c28d93b
feat: remove the workaround for the flakiness - should not be needed
rauno56 Aug 15, 2024
829cf69
feat: assert the existance of config in e2e tests
rauno56 Aug 15, 2024
589b5c9
refactor: define utils.GetCurrentConfig
rauno56 Aug 15, 2024
ce3c385
feat: add config and system-object labels to config CM
rauno56 Aug 15, 2024
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 .goreleaser.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ changelog:
- "^docs:"
- "^test:"
brews:
- tap:
- repository:
rauno56 marked this conversation as resolved.
Show resolved Hide resolved
owner: keyval-dev
name: homebrew-odigos-cli
token: "{{ .Env.HOMEBREW_GITHUB_API_TOKEN }}"
Expand Down
13 changes: 11 additions & 2 deletions api/config/crd/bases/odigos.io_odigosconfigurations.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,11 @@ spec:
- name: v1alpha1
schema:
openAPIV3Schema:
description: OdigosConfiguration is the Schema for the odigos configuration
description: |-
OdigosConfiguration is the Schema for the odigos configuration


Deprecated: Use common.OdigosConfiguration instead
properties:
apiVersion:
description: |-
Expand All @@ -37,11 +41,16 @@ spec:
metadata:
type: object
spec:
description: OdigosConfigurationSpec defines the desired state of OdigosConfiguration
description: |-
OdigosConfigurationSpec defines the desired state of OdigosConfiguration


Deprecated: Use common.OdigosConfiguration instead
properties:
autoscalerImage:
type: string
collectorGateway:
description: 'Deprecated: Use common.OdigosConfiguration instead'
properties:
goMemLimitMiB:
description: |-
Expand Down
33 changes: 33 additions & 0 deletions api/odigos/v1alpha1/odigosconfig_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import (
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
)

// Deprecated: Use common.OdigosConfiguration instead
type CollectorGatewayConfiguration struct {
// RequestMemoryMiB is the memory request for the cluster gateway collector deployment.
// it will be embedded in the deployment as a resource request of the form "memory: <value>Mi"
Expand All @@ -30,6 +31,8 @@ type CollectorGatewayConfiguration struct {
}

// OdigosConfigurationSpec defines the desired state of OdigosConfiguration
//
// Deprecated: Use common.OdigosConfiguration instead
type OdigosConfigurationSpec struct {
OdigosVersion string `json:"odigosVersion"`
ConfigVersion int `json:"configVersion"`
Expand All @@ -55,6 +58,8 @@ type OdigosConfigurationSpec struct {
//+kubebuilder:object:root=true

// OdigosConfiguration is the Schema for the odigos configuration
//
// Deprecated: Use common.OdigosConfiguration instead
type OdigosConfiguration struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`
Expand All @@ -74,3 +79,31 @@ type OdigosConfigurationList struct {
func init() {
SchemeBuilder.Register(&OdigosConfiguration{}, &OdigosConfigurationList{})
}

func (odigosConfig *OdigosConfiguration) ToCommonConfig() *common.OdigosConfiguration {
var collectorGateway common.CollectorGatewayConfiguration
if odigosConfig.Spec.CollectorGateway != nil {
collectorGateway = common.CollectorGatewayConfiguration{
RequestMemoryMiB: odigosConfig.Spec.CollectorGateway.RequestMemoryMiB,
MemoryLimiterLimitMiB: odigosConfig.Spec.CollectorGateway.MemoryLimiterLimitMiB,
MemoryLimiterSpikeLimitMiB: odigosConfig.Spec.CollectorGateway.MemoryLimiterSpikeLimitMiB,
GoMemLimitMib: odigosConfig.Spec.CollectorGateway.GoMemLimitMib,
}
}
return &common.OdigosConfiguration{
OdigosVersion: odigosConfig.Spec.OdigosVersion,
ConfigVersion: odigosConfig.Spec.ConfigVersion,
TelemetryEnabled: odigosConfig.Spec.TelemetryEnabled,
OpenshiftEnabled: odigosConfig.Spec.OpenshiftEnabled,
IgnoredNamespaces: odigosConfig.Spec.IgnoredNamespaces,
IgnoredContainers: odigosConfig.Spec.IgnoredContainers,
Psp: odigosConfig.Spec.Psp,
ImagePrefix: odigosConfig.Spec.ImagePrefix,
OdigletImage: odigosConfig.Spec.OdigletImage,
InstrumentorImage: odigosConfig.Spec.InstrumentorImage,
AutoscalerImage: odigosConfig.Spec.AutoscalerImage,
DefaultSDKs: odigosConfig.Spec.DefaultSDKs,
CollectorGateway: &collectorGateway,
GoAutoIncludeCodeAttributes: odigosConfig.Spec.GoAutoIncludeCodeAttributes,
}
}
23 changes: 12 additions & 11 deletions autoscaler/controllers/gateway/memory.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
package gateway

import odigosv1 "github.com/odigos-io/odigos/api/odigos/v1alpha1"
import (
"github.com/odigos-io/odigos/common"
)

const (
defaultRequestMemoryMiB = 500
Expand All @@ -25,27 +27,26 @@ type memoryConfigurations struct {
gomemlimitMiB int
}

func getMemoryConfigurations(odigosConfig *odigosv1.OdigosConfiguration) *memoryConfigurations {

func getMemoryConfigurations(odigosConfig *common.OdigosConfiguration) *memoryConfigurations {
memoryRequestMiB := defaultRequestMemoryMiB
if odigosConfig.Spec.CollectorGateway != nil && odigosConfig.Spec.CollectorGateway.RequestMemoryMiB > 0 {
memoryRequestMiB = odigosConfig.Spec.CollectorGateway.RequestMemoryMiB
if odigosConfig.CollectorGateway != nil && odigosConfig.CollectorGateway.RequestMemoryMiB > 0 {
memoryRequestMiB = odigosConfig.CollectorGateway.RequestMemoryMiB
}

// the memory limiter hard limit is set as 50 MiB less than the memory request
memoryLimiterLimitMiB := memoryRequestMiB - defaultMemoryLimiterLimitDiffMib
if odigosConfig.Spec.CollectorGateway != nil && odigosConfig.Spec.CollectorGateway.MemoryLimiterLimitMiB > 0 {
memoryLimiterLimitMiB = odigosConfig.Spec.CollectorGateway.MemoryLimiterLimitMiB
if odigosConfig.CollectorGateway != nil && odigosConfig.CollectorGateway.MemoryLimiterLimitMiB > 0 {
memoryLimiterLimitMiB = odigosConfig.CollectorGateway.MemoryLimiterLimitMiB
}

memoryLimiterSpikeLimitMiB := memoryLimiterLimitMiB * defaultMemoryLimiterSpikePercentage / 100.0
if odigosConfig.Spec.CollectorGateway != nil && odigosConfig.Spec.CollectorGateway.MemoryLimiterSpikeLimitMiB > 0 {
memoryLimiterSpikeLimitMiB = odigosConfig.Spec.CollectorGateway.MemoryLimiterSpikeLimitMiB
if odigosConfig.CollectorGateway != nil && odigosConfig.CollectorGateway.MemoryLimiterSpikeLimitMiB > 0 {
memoryLimiterSpikeLimitMiB = odigosConfig.CollectorGateway.MemoryLimiterSpikeLimitMiB
}

gomemlimitMiB := int(memoryLimiterLimitMiB * defaultGoMemLimitPercentage / 100.0)
if odigosConfig.Spec.CollectorGateway != nil && odigosConfig.Spec.CollectorGateway.GoMemLimitMib != 0 {
gomemlimitMiB = odigosConfig.Spec.CollectorGateway.GoMemLimitMib
if odigosConfig.CollectorGateway != nil && odigosConfig.CollectorGateway.GoMemLimitMib != 0 {
gomemlimitMiB = odigosConfig.CollectorGateway.GoMemLimitMib
}

return &memoryConfigurations{
Expand Down
16 changes: 8 additions & 8 deletions autoscaler/controllers/gateway/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,11 @@ import (
appsv1 "k8s.io/api/apps/v1"

odigosv1 "github.com/odigos-io/odigos/api/odigos/v1alpha1"
"github.com/odigos-io/odigos/autoscaler/controllers/common"
"github.com/odigos-io/odigos/common/consts"
commonconf "github.com/odigos-io/odigos/autoscaler/controllers/common"
"github.com/odigos-io/odigos/common"
k8sconsts "github.com/odigos-io/odigos/k8sutils/pkg/consts"
"github.com/odigos-io/odigos/k8sutils/pkg/env"
"github.com/odigos-io/odigos/k8sutils/pkg/utils"
"k8s.io/apimachinery/pkg/runtime"
"k8s.io/apimachinery/pkg/types"
"sigs.k8s.io/controller-runtime/pkg/client"
Expand Down Expand Up @@ -44,11 +45,10 @@ func Sync(ctx context.Context, k8sClient client.Client, scheme *runtime.Scheme,
return err
}
// Add the generic batch processor to the list of processors
processors.Items = append(processors.Items, common.GetGenericBatchProcessor())
processors.Items = append(processors.Items, commonconf.GetGenericBatchProcessor())

odigosSystemNamespaceName := env.GetCurrentNamespace()
var odigosConfig odigosv1.OdigosConfiguration
if err := k8sClient.Get(ctx, types.NamespacedName{Namespace: odigosSystemNamespaceName, Name: consts.OdigosConfigurationName}, &odigosConfig); err != nil {
odigosConfig, err := utils.GetCurrentConfig(ctx, k8sClient)
if err != nil {
logger.Error(err, "failed to get odigos config")
return err
}
Expand All @@ -58,7 +58,7 @@ func Sync(ctx context.Context, k8sClient client.Client, scheme *runtime.Scheme,

func syncGateway(dests *odigosv1.DestinationList, processors *odigosv1.ProcessorList,
gateway *odigosv1.CollectorsGroup, ctx context.Context,
c client.Client, scheme *runtime.Scheme, imagePullSecrets []string, odigosVersion string, odigosConfig *odigosv1.OdigosConfiguration) error {
c client.Client, scheme *runtime.Scheme, imagePullSecrets []string, odigosVersion string, odigosConfig *common.OdigosConfiguration) error {
logger := log.FromContext(ctx)
logger.V(0).Info("Syncing gateway")

Expand Down Expand Up @@ -88,7 +88,7 @@ func syncGateway(dests *odigosv1.DestinationList, processors *odigosv1.Processor
return err
}

err = common.UpdateCollectorGroupReceiverSignals(ctx, c, gateway, signals)
err = commonconf.UpdateCollectorGroupReceiverSignals(ctx, c, gateway, signals)
if err != nil {
logger.Error(err, "Failed to update cluster collectors group received signals")
return err
Expand Down
6 changes: 3 additions & 3 deletions autoscaler/controllers/odigosconfig_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ package controllers
import (
"context"

v1 "github.com/odigos-io/odigos/api/odigos/v1alpha1"
"github.com/odigos-io/odigos/autoscaler/controllers/gateway"
"k8s.io/api/core/v1"
"k8s.io/apimachinery/pkg/runtime"
ctrl "sigs.k8s.io/controller-runtime"
"sigs.k8s.io/controller-runtime/pkg/client"
Expand All @@ -19,7 +19,6 @@ type OdigosConfigReconciler struct {
}

func (r *OdigosConfigReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error) {

logger := log.FromContext(ctx)
logger.V(0).Info("Reconciling Odigos Configuration")

Expand All @@ -33,7 +32,8 @@ func (r *OdigosConfigReconciler) Reconcile(ctx context.Context, req ctrl.Request

// SetupWithManager sets up the controller with the Manager.
func (r *OdigosConfigReconciler) SetupWithManager(mgr ctrl.Manager) error {
// TODO: Clean up noise from too broad of a definition here
return ctrl.NewControllerManagedBy(mgr).
For(&v1.OdigosConfiguration{}).
For(&v1.ConfigMap{}).
Complete(r)
}
8 changes: 3 additions & 5 deletions cli/cmd/install.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ import (

apierrors "k8s.io/apimachinery/pkg/api/errors"

odigosv1 "github.com/odigos-io/odigos/api/odigos/v1alpha1"
"github.com/odigos-io/odigos/common"
"github.com/odigos-io/odigos/common/consts"
"github.com/odigos-io/odigos/common/utils"
Expand Down Expand Up @@ -83,7 +82,7 @@ This command will install k8s components that will auto-instrument your applicat
odigosProToken = odigosOnPremToken
}

config := createOdigosConfigSpec()
config := createOdigosConfig()

fmt.Printf("Installing Odigos version %s in namespace %s ...\n", versionFlag, ns)

Expand Down Expand Up @@ -178,12 +177,11 @@ func createNamespace(ctx context.Context, cmd *cobra.Command, client *kube.Clien
return nil
}

func createOdigosConfigSpec() odigosv1.OdigosConfigurationSpec {

func createOdigosConfig() common.OdigosConfiguration {
fullIgnoredNamespaces := utils.MergeDefaultIgnoreWithUserInput(userInputIgnoredNamespaces, consts.SystemNamespaces)
fullIgnoredContainers := utils.MergeDefaultIgnoreWithUserInput(userInputIgnoredContainers, consts.IgnoredContainers)

return odigosv1.OdigosConfigurationSpec{
return common.OdigosConfiguration{
OdigosVersion: versionFlag,
ConfigVersion: 1, // config version starts at 1 and incremented on every config change
TelemetryEnabled: telemetryEnabled,
Expand Down
6 changes: 3 additions & 3 deletions cli/cmd/login.go
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ func updateApiKey(cmd *cobra.Command, args []string) {
fmt.Println("Odigos cloud login failed - unable to read the current Odigos configuration.")
os.Exit(1)
}
config.Spec.ConfigVersion += 1
config.ConfigVersion += 1

if odigosCloudApiKeyFlag == "" {
fmt.Println("Enter your odigos cloud api-key. You can find it here: https://app.odigos.io/settings")
Expand All @@ -92,7 +92,7 @@ func updateApiKey(cmd *cobra.Command, args []string) {
}
isPrevOdigosCloud := currentTier == common.CloudOdigosTier

resourceManagers := resources.CreateResourceManagers(client, ns, common.CloudOdigosTier, &odigosCloudApiKeyFlag, &config.Spec)
resourceManagers := resources.CreateResourceManagers(client, ns, common.CloudOdigosTier, &odigosCloudApiKeyFlag, config)
err = resources.ApplyResourceManagers(ctx, client, resourceManagers, "Updating")
if err != nil {
fmt.Println("Odigos cloud login failed - unable to apply Odigos resources.")
Expand All @@ -106,7 +106,7 @@ func updateApiKey(cmd *cobra.Command, args []string) {

if isPrevOdigosCloud {
l := log.Print("Restarting relevant pods ...")
err := restartPodsAfterCloudLogin(ctx, client, ns, config.Spec.ConfigVersion)
err := restartPodsAfterCloudLogin(ctx, client, ns, config.ConfigVersion)
if err != nil {
l.Error(err)
}
Expand Down
6 changes: 3 additions & 3 deletions cli/cmd/logout.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ var logoutCmd = &cobra.Command{
Use: "logout",
Short: "Logout from Odigos cloud",
Long: `Disconnect this Odigos installation from your odigos cloud account.

After running this command, you will no longer be able to control and monitor this Odigos installation from Odigos cloud.
You can run 'odigos ui' to manage your Odigos installation locally.
`,
Expand Down Expand Up @@ -65,10 +65,10 @@ var logoutCmd = &cobra.Command{
fmt.Println("Odigos cloud logout failed - unable to read the current Odigos configuration.")
os.Exit(1)
}
config.Spec.ConfigVersion += 1
config.ConfigVersion += 1

emptyApiKey := ""
resourceManagers := resources.CreateResourceManagers(client, ns, common.CommunityOdigosTier, &emptyApiKey, &config.Spec)
resourceManagers := resources.CreateResourceManagers(client, ns, common.CommunityOdigosTier, &emptyApiKey, config)
err = resources.ApplyResourceManagers(ctx, client, resourceManagers, "Updating")
if err != nil {
fmt.Println("Odigos cloud logout failed - unable to apply Odigos resources.")
Expand Down
23 changes: 19 additions & 4 deletions cli/cmd/resources/applyresources.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,10 @@ import (
"github.com/odigos-io/odigos/cli/cmd/resources/resourcemanager"
"github.com/odigos-io/odigos/cli/pkg/kube"
"github.com/odigos-io/odigos/cli/pkg/log"
"github.com/odigos-io/odigos/common"
"github.com/odigos-io/odigos/common/consts"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"sigs.k8s.io/yaml"
)

func ApplyResourceManagers(ctx context.Context, client *kube.Client, resourceManagers []resourcemanager.ResourceManager, prefixForLogging string) error {
Expand All @@ -26,11 +28,11 @@ func ApplyResourceManagers(ctx context.Context, client *kube.Client, resourceMan
return nil
}

func DeleteOldOdigosSystemObjects(ctx context.Context, client *kube.Client, ns string, config *v1alpha1.OdigosConfiguration) error {
func DeleteOldOdigosSystemObjects(ctx context.Context, client *kube.Client, ns string, config *common.OdigosConfiguration) error {
resources := kube.GetManagedResources(ns)
for _, resource := range resources {
l := log.Print(fmt.Sprintf("Syncing %s", resource.Resource.Resource))
err := client.DeleteOldOdigosSystemObjects(ctx, resource, config.Spec.ConfigVersion)
err := client.DeleteOldOdigosSystemObjects(ctx, resource, config.ConfigVersion)
if err != nil {
l.Error(err)
os.Exit(1)
Expand All @@ -41,6 +43,19 @@ func DeleteOldOdigosSystemObjects(ctx context.Context, client *kube.Client, ns s
return nil
}

func GetCurrentConfig(ctx context.Context, client *kube.Client, ns string) (*v1alpha1.OdigosConfiguration, error) {
return client.OdigosClient.OdigosConfigurations(ns).Get(ctx, consts.OdigosConfigurationName, metav1.GetOptions{})
func GetCurrentConfig(ctx context.Context, client *kube.Client, ns string) (*common.OdigosConfiguration, error) {
configMap, err := client.CoreV1().ConfigMaps(ns).Get(ctx, consts.OdigosConfigurationName, metav1.GetOptions{})
if err != nil {
return nil, err
}
var odigosConfig common.OdigosConfiguration
if err := yaml.Unmarshal([]byte(configMap.Data[consts.OdigosConfigurationFileName]), &odigosConfig); err != nil {
return nil, err
}
edeNFed marked this conversation as resolved.
Show resolved Hide resolved
return &odigosConfig, nil
}
Comment on lines +46 to 56
Copy link
Collaborator

@blumamir blumamir Aug 14, 2024

Choose a reason for hiding this comment

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

This function is also defined in autoscaler, frontent, instrumentor, odiglet and maybe other places.

WDYT about moving it to k8sutils module use this function in all places?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Refactored the use cases in controllers. Left the others intact.


func GetDeprecatedConfig(ctx context.Context, client *kube.Client, ns string) (*v1alpha1.OdigosConfiguration, error) {
return client.OdigosClient.OdigosConfigurations(ns).Get(ctx, consts.OdigosConfigurationName, metav1.GetOptions{})
}

6 changes: 3 additions & 3 deletions cli/cmd/resources/autoscaler.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ package resources
import (
"context"

odigosv1 "github.com/odigos-io/odigos/api/odigos/v1alpha1"
"github.com/odigos-io/odigos/cli/cmd/resources/resourcemanager"
"github.com/odigos-io/odigos/cli/pkg/containers"
"github.com/odigos-io/odigos/cli/pkg/kube"
"github.com/odigos-io/odigos/common"
"sigs.k8s.io/controller-runtime/pkg/client"

appsv1 "k8s.io/api/apps/v1"
Expand Down Expand Up @@ -516,10 +516,10 @@ func NewAutoscalerDeployment(ns string, version string, imagePrefix string, imag
type autoScalerResourceManager struct {
client *kube.Client
ns string
config *odigosv1.OdigosConfigurationSpec
config *common.OdigosConfiguration
}

func NewAutoScalerResourceManager(client *kube.Client, ns string, config *odigosv1.OdigosConfigurationSpec) resourcemanager.ResourceManager {
func NewAutoScalerResourceManager(client *kube.Client, ns string, config *common.OdigosConfiguration) resourcemanager.ResourceManager {
return &autoScalerResourceManager{client: client, ns: ns, config: config}
}

Expand Down
6 changes: 3 additions & 3 deletions cli/cmd/resources/datacollection.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ package resources
import (
"context"

odigosv1 "github.com/odigos-io/odigos/api/odigos/v1alpha1"
"github.com/odigos-io/odigos/cli/cmd/resources/resourcemanager"
"github.com/odigos-io/odigos/cli/pkg/kube"
"github.com/odigos-io/odigos/common"
corev1 "k8s.io/api/core/v1"
rbacv1 "k8s.io/api/rbac/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
Expand Down Expand Up @@ -113,10 +113,10 @@ func NewDataCollectionClusterRoleBinding(ns string) *rbacv1.ClusterRoleBinding {
type dataCollectionResourceManager struct {
client *kube.Client
ns string
config *odigosv1.OdigosConfigurationSpec
config *common.OdigosConfiguration
}

func NewDataCollectionResourceManager(client *kube.Client, ns string, config *odigosv1.OdigosConfigurationSpec) resourcemanager.ResourceManager {
func NewDataCollectionResourceManager(client *kube.Client, ns string, config *common.OdigosConfiguration) resourcemanager.ResourceManager {
return &dataCollectionResourceManager{client: client, ns: ns, config: config}
}

Expand Down
Loading
Loading