Skip to content

Commit

Permalink
helmrepository api version is v1beta2 not v1
Browse files Browse the repository at this point in the history
  • Loading branch information
enekofb committed Aug 22, 2023
1 parent e3b0570 commit 9808968
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
6 changes: 3 additions & 3 deletions pkg/run/install/install_dashboard.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@ import (
"context"
"encoding/json"
"fmt"
sourcev1b2 "github.com/fluxcd/source-controller/api/v1beta2"
"strings"
"time"

sourcev1b2 "github.com/fluxcd/source-controller/api/v1beta2"

helmv2 "github.com/fluxcd/helm-controller/api/v2beta1"
sourcev1 "github.com/fluxcd/source-controller/api/v1"
coretypes "github.com/weaveworks/weave-gitops/core/server/types"
"github.com/weaveworks/weave-gitops/pkg/config"
"github.com/weaveworks/weave-gitops/pkg/logger"
Expand Down Expand Up @@ -301,7 +301,7 @@ func makeHelmRepository(name, namespace string) *sourcev1b2.HelmRepository {
helmRepository := &sourcev1b2.HelmRepository{
TypeMeta: metav1.TypeMeta{
Kind: sourcev1b2.HelmRepositoryKind,
APIVersion: sourcev1.GroupVersion.Identifier(),
APIVersion: sourcev1b2.GroupVersion.Identifier(),
},
ObjectMeta: metav1.ObjectMeta{
Name: name,
Expand Down
3 changes: 1 addition & 2 deletions pkg/run/install/install_dashboard_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ import (
"time"

helmv2 "github.com/fluxcd/helm-controller/api/v2beta1"
sourcev1 "github.com/fluxcd/source-controller/api/v1"
sourcev1b2 "github.com/fluxcd/source-controller/api/v1beta2"
"github.com/go-logr/logr"
. "github.com/onsi/ginkgo/v2"
Expand Down Expand Up @@ -397,7 +396,7 @@ var _ = Describe("makeHelmRepository", func() {
It("creates helmrepository", func() {
actual := makeHelmRepository(testDashboardName, testNamespace)
Expect(actual.Kind).To(Equal(sourcev1b2.HelmRepositoryKind))
Expect(actual.APIVersion).To(Equal(sourcev1.GroupVersion.Identifier()))
Expect(actual.APIVersion).To(Equal(sourcev1b2.GroupVersion.Identifier()))
Expect(actual.Name).To(Equal(testDashboardName))
Expect(actual.Namespace).To(Equal(testNamespace))

Expand Down

0 comments on commit 9808968

Please sign in to comment.