Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: change outdated plugin release namespace references #602

Merged
merged 2 commits into from
Sep 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions pkg/controllers/plugin/remote_cluster_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ var (
Spec: greenhousev1alpha1.PluginSpec{
ClusterName: "test-cluster",
PluginDefinition: "test-plugindefinition",
ReleaseNamespace: test.TestNamespace,
},
}

Expand Down Expand Up @@ -391,7 +392,7 @@ var _ = Describe("HelmController reconciliation", Ordered, func() {
By("creating plugin definition with CRDs")
Expect(test.K8sClient.Create(test.Ctx, testPluginWithHelmChartCRDs)).To(Succeed(), "should create plugin definition")

remoteRestClientGetter := clientutil.NewRestClientGetterFromBytes(remoteKubeConfig, testPluginWithCRDs.GetReleaseNamespace(), clientutil.WithPersistentConfig())
remoteRestClientGetter := clientutil.NewRestClientGetterFromBytes(remoteKubeConfig, testPluginWithCRDs.Spec.ReleaseNamespace, clientutil.WithPersistentConfig())

By("creating test plugin referencing the cluster")
testPluginWithCRDs.Spec.ClusterName = "test-cluster"
Expand All @@ -410,7 +411,7 @@ var _ = Describe("HelmController reconciliation", Ordered, func() {
}).Should(BeTrue(), "the ClusterAccessReadyCondition should be false")

By("checking the helm releases deployed to the remote cluster")
helmConfig, err := helm.ExportNewHelmAction(remoteRestClientGetter, testPluginWithCRDs.GetReleaseNamespace())
helmConfig, err := helm.ExportNewHelmAction(remoteRestClientGetter, testPluginWithCRDs.Spec.ReleaseNamespace)
Expect(err).ShouldNot(HaveOccurred(), "there should be no error creating helm config")
listAction := action.NewList(helmConfig)
Eventually(func() []*release.Release {
Expand Down
1 change: 1 addition & 0 deletions pkg/helm/diff_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ var _ = Describe("ensure helm diff against the release manifest works as expecte
Value: test.MustReturnJSONFor("true"),
},
},
ReleaseNamespace: namespace,
},
}

Expand Down
1 change: 1 addition & 0 deletions pkg/helm/suite_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,7 @@ var (
PluginDefinition: "test-plugindefinition",
ClusterName: "test-cluster",
OptionValues: []greenhousesapv1alpha1.PluginOptionValue{},
ReleaseNamespace: "test-release-namespace",
},
}

Expand Down
Loading