Skip to content

Commit

Permalink
Move operator package from helm-charts repo to redpanda-operator
Browse files Browse the repository at this point in the history
  • Loading branch information
RafalKorepta committed Dec 12, 2024
1 parent 4a986a2 commit 0cb431d
Show file tree
Hide file tree
Showing 18 changed files with 38 additions and 44 deletions.
2 changes: 1 addition & 1 deletion acceptance/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ require (
github.com/prometheus/procfs v0.15.1 // indirect
github.com/redpanda-data/common-go/net v0.1.0 // indirect
github.com/redpanda-data/console/backend v0.0.0-20240303221210-05d5d9e85f20 // indirect
github.com/redpanda-data/helm-charts v0.0.0-20241203151858-926cfe070c6e // indirect
github.com/redpanda-data/redpanda-operator/charts v0.0.0-00010101000000-000000000000 // indirect
github.com/redpanda-data/redpanda/src/go/rpk v0.0.0-20240827155712-244863ea0ae8 // indirect
github.com/rivo/uniseg v0.4.7 // indirect
github.com/rogpeppe/go-internal v1.12.0 // indirect
Expand Down
2 changes: 0 additions & 2 deletions acceptance/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -653,8 +653,6 @@ github.com/redpanda-data/common-go/rpadmin v0.1.9 h1:X5a95P7Dc+7EaidU7dusWJyiG3e
github.com/redpanda-data/common-go/rpadmin v0.1.9/go.mod h1:I7umqhnMhIOSEnIA3fvLtdQU7QO/SbWGCwFfFDs3De4=
github.com/redpanda-data/console/backend v0.0.0-20240303221210-05d5d9e85f20 h1:+zsE3W1V86k2sjAGWOySIlF0xn5R1aXXQBaIdr80F48=
github.com/redpanda-data/console/backend v0.0.0-20240303221210-05d5d9e85f20/go.mod h1:DC42/3+k5PefSo4IalYbDN3yRZrVFP0b69+gC/NwGd4=
github.com/redpanda-data/helm-charts v0.0.0-20241203151858-926cfe070c6e h1:UEzwEsi0nuT6qrDyDfpXjCm9DhjY4Cryj9XRPgjzpDs=
github.com/redpanda-data/helm-charts v0.0.0-20241203151858-926cfe070c6e/go.mod h1:maQmSf2TLXRGKLcDeCBO/zD+5/i+8NDNOkS2685/P9A=
github.com/redpanda-data/redpanda/src/go/rpk v0.0.0-20240827155712-244863ea0ae8 h1:uTQKqF8UPNxYxKBJ11VlG6Vt2l9ctkkeXsmmjHUSUG4=
github.com/redpanda-data/redpanda/src/go/rpk v0.0.0-20240827155712-244863ea0ae8/go.mod h1:97qkjcMI3gDL+y+aY/w5o0xF2qGHFof6rCXIYjnTalM=
github.com/rhnvrm/simples3 v0.6.1/go.mod h1:Y+3vYm2V7Y4VijFoJHHTrja6OgPrJ2cBti8dPGkC3sA=
Expand Down
6 changes: 3 additions & 3 deletions operator/api/redpanda/v1alpha2/redpanda_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@ import (
"k8s.io/client-go/rest"
"k8s.io/utils/ptr"

redpandachart "github.com/redpanda-data/helm-charts/charts/redpanda"
"github.com/redpanda-data/helm-charts/pkg/gotohelm/helmette"
"github.com/redpanda-data/helm-charts/pkg/kube"
redpandachart "github.com/redpanda-data/redpanda-operator/charts/redpanda"
"github.com/redpanda-data/redpanda-operator/pkg/gotohelm/helmette"
"github.com/redpanda-data/redpanda-operator/pkg/kube"

"github.com/redpanda-data/redpanda-operator/operator/api/vectorized/v1alpha1"
)
Expand Down
6 changes: 3 additions & 3 deletions operator/api/redpanda/v1alpha2/redpanda_types_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,9 @@ import (
"pgregory.net/rapid"
"sigs.k8s.io/controller-runtime/pkg/client"

"github.com/redpanda-data/helm-charts/charts/connectors"
"github.com/redpanda-data/helm-charts/charts/console"
"github.com/redpanda-data/helm-charts/charts/redpanda"
"github.com/redpanda-data/redpanda-operator/charts/connectors"
"github.com/redpanda-data/redpanda-operator/charts/console"
"github.com/redpanda-data/redpanda-operator/charts/redpanda"
"github.com/redpanda-data/redpanda-operator/operator/api/apiutil"
"github.com/redpanda-data/redpanda-operator/operator/api/redpanda/v1alpha2"
crds "github.com/redpanda-data/redpanda-operator/operator/config/crd/bases"
Expand Down
2 changes: 1 addition & 1 deletion operator/config/crd/bases/crds.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import (
apiextensionsv1 "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1"
"k8s.io/apimachinery/pkg/runtime"

"github.com/redpanda-data/helm-charts/pkg/kube"
"github.com/redpanda-data/redpanda-operator/pkg/kube"
)

var (
Expand Down
26 changes: 12 additions & 14 deletions operator/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,8 @@ require (
github.com/redpanda-data/common-go/net v0.1.0
github.com/redpanda-data/common-go/rpadmin v0.1.9
github.com/redpanda-data/console/backend v0.0.0-20240303221210-05d5d9e85f20
github.com/redpanda-data/helm-charts v0.0.0-20241203151858-926cfe070c6e
github.com/redpanda-data/redpanda-operator/charts v0.0.0-00010101000000-000000000000
github.com/redpanda-data/redpanda-operator/pkg v0.0.0-00010101000000-000000000000
github.com/redpanda-data/redpanda/src/go/rpk v0.0.0-20240827155712-244863ea0ae8
github.com/scalalang2/golang-fifo v1.0.2
github.com/spf13/afero v1.11.0
Expand Down Expand Up @@ -254,7 +255,6 @@ require (
github.com/hashicorp/go-multierror v1.1.1 // indirect
github.com/hashicorp/go-retryablehttp v0.7.5 // indirect
github.com/hashicorp/go-uuid v1.0.3 // indirect
github.com/hashicorp/golang-lru/arc/v2 v2.0.7 // indirect
github.com/hashicorp/hcl v1.0.1-vault-5 // indirect
github.com/homeport/dyff v1.7.1 // indirect
github.com/huandu/xstrings v1.4.0 // indirect
Expand Down Expand Up @@ -299,7 +299,6 @@ require (
github.com/mattn/go-colorable v0.1.13 // indirect
github.com/mattn/go-isatty v0.0.20 // indirect
github.com/mattn/go-runewidth v0.0.15 // indirect
github.com/mattn/go-sqlite3 v1.14.22 // indirect
github.com/mgutz/ansi v0.0.0-20200706080929-d51e80ef957d // indirect
github.com/miekg/pkcs11 v1.1.1 // indirect
github.com/minio/md5-simd v1.1.2 // indirect
Expand Down Expand Up @@ -444,14 +443,13 @@ require (
sigs.k8s.io/structured-merge-diff/v4 v4.4.1 // indirect
)

replace github.com/opencontainers/go-digest => github.com/opencontainers/go-digest v1.0.1-0.20230815154656-802ce17c4f59

replace github.com/cyphar/filepath-securejoin => github.com/cyphar/filepath-securejoin v0.2.4

replace github.com/fluxcd/helm-controller/shim => github.com/redpanda-data/flux-controller-shim/helm/shim v0.0.0-20231227162419-a45126310240

replace github.com/fluxcd/source-controller/shim => github.com/redpanda-data/flux-controller-shim/source/shim v0.0.0-20240113100428-5e301ef97b19

replace github.com/fluxcd/helm-controller v0.37.2 => github.com/redpanda-data/helm-controller v0.37.3-0.20240119022335-c90fadbd044e

replace pgregory.net/rapid => github.com/chrisseto/rapid v0.0.0-20240815210052-cdeef406c65c
replace (
github.com/cyphar/filepath-securejoin => github.com/cyphar/filepath-securejoin v0.2.4
github.com/fluxcd/helm-controller v0.37.2 => github.com/redpanda-data/helm-controller v0.37.3-0.20240119022335-c90fadbd044e
github.com/fluxcd/helm-controller/shim => github.com/redpanda-data/flux-controller-shim/helm/shim v0.0.0-20231227162419-a45126310240
github.com/fluxcd/source-controller/shim => github.com/redpanda-data/flux-controller-shim/source/shim v0.0.0-20240113100428-5e301ef97b19
github.com/opencontainers/go-digest => github.com/opencontainers/go-digest v1.0.1-0.20230815154656-802ce17c4f59
github.com/redpanda-data/redpanda-operator/charts => ../charts
github.com/redpanda-data/redpanda-operator/pkg => ../pkg
pgregory.net/rapid => github.com/chrisseto/rapid v0.0.0-20240815210052-cdeef406c65c
)
2 changes: 0 additions & 2 deletions operator/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -1093,8 +1093,6 @@ github.com/redpanda-data/flux-controller-shim/helm/shim v0.0.0-20231227162419-a4
github.com/redpanda-data/flux-controller-shim/helm/shim v0.0.0-20231227162419-a45126310240/go.mod h1:5KLXArOMFOrwb3BihpFaRNiPCyo9AXsXhvMdUmrCdUg=
github.com/redpanda-data/flux-controller-shim/source/shim v0.0.0-20240113100428-5e301ef97b19 h1:sJjDhnIbTMOuP4Rnhm1N3GNfgv6BJlocCnGliNvhgbw=
github.com/redpanda-data/flux-controller-shim/source/shim v0.0.0-20240113100428-5e301ef97b19/go.mod h1:T39OECA7eOlhpHZPBSGg+bpuwtt/G4m03fjBkJ821CM=
github.com/redpanda-data/helm-charts v0.0.0-20241203151858-926cfe070c6e h1:UEzwEsi0nuT6qrDyDfpXjCm9DhjY4Cryj9XRPgjzpDs=
github.com/redpanda-data/helm-charts v0.0.0-20241203151858-926cfe070c6e/go.mod h1:maQmSf2TLXRGKLcDeCBO/zD+5/i+8NDNOkS2685/P9A=
github.com/redpanda-data/helm-controller v0.37.3-0.20240119022335-c90fadbd044e h1:8HB05vSCY+0MwjT2DIVq6gJV5iw7nQNIDfMqcc1NEC8=
github.com/redpanda-data/helm-controller v0.37.3-0.20240119022335-c90fadbd044e/go.mod h1:jF5kbQy3qT/zufL27DE3lecfYTRWeAzSiVmrbDDQwUw=
github.com/redpanda-data/redpanda/src/go/rpk v0.0.0-20240827155712-244863ea0ae8 h1:uTQKqF8UPNxYxKBJ11VlG6Vt2l9ctkkeXsmmjHUSUG4=
Expand Down
6 changes: 3 additions & 3 deletions operator/internal/controller/redpanda/redpanda_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,14 +45,14 @@ import (

"github.com/redpanda-data/common-go/rpadmin"

"github.com/redpanda-data/helm-charts/charts/redpanda"
"github.com/redpanda-data/helm-charts/pkg/gotohelm/helmette"
"github.com/redpanda-data/helm-charts/pkg/kube"
"github.com/redpanda-data/redpanda-operator/charts/redpanda"
"github.com/redpanda-data/redpanda-operator/operator/api/redpanda/v1alpha2"
"github.com/redpanda-data/redpanda-operator/operator/cmd/syncclusterconfig"
internalclient "github.com/redpanda-data/redpanda-operator/operator/pkg/client"
opkube "github.com/redpanda-data/redpanda-operator/operator/pkg/kube"
"github.com/redpanda-data/redpanda-operator/operator/pkg/resources"
"github.com/redpanda-data/redpanda-operator/pkg/gotohelm/helmette"
"github.com/redpanda-data/redpanda-operator/pkg/kube"
)

const (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,16 +43,16 @@ import (
ctrl "sigs.k8s.io/controller-runtime"
"sigs.k8s.io/controller-runtime/pkg/client"

redpandachart "github.com/redpanda-data/helm-charts/charts/redpanda"
"github.com/redpanda-data/helm-charts/pkg/gotohelm/helmette"
"github.com/redpanda-data/helm-charts/pkg/kube"
redpandachart "github.com/redpanda-data/redpanda-operator/charts/redpanda"
redpandav1alpha2 "github.com/redpanda-data/redpanda-operator/operator/api/redpanda/v1alpha2"
crds "github.com/redpanda-data/redpanda-operator/operator/config/crd/bases"
"github.com/redpanda-data/redpanda-operator/operator/internal/controller"
"github.com/redpanda-data/redpanda-operator/operator/internal/controller/flux"
"github.com/redpanda-data/redpanda-operator/operator/internal/controller/redpanda"
"github.com/redpanda-data/redpanda-operator/operator/internal/testenv"
internalclient "github.com/redpanda-data/redpanda-operator/operator/pkg/client"
"github.com/redpanda-data/redpanda-operator/pkg/gotohelm/helmette"
"github.com/redpanda-data/redpanda-operator/pkg/kube"
)

// operatorRBAC is the ClusterRole and Role generated via controller-gen and
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ import (
"sigs.k8s.io/controller-runtime/pkg/manager"
metricsserver "sigs.k8s.io/controller-runtime/pkg/metrics/server"

"github.com/redpanda-data/helm-charts/pkg/testutil"
"github.com/redpanda-data/redpanda-operator/operator/pkg/k3d"
"github.com/redpanda-data/redpanda-operator/pkg/testutil"
)

func TestPVCUnbinderShouldRemediate(t *testing.T) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,13 @@ import (
ctrl "sigs.k8s.io/controller-runtime"
"sigs.k8s.io/controller-runtime/pkg/client"

"github.com/redpanda-data/helm-charts/pkg/helm"
"github.com/redpanda-data/helm-charts/pkg/kube"
redpandav1alpha2 "github.com/redpanda-data/redpanda-operator/operator/api/redpanda/v1alpha2"
"github.com/redpanda-data/redpanda-operator/operator/internal/decommissioning"
"github.com/redpanda-data/redpanda-operator/operator/internal/testenv"
internalclient "github.com/redpanda-data/redpanda-operator/operator/pkg/client"
"github.com/redpanda-data/redpanda-operator/operator/pkg/functional"
"github.com/redpanda-data/redpanda-operator/pkg/helm"
"github.com/redpanda-data/redpanda-operator/pkg/kube"
)

//go:embed role.yaml
Expand Down
2 changes: 1 addition & 1 deletion operator/internal/testenv/testenv.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@ import (
"sigs.k8s.io/controller-runtime/pkg/envtest"
"sigs.k8s.io/controller-runtime/pkg/metrics/server"

"github.com/redpanda-data/helm-charts/pkg/testutil"
"github.com/redpanda-data/redpanda-operator/operator/pkg/k3d"
"github.com/redpanda-data/redpanda-operator/pkg/testutil"
)

const k3dClusterName = "testenv"
Expand Down
2 changes: 1 addition & 1 deletion operator/pkg/client/cluster.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import (
"github.com/twmb/franz-go/pkg/kgo"
"github.com/twmb/franz-go/pkg/sr"

"github.com/redpanda-data/helm-charts/pkg/redpanda"
redpanda "github.com/redpanda-data/redpanda-operator/charts/redpanda/client"
redpandav1alpha2 "github.com/redpanda-data/redpanda-operator/operator/api/redpanda/v1alpha2"
)

Expand Down
2 changes: 1 addition & 1 deletion operator/pkg/client/factory.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ import (

rpkconfig "github.com/redpanda-data/redpanda/src/go/rpk/pkg/config"

"github.com/redpanda-data/helm-charts/pkg/redpanda"
redpanda "github.com/redpanda-data/redpanda-operator/charts/redpanda/client"
redpandav1alpha2 "github.com/redpanda-data/redpanda-operator/operator/api/redpanda/v1alpha2"
"github.com/redpanda-data/redpanda-operator/operator/pkg/client/acls"
"github.com/redpanda-data/redpanda-operator/operator/pkg/client/schemas"
Expand Down
6 changes: 3 additions & 3 deletions operator/pkg/client/factory_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,12 @@ import (
"sigs.k8s.io/controller-runtime/pkg/client"
"sigs.k8s.io/controller-runtime/pkg/log"

"github.com/redpanda-data/helm-charts/pkg/helm"
"github.com/redpanda-data/helm-charts/pkg/kube"
"github.com/redpanda-data/helm-charts/pkg/testutil"
redpandav1alpha2 "github.com/redpanda-data/redpanda-operator/operator/api/redpanda/v1alpha2"
"github.com/redpanda-data/redpanda-operator/operator/internal/controller"
"github.com/redpanda-data/redpanda-operator/operator/pkg/k3d"
"github.com/redpanda-data/redpanda-operator/pkg/helm"
"github.com/redpanda-data/redpanda-operator/pkg/kube"
"github.com/redpanda-data/redpanda-operator/pkg/testutil"
)

var chartVersion = ""
Expand Down
2 changes: 1 addition & 1 deletion operator/pkg/client/spec_tls.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import (

"sigs.k8s.io/controller-runtime/pkg/log"

"github.com/redpanda-data/helm-charts/pkg/redpanda"
redpanda "github.com/redpanda-data/redpanda-operator/charts/redpanda/client"
redpandav1alpha2 "github.com/redpanda-data/redpanda-operator/operator/api/redpanda/v1alpha2"
)

Expand Down
2 changes: 1 addition & 1 deletion operator/pkg/k3d/k3d.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ import (
"sigs.k8s.io/controller-runtime/pkg/client"
"sigs.k8s.io/yaml"

"github.com/redpanda-data/helm-charts/pkg/kube"
"github.com/redpanda-data/redpanda-operator/pkg/kube"
)

const (
Expand Down
2 changes: 1 addition & 1 deletion operator/pkg/lint/lint_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import (
"strings"
"testing"

"github.com/redpanda-data/helm-charts/pkg/testutil"
"github.com/redpanda-data/redpanda-operator/pkg/testutil"
)

func TestToolVersions(t *testing.T) {
Expand Down

0 comments on commit 0cb431d

Please sign in to comment.