Skip to content

Commit

Permalink
fix(go.mod): change the module path to reflect the new repository
Browse files Browse the repository at this point in the history
Signed-off-by: Aldo Lacuku <aldo@lacuku.eu>
  • Loading branch information
alacuku authored and poiana committed Nov 20, 2023
1 parent 7854cf1 commit f7c4ab7
Show file tree
Hide file tree
Showing 22 changed files with 47 additions and 62 deletions.
2 changes: 1 addition & 1 deletion broker/blockingChannel.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ package broker
import (
"context"

"github.com/alacuku/k8s-metadata/pkg/events"
"github.com/falcosecurity/k8s-metacollector/pkg/events"
)

// BlockingChannel implements the Queue interface using a channel.
Expand Down
7 changes: 3 additions & 4 deletions broker/broker.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,12 @@ import (
"net"
"sync"

"github.com/falcosecurity/k8s-metacollector/metadata"
"github.com/falcosecurity/k8s-metacollector/pkg/events"
"github.com/falcosecurity/k8s-metacollector/pkg/subscriber"
"github.com/go-logr/logr"
"google.golang.org/grpc"
"google.golang.org/grpc/credentials"

"github.com/alacuku/k8s-metadata/metadata"
"github.com/alacuku/k8s-metadata/pkg/events"
"github.com/alacuku/k8s-metadata/pkg/subscriber"
)

// Broker receives events from the collectors and sends them to the subscribers.
Expand Down
5 changes: 2 additions & 3 deletions broker/metrics.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,10 @@ import (
"sync"
"time"

"github.com/falcosecurity/k8s-metacollector/pkg/consts"
"github.com/falcosecurity/k8s-metacollector/pkg/events"
"github.com/prometheus/client_golang/prometheus"
ctrlmetrics "sigs.k8s.io/controller-runtime/pkg/metrics"

"github.com/alacuku/k8s-metadata/pkg/consts"
"github.com/alacuku/k8s-metadata/pkg/events"
)

const (
Expand Down
2 changes: 1 addition & 1 deletion broker/queue.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ package broker
import (
"context"

"github.com/alacuku/k8s-metadata/pkg/events"
"github.com/falcosecurity/k8s-metacollector/pkg/events"
)

// Queue used to dispatch events from the collectors to the broker.
Expand Down
7 changes: 3 additions & 4 deletions collectors/dispatch.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@ import (
"context"
"sync"

"github.com/falcosecurity/k8s-metacollector/pkg/events"
"github.com/falcosecurity/k8s-metacollector/pkg/resource"
"github.com/falcosecurity/k8s-metacollector/pkg/subscriber"
"github.com/go-logr/logr"
appsv1 "k8s.io/api/apps/v1"
corev1 "k8s.io/api/core/v1"
Expand All @@ -27,10 +30,6 @@ import (
"k8s.io/apimachinery/pkg/types"
"sigs.k8s.io/controller-runtime/pkg/client"
"sigs.k8s.io/controller-runtime/pkg/event"

"github.com/alacuku/k8s-metadata/pkg/events"
"github.com/alacuku/k8s-metadata/pkg/resource"
"github.com/alacuku/k8s-metadata/pkg/subscriber"
)

func dispatch(ctx context.Context, logger logr.Logger, resourceKind string, subChan subscriber.SubsChan,
Expand Down
3 changes: 1 addition & 2 deletions collectors/endpoints.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ package collectors
import (
"context"

"github.com/falcosecurity/k8s-metacollector/pkg/resource"
corev1 "k8s.io/api/core/v1"
k8sApiErrors "k8s.io/apimachinery/pkg/api/errors"
"k8s.io/apimachinery/pkg/types"
Expand All @@ -27,8 +28,6 @@ import (
"sigs.k8s.io/controller-runtime/pkg/controller"
"sigs.k8s.io/controller-runtime/pkg/event"
"sigs.k8s.io/controller-runtime/pkg/log"

"github.com/alacuku/k8s-metadata/pkg/resource"
)

// EndpointsDispatcher each time an endpoint changes it triggers a reconcile for the pods and services to which it relates.
Expand Down
3 changes: 1 addition & 2 deletions collectors/endpointslices.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ import (
"context"
"strings"

"github.com/falcosecurity/k8s-metacollector/pkg/resource"
discoveryv1 "k8s.io/api/discovery/v1"
k8sApiErrors "k8s.io/apimachinery/pkg/api/errors"
"k8s.io/apimachinery/pkg/types"
Expand All @@ -28,8 +29,6 @@ import (
"sigs.k8s.io/controller-runtime/pkg/controller"
"sigs.k8s.io/controller-runtime/pkg/event"
"sigs.k8s.io/controller-runtime/pkg/log"

"github.com/alacuku/k8s-metadata/pkg/resource"
)

// EndpointslicesDispatcher each time an endpoint changes it triggers a reconcile for the pods and services to which it relates.
Expand Down
3 changes: 1 addition & 2 deletions collectors/metrics.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,12 @@
package collectors

import (
"github.com/falcosecurity/k8s-metacollector/pkg/consts"
"github.com/prometheus/client_golang/prometheus"
"sigs.k8s.io/controller-runtime/pkg/client"
"sigs.k8s.io/controller-runtime/pkg/event"
"sigs.k8s.io/controller-runtime/pkg/metrics"
"sigs.k8s.io/controller-runtime/pkg/predicate"

"github.com/alacuku/k8s-metadata/pkg/consts"
)

const (
Expand Down
3 changes: 1 addition & 2 deletions collectors/options.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,11 @@
package collectors

import (
"github.com/falcosecurity/k8s-metacollector/pkg/subscriber"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"sigs.k8s.io/controller-runtime/pkg/client"
"sigs.k8s.io/controller-runtime/pkg/event"
"sigs.k8s.io/controller-runtime/pkg/source"

"github.com/alacuku/k8s-metadata/pkg/subscriber"
)

type collectorOptions struct {
Expand Down
11 changes: 5 additions & 6 deletions collectors/partialObjectMetadata.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,11 @@ import (
"context"
"encoding/json"

"github.com/falcosecurity/k8s-metacollector/broker"
"github.com/falcosecurity/k8s-metacollector/pkg/events"
"github.com/falcosecurity/k8s-metacollector/pkg/fields"
"github.com/falcosecurity/k8s-metacollector/pkg/resource"
"github.com/falcosecurity/k8s-metacollector/pkg/subscriber"
"github.com/go-logr/logr"
"github.com/mitchellh/hashstructure/v2"
appsv1 "k8s.io/api/apps/v1"
Expand All @@ -35,12 +40,6 @@ import (
"sigs.k8s.io/controller-runtime/pkg/handler"
"sigs.k8s.io/controller-runtime/pkg/log"
"sigs.k8s.io/controller-runtime/pkg/source"

"github.com/alacuku/k8s-metadata/broker"
"github.com/alacuku/k8s-metadata/pkg/events"
"github.com/alacuku/k8s-metadata/pkg/fields"
"github.com/alacuku/k8s-metadata/pkg/resource"
"github.com/alacuku/k8s-metadata/pkg/subscriber"
)

// ObjectMetaCollector collects resources' metadata, puts them in a local cache and generates appropriate
Expand Down
11 changes: 5 additions & 6 deletions collectors/pod.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,11 @@ import (
"encoding/json"
"sort"

"github.com/falcosecurity/k8s-metacollector/broker"
"github.com/falcosecurity/k8s-metacollector/pkg/events"
"github.com/falcosecurity/k8s-metacollector/pkg/fields"
"github.com/falcosecurity/k8s-metacollector/pkg/resource"
"github.com/falcosecurity/k8s-metacollector/pkg/subscriber"
"github.com/go-logr/logr"
"github.com/mitchellh/hashstructure/v2"
corev1 "k8s.io/api/core/v1"
Expand All @@ -36,12 +41,6 @@ import (
"sigs.k8s.io/controller-runtime/pkg/handler"
"sigs.k8s.io/controller-runtime/pkg/log"
"sigs.k8s.io/controller-runtime/pkg/source"

"github.com/alacuku/k8s-metadata/broker"
"github.com/alacuku/k8s-metadata/pkg/events"
"github.com/alacuku/k8s-metadata/pkg/fields"
"github.com/alacuku/k8s-metadata/pkg/resource"
"github.com/alacuku/k8s-metadata/pkg/subscriber"
)

// PodCollector collects pods' metadata, puts them in a local cache and generates appropriate
Expand Down
11 changes: 5 additions & 6 deletions collectors/services.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,11 @@ import (
"context"
"encoding/json"

"github.com/falcosecurity/k8s-metacollector/broker"
"github.com/falcosecurity/k8s-metacollector/pkg/events"
"github.com/falcosecurity/k8s-metacollector/pkg/fields"
"github.com/falcosecurity/k8s-metacollector/pkg/resource"
"github.com/falcosecurity/k8s-metacollector/pkg/subscriber"
"github.com/go-logr/logr"
"github.com/mitchellh/hashstructure/v2"
corev1 "k8s.io/api/core/v1"
Expand All @@ -33,12 +38,6 @@ import (
"sigs.k8s.io/controller-runtime/pkg/handler"
"sigs.k8s.io/controller-runtime/pkg/log"
"sigs.k8s.io/controller-runtime/pkg/source"

"github.com/alacuku/k8s-metadata/broker"
"github.com/alacuku/k8s-metadata/pkg/events"
"github.com/alacuku/k8s-metadata/pkg/fields"
"github.com/alacuku/k8s-metadata/pkg/resource"
"github.com/alacuku/k8s-metadata/pkg/subscriber"
)

// ServiceCollector collects services' metadata, puts them in a local cache and generates appropriate
Expand Down
3 changes: 1 addition & 2 deletions collectors/transformers.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,12 @@ package collectors
import (
"fmt"

"github.com/falcosecurity/k8s-metacollector/pkg/resource"
"github.com/go-logr/logr"
corev1 "k8s.io/api/core/v1"
discoveryv1 "k8s.io/api/discovery/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
toolscache "k8s.io/client-go/tools/cache"

"github.com/alacuku/k8s-metadata/pkg/resource"
)

// PodTransformer transforms the pod objects received from the api-server
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module github.com/alacuku/k8s-metadata
module github.com/falcosecurity/k8s-metacollector

go 1.21

Expand Down
11 changes: 5 additions & 6 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,11 @@ import (
"flag"
"os"

"github.com/falcosecurity/k8s-metacollector/broker"
"github.com/falcosecurity/k8s-metacollector/collectors"
"github.com/falcosecurity/k8s-metacollector/pkg/events"
"github.com/falcosecurity/k8s-metacollector/pkg/resource"
"github.com/falcosecurity/k8s-metacollector/pkg/subscriber"
v1 "k8s.io/api/apps/v1"
corev1 "k8s.io/api/core/v1"
discoveryv1 "k8s.io/api/discovery/v1"
Expand All @@ -36,12 +41,6 @@ import (
"sigs.k8s.io/controller-runtime/pkg/log/zap"
"sigs.k8s.io/controller-runtime/pkg/metrics/server"
"sigs.k8s.io/controller-runtime/pkg/source"

"github.com/alacuku/k8s-metadata/broker"
"github.com/alacuku/k8s-metadata/collectors"
"github.com/alacuku/k8s-metadata/pkg/events"
"github.com/alacuku/k8s-metadata/pkg/resource"
"github.com/alacuku/k8s-metadata/pkg/subscriber"
)

var (
Expand Down
3 changes: 1 addition & 2 deletions metadata/metrics.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,9 @@
package metadata

import (
"github.com/falcosecurity/k8s-metacollector/pkg/consts"
"github.com/prometheus/client_golang/prometheus"
ctrlmetrics "sigs.k8s.io/controller-runtime/pkg/metrics"

"github.com/alacuku/k8s-metadata/pkg/consts"
)

const (
Expand Down
3 changes: 1 addition & 2 deletions metadata/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,9 @@ package metadata
import (
"sync"

"github.com/falcosecurity/k8s-metacollector/pkg/subscriber"
"github.com/go-logr/logr"
"k8s.io/apimachinery/pkg/util/uuid"

"github.com/alacuku/k8s-metadata/pkg/subscriber"
)

// Connection used to track a subscriber connection. Each time a subscriber arrives a
Expand Down
3 changes: 1 addition & 2 deletions pkg/events/cache.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,8 @@ package events
import (
"sync"

"github.com/falcosecurity/k8s-metacollector/pkg/fields"
"k8s.io/apimachinery/pkg/types"

"github.com/alacuku/k8s-metadata/pkg/fields"
)

// Cache for resources items. For each resource that is sent to at least
Expand Down
4 changes: 2 additions & 2 deletions pkg/events/event.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ package events
import (
"fmt"

"github.com/alacuku/k8s-metadata/metadata"
"github.com/alacuku/k8s-metadata/pkg/fields"
"github.com/falcosecurity/k8s-metacollector/metadata"
"github.com/falcosecurity/k8s-metacollector/pkg/fields"
)

const (
Expand Down
4 changes: 2 additions & 2 deletions pkg/events/interface.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@
package events

import (
"github.com/alacuku/k8s-metadata/metadata"
"github.com/alacuku/k8s-metadata/pkg/fields"
"github.com/falcosecurity/k8s-metacollector/metadata"
"github.com/falcosecurity/k8s-metacollector/pkg/fields"
)

// Interface must be satisfied by events generated for each supported k8s resource.
Expand Down
6 changes: 3 additions & 3 deletions pkg/events/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@
package events

import (
"github.com/alacuku/k8s-metadata/metadata"
"github.com/alacuku/k8s-metadata/pkg/fields"
"github.com/alacuku/k8s-metadata/pkg/resource"
"github.com/falcosecurity/k8s-metacollector/metadata"
"github.com/falcosecurity/k8s-metacollector/pkg/fields"
"github.com/falcosecurity/k8s-metacollector/pkg/resource"
)

// Resource event that holds metadata fields for k8s resources.
Expand Down
2 changes: 1 addition & 1 deletion pkg/subscriber/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ package subscriber
import (
"sync"

"github.com/alacuku/k8s-metadata/pkg/fields"
"github.com/falcosecurity/k8s-metacollector/pkg/fields"
)

// Subscribers for generic items.
Expand Down

0 comments on commit f7c4ab7

Please sign in to comment.