Skip to content

Commit

Permalink
feat: Refactor Go packages to ease collaboration
Browse files Browse the repository at this point in the history
  • Loading branch information
juanjjaramillo committed May 3, 2024
1 parent 1e905b1 commit cc821a1
Show file tree
Hide file tree
Showing 35 changed files with 29 additions and 29 deletions.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ import (
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/client-go/rest"

"github.com/newrelic/k8s-agents-operator/pkg/autodetect"
"github.com/newrelic/k8s-agents-operator/src/autodetect"
)

func TestDetectPlatformBasedOnAvailableAPIGroups(t *testing.T) {
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import (

corev1 "k8s.io/api/core/v1"

"github.com/newrelic/k8s-agents-operator/api/v1alpha1"
"github.com/newrelic/k8s-agents-operator/src/api/v1alpha1"
)

const (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import (

corev1 "k8s.io/api/core/v1"

"github.com/newrelic/k8s-agents-operator/api/v1alpha1"
"github.com/newrelic/k8s-agents-operator/src/api/v1alpha1"
)

const (
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ package instrumentation
import (
corev1 "k8s.io/api/core/v1"

"github.com/newrelic/k8s-agents-operator/api/v1alpha1"
"github.com/newrelic/k8s-agents-operator/src/api/v1alpha1"
)

const (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ package instrumentation
import (
corev1 "k8s.io/api/core/v1"

"github.com/newrelic/k8s-agents-operator/api/v1alpha1"
"github.com/newrelic/k8s-agents-operator/src/api/v1alpha1"
)

const (
Expand Down
2 changes: 1 addition & 1 deletion pkg/instrumentation/php.go → src/instrumentation/php.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import (

corev1 "k8s.io/api/core/v1"

"github.com/newrelic/k8s-agents-operator/api/v1alpha1"
"github.com/newrelic/k8s-agents-operator/src/api/v1alpha1"
)

const (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ import (
"k8s.io/apimachinery/pkg/types"
"sigs.k8s.io/controller-runtime/pkg/client"

"github.com/newrelic/k8s-agents-operator/api/v1alpha1"
"github.com/newrelic/k8s-agents-operator/internal/webhookhandler"
"github.com/newrelic/k8s-agents-operator/src/api/v1alpha1"
"github.com/newrelic/k8s-agents-operator/src/internal/webhookhandler"
)

var (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import (

corev1 "k8s.io/api/core/v1"

"github.com/newrelic/k8s-agents-operator/api/v1alpha1"
"github.com/newrelic/k8s-agents-operator/src/api/v1alpha1"
)

const (
Expand Down
4 changes: 2 additions & 2 deletions pkg/instrumentation/sdk.go → src/instrumentation/sdk.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ import (
"k8s.io/client-go/util/retry"
"sigs.k8s.io/controller-runtime/pkg/client"

"github.com/newrelic/k8s-agents-operator/api/v1alpha1"
"github.com/newrelic/k8s-agents-operator/pkg/constants"
"github.com/newrelic/k8s-agents-operator/src/api/v1alpha1"
"github.com/newrelic/k8s-agents-operator/src/constants"
)

const (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import (
"github.com/go-logr/logr"
"sigs.k8s.io/controller-runtime/pkg/client"

"github.com/newrelic/k8s-agents-operator/api/v1alpha1"
"github.com/newrelic/k8s-agents-operator/src/api/v1alpha1"
)

type InstrumentationUpgrade struct {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ import (
"sigs.k8s.io/controller-runtime/pkg/client"
"sigs.k8s.io/controller-runtime/pkg/envtest"

"github.com/newrelic/k8s-agents-operator/api/v1alpha1"
"github.com/newrelic/k8s-agents-operator/src/api/v1alpha1"
)

var k8sClient client.Client
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ import (
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/types"

"github.com/newrelic/k8s-agents-operator/api/v1alpha1"
"github.com/newrelic/k8s-agents-operator/src/api/v1alpha1"
)

func TestUpgrade(t *testing.T) {
Expand Down
File renamed without changes.
File renamed without changes.
4 changes: 2 additions & 2 deletions internal/config/main.go → src/internal/config/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ import (
"github.com/go-logr/logr"
logf "sigs.k8s.io/controller-runtime/pkg/log"

"github.com/newrelic/k8s-agents-operator/internal/version"
"github.com/newrelic/k8s-agents-operator/pkg/autodetect"
"github.com/newrelic/k8s-agents-operator/src/autodetect"
"github.com/newrelic/k8s-agents-operator/src/internal/version"
)

const (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ import (
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"

"github.com/newrelic/k8s-agents-operator/internal/config"
"github.com/newrelic/k8s-agents-operator/pkg/autodetect"
"github.com/newrelic/k8s-agents-operator/src/autodetect"
"github.com/newrelic/k8s-agents-operator/src/internal/config"
)

func TestNewConfig(t *testing.T) {
Expand Down
4 changes: 2 additions & 2 deletions internal/config/options.go → src/internal/config/options.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ import (

"github.com/go-logr/logr"

"github.com/newrelic/k8s-agents-operator/internal/version"
"github.com/newrelic/k8s-agents-operator/pkg/autodetect"
"github.com/newrelic/k8s-agents-operator/src/autodetect"
"github.com/newrelic/k8s-agents-operator/src/internal/version"
)

// Option represents one specific configuration option.
Expand Down
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ import (
"sigs.k8s.io/controller-runtime/pkg/client"
"sigs.k8s.io/controller-runtime/pkg/webhook/admission"

"github.com/newrelic/k8s-agents-operator/internal/config"
"github.com/newrelic/k8s-agents-operator/src/internal/config"
)

// +kubebuilder:webhook:path=/mutate-v1-pod,mutating=true,failurePolicy=ignore,groups="",resources=pods,verbs=create;update,versions=v1,name=mpod.kb.io,sideEffects=none,admissionReviewVersions=v1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ import (
"sigs.k8s.io/controller-runtime/pkg/client"
"sigs.k8s.io/controller-runtime/pkg/envtest"

"github.com/newrelic/k8s-agents-operator/api/v1alpha1"
"github.com/newrelic/k8s-agents-operator/src/api/v1alpha1"
// +kubebuilder:scaffold:imports
)

Expand Down
14 changes: 7 additions & 7 deletions cmd/main.go → src/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,13 +41,13 @@ import (
"sigs.k8s.io/controller-runtime/pkg/manager"
"sigs.k8s.io/controller-runtime/pkg/webhook"

v1alpha1 "github.com/newrelic/k8s-agents-operator/api/v1alpha1"
"github.com/newrelic/k8s-agents-operator/internal/config"
"github.com/newrelic/k8s-agents-operator/internal/version"
"github.com/newrelic/k8s-agents-operator/internal/webhookhandler"
"github.com/newrelic/k8s-agents-operator/pkg/autodetect"
"github.com/newrelic/k8s-agents-operator/pkg/instrumentation"
instrumentationupgrade "github.com/newrelic/k8s-agents-operator/pkg/instrumentation/upgrade"
v1alpha1 "github.com/newrelic/k8s-agents-operator/src/api/v1alpha1"
"github.com/newrelic/k8s-agents-operator/src/autodetect"
"github.com/newrelic/k8s-agents-operator/src/instrumentation"
instrumentationupgrade "github.com/newrelic/k8s-agents-operator/src/instrumentation/upgrade"
"github.com/newrelic/k8s-agents-operator/src/internal/config"
"github.com/newrelic/k8s-agents-operator/src/internal/version"
"github.com/newrelic/k8s-agents-operator/src/internal/webhookhandler"
// +kubebuilder:scaffold:imports
)

Expand Down

0 comments on commit cc821a1

Please sign in to comment.