Skip to content

Commit

Permalink
rearrange helm library related code to internal/legacy/
Browse files Browse the repository at this point in the history
  • Loading branch information
varshaprasad96 committed Nov 1, 2021
1 parent d147756 commit fff4b47
Show file tree
Hide file tree
Showing 24 changed files with 32 additions and 32 deletions.
6 changes: 3 additions & 3 deletions internal/cmd/helm-operator/run/cmd.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,13 @@ import (
"runtime"
"strings"

"github.com/operator-framework/helm-operator-plugins/internal/controller"
"github.com/operator-framework/helm-operator-plugins/internal/flags"
"github.com/operator-framework/helm-operator-plugins/internal/legacy/controller"
"github.com/operator-framework/helm-operator-plugins/internal/legacy/release"
watches "github.com/operator-framework/helm-operator-plugins/internal/legacy/watches"
"github.com/operator-framework/helm-operator-plugins/internal/metrics"
"github.com/operator-framework/helm-operator-plugins/internal/release"
"github.com/operator-framework/helm-operator-plugins/internal/version"
helmmgr "github.com/operator-framework/helm-operator-plugins/pkg/manager"
watches "github.com/operator-framework/helm-operator-plugins/pkg/watches/helm"
"github.com/spf13/cobra"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
ctrl "sigs.k8s.io/controller-runtime"
Expand Down
2 changes: 1 addition & 1 deletion internal/cmd/hybrid-operator/run/cmd.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ import (
"github.com/operator-framework/helm-operator-plugins/pkg/annotation"
helmmgr "github.com/operator-framework/helm-operator-plugins/pkg/manager"
"github.com/operator-framework/helm-operator-plugins/pkg/reconciler"
watches "github.com/operator-framework/helm-operator-plugins/pkg/watches/hybrid"
"github.com/operator-framework/helm-operator-plugins/pkg/watches"
"github.com/spf13/cobra"
ctrl "sigs.k8s.io/controller-runtime"
"sigs.k8s.io/controller-runtime/pkg/client/config"
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/source"
"sigs.k8s.io/yaml"

"github.com/operator-framework/helm-operator-plugins/internal/release"
"github.com/operator-framework/helm-operator-plugins/internal/legacy/release"
"github.com/operator-framework/helm-operator-plugins/pkg/sdk/controllerutil"
libhandler "github.com/operator-framework/operator-lib/handler"
"github.com/operator-framework/operator-lib/predicate"
Expand Down
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,9 @@ import (
"sigs.k8s.io/controller-runtime/pkg/controller/controllerutil"
"sigs.k8s.io/controller-runtime/pkg/reconcile"

"github.com/operator-framework/helm-operator-plugins/internal/helm/diff"
"github.com/operator-framework/helm-operator-plugins/internal/helm/types"
"github.com/operator-framework/helm-operator-plugins/internal/release"
"github.com/operator-framework/helm-operator-plugins/internal/legacy/helm/diff"
"github.com/operator-framework/helm-operator-plugins/internal/legacy/helm/types"
"github.com/operator-framework/helm-operator-plugins/internal/legacy/release"
)

// blank assignment to verify that HelmOperatorReconciler implements reconcile.Reconciler
Expand Down
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.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@ import (
"k8s.io/cli-runtime/pkg/resource"
"k8s.io/client-go/discovery"

"github.com/operator-framework/helm-operator-plugins/internal/helm/types"
"github.com/operator-framework/helm-operator-plugins/internal/manifestutil"
"github.com/operator-framework/helm-operator-plugins/internal/legacy/helm/types"
"github.com/operator-framework/helm-operator-plugins/internal/legacy/manifestutil"
)

// Manager manages a Helm release. It can install, upgrade, reconcile,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ import (
v1 "k8s.io/client-go/kubernetes/typed/core/v1"
crmanager "sigs.k8s.io/controller-runtime/pkg/manager"

"github.com/operator-framework/helm-operator-plugins/internal/helm/types"
"github.com/operator-framework/helm-operator-plugins/pkg/client/helm/client"
"github.com/operator-framework/helm-operator-plugins/internal/legacy/helm/client"
"github.com/operator-framework/helm-operator-plugins/internal/legacy/helm/types"
)

// ManagerFactory creates Managers that are specific to custom resources. It is
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
40 changes: 20 additions & 20 deletions pkg/watches/hybrid/watches_test.go → pkg/watches/watches_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,15 +36,15 @@ var _ = Describe("LoadReader", func() {
- group: mygroup
version: v1alpha1
kind: MyKind
chart: ../../../pkg/internal/testdata/test-chart
chart: ../../pkg/internal/testdata/test-chart
watchDependentResources: false
overrideValues:
key: value
`
expectedWatches = []Watch{
{
GroupVersionKind: schema.GroupVersionKind{Group: "mygroup", Version: "v1alpha1", Kind: "MyKind"},
ChartPath: "../../../pkg/internal/testdata/test-chart",
ChartPath: "../../pkg/internal/testdata/test-chart",
WatchDependentResources: &falseVal,
OverrideValues: map[string]string{"key": "value"},
},
Expand All @@ -61,15 +61,15 @@ var _ = Describe("LoadReader", func() {
- group: mygroup
version: v1alpha1
kind: MyKind
chart: ../../../pkg/internal/testdata/test-chart
chart: ../../pkg/internal/testdata/test-chart
watchDependentResources: false
overrideValues:
key: $MY_VALUE
`
expectedWatches = []Watch{
{
GroupVersionKind: schema.GroupVersionKind{Group: "mygroup", Version: "v1alpha1", Kind: "MyKind"},
ChartPath: "../../../pkg/internal/testdata/test-chart",
ChartPath: "../../pkg/internal/testdata/test-chart",
WatchDependentResources: &falseVal,
OverrideValues: map[string]string{"key": "value"},
},
Expand All @@ -90,7 +90,7 @@ var _ = Describe("LoadReader", func() {
- group: mygroup
version: v1alpha1
kind: MyKind
chart: ../../../pkg/internal/testdata/test-chart
chart: ../../pkg/internal/testdata/test-chart
watchDependentResources: false
reconcilePeriod: 1s
maxConcurrentReconciles: 2
Expand All @@ -100,7 +100,7 @@ var _ = Describe("LoadReader", func() {
expectedWatches = []Watch{
{
GroupVersionKind: schema.GroupVersionKind{Group: "mygroup", Version: "v1alpha1", Kind: "MyKind"},
ChartPath: "../../../pkg/internal/testdata/test-chart",
ChartPath: "../../pkg/internal/testdata/test-chart",
WatchDependentResources: &falseVal,
OverrideValues: map[string]string{"key": "value"},
MaxConcurrentReconciles: &concurrentReconciles,
Expand All @@ -122,7 +122,7 @@ var _ = Describe("LoadReader", func() {
- group: mygroup
version: v1alpha1
kind: MyKind
chart: ../../../pkg/internal/testdata/test-chart
chart: ../../pkg/internal/testdata/test-chart
watchDependentResources: false
overrideValues:
repo: '{{ ("$MY_IMAGE" | split ":")._0 }}'
Expand All @@ -131,7 +131,7 @@ var _ = Describe("LoadReader", func() {
expectedWatches = []Watch{
{
GroupVersionKind: schema.GroupVersionKind{Group: "mygroup", Version: "v1alpha1", Kind: "MyKind"},
ChartPath: "../../../pkg/internal/testdata/test-chart",
ChartPath: "../../pkg/internal/testdata/test-chart",
WatchDependentResources: &falseVal,
OverrideValues: map[string]string{
"repo": "quay.io/operator-framework/helm-operator",
Expand All @@ -154,7 +154,7 @@ var _ = Describe("LoadReader", func() {
- group: mygroup
version: v1alpha1
kind: MyKind
chart: ../../../pkg/internal/testdata/test-chart
chart: ../../pkg/internal/testdata/test-chart
overrideValues:
repo: '{{ ("$MY_IMAGE" | split ":")._0 }}'
tag: '{{ ("$MY_IMAGE" | split ":")._1'
Expand All @@ -173,21 +173,21 @@ var _ = Describe("LoadReader", func() {
- group: mygroup
version: v1alpha1
kind: MyFirstKind
chart: ../../../pkg/internal/testdata/test-chart
chart: ../../pkg/internal/testdata/test-chart
- group: mygroup
version: v1alpha1
kind: MySecondKind
chart: ../../../pkg/internal/testdata/test-chart
chart: ../../pkg/internal/testdata/test-chart
`
expectedWatches = []Watch{
{
GroupVersionKind: schema.GroupVersionKind{Group: "mygroup", Version: "v1alpha1", Kind: "MyFirstKind"},
ChartPath: "../../../pkg/internal/testdata/test-chart",
ChartPath: "../../pkg/internal/testdata/test-chart",
WatchDependentResources: &trueVal,
},
{
GroupVersionKind: schema.GroupVersionKind{Group: "mygroup", Version: "v1alpha1", Kind: "MySecondKind"},
ChartPath: "../../../pkg/internal/testdata/test-chart",
ChartPath: "../../pkg/internal/testdata/test-chart",
WatchDependentResources: &trueVal,
},
}
Expand All @@ -202,11 +202,11 @@ var _ = Describe("LoadReader", func() {
- group: mygroup
version: v1alpha1
kind: MyKind
chart: ../../../pkg/internal/testdata/test-chart
chart: ../../pkg/internal/testdata/test-chart
- group: mygroup
version: v1alpha1
kind: MyKind
chart: ../../../pkg/internal/testdata/test-chart
chart: ../../pkg/internal/testdata/test-chart
`
watchesData := bytes.NewBufferString(data)
watches, err := LoadReader(watchesData)
Expand All @@ -218,7 +218,7 @@ var _ = Describe("LoadReader", func() {
data = `---
- group: mygroup
kind: MyKind
chart: ../../../pkg/internal/testdata/test-chart
chart: ../../pkg/internal/testdata/test-chart
`
watchesData := bytes.NewBufferString(data)
watches, err := LoadReader(watchesData)
Expand All @@ -230,7 +230,7 @@ var _ = Describe("LoadReader", func() {
data = `---
- group: mygroup
version: v1alpha1
chart: ../../../pkg/internal/testdata/test-chart
chart: ../../pkg/internal/testdata/test-chart
`
watchesData := bytes.NewBufferString(data)
watches, err := LoadReader(watchesData)
Expand All @@ -256,7 +256,7 @@ var _ = Describe("LoadReader", func() {
- group: mygroup
version: v1alpha1
kind: MyKind
chart: ../../../pkg/internal/testdata/test-chart
chart: ../../pkg/internal/testdata/test-chart
overrideValues:
key1:
key2: value
Expand Down Expand Up @@ -290,7 +290,7 @@ var _ = Describe("Load", func() {
- group: mygroup
version: v1alpha1
kind: MyKind
chart: ../../../pkg/internal/testdata/test-chart
chart: ../../pkg/internal/testdata/test-chart
watchDependentResources: false
overrideValues:
key: value
Expand All @@ -299,7 +299,7 @@ var _ = Describe("Load", func() {
expectedWatches = []Watch{
{
GroupVersionKind: schema.GroupVersionKind{Group: "mygroup", Version: "v1alpha1", Kind: "MyKind"},
ChartPath: "../../../pkg/internal/testdata/test-chart",
ChartPath: "../../pkg/internal/testdata/test-chart",
WatchDependentResources: &falseVal,
OverrideValues: map[string]string{"key": "value"},
},
Expand Down

0 comments on commit fff4b47

Please sign in to comment.