Skip to content

Commit

Permalink
Merge pull request #155 from rancher/internal-update
Browse files Browse the repository at this point in the history
move dependencies into internal package
  • Loading branch information
alexandreLamarre authored Jan 28, 2025
2 parents 008ee48 + 33f8461 commit 2f25bd1
Show file tree
Hide file tree
Showing 85 changed files with 97 additions and 97 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/hl-e2e.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ on:
- 'crds/helm-locker/**'
- 'package/Dockerfile-helm-locker'
- 'cmd/helm-locker/**'
- 'pkg/helm-locker/**'
- 'internal/helm-locker/**'

env:
CLUSTER_NAME : e2e-ci-helm-locker
Expand Down
4 changes: 2 additions & 2 deletions cmd/helm-locker/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ import (
"net/http"
_ "net/http/pprof"

"github.com/rancher/prometheus-federator/pkg/helm-locker/controllers"
"github.com/rancher/prometheus-federator/pkg/helm-locker/crd"
"github.com/rancher/prometheus-federator/internal/helm-locker/controllers"
"github.com/rancher/prometheus-federator/internal/helm-locker/crd"
"github.com/rancher/prometheus-federator/pkg/version"
command "github.com/rancher/wrangler-cli"
_ "github.com/rancher/wrangler/pkg/generated/controllers/apiextensions.k8s.io"
Expand Down
4 changes: 2 additions & 2 deletions cmd/helm-project-operator/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ import (
_ "net/http/pprof"
"os"

"github.com/rancher/prometheus-federator/pkg/helm-project-operator/controllers/common"
"github.com/rancher/prometheus-federator/pkg/helm-project-operator/operator"
"github.com/rancher/prometheus-federator/internal/helm-project-operator/controllers/common"
"github.com/rancher/prometheus-federator/internal/helm-project-operator/operator"

"github.com/rancher/prometheus-federator/pkg/version"
command "github.com/rancher/wrangler-cli"
Expand Down
4 changes: 2 additions & 2 deletions cmd/prometheus-federator/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ import (
_ "net/http/pprof"
"os"

"github.com/rancher/prometheus-federator/internal/helm-project-operator/controllers/common"
"github.com/rancher/prometheus-federator/internal/helm-project-operator/operator"
"github.com/rancher/prometheus-federator/pkg/debug"
"github.com/rancher/prometheus-federator/pkg/helm-project-operator/controllers/common"
"github.com/rancher/prometheus-federator/pkg/helm-project-operator/operator"
"github.com/rancher/prometheus-federator/pkg/version"
command "github.com/rancher/wrangler-cli"
_ "github.com/rancher/wrangler/pkg/generated/controllers/apiextensions.k8s.io"
Expand Down
12 changes: 6 additions & 6 deletions generate.go
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
//go:generate go run pkg/codegen/buildconfig/writer.go pkg/codegen/buildconfig/main.go

//go:generate go run pkg/helm-locker/codegen/cleanup/main.go
//go:generate go run pkg/helm-locker/codegen/main.go
//go:generate go run ./pkg/helm-locker/codegen crds ./crds/helm-locker/crds.yaml
//go:generate go run internal/helm-locker/codegen/cleanup/main.go
//go:generate go run internal/helm-locker/codegen/main.go
//go:generate go run ./internal/helm-locker/codegen crds ./crds/helm-locker/crds.yaml

//go:generate go run pkg/helm-project-operator/codegen/cleanup/main.go
//go:generate go run pkg/helm-project-operator/codegen/main.go
//go:generate go run ./pkg/helm-project-operator/codegen crds ./crds/helm-project-operator ./crds/helm-project-operator
//go:generate go run internal/helm-project-operator/codegen/cleanup/main.go
//go:generate go run internal/helm-project-operator/codegen/main.go
//go:generate go run ./internal/helm-project-operator/codegen crds ./crds/helm-project-operator ./crds/helm-project-operator

package main

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ import (
)

func main() {
if err := cleanup.Cleanup("./pkg/helm-locker/apis"); err != nil {
if err := cleanup.Cleanup("./internal/helm-locker/apis"); err != nil {
logrus.Fatal(err)
}
if err := os.RemoveAll("./pkg/helm-locker/generated"); err != nil {
if err := os.RemoveAll("./internal/helm-locker/generated"); err != nil {
logrus.Fatal(err)
}
if err := os.RemoveAll("./crds/helm-locker"); err != nil {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ package main
import (
"os"

v1alpha1 "github.com/rancher/prometheus-federator/pkg/helm-locker/apis/helm.cattle.io/v1alpha1"
"github.com/rancher/prometheus-federator/pkg/helm-locker/crd"
v1alpha1 "github.com/rancher/prometheus-federator/internal/helm-locker/apis/helm.cattle.io/v1alpha1"
"github.com/rancher/prometheus-federator/internal/helm-locker/crd"
"github.com/sirupsen/logrus"

controllergen "github.com/rancher/wrangler/pkg/controller-gen"
Expand All @@ -26,7 +26,7 @@ func main() {
os.Unsetenv("GOPATH")
logrus.Info("Generating controller boilerplate")
controllergen.Run(args.Options{
OutputPackage: "github.com/rancher/prometheus-federator/pkg/helm-locker/generated",
OutputPackage: "github.com/rancher/prometheus-federator/internal/helm-locker/generated",
Boilerplate: "gen/boilerplate.go.txt",
Groups: map[string]args.Group{
"helm.cattle.io": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ import (
"github.com/rancher/lasso/pkg/cache"
"github.com/rancher/lasso/pkg/client"
"github.com/rancher/lasso/pkg/controller"
"github.com/rancher/prometheus-federator/pkg/helm-locker/controllers/release"
"github.com/rancher/prometheus-federator/pkg/helm-locker/generated/controllers/helm.cattle.io"
helmcontroller "github.com/rancher/prometheus-federator/pkg/helm-locker/generated/controllers/helm.cattle.io/v1alpha1"
"github.com/rancher/prometheus-federator/pkg/helm-locker/objectset"
"github.com/rancher/prometheus-federator/internal/helm-locker/controllers/release"
"github.com/rancher/prometheus-federator/internal/helm-locker/generated/controllers/helm.cattle.io"
helmcontroller "github.com/rancher/prometheus-federator/internal/helm-locker/generated/controllers/helm.cattle.io/v1alpha1"
"github.com/rancher/prometheus-federator/internal/helm-locker/objectset"
"github.com/rancher/wrangler/pkg/apply"
"github.com/rancher/wrangler/pkg/generated/controllers/core"
corecontroller "github.com/rancher/wrangler/pkg/generated/controllers/core/v1"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@ import (
"fmt"

"github.com/rancher/lasso/pkg/controller"
v1alpha1 "github.com/rancher/prometheus-federator/pkg/helm-locker/apis/helm.cattle.io/v1alpha1"
helmcontroller "github.com/rancher/prometheus-federator/pkg/helm-locker/generated/controllers/helm.cattle.io/v1alpha1"
"github.com/rancher/prometheus-federator/pkg/helm-locker/objectset"
"github.com/rancher/prometheus-federator/pkg/helm-locker/objectset/parser"
"github.com/rancher/prometheus-federator/pkg/helm-locker/releases"
v1alpha1 "github.com/rancher/prometheus-federator/internal/helm-locker/apis/helm.cattle.io/v1alpha1"
helmcontroller "github.com/rancher/prometheus-federator/internal/helm-locker/generated/controllers/helm.cattle.io/v1alpha1"
"github.com/rancher/prometheus-federator/internal/helm-locker/objectset"
"github.com/rancher/prometheus-federator/internal/helm-locker/objectset/parser"
"github.com/rancher/prometheus-federator/internal/helm-locker/releases"
"github.com/rancher/prometheus-federator/pkg/remove"
corecontroller "github.com/rancher/wrangler/pkg/generated/controllers/core/v1"
"github.com/rancher/wrangler/pkg/relatedresource"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package release

import (
v1alpha1 "github.com/rancher/prometheus-federator/pkg/helm-locker/apis/helm.cattle.io/v1alpha1"
v1alpha1 "github.com/rancher/prometheus-federator/internal/helm-locker/apis/helm.cattle.io/v1alpha1"
rspb "helm.sh/helm/v3/pkg/release"
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package release
import (
"fmt"

v1alpha1 "github.com/rancher/prometheus-federator/pkg/helm-locker/apis/helm.cattle.io/v1alpha1"
v1alpha1 "github.com/rancher/prometheus-federator/internal/helm-locker/apis/helm.cattle.io/v1alpha1"
"github.com/rancher/wrangler/pkg/relatedresource"
corev1 "k8s.io/api/core/v1"
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"os"
"path/filepath"

v1alpha1 "github.com/rancher/prometheus-federator/pkg/helm-locker/apis/helm.cattle.io/v1alpha1"
v1alpha1 "github.com/rancher/prometheus-federator/internal/helm-locker/apis/helm.cattle.io/v1alpha1"
"github.com/rancher/wrangler/pkg/crd"
"github.com/rancher/wrangler/pkg/yaml"
"k8s.io/apimachinery/pkg/runtime"
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

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 @@ -7,7 +7,7 @@ import (
"time"

"github.com/rancher/lasso/pkg/controller"
"github.com/rancher/prometheus-federator/pkg/helm-locker/gvk"
"github.com/rancher/prometheus-federator/internal/helm-locker/gvk"
"github.com/rancher/wrangler/pkg/objectset"
"github.com/rancher/wrangler/pkg/relatedresource"
"github.com/sirupsen/logrus"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import (
"time"

"github.com/rancher/lasso/pkg/controller"
"github.com/rancher/prometheus-federator/pkg/helm-locker/gvk"
"github.com/rancher/prometheus-federator/pkg/helm-locker/informerfactory"
"github.com/rancher/prometheus-federator/internal/helm-locker/gvk"
"github.com/rancher/prometheus-federator/internal/helm-locker/informerfactory"
"github.com/rancher/wrangler/pkg/apply"
"github.com/rancher/wrangler/pkg/start"
"k8s.io/client-go/discovery"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"fmt"

"github.com/rancher/lasso/pkg/controller"
"github.com/rancher/prometheus-federator/pkg/helm-locker/gvk"
"github.com/rancher/prometheus-federator/internal/helm-locker/gvk"
"github.com/rancher/wrangler/pkg/apply"
"github.com/rancher/wrangler/pkg/relatedresource"
"github.com/sirupsen/logrus"
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ import (
)

func main() {
if err := cleanup.Cleanup("./pkg/helm-project-operator/apis"); err != nil {
if err := cleanup.Cleanup("./internal/helm-project-operator/apis"); err != nil {
logrus.Fatal(err)
}
if err := os.RemoveAll("./pkg/helm-project-operator/generated"); err != nil {
if err := os.RemoveAll("./internal/helm-project-operator/generated"); err != nil {
logrus.Fatal(err)
}
if err := os.RemoveAll("./crds/helm-project-operator"); err != nil {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ package main
import (
"os"

"github.com/rancher/prometheus-federator/pkg/helm-project-operator/apis/helm.cattle.io/v1alpha1"
"github.com/rancher/prometheus-federator/pkg/helm-project-operator/crd"
"github.com/rancher/prometheus-federator/internal/helm-project-operator/apis/helm.cattle.io/v1alpha1"
"github.com/rancher/prometheus-federator/internal/helm-project-operator/crd"

"github.com/sirupsen/logrus"

Expand All @@ -26,7 +26,7 @@ func main() {

os.Unsetenv("GOPATH")
controllergen.Run(args.Options{
OutputPackage: "github.com/rancher/prometheus-federator/pkg/helm-project-operator/generated",
OutputPackage: "github.com/rancher/prometheus-federator/internal/helm-project-operator/generated",
Boilerplate: "gen/boilerplate.go.txt",
Groups: map[string]args.Group{
"helm.cattle.io": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"os"
"path/filepath"

"github.com/rancher/prometheus-federator/pkg/helm-project-operator/apis/helm.cattle.io/v1alpha1"
"github.com/rancher/prometheus-federator/internal/helm-project-operator/apis/helm.cattle.io/v1alpha1"

"github.com/sirupsen/logrus"
"gopkg.in/yaml.v2"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package common

import (
"github.com/rancher/prometheus-federator/pkg/helm-project-operator/apis/helm.cattle.io/v1alpha1"
"github.com/rancher/prometheus-federator/internal/helm-project-operator/apis/helm.cattle.io/v1alpha1"
)

// User-Applied Labels
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,23 +6,23 @@ import (
"fmt"
"time"

"github.com/rancher/prometheus-federator/pkg/helm-project-operator/controllers/common"
"github.com/rancher/prometheus-federator/pkg/helm-project-operator/controllers/hardened"
"github.com/rancher/prometheus-federator/pkg/helm-project-operator/controllers/namespace"
"github.com/rancher/prometheus-federator/pkg/helm-project-operator/controllers/project"
helmproject "github.com/rancher/prometheus-federator/pkg/helm-project-operator/generated/controllers/helm.cattle.io"
helmprojectcontroller "github.com/rancher/prometheus-federator/pkg/helm-project-operator/generated/controllers/helm.cattle.io/v1alpha1"
"github.com/rancher/prometheus-federator/internal/helm-project-operator/controllers/common"
"github.com/rancher/prometheus-federator/internal/helm-project-operator/controllers/hardened"
"github.com/rancher/prometheus-federator/internal/helm-project-operator/controllers/namespace"
"github.com/rancher/prometheus-federator/internal/helm-project-operator/controllers/project"
helmproject "github.com/rancher/prometheus-federator/internal/helm-project-operator/generated/controllers/helm.cattle.io"
helmprojectcontroller "github.com/rancher/prometheus-federator/internal/helm-project-operator/generated/controllers/helm.cattle.io/v1alpha1"

"github.com/k3s-io/helm-controller/pkg/controllers/chart"
k3shelm "github.com/k3s-io/helm-controller/pkg/generated/controllers/helm.cattle.io"
k3shelmcontroller "github.com/k3s-io/helm-controller/pkg/generated/controllers/helm.cattle.io/v1"
"github.com/rancher/lasso/pkg/cache"
"github.com/rancher/lasso/pkg/client"
"github.com/rancher/lasso/pkg/controller"
"github.com/rancher/prometheus-federator/pkg/helm-locker/controllers/release"
helmlocker "github.com/rancher/prometheus-federator/pkg/helm-locker/generated/controllers/helm.cattle.io"
helmlockercontroller "github.com/rancher/prometheus-federator/pkg/helm-locker/generated/controllers/helm.cattle.io/v1alpha1"
"github.com/rancher/prometheus-federator/pkg/helm-locker/objectset"
"github.com/rancher/prometheus-federator/internal/helm-locker/controllers/release"
helmlocker "github.com/rancher/prometheus-federator/internal/helm-locker/generated/controllers/helm.cattle.io"
helmlockercontroller "github.com/rancher/prometheus-federator/internal/helm-locker/generated/controllers/helm.cattle.io/v1alpha1"
"github.com/rancher/prometheus-federator/internal/helm-locker/objectset"
"github.com/rancher/wrangler/pkg/apply"
batch "github.com/rancher/wrangler/pkg/generated/controllers/batch"
batchcontroller "github.com/rancher/wrangler/pkg/generated/controllers/batch/v1"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package hardened
import (
"context"

common2 "github.com/rancher/prometheus-federator/pkg/helm-project-operator/controllers/common"
common2 "github.com/rancher/prometheus-federator/internal/helm-project-operator/controllers/common"

"github.com/rancher/wrangler/pkg/apply"
corecontroller "github.com/rancher/wrangler/pkg/generated/controllers/core/v1"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package hardened
import (
"context"

"github.com/rancher/prometheus-federator/pkg/helm-project-operator/controllers/common"
"github.com/rancher/prometheus-federator/internal/helm-project-operator/controllers/common"

"github.com/rancher/wrangler/pkg/relatedresource"
corev1 "k8s.io/api/core/v1"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package hardened

import (
"github.com/rancher/prometheus-federator/pkg/helm-project-operator/controllers/common"
"github.com/rancher/prometheus-federator/internal/helm-project-operator/controllers/common"
corev1 "k8s.io/api/core/v1"
networkingv1 "k8s.io/api/networking/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ import (
"context"
"fmt"

"github.com/rancher/prometheus-federator/pkg/helm-project-operator/applier"
common2 "github.com/rancher/prometheus-federator/pkg/helm-project-operator/controllers/common"
helmprojectcontroller "github.com/rancher/prometheus-federator/pkg/helm-project-operator/generated/controllers/helm.cattle.io/v1alpha1"
"github.com/rancher/prometheus-federator/internal/helm-project-operator/applier"
common2 "github.com/rancher/prometheus-federator/internal/helm-project-operator/controllers/common"
helmprojectcontroller "github.com/rancher/prometheus-federator/internal/helm-project-operator/generated/controllers/helm.cattle.io/v1alpha1"

"github.com/rancher/wrangler/pkg/apply"
corecontroller "github.com/rancher/wrangler/pkg/generated/controllers/core/v1"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"fmt"
"sort"

"github.com/rancher/prometheus-federator/pkg/helm-project-operator/apis/helm.cattle.io/v1alpha1"
"github.com/rancher/prometheus-federator/internal/helm-project-operator/apis/helm.cattle.io/v1alpha1"

corecontroller "github.com/rancher/wrangler/pkg/generated/controllers/core/v1"
corev1 "k8s.io/api/core/v1"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package namespace

import (
"github.com/rancher/prometheus-federator/pkg/helm-project-operator/controllers/common"
"github.com/rancher/prometheus-federator/internal/helm-project-operator/controllers/common"
corev1 "k8s.io/api/core/v1"
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"fmt"
"strings"

common2 "github.com/rancher/prometheus-federator/pkg/helm-project-operator/controllers/common"
common2 "github.com/rancher/prometheus-federator/internal/helm-project-operator/controllers/common"

corev1 "k8s.io/api/core/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package project
import (
"fmt"

"github.com/rancher/prometheus-federator/pkg/helm-project-operator/controllers/common"
"github.com/rancher/prometheus-federator/internal/helm-project-operator/controllers/common"

"github.com/sirupsen/logrus"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
Expand Down
Loading

0 comments on commit 2f25bd1

Please sign in to comment.