Skip to content

Commit

Permalink
chore: cleanup irrelevant comments (#1756)
Browse files Browse the repository at this point in the history
This PR is a general housekeeping, removing some auto-generated comments
with trivial or non-up-to-date info, that does not give any value to our
code base.
  • Loading branch information
blumamir authored Nov 15, 2024
1 parent 9d99599 commit dc16c6f
Show file tree
Hide file tree
Showing 13 changed files with 0 additions and 73 deletions.
20 changes: 0 additions & 20 deletions autoscaler/controllers/collectorsgroup_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ import (
"sigs.k8s.io/controller-runtime/pkg/client"
)

// CollectorsGroupReconciler reconciles a CollectorsGroup object
type CollectorsGroupReconciler struct {
client.Client
Scheme *runtime.Scheme
Expand All @@ -42,24 +41,6 @@ type CollectorsGroupReconciler struct {
Config *controllerconfig.ControllerConfig
}

//+kubebuilder:rbac:groups=odigos.io,namespace=odigos-system,resources=collectorsgroups,verbs=get;list;watch;create;update;patch;delete
//+kubebuilder:rbac:groups=odigos.io,namespace=odigos-system,resources=collectorsgroups/status,verbs=get;update;patch
//+kubebuilder:rbac:groups=odigos.io,namespace=odigos-system,resources=collectorsgroups/finalizers,verbs=update
//+kubebuilder:rbac:groups=apps,namespace=odigos-system,resources=deployments,verbs=get;list;watch;create;update;patch;delete
//+kubebuilder:rbac:groups=apps,namespace=odigos-system,resources=deployments/status,verbs=get;update;patch
//+kubebuilder:rbac:groups=apps,namespace=odigos-system,resources=daemonsets,verbs=get;list;watch;create;update;patch;delete
//+kubebuilder:rbac:groups=apps,namespace=odigos-system,resources=daemonsets/status,verbs=get;update;patch
//+kubebuilder:rbac:groups="",namespace=odigos-system,resources=services,verbs=get;list;watch;create;update;patch;delete
//+kubebuilder:rbac:groups="",namespace=odigos-system,resources=configmaps,verbs=get;list;watch;create;update;patch;delete

// Reconcile is part of the main kubernetes reconciliation loop which aims to
// move the current state of the cluster closer to the desired state.
// the CollectorsGroup object against the actual cluster state, and then
// perform operations to make the cluster state reflect the state specified by
// the user.
//
// For more details, check Reconcile and its Result here:
// - https://pkg.go.dev/sigs.k8s.io/[email protected]/pkg/reconcile
func (r *CollectorsGroupReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error) {
logger := log.FromContext(ctx)
logger.V(0).Info("Reconciling CollectorsGroup")
Expand All @@ -77,7 +58,6 @@ func (r *CollectorsGroupReconciler) Reconcile(ctx context.Context, req ctrl.Requ
return ctrl.Result{}, nil
}

// SetupWithManager sets up the controller with the Manager.
func (r *CollectorsGroupReconciler) SetupWithManager(mgr ctrl.Manager) error {
return ctrl.NewControllerManagedBy(mgr).
For(&odigosv1.CollectorsGroup{}).
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,6 @@ func calcDataCollectionReadyStatus(ds *appsv1.DaemonSet) bool {
return ds.Status.DesiredNumberScheduled > 0 && float64(ds.Status.NumberReady) >= float64(ds.Status.DesiredNumberScheduled)/float64(2)
}

// SetupWithManager sets up the controller with the Manager.
func (r *DataCollectionDaemonSetReconciler) SetupWithManager(mgr ctrl.Manager) error {
return ctrl.NewControllerManagedBy(mgr).
For(&appsv1.DaemonSet{}).
Expand Down
13 changes: 0 additions & 13 deletions autoscaler/controllers/destination_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ import (
v1 "github.com/odigos-io/odigos/api/odigos/v1alpha1"
)

// DestinationReconciler reconciles a Destination object
type DestinationReconciler struct {
client.Client
Scheme *runtime.Scheme
Expand All @@ -38,18 +37,6 @@ type DestinationReconciler struct {
Config *controllerconfig.ControllerConfig
}

//+kubebuilder:rbac:groups=odigos.io,namespace=odigos-system,resources=destinations,verbs=get;list;watch;create;update;patch;delete
//+kubebuilder:rbac:groups=odigos.io,namespace=odigos-system,resources=destinations/status,verbs=get;update;patch
//+kubebuilder:rbac:groups=odigos.io,namespace=odigos-system,resources=destinations/finalizers,verbs=update

// Reconcile is part of the main kubernetes reconciliation loop which aims to
// move the current state of the cluster closer to the desired state.
// the Destination object against the actual cluster state, and then
// perform operations to make the cluster state reflect the state specified by
// the user.
//
// For more details, check Reconcile and its Result here:
// - https://pkg.go.dev/sigs.k8s.io/[email protected]/pkg/reconcile
func (r *DestinationReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error) {
logger := log.FromContext(ctx)
logger.V(0).Info("Reconciling Destination")
Expand Down
1 change: 0 additions & 1 deletion autoscaler/controllers/gatewaydeployment_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@ func (r *GatewayDeploymentReconciler) Reconcile(ctx context.Context, req ctrl.Re
return ctrl.Result{}, nil
}

// SetupWithManager sets up the controller with the Manager.
func (r *GatewayDeploymentReconciler) SetupWithManager(mgr ctrl.Manager) error {
return ctrl.NewControllerManagedBy(mgr).
For(&appsv1.Deployment{}).
Expand Down
14 changes: 0 additions & 14 deletions autoscaler/controllers/instrumentedapplication_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ import (
"sigs.k8s.io/controller-runtime/pkg/log"
)

// InstrumentedApplicationReconciler reconciles a InstrumentedApplication object
type InstrumentedApplicationReconciler struct {
client.Client
Scheme *runtime.Scheme
Expand All @@ -36,18 +35,6 @@ type InstrumentedApplicationReconciler struct {
DisableNameProcessor bool
}

//+kubebuilder:rbac:groups=odigos.io,resources=instrumentedapplications,verbs=get;list;watch;create;update;patch;delete
//+kubebuilder:rbac:groups=odigos.io,resources=instrumentedapplications/status,verbs=get;update;patch
//+kubebuilder:rbac:groups=odigos.io,resources=instrumentedapplications/finalizers,verbs=update

// Reconcile is part of the main kubernetes reconciliation loop which aims to
// move the current state of the cluster closer to the desired state.
// the InstrumentedApplication object against the actual cluster state, and then
// perform operations to make the cluster state reflect the state specified by
// the user.
//
// For more details, check Reconcile and its Result here:
// - https://pkg.go.dev/sigs.k8s.io/[email protected]/pkg/reconcile
func (r *InstrumentedApplicationReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error) {
logger := log.FromContext(ctx)
logger.V(0).Info("Reconciling InstrumentedApps")
Expand All @@ -59,7 +46,6 @@ func (r *InstrumentedApplicationReconciler) Reconcile(ctx context.Context, req c
return ctrl.Result{}, nil
}

// SetupWithManager sets up the controller with the Manager.
func (r *InstrumentedApplicationReconciler) SetupWithManager(mgr ctrl.Manager) error {
return ctrl.NewControllerManagedBy(mgr).
For(&odigosv1.InstrumentedApplication{}).
Expand Down
1 change: 0 additions & 1 deletion autoscaler/controllers/odigosconfig_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ func (r *OdigosConfigReconciler) Reconcile(ctx context.Context, req ctrl.Request
return ctrl.Result{}, nil
}

// SetupWithManager sets up the controller with the Manager.
func (r *OdigosConfigReconciler) SetupWithManager(mgr ctrl.Manager) error {
return ctrl.NewControllerManagedBy(mgr).
For(&v1.ConfigMap{}).
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,16 +28,11 @@ import (
"sigs.k8s.io/controller-runtime/pkg/log"
)

// DaemonSetReconciler reconciles a DaemonSet object
type DaemonSetReconciler struct {
client.Client
Scheme *runtime.Scheme
}

//+kubebuilder:rbac:groups=apps,resources=daemonsets,verbs=get;list;watch;create;update;patch;delete
//+kubebuilder:rbac:groups=apps,resources=daemonsets/status,verbs=get;update;patch
//+kubebuilder:rbac:groups=apps,resources=daemonsets/finalizers,verbs=update

func (r *DaemonSetReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error) {
logger := log.FromContext(ctx)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,16 +27,11 @@ import (
"sigs.k8s.io/controller-runtime/pkg/log"
)

// DeploymentReconciler reconciles a Deployment object
type DeploymentReconciler struct {
client.Client
Scheme *runtime.Scheme
}

//+kubebuilder:rbac:groups=apps,resources=deployments,verbs=get;list;watch;create;update;patch;delete
//+kubebuilder:rbac:groups=apps,resources=deployments/status,verbs=get;update;patch
//+kubebuilder:rbac:groups=apps,resources=deployments/finalizers,verbs=update

func (r *DeploymentReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error) {
logger := log.FromContext(ctx)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,6 @@ func getObjectByOwnerReference(ctx context.Context, k8sClient client.Client, own
return nil, fmt.Errorf("unsupported owner kind %s", ownerRef.Kind)
}

// DeploymentReconciler reconciles a Deployment object
type InstrumentedApplicationReconciler struct {
client.Client
Scheme *runtime.Scheme
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,6 @@ func (i *NsLabelBecameDisabledPredicate) Generic(e event.GenericEvent) bool {
return false
}

// NamespaceReconciler reconciles a Namespace object
type NamespaceReconciler struct {
client.Client
Scheme *runtime.Scheme
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,16 +28,11 @@ import (
"sigs.k8s.io/controller-runtime/pkg/log"
)

// StatefulSetReconciler reconciles a StatefulSet object
type StatefulSetReconciler struct {
client.Client
Scheme *runtime.Scheme
}

//+kubebuilder:rbac:groups=apps,resources=statefulsets,verbs=get;list;watch;create;update;patch;delete
//+kubebuilder:rbac:groups=apps,resources=statefulsets/status,verbs=get;update;patch
//+kubebuilder:rbac:groups=apps,resources=statefulsets/finalizers,verbs=update

func (r *StatefulSetReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error) {
logger := log.FromContext(ctx)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ import (
"sigs.k8s.io/controller-runtime/pkg/log"
)

// InstrumentedApplicationReconciler reconciles a InstrumentedApplication object
type InstrumentedApplicationReconciler struct {
client.Client
Scheme *runtime.Scheme
Expand Down
5 changes: 0 additions & 5 deletions scheduler/controllers/destination_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,15 +31,11 @@ import (
"sigs.k8s.io/controller-runtime/pkg/log"
)

// DestinationReconciler reconciles a Destination object
type DestinationReconciler struct {
client.Client
Scheme *runtime.Scheme
}

// +kubebuilder:rbac:groups=odigos.io,resources=destinations,verbs=get;list;watch;create;update;patch;delete
// +kubebuilder:rbac:groups=odigos.io,resources=destinations/status,verbs=get;update;patch
// +kubebuilder:rbac:groups=odigos.io,resources=destinations/finalizers,verbs=update
func (r *DestinationReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error) {
logger := log.FromContext(ctx)

Expand All @@ -64,7 +60,6 @@ func (r *DestinationReconciler) Reconcile(ctx context.Context, req ctrl.Request)
return ctrl.Result{}, nil
}

// SetupWithManager sets up the controller with the Manager.
func (r *DestinationReconciler) SetupWithManager(mgr ctrl.Manager) error {
return ctrl.NewControllerManagedBy(mgr).
For(&odigosv1.Destination{}).
Expand Down

0 comments on commit dc16c6f

Please sign in to comment.