Skip to content

Commit

Permalink
Merge branch 'main' into webhook-injection-no-kubelet
Browse files Browse the repository at this point in the history
  • Loading branch information
tamirdavid1 authored Oct 7, 2024
2 parents 5fd1dbd + 5c72fb0 commit 706972a
Show file tree
Hide file tree
Showing 10 changed files with 26 additions and 20 deletions.
2 changes: 1 addition & 1 deletion cli/cmd/resources/autoscaler.go
Original file line number Diff line number Diff line change
Expand Up @@ -467,7 +467,7 @@ func NewAutoscalerDeployment(ns string, version string, imagePrefix string, imag
Resources: corev1.ResourceRequirements{
Limits: corev1.ResourceList{
"cpu": resource.MustParse("500m"),
"memory": *resource.NewQuantity(134217728, resource.BinarySI),
"memory": *resource.NewQuantity(536870912, resource.BinarySI),
},
Requests: corev1.ResourceList{
"cpu": resource.MustParse("10m"),
Expand Down
2 changes: 1 addition & 1 deletion cli/cmd/resources/instrumentor.go
Original file line number Diff line number Diff line change
Expand Up @@ -501,7 +501,7 @@ func NewInstrumentorDeployment(ns string, version string, telemetryEnabled bool,
Resources: corev1.ResourceRequirements{
Limits: corev1.ResourceList{
"cpu": resource.MustParse("500m"),
"memory": *resource.NewQuantity(134217728, resource.BinarySI),
"memory": *resource.NewQuantity(536870912, resource.BinarySI),
},
Requests: corev1.ResourceList{
"cpu": resource.MustParse("10m"),
Expand Down
2 changes: 1 addition & 1 deletion cli/cmd/resources/scheduler.go
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,7 @@ func NewSchedulerDeployment(ns string, version string, imagePrefix string) *apps
Resources: corev1.ResourceRequirements{
Limits: corev1.ResourceList{
"cpu": resource.MustParse("500m"),
"memory": *resource.NewQuantity(134217728, resource.BinarySI),
"memory": *resource.NewQuantity(536870912, resource.BinarySI),
},
Requests: corev1.ResourceList{
"cpu": resource.MustParse("10m"),
Expand Down
2 changes: 1 addition & 1 deletion cli/cmd/resources/ui.go
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ func NewUIDeployment(ns string, version string, imagePrefix string) *appsv1.Depl
Resources: corev1.ResourceRequirements{
Limits: corev1.ResourceList{
"cpu": resource.MustParse("500m"),
"memory": *resource.NewQuantity(134217728, resource.BinarySI),
"memory": *resource.NewQuantity(536870912, resource.BinarySI),
},
Requests: corev1.ResourceList{
"cpu": resource.MustParse("10m"),
Expand Down
2 changes: 1 addition & 1 deletion helm/odigos/templates/autoscaler/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ spec:
resources:
limits:
cpu: 500m
memory: 128Mi
memory: 512Mi
requests:
cpu: 10m
memory: 64Mi
Expand Down
2 changes: 1 addition & 1 deletion helm/odigos/templates/instrumentor/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ spec:
resources:
limits:
cpu: 500m
memory: 128Mi
memory: 512Mi
requests:
cpu: 10m
memory: 64Mi
Expand Down
2 changes: 1 addition & 1 deletion helm/odigos/templates/scheduler/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ spec:
resources:
limits:
cpu: 500m
memory: 128Mi
memory: 512Mi
requests:
cpu: 10m
memory: 64Mi
Expand Down
2 changes: 1 addition & 1 deletion helm/odigos/templates/ui/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ spec:
resources:
limits:
cpu: 500m
memory: 128Mi
memory: 512Mi
requests:
cpu: 10m
memory: 64Mi
Expand Down
25 changes: 13 additions & 12 deletions instrumentor/controllers/startlangdetection/manager.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package startlangdetection

import (
"github.com/odigos-io/odigos/instrumentor/controllers/utils"
appsv1 "k8s.io/api/apps/v1"
corev1 "k8s.io/api/core/v1"
ctrl "sigs.k8s.io/controller-runtime"
Expand Down Expand Up @@ -59,18 +60,18 @@ func SetupWithManager(mgr ctrl.Manager) error {
return err
}

//err = builder.
// ControllerManagedBy(mgr).
// Named("startlangdetection-configmaps").
// For(&corev1.ConfigMap{}).
// WithEventFilter(&utils.OnlyUpdatesPredicate{}).
// Complete(&OdigosConfigReconciler{
// Client: mgr.GetClient(),
// Scheme: mgr.GetScheme(),
// })
//if err != nil {
// return err
//}
err = builder.
ControllerManagedBy(mgr).
Named("startlangdetection-configmaps").
For(&corev1.ConfigMap{}).
WithEventFilter(&utils.OnlyUpdatesPredicate{}).
Complete(&OdigosConfigReconciler{
Client: mgr.GetClient(),
Scheme: mgr.GetScheme(),
})
if err != nil {
return err
}

return nil
}
5 changes: 5 additions & 0 deletions instrumentor/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ import (
"flag"
"os"

"github.com/odigos-io/odigos/k8sutils/pkg/env"

"github.com/odigos-io/odigos/instrumentor/controllers/instrumentationconfig"
"github.com/odigos-io/odigos/instrumentor/controllers/startlangdetection"

Expand Down Expand Up @@ -172,6 +174,9 @@ func main() {
&corev1.Namespace{}: {
Label: labels.Set{consts.OdigosInstrumentationLabel: consts.InstrumentationEnabled}.AsSelector(),
},
&corev1.ConfigMap{}: {
Field: client.InNamespace(env.GetCurrentNamespace()).AsSelector(),
},
},
},
}
Expand Down

0 comments on commit 706972a

Please sign in to comment.