From c215af480974674e80301f72114f2180895dad50 Mon Sep 17 00:00:00 2001 From: Greg Fichtenholtz <74032303+gfichtenholt@users.noreply.github.com> Date: Tue, 29 Mar 2022 18:44:58 -0700 Subject: [PATCH] fix for [flux] Upgrade Flux to the Source v1beta2 API #4506 (#4523) * attempt #2 * attempt #2 * 1st checkpoint * 2nd checkpoint --- .../plugins/fluxv2/packages/v1alpha1/chart.go | 2 +- .../v1alpha1/chart_integration_test.go | 2 +- .../fluxv2/packages/v1alpha1/chart_test.go | 9 +- .../fluxv2/packages/v1alpha1/common/utils.go | 2 +- .../packages/v1alpha1/global_vars_test.go | 136 +++++++++++------- .../v1alpha1/integration_utils_test.go | 2 +- .../fluxv2/packages/v1alpha1/release.go | 5 +- .../v1alpha1/release_integration_test.go | 2 +- .../fluxv2/packages/v1alpha1/release_test.go | 12 +- .../plugins/fluxv2/packages/v1alpha1/repo.go | 30 ++-- .../v1alpha1/repo_integration_test.go | 17 +-- .../fluxv2/packages/v1alpha1/repo_test.go | 39 +++-- .../fluxv2/packages/v1alpha1/server.go | 2 +- .../fluxv2/packages/v1alpha1/server_test.go | 33 ++--- .../packages/v1alpha1/test_util_test.go | 4 +- go.mod | 9 +- go.sum | 20 ++- script/makefiles/deploy-dev.mk | 2 +- 18 files changed, 179 insertions(+), 149 deletions(-) diff --git a/cmd/kubeapps-apis/plugins/fluxv2/packages/v1alpha1/chart.go b/cmd/kubeapps-apis/plugins/fluxv2/packages/v1alpha1/chart.go index 03629d39d70..756e172752d 100644 --- a/cmd/kubeapps-apis/plugins/fluxv2/packages/v1alpha1/chart.go +++ b/cmd/kubeapps-apis/plugins/fluxv2/packages/v1alpha1/chart.go @@ -10,7 +10,7 @@ import ( "reflect" "strings" - sourcev1 "github.com/fluxcd/source-controller/api/v1beta1" + sourcev1 "github.com/fluxcd/source-controller/api/v1beta2" corev1 "github.com/kubeapps/kubeapps/cmd/kubeapps-apis/gen/core/packages/v1alpha1" "github.com/kubeapps/kubeapps/cmd/kubeapps-apis/plugins/fluxv2/packages/v1alpha1/common" "github.com/kubeapps/kubeapps/cmd/kubeapps-apis/plugins/pkg/pkgutils" diff --git a/cmd/kubeapps-apis/plugins/fluxv2/packages/v1alpha1/chart_integration_test.go b/cmd/kubeapps-apis/plugins/fluxv2/packages/v1alpha1/chart_integration_test.go index 5c113e22c73..2fc288df359 100644 --- a/cmd/kubeapps-apis/plugins/fluxv2/packages/v1alpha1/chart_integration_test.go +++ b/cmd/kubeapps-apis/plugins/fluxv2/packages/v1alpha1/chart_integration_test.go @@ -10,7 +10,7 @@ import ( "testing" "time" - sourcev1 "github.com/fluxcd/source-controller/api/v1beta1" + sourcev1 "github.com/fluxcd/source-controller/api/v1beta2" corev1 "github.com/kubeapps/kubeapps/cmd/kubeapps-apis/gen/core/packages/v1alpha1" "github.com/kubeapps/kubeapps/cmd/kubeapps-apis/plugins/fluxv2/packages/v1alpha1/common" "golang.org/x/sync/semaphore" diff --git a/cmd/kubeapps-apis/plugins/fluxv2/packages/v1alpha1/chart_test.go b/cmd/kubeapps-apis/plugins/fluxv2/packages/v1alpha1/chart_test.go index b8e37ba9c8a..c243002beb9 100644 --- a/cmd/kubeapps-apis/plugins/fluxv2/packages/v1alpha1/chart_test.go +++ b/cmd/kubeapps-apis/plugins/fluxv2/packages/v1alpha1/chart_test.go @@ -14,7 +14,8 @@ import ( "testing" "time" - sourcev1 "github.com/fluxcd/source-controller/api/v1beta1" + fluxmeta "github.com/fluxcd/pkg/apis/meta" + sourcev1 "github.com/fluxcd/source-controller/api/v1beta2" redismock "github.com/go-redis/redismock/v8" "github.com/google/go-cmp/cmp" "github.com/google/go-cmp/cmp/cmpopts" @@ -879,9 +880,9 @@ func TestChartWithRelativeURL(t *testing.T) { }, Conditions: []metav1.Condition{ { - Type: "Ready", - Status: "True", - Reason: sourcev1.IndexationSucceededReason, + Type: fluxmeta.ReadyCondition, + Status: metav1.ConditionTrue, + Reason: fluxmeta.SucceededReason, }, }, URL: ts.URL + "/index.yaml", diff --git a/cmd/kubeapps-apis/plugins/fluxv2/packages/v1alpha1/common/utils.go b/cmd/kubeapps-apis/plugins/fluxv2/packages/v1alpha1/common/utils.go index 2c81b8fce46..fe9375dd56f 100644 --- a/cmd/kubeapps-apis/plugins/fluxv2/packages/v1alpha1/common/utils.go +++ b/cmd/kubeapps-apis/plugins/fluxv2/packages/v1alpha1/common/utils.go @@ -18,7 +18,7 @@ import ( "time" helmv2 "github.com/fluxcd/helm-controller/api/v2beta1" - sourcev1 "github.com/fluxcd/source-controller/api/v1beta1" + sourcev1 "github.com/fluxcd/source-controller/api/v1beta2" "github.com/go-redis/redis/v8" plugins "github.com/kubeapps/kubeapps/cmd/kubeapps-apis/gen/core/plugins/v1alpha1" "github.com/kubeapps/kubeapps/cmd/kubeapps-apis/plugins/pkg/pkgutils" diff --git a/cmd/kubeapps-apis/plugins/fluxv2/packages/v1alpha1/global_vars_test.go b/cmd/kubeapps-apis/plugins/fluxv2/packages/v1alpha1/global_vars_test.go index b548b65ceef..932c37deb8e 100644 --- a/cmd/kubeapps-apis/plugins/fluxv2/packages/v1alpha1/global_vars_test.go +++ b/cmd/kubeapps-apis/plugins/fluxv2/packages/v1alpha1/global_vars_test.go @@ -9,7 +9,7 @@ import ( helmv2 "github.com/fluxcd/helm-controller/api/v2beta1" fluxmeta "github.com/fluxcd/pkg/apis/meta" - sourcev1 "github.com/fluxcd/source-controller/api/v1beta1" + sourcev1 "github.com/fluxcd/source-controller/api/v1beta2" corev1 "github.com/kubeapps/kubeapps/cmd/kubeapps-apis/gen/core/packages/v1alpha1" "helm.sh/helm/v3/pkg/release" v1 "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1" @@ -1294,15 +1294,15 @@ var ( Conditions: []metav1.Condition{ { LastTransitionTime: metav1.Time{Time: lastTransitionTime}, - Type: "Ready", - Status: "True", + Type: fluxmeta.ReadyCondition, + Status: metav1.ConditionTrue, Reason: "ReconciliationSucceeded", Message: "Release reconciliation succeeded", }, { LastTransitionTime: metav1.Time{Time: lastTransitionTime}, Type: "Released", - Status: "True", + Status: metav1.ConditionTrue, Reason: helmv2.InstallSucceededReason, Message: "Helm install succeeded", }, @@ -1345,15 +1345,15 @@ var ( Conditions: []metav1.Condition{ { LastTransitionTime: metav1.Time{Time: lastTransitionTime}, - Type: "Ready", - Status: "True", + Type: fluxmeta.ReadyCondition, + Status: metav1.ConditionTrue, Reason: "ReconciliationSucceeded", Message: "Release reconciliation succeeded", }, { LastTransitionTime: metav1.Time{Time: lastTransitionTime}, Type: "Released", - Status: "True", + Status: metav1.ConditionTrue, Reason: helmv2.InstallSucceededReason, Message: "Helm install succeeded", }, @@ -1378,15 +1378,15 @@ var ( Conditions: []metav1.Condition{ { LastTransitionTime: metav1.Time{Time: lastTransitionTime}, - Type: "Ready", - Status: "False", + Type: fluxmeta.ReadyCondition, + Status: metav1.ConditionFalse, Reason: helmv2.InstallFailedReason, Message: "install retries exhausted", }, { LastTransitionTime: metav1.Time{Time: lastTransitionTime}, Type: "Released", - Status: "False", + Status: metav1.ConditionFalse, Reason: helmv2.InstallFailedReason, Message: "Helm install failed: unable to build kubernetes objects from release manifest: error validating \"\": error validating data: ValidationError(Deployment.spec.replicas): invalid type for io.k8s.api.apps.v1.DeploymentSpec.replicas: got \"string\", expected \"integer\"", }, @@ -1420,15 +1420,15 @@ var ( Conditions: []metav1.Condition{ { LastTransitionTime: metav1.Time{Time: lastTransitionTime}, - Type: "Ready", - Status: "True", + Type: fluxmeta.ReadyCondition, + Status: metav1.ConditionTrue, Reason: "ReconciliationSucceeded", Message: "Release reconciliation succeeded", }, { LastTransitionTime: metav1.Time{Time: lastTransitionTime}, Type: "Released", - Status: "True", + Status: metav1.ConditionTrue, Reason: helmv2.InstallSucceededReason, Message: "Helm install succeeded", }, @@ -1453,15 +1453,15 @@ var ( Conditions: []metav1.Condition{ { LastTransitionTime: metav1.Time{Time: lastTransitionTime}, - Type: "Ready", - Status: "True", + Type: fluxmeta.ReadyCondition, + Status: metav1.ConditionTrue, Reason: "ReconciliationSucceeded", Message: "Release reconciliation succeeded", }, { LastTransitionTime: metav1.Time{Time: lastTransitionTime}, Type: "Released", - Status: "True", + Status: metav1.ConditionTrue, Reason: helmv2.InstallSucceededReason, Message: "Helm install succeeded", }, @@ -1486,7 +1486,7 @@ var ( Conditions: []metav1.Condition{ { LastTransitionTime: metav1.Time{Time: lastTransitionTime}, - Type: "Ready", + Type: fluxmeta.ReadyCondition, Status: "Unknown", Reason: "Progressing", Message: "reconciliation in progress", @@ -1511,8 +1511,8 @@ var ( Conditions: []metav1.Condition{ { LastTransitionTime: metav1.Time{Time: lastTransitionTime}, - Type: "Ready", - Status: "False", + Type: fluxmeta.ReadyCondition, + Status: metav1.ConditionFalse, Reason: helmv2.ArtifactFailedReason, Message: "HelmChart 'default/kubeapps-my-redis' is not ready", }, @@ -1545,15 +1545,15 @@ var ( Conditions: []metav1.Condition{ { LastTransitionTime: metav1.Time{Time: lastTransitionTime}, - Type: "Ready", - Status: "True", + Type: fluxmeta.ReadyCondition, + Status: metav1.ConditionTrue, Reason: "ReconciliationSucceeded", Message: "Release reconciliation succeeded", }, { LastTransitionTime: metav1.Time{Time: lastTransitionTime}, Type: "Released", - Status: "True", + Status: metav1.ConditionTrue, Reason: helmv2.InstallSucceededReason, Message: "Helm install succeeded", }, @@ -1829,15 +1829,15 @@ var ( Conditions: []metav1.Condition{ { LastTransitionTime: metav1.Time{Time: lastTransitionTime}, - Type: "Ready", - Status: "True", + Type: fluxmeta.ReadyCondition, + Status: metav1.ConditionTrue, Reason: "ReconciliationSucceeded", Message: "Release reconciliation succeeded", }, { LastTransitionTime: metav1.Time{Time: lastTransitionTime}, Type: "Released", - Status: "True", + Status: metav1.ConditionTrue, Reason: helmv2.InstallSucceededReason, Message: "Helm install succeeded", }, @@ -2262,7 +2262,7 @@ var ( Status: &corev1.PackageRepositoryStatus{ Ready: true, Reason: corev1.PackageRepositoryStatus_STATUS_REASON_SUCCESS, - UserReason: "IndexationSucceed", + UserReason: "Succeeded: stored artifact for revision '651f952130ea96823711d08345b85e82be011dc6'", }, }, } @@ -2325,7 +2325,7 @@ var ( Status: &corev1.PackageRepositoryStatus{ Ready: true, Reason: corev1.PackageRepositoryStatus_STATUS_REASON_SUCCESS, - UserReason: "IndexationSucceed", + UserReason: "Succeeded: stored artifact for revision '651f952130ea96823711d08345b85e82be011dc6'", }, }, } @@ -2365,7 +2365,7 @@ var ( Status: &corev1.PackageRepositoryStatus{ Ready: false, Reason: corev1.PackageRepositoryStatus_STATUS_REASON_FAILED, - UserReason: "IndexationFailed: failed to fetch https://invalid.example.com/index.yaml : 404 Not Found", + UserReason: "Failed: failed to fetch https://invalid.example.com/index.yaml : 404 Not Found", }, }, } @@ -2391,7 +2391,7 @@ var ( Status: &corev1.PackageRepositoryStatus{ Ready: true, Reason: corev1.PackageRepositoryStatus_STATUS_REASON_SUCCESS, - UserReason: "IndexationSucceed", + UserReason: "Succeeded: stored artifact for revision '651f952130ea96823711d08345b85e82be011dc6'", }, }, } @@ -2427,7 +2427,7 @@ var ( Status: &corev1.PackageRepositoryStatus{ Ready: true, Reason: corev1.PackageRepositoryStatus_STATUS_REASON_SUCCESS, - UserReason: "IndexationSucceed", + UserReason: "Succeeded: stored artifact for revision '651f952130ea96823711d08345b85e82be011dc6'", }, }, } @@ -2455,7 +2455,7 @@ var ( Status: &corev1.PackageRepositoryStatus{ Ready: true, Reason: corev1.PackageRepositoryStatus_STATUS_REASON_SUCCESS, - UserReason: "IndexationSucceed: Fetched revision: 2867920fb8f56575f4bc95ed878ee2a0c8ae79cdd2bca210a72aa3ff04defa1b", + UserReason: "Succeeded: stored artifact for revision '2867920fb8f56575f4bc95ed878ee2a0c8ae79cdd2bca210a72aa3ff04defa1b'", }, }, } @@ -2493,7 +2493,7 @@ var ( Status: &corev1.PackageRepositoryStatus{ Ready: true, Reason: corev1.PackageRepositoryStatus_STATUS_REASON_SUCCESS, - UserReason: "IndexationSucceed: Fetched revision: ", + UserReason: "Succeeded: stored artifact for revision '", }, }, } @@ -2506,10 +2506,10 @@ var ( // will be set when scenario is run Namespace: "TBD", }, - Identifier: "my-podinfo", + Identifier: "my-podinfo-2", Plugin: fluxPlugin, }, - Name: "my-podinfo", + Name: "my-podinfo-2", Description: "", NamespaceScoped: false, Type: "helm", @@ -2521,7 +2521,7 @@ var ( Status: &corev1.PackageRepositoryStatus{ Ready: false, Reason: corev1.PackageRepositoryStatus_STATUS_REASON_FAILED, - UserReason: "IndexationFailed: failed to download repository index: failed to cache index to temporary file: failed to fetch http://fluxv2plugin-testdata-svc.default.svc.cluster.local:80/podinfo-basic-auth/index.yaml : 401 Unauthorized", + UserReason: "Failed: failed to fetch Helm repository index: failed to cache index to temporary file: failed to fetch http://fluxv2plugin-testdata-svc.default.svc.cluster.local:80/podinfo-basic-auth/index.yaml : 401 Unauthorize", }, }, } @@ -2534,10 +2534,10 @@ var ( // will be set when scenario is run Namespace: "TBD", }, - Identifier: "my-podinfo", + Identifier: "my-podinfo-3", Plugin: fluxPlugin, }, - Name: "my-podinfo", + Name: "my-podinfo-3", Description: "", NamespaceScoped: false, Type: "helm", @@ -2555,7 +2555,7 @@ var ( Status: &corev1.PackageRepositoryStatus{ Ready: true, Reason: corev1.PackageRepositoryStatus_STATUS_REASON_SUCCESS, - UserReason: "IndexationSucceed: Fetched revision: 9d3ac1eb708dfaebae14d7c88fd46afce8b1e0f7aace790d91758575dc8ce518", + UserReason: "Succeeded: stored artifact for revision '9d3ac1eb708dfaebae14d7c88fd46afce8b1e0f7aace790d91758575dc8ce518'", }, }, } @@ -2570,6 +2570,36 @@ var ( }, } + get_repo_detail_req_9 = &corev1.GetPackageRepositoryDetailRequest{ + PackageRepoRef: &corev1.PackageRepositoryReference{ + Context: &corev1.Context{ + // will be set when test scenario is run + Namespace: "TBD", + }, + Identifier: "my-podinfo-2", + }, + } + + get_repo_detail_req_10 = &corev1.GetPackageRepositoryDetailRequest{ + PackageRepoRef: &corev1.PackageRepositoryReference{ + Context: &corev1.Context{ + // will be set when test scenario is run + Namespace: "TBD", + }, + Identifier: "my-podinfo-3", + }, + } + + get_repo_detail_req_11 = &corev1.GetPackageRepositoryDetailRequest{ + PackageRepoRef: &corev1.PackageRepositoryReference{ + Context: &corev1.Context{ + // will be set when test scenario is run + Namespace: "TBD", + }, + Identifier: "my-podinfo-4", + }, + } + get_summaries_repo_1 = newRepo("bar", "foo", &sourcev1.HelmRepositorySpec{ URL: "http://example.com", @@ -2586,10 +2616,10 @@ var ( Conditions: []metav1.Condition{ { LastTransitionTime: metav1.Time{Time: lastTransitionTime}, - Message: "Fetched revision: 651f952130ea96823711d08345b85e82be011dc6", - Reason: sourcev1.IndexationSucceededReason, - Status: "True", - Type: "Ready", + Message: "stored artifact for revision '651f952130ea96823711d08345b85e82be011dc6'", + Reason: fluxmeta.SucceededReason, + Status: metav1.ConditionTrue, + Type: fluxmeta.ReadyCondition, }, }, URL: "TBD", @@ -2611,10 +2641,10 @@ var ( Conditions: []metav1.Condition{ { LastTransitionTime: metav1.Time{Time: lastTransitionTime}, - Message: "Fetched revision: 651f952130ea96823711d08345b85e82be011dc6", - Reason: sourcev1.IndexationSucceededReason, - Status: "True", - Type: "Ready", + Message: "stored artifact for revision '651f952130ea96823711d08345b85e82be011dc6'", + Reason: fluxmeta.SucceededReason, + Status: metav1.ConditionTrue, + Type: fluxmeta.ReadyCondition, }, }, URL: "TBD", @@ -2639,9 +2669,9 @@ var ( Conditions: []metav1.Condition{ { LastTransitionTime: metav1.Time{Time: lastTransitionTime}, - Type: "Ready", - Status: "False", - Reason: "IndexationFailed", + Type: fluxmeta.ReadyCondition, + Status: metav1.ConditionFalse, + Reason: fluxmeta.FailedReason, Message: "failed to fetch https://invalid.example.com/index.yaml : 404 Not Found", }, }, @@ -2664,7 +2694,7 @@ var ( Status: &corev1.PackageRepositoryStatus{ Ready: true, Reason: corev1.PackageRepositoryStatus_STATUS_REASON_SUCCESS, - UserReason: "IndexationSucceed: Fetched revision: 651f952130ea96823711d08345b85e82be011dc6", + UserReason: "Succeeded: stored artifact for revision '651f952130ea96823711d08345b85e82be011dc6'", }, } @@ -2685,7 +2715,7 @@ var ( Status: &corev1.PackageRepositoryStatus{ Ready: true, Reason: corev1.PackageRepositoryStatus_STATUS_REASON_SUCCESS, - UserReason: "IndexationSucceed: Fetched revision: 651f952130ea96823711d08345b85e82be011dc6", + UserReason: "Succeeded: stored artifact for revision '651f952130ea96823711d08345b85e82be011dc6'", }, } @@ -2727,7 +2757,7 @@ var ( Status: &corev1.PackageRepositoryStatus{ Ready: false, Reason: corev1.PackageRepositoryStatus_STATUS_REASON_FAILED, - UserReason: "IndexationFailed: failed to fetch https://invalid.example.com/index.yaml : 404 Not Found", + UserReason: "Failed: failed to fetch https://invalid.example.com/index.yaml : 404 Not Found", }, } @@ -2749,7 +2779,7 @@ var ( Status: &corev1.PackageRepositoryStatus{ Ready: true, Reason: corev1.PackageRepositoryStatus_STATUS_REASON_SUCCESS, - UserReason: "IndexationSucceed: Fetched revision: 2867920fb8f56575f4bc95ed878ee2a0c8ae79cdd2bca210a72aa3ff04defa1b", + UserReason: "Succeeded: stored artifact for revision '2867920fb8f56575f4bc95ed878ee2a0c8ae79cdd2bca210a72aa3ff04defa1b'", }, } } diff --git a/cmd/kubeapps-apis/plugins/fluxv2/packages/v1alpha1/integration_utils_test.go b/cmd/kubeapps-apis/plugins/fluxv2/packages/v1alpha1/integration_utils_test.go index 48e17e2a70f..1a215840d64 100644 --- a/cmd/kubeapps-apis/plugins/fluxv2/packages/v1alpha1/integration_utils_test.go +++ b/cmd/kubeapps-apis/plugins/fluxv2/packages/v1alpha1/integration_utils_test.go @@ -20,7 +20,7 @@ import ( helmv2 "github.com/fluxcd/helm-controller/api/v2beta1" "github.com/fluxcd/pkg/apis/meta" - sourcev1 "github.com/fluxcd/source-controller/api/v1beta1" + sourcev1 "github.com/fluxcd/source-controller/api/v1beta2" "github.com/go-redis/redis/v8" "github.com/kubeapps/kubeapps/cmd/apprepository-controller/pkg/client/clientset/versioned/scheme" plugins "github.com/kubeapps/kubeapps/cmd/kubeapps-apis/gen/core/plugins/v1alpha1" diff --git a/cmd/kubeapps-apis/plugins/fluxv2/packages/v1alpha1/release.go b/cmd/kubeapps-apis/plugins/fluxv2/packages/v1alpha1/release.go index 98cde64e31f..a883c0221b8 100644 --- a/cmd/kubeapps-apis/plugins/fluxv2/packages/v1alpha1/release.go +++ b/cmd/kubeapps-apis/plugins/fluxv2/packages/v1alpha1/release.go @@ -11,7 +11,8 @@ import ( "time" helmv2 "github.com/fluxcd/helm-controller/api/v2beta1" - sourcev1 "github.com/fluxcd/source-controller/api/v1beta1" + fluxmeta "github.com/fluxcd/pkg/apis/meta" + sourcev1 "github.com/fluxcd/source-controller/api/v1beta2" corev1 "github.com/kubeapps/kubeapps/cmd/kubeapps-apis/gen/core/packages/v1alpha1" "github.com/kubeapps/kubeapps/cmd/kubeapps-apis/plugins/fluxv2/packages/v1alpha1/common" "github.com/kubeapps/kubeapps/cmd/kubeapps-apis/plugins/pkg/pkgutils" @@ -569,7 +570,7 @@ func isHelmReleaseReady(rel helmv2.HelmRelease) (ready bool, status corev1.Insta } isInstallFailed := false - readyCond := meta.FindStatusCondition(*rel.GetStatusConditions(), "Ready") + readyCond := meta.FindStatusCondition(rel.GetConditions(), fluxmeta.ReadyCondition) if readyCond != nil { if readyCond.Reason != "" { // this could be something like diff --git a/cmd/kubeapps-apis/plugins/fluxv2/packages/v1alpha1/release_integration_test.go b/cmd/kubeapps-apis/plugins/fluxv2/packages/v1alpha1/release_integration_test.go index 36944dff8db..81c7a3c98f0 100644 --- a/cmd/kubeapps-apis/plugins/fluxv2/packages/v1alpha1/release_integration_test.go +++ b/cmd/kubeapps-apis/plugins/fluxv2/packages/v1alpha1/release_integration_test.go @@ -10,7 +10,7 @@ import ( "time" helmv2 "github.com/fluxcd/helm-controller/api/v2beta1" - sourcev1 "github.com/fluxcd/source-controller/api/v1beta1" + sourcev1 "github.com/fluxcd/source-controller/api/v1beta2" "github.com/google/go-cmp/cmp" "github.com/google/go-cmp/cmp/cmpopts" corev1 "github.com/kubeapps/kubeapps/cmd/kubeapps-apis/gen/core/packages/v1alpha1" diff --git a/cmd/kubeapps-apis/plugins/fluxv2/packages/v1alpha1/release_test.go b/cmd/kubeapps-apis/plugins/fluxv2/packages/v1alpha1/release_test.go index da7497ed023..6a4da84d7dd 100644 --- a/cmd/kubeapps-apis/plugins/fluxv2/packages/v1alpha1/release_test.go +++ b/cmd/kubeapps-apis/plugins/fluxv2/packages/v1alpha1/release_test.go @@ -13,7 +13,8 @@ import ( "time" helmv2 "github.com/fluxcd/helm-controller/api/v2beta1" - sourcev1 "github.com/fluxcd/source-controller/api/v1beta1" + fluxmeta "github.com/fluxcd/pkg/apis/meta" + sourcev1 "github.com/fluxcd/source-controller/api/v1beta2" redismock "github.com/go-redis/redismock/v8" "github.com/google/go-cmp/cmp" "github.com/google/go-cmp/cmp/cmpopts" @@ -1155,18 +1156,13 @@ func newChartsAndReleases(t *testing.T, existingK8sObjs []testSpecGetInstalledPa Interval: metav1.Duration{Duration: 1 * time.Minute}, } - lastTransitionTime, err := time.Parse(time.RFC3339, "2021-08-12T03:25:38Z") - if err != nil { - t.Fatalf("%v", err) - } - chartStatus := &sourcev1.HelmChartStatus{ Conditions: []metav1.Condition{ { LastTransitionTime: metav1.Time{Time: lastTransitionTime}, Message: "Fetched revision: " + existing.chartSpecVersion, - Type: "Ready", - Status: "True", + Type: fluxmeta.ReadyCondition, + Status: metav1.ConditionTrue, Reason: sourcev1.ChartPullSucceededReason, }, }, diff --git a/cmd/kubeapps-apis/plugins/fluxv2/packages/v1alpha1/repo.go b/cmd/kubeapps-apis/plugins/fluxv2/packages/v1alpha1/repo.go index fae23bbbb7e..dd432114fe0 100644 --- a/cmd/kubeapps-apis/plugins/fluxv2/packages/v1alpha1/repo.go +++ b/cmd/kubeapps-apis/plugins/fluxv2/packages/v1alpha1/repo.go @@ -15,7 +15,7 @@ import ( "time" fluxmeta "github.com/fluxcd/pkg/apis/meta" - sourcev1 "github.com/fluxcd/source-controller/api/v1beta1" + sourcev1 "github.com/fluxcd/source-controller/api/v1beta2" corev1 "github.com/kubeapps/kubeapps/cmd/kubeapps-apis/gen/core/packages/v1alpha1" "github.com/kubeapps/kubeapps/cmd/kubeapps-apis/plugins/fluxv2/packages/v1alpha1/cache" "github.com/kubeapps/kubeapps/cmd/kubeapps-apis/plugins/fluxv2/packages/v1alpha1/common" @@ -440,15 +440,10 @@ func (s *Server) repoSummaries(ctx context.Context, namespace string) ([]*corev1 return nil, err } } else { - // here I think the right semantics are different than that of availablePackageSummaries - // namely, if a specific namespace is specified we need to list repos in that namespace + // here, the right semantics are different than that of availablePackageSummaries() + // namely, if a specific namespace is passed in, we need to list repos in that namespace // and if the caller happens not to have 'read' access to that namespace, a PermissionDenied // error should be raised, as opposed to returning an empty list with no error - - // also note that, at least theoretically, it is not clear what we'd do if we ever - // had a flavor of API that allowed 2 namespaces (as opposed to all/one), and the caller - // only had access to 1 of them. Raise the error (same as with one namespace) or ignore - // inaccessible namespace (same as with all namespaces)? var repoList sourcev1.HelmRepositoryList var client ctrlclient.Client if client, err = s.getClient(ctx, namespace); err != nil { @@ -761,17 +756,18 @@ func isRepoReady(repo sourcev1.HelmRepository) bool { } // returns 3 things: -// - complete whether the operation was completed -// - success (only applicable when complete == true) whether the operation was successful or failed -// - reason, if present +// - complete: whether the operation was completed +// - success: (only applicable when complete == true) whether the operation was successful or failed +// - reason: if present // docs: // 1. https://fluxcd.io/docs/components/source/helmrepositories/#status-examples func isHelmRepositoryReady(repo sourcev1.HelmRepository) (complete bool, success bool, reason string) { - if !checkRepoGeneration(repo) { - return false, false, "" - } - - readyCond := meta.FindStatusCondition(*repo.GetStatusConditions(), "Ready") + // flux source-controller v1beta2 API made a change so that we can no longer + // rely on a simple "metadata.generation" vs "status.observedGeneration" check for a + // quick answer. The resource may now exist with "observedGeneration": -1 either in + // pending or in a failed state. We need to distinguish between the two. Personally, + // feels like a mistake to me. + readyCond := meta.FindStatusCondition(repo.GetConditions(), fluxmeta.ReadyCondition) if readyCond != nil { if readyCond.Reason != "" { // this could be something like @@ -787,7 +783,7 @@ func isHelmRepositoryReady(repo sourcev1.HelmRepository) (complete bool, success } switch readyCond.Status { case metav1.ConditionTrue: - return true, true, reason + return checkRepoGeneration(repo), true, reason case metav1.ConditionFalse: return true, false, reason // metav1.ConditionUnknown falls through diff --git a/cmd/kubeapps-apis/plugins/fluxv2/packages/v1alpha1/repo_integration_test.go b/cmd/kubeapps-apis/plugins/fluxv2/packages/v1alpha1/repo_integration_test.go index 0d298c3e38e..9b08954afd7 100644 --- a/cmd/kubeapps-apis/plugins/fluxv2/packages/v1alpha1/repo_integration_test.go +++ b/cmd/kubeapps-apis/plugins/fluxv2/packages/v1alpha1/repo_integration_test.go @@ -13,7 +13,6 @@ import ( "github.com/google/go-cmp/cmp/cmpopts" corev1 "github.com/kubeapps/kubeapps/cmd/kubeapps-apis/gen/core/packages/v1alpha1" plugins "github.com/kubeapps/kubeapps/cmd/kubeapps-apis/gen/core/plugins/v1alpha1" - "github.com/kubeapps/kubeapps/cmd/kubeapps-apis/plugins/fluxv2/packages/v1alpha1/common" "google.golang.org/grpc/codes" "google.golang.org/grpc/status" apiv1 "k8s.io/api/core/v1" @@ -418,16 +417,16 @@ func TestKindClusterGetPackageRepositoryDetail(t *testing.T) { }, { testName: "get detail fails for podinfo basic auth package repository without creds", - request: get_repo_detail_req_6, - repoName: "my-podinfo", + request: get_repo_detail_req_9, + repoName: "my-podinfo-2", repoUrl: podinfo_basic_auth_repo_url, expectedStatusCode: codes.OK, expectedResponse: get_repo_detail_resp_13, }, { testName: "get detail succeeds for podinfo basic auth package repository with creds", - request: get_repo_detail_req_6, - repoName: "my-podinfo", + request: get_repo_detail_req_10, + repoName: "my-podinfo-3", repoUrl: podinfo_basic_auth_repo_url, expectedStatusCode: codes.OK, expectedResponse: get_repo_detail_resp_14, @@ -442,8 +441,8 @@ func TestKindClusterGetPackageRepositoryDetail(t *testing.T) { }, { testName: "get detail returns PermissionDenied error", - request: get_repo_detail_req_6, - repoName: "my-podinfo", + request: get_repo_detail_req_11, + repoName: "my-podinfo-11", repoUrl: podinfo_repo_url, expectedStatusCode: codes.PermissionDenied, unauthorized: true, @@ -548,7 +547,9 @@ func TestKindClusterGetPackageRepositoryDetail(t *testing.T) { } if !strings.HasPrefix(resp.GetDetail().Status.UserReason, tc.expectedResponse.Detail.Status.UserReason) { - t.Errorf("unexpected response: %s", common.PrettyPrint(resp)) + t.Errorf("unexpected response (status.UserReason): (-want +got):\n- %s\n+ %s", + tc.expectedResponse.Detail.Status.UserReason, + resp.GetDetail().Status.UserReason) } }) } diff --git a/cmd/kubeapps-apis/plugins/fluxv2/packages/v1alpha1/repo_test.go b/cmd/kubeapps-apis/plugins/fluxv2/packages/v1alpha1/repo_test.go index 08ad2ecc918..9dfe0964371 100644 --- a/cmd/kubeapps-apis/plugins/fluxv2/packages/v1alpha1/repo_test.go +++ b/cmd/kubeapps-apis/plugins/fluxv2/packages/v1alpha1/repo_test.go @@ -14,7 +14,7 @@ import ( "time" fluxmeta "github.com/fluxcd/pkg/apis/meta" - sourcev1 "github.com/fluxcd/source-controller/api/v1beta1" + sourcev1 "github.com/fluxcd/source-controller/api/v1beta2" redismock "github.com/go-redis/redismock/v8" "github.com/google/go-cmp/cmp" "github.com/google/go-cmp/cmp/cmpopts" @@ -608,9 +608,9 @@ func TestGetAvailablePackageSummaryAfterRepoIndexUpdate(t *testing.T) { }, Conditions: []metav1.Condition{ { - Type: "Ready", - Status: "True", - Reason: sourcev1.IndexationSucceededReason, + Type: fluxmeta.ReadyCondition, + Status: metav1.ConditionTrue, + Reason: fluxmeta.SucceededReason, }, }, URL: ts.URL, @@ -1666,9 +1666,9 @@ func TestGetPackageRepositoryDetail(t *testing.T) { Conditions: []metav1.Condition{ { LastTransitionTime: metav1.Time{Time: lastTransitionTime}, - Type: "Ready", - Status: "Unknown", - Reason: "Progressing", + Type: fluxmeta.ReadyCondition, + Status: metav1.ConditionUnknown, + Reason: fluxmeta.ProgressingReason, Message: "reconciliation in progress", }, }, @@ -1684,9 +1684,9 @@ func TestGetPackageRepositoryDetail(t *testing.T) { Conditions: []metav1.Condition{ { LastTransitionTime: metav1.Time{Time: lastTransitionTime}, - Type: "Ready", - Status: "False", - Reason: "IndexationFailed", + Type: fluxmeta.ReadyCondition, + Status: metav1.ConditionFalse, + Reason: fluxmeta.FailedReason, Message: "failed to fetch https://invalid.example.com/index.yaml : 404 Not Found", }, }, @@ -2050,17 +2050,26 @@ func newRepoWithIndex(repoIndex, repoName, repoNamespace string, replaceUrls map repoSpec.SecretRef = &fluxmeta.LocalObjectReference{Name: secretRef} } + revision := "651f952130ea96823711d08345b85e82be011dc6" + sz := int64(31989) + repoStatus := &sourcev1.HelmRepositoryStatus{ Artifact: &sourcev1.Artifact{ - Checksum: "651f952130ea96823711d08345b85e82be011dc6", + Path: fmt.Sprintf("helmrepository/%s/%s/index-%s.yaml", repoNamespace, repoName, revision), + Checksum: revision, LastUpdateTime: metav1.Time{Time: lastUpdateTime}, - Revision: "651f952130ea96823711d08345b85e82be011dc6", + Revision: revision, + Size: &sz, + URL: fmt.Sprintf("http://source-controller.flux-system.svc.cluster.local./helmrepository/%s/%s/index-%s.yaml", repoNamespace, repoName, revision), }, Conditions: []metav1.Condition{ { - Type: "Ready", - Status: "True", - Reason: sourcev1.IndexationSucceededReason, + Type: fluxmeta.ReadyCondition, + Status: metav1.ConditionTrue, + Reason: fluxmeta.SucceededReason, + Message: fmt.Sprintf("stored artifact for revision '%s'", revision), + LastTransitionTime: metav1.Time{Time: lastTransitionTime}, + ObservedGeneration: 1, }, }, URL: ts.URL, diff --git a/cmd/kubeapps-apis/plugins/fluxv2/packages/v1alpha1/server.go b/cmd/kubeapps-apis/plugins/fluxv2/packages/v1alpha1/server.go index 14ce4715b3e..315648c908f 100644 --- a/cmd/kubeapps-apis/plugins/fluxv2/packages/v1alpha1/server.go +++ b/cmd/kubeapps-apis/plugins/fluxv2/packages/v1alpha1/server.go @@ -9,7 +9,7 @@ import ( "reflect" helmv2 "github.com/fluxcd/helm-controller/api/v2beta1" - sourcev1 "github.com/fluxcd/source-controller/api/v1beta1" + sourcev1 "github.com/fluxcd/source-controller/api/v1beta2" authorizationv1 "k8s.io/api/authorization/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" diff --git a/cmd/kubeapps-apis/plugins/fluxv2/packages/v1alpha1/server_test.go b/cmd/kubeapps-apis/plugins/fluxv2/packages/v1alpha1/server_test.go index fb31411ef39..306670083b9 100644 --- a/cmd/kubeapps-apis/plugins/fluxv2/packages/v1alpha1/server_test.go +++ b/cmd/kubeapps-apis/plugins/fluxv2/packages/v1alpha1/server_test.go @@ -10,7 +10,8 @@ import ( "testing" "time" - sourcev1 "github.com/fluxcd/source-controller/api/v1beta1" + fluxmeta "github.com/fluxcd/pkg/apis/meta" + sourcev1 "github.com/fluxcd/source-controller/api/v1beta2" redismock "github.com/go-redis/redismock/v8" corev1 "github.com/kubeapps/kubeapps/cmd/kubeapps-apis/gen/core/packages/v1alpha1" "github.com/kubeapps/kubeapps/cmd/kubeapps-apis/plugins/fluxv2/packages/v1alpha1/cache" @@ -61,9 +62,9 @@ func TestGetAvailablePackagesStatus(t *testing.T) { &sourcev1.HelmRepositoryStatus{ Conditions: []metav1.Condition{ { - Type: "Ready", - Status: "False", - Reason: "IndexationFailed", + Type: fluxmeta.ReadyCondition, + Status: metav1.ConditionFalse, + Reason: fluxmeta.FailedReason, }, }, }), @@ -76,9 +77,9 @@ func TestGetAvailablePackagesStatus(t *testing.T) { &sourcev1.HelmRepositoryStatus{ Conditions: []metav1.Condition{ { - Type: "Ready", - Status: "True", - Reason: "IndexationSucceed", + Type: fluxmeta.ReadyCondition, + Status: metav1.ConditionTrue, + Reason: fluxmeta.SucceededReason, }, }, }), @@ -91,9 +92,9 @@ func TestGetAvailablePackagesStatus(t *testing.T) { &sourcev1.HelmRepositoryStatus{ Conditions: []metav1.Condition{ { - Type: "Ready", - Status: "True", - Reason: "IndexationSucceed", + Type: fluxmeta.ReadyCondition, + Status: metav1.ConditionTrue, + Reason: fluxmeta.SucceededReason, }, }, }), @@ -106,9 +107,9 @@ func TestGetAvailablePackagesStatus(t *testing.T) { &sourcev1.HelmRepositoryStatus{ Conditions: []metav1.Condition{ { - Type: "Ready", - Status: "True", - Reason: "IndexationSucceed", + Type: fluxmeta.ReadyCondition, + Status: metav1.ConditionTrue, + Reason: fluxmeta.SucceededReason, }, }, }), @@ -124,9 +125,9 @@ func TestGetAvailablePackagesStatus(t *testing.T) { &sourcev1.HelmRepositoryStatus{ Conditions: []metav1.Condition{ { - Type: "Ready", - Status: "True", - Reason: "IndexationSucceed", + Type: fluxmeta.ReadyCondition, + Status: metav1.ConditionTrue, + Reason: fluxmeta.SucceededReason, }, }, }), diff --git a/cmd/kubeapps-apis/plugins/fluxv2/packages/v1alpha1/test_util_test.go b/cmd/kubeapps-apis/plugins/fluxv2/packages/v1alpha1/test_util_test.go index b2aa8486f87..d82f3eab64d 100644 --- a/cmd/kubeapps-apis/plugins/fluxv2/packages/v1alpha1/test_util_test.go +++ b/cmd/kubeapps-apis/plugins/fluxv2/packages/v1alpha1/test_util_test.go @@ -13,7 +13,7 @@ import ( "testing" helmv2 "github.com/fluxcd/helm-controller/api/v2beta1" - sourcev1 "github.com/fluxcd/source-controller/api/v1beta1" + sourcev1 "github.com/fluxcd/source-controller/api/v1beta2" "github.com/google/go-cmp/cmp" corev1 "github.com/kubeapps/kubeapps/cmd/kubeapps-apis/gen/core/packages/v1alpha1" plugins "github.com/kubeapps/kubeapps/cmd/kubeapps-apis/gen/core/plugins/v1alpha1" @@ -366,7 +366,7 @@ var ( Conditions: []apiextv1.CustomResourceDefinitionCondition{ { Type: "Established", - Status: "True", + Status: apiextv1.ConditionStatus(metav1.ConditionTrue), }, }, }, diff --git a/go.mod b/go.mod index 277d5cb5e1b..7e3ac55735c 100644 --- a/go.mod +++ b/go.mod @@ -47,9 +47,9 @@ require ( github.com/cppforlife/go-cli-ui v0.0.0-20200716203538-1e47f820817f github.com/disintegration/imaging v1.6.2 github.com/distribution/distribution v2.8.1+incompatible - github.com/fluxcd/helm-controller/api v0.17.2 - github.com/fluxcd/pkg/apis/meta v0.10.2 - github.com/fluxcd/source-controller/api v0.21.2 + github.com/fluxcd/helm-controller/api v0.18.2 + github.com/fluxcd/pkg/apis/meta v0.12.1 + github.com/fluxcd/source-controller/api v0.22.4 github.com/go-redis/redis/v8 v8.11.5 github.com/go-redis/redismock/v8 v8.0.6 github.com/google/go-cmp v0.5.7 @@ -131,8 +131,7 @@ require ( github.com/fatih/camelcase v1.0.0 // indirect github.com/fatih/color v1.13.0 // indirect github.com/fluxcd/pkg/apis/acl v0.0.3 // indirect - github.com/fluxcd/pkg/apis/kustomize v0.3.1 // indirect - github.com/fluxcd/pkg/runtime v0.12.5 // indirect + github.com/fluxcd/pkg/apis/kustomize v0.3.2 // indirect github.com/fsnotify/fsnotify v1.5.1 // indirect github.com/fvbommel/sortorder v1.0.1 // indirect github.com/ghodss/yaml v1.0.0 // indirect diff --git a/go.sum b/go.sum index cf4caeb7cd2..7dc6f7b0248 100644 --- a/go.sum +++ b/go.sum @@ -573,18 +573,16 @@ github.com/fatih/color v1.13.0 h1:8LOYc1KYPPmyKMuN8QV2DNRWNbLo6LZ0iLs8+mlH53w= github.com/fatih/color v1.13.0/go.mod h1:kLAiJbzzSOZDVNGyDpeOxJ47H46qBXwg5ILebYFFOfk= github.com/felixge/httpsnoop v1.0.1 h1:lvB5Jl89CsZtGIWuTcDM1E/vkVs49/Ml7JJe07l8SPQ= github.com/felixge/httpsnoop v1.0.1/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= -github.com/fluxcd/helm-controller/api v0.17.2 h1:o/9BYA+DP5aC1o5ZT0Gfmtqraw6hGctaHTBjM6/3rls= -github.com/fluxcd/helm-controller/api v0.17.2/go.mod h1:ajkvxpv3mwzr/+H3iKpcnHW9qsOrIqNakalyGzQXduM= +github.com/fluxcd/helm-controller/api v0.18.2 h1:zXyu9q4B/J7ouOVl4nyxYHPVwhAs3bwWa4lgP7SQmfo= +github.com/fluxcd/helm-controller/api v0.18.2/go.mod h1:+P3I9VV/4IMryjj9BIGtdZnxdCQfBXExWTv8Z9DF33o= github.com/fluxcd/pkg/apis/acl v0.0.3 h1:Lw0ZHdpnO4G7Zy9KjrzwwBmDZQuy4qEjaU/RvA6k1lc= github.com/fluxcd/pkg/apis/acl v0.0.3/go.mod h1:XPts6lRJ9C9fIF9xVWofmQwftvhY25n1ps7W9xw0XLU= -github.com/fluxcd/pkg/apis/kustomize v0.3.1 h1:wmb5D9e1+Rr3/5O3235ERuj+h2VKUArVfYYk68QKP+w= -github.com/fluxcd/pkg/apis/kustomize v0.3.1/go.mod h1:k2HSRd68UwgNmOYBPOd6WbX6a2MH2X/Jeh7e3s3PFPc= -github.com/fluxcd/pkg/apis/meta v0.10.2 h1:pnDBBEvfs4HaKiVAYgz+e/AQ8dLvcgmVfSeBroZ/KKI= -github.com/fluxcd/pkg/apis/meta v0.10.2/go.mod h1:KQ2er9xa6koy7uoPMZjIjNudB5p4tXs+w0GO6fRcy7I= -github.com/fluxcd/pkg/runtime v0.12.5 h1:/8+0UBnSHbO9DVG9IFTjc37lwofsixGbs5WpHso8n5s= -github.com/fluxcd/pkg/runtime v0.12.5/go.mod h1:gspNvhAqodZgSmK1ZhMtvARBf/NGAlxmaZaIOHkJYsc= -github.com/fluxcd/source-controller/api v0.21.2 h1:J0S5NN4V8FPLrkSMXIUoUvj1X/RuTpVJSjIRF414wmc= -github.com/fluxcd/source-controller/api v0.21.2/go.mod h1:Ab2qDmAUz6ZCp8UaHYLYzxyFrC1FQqEqjxiROb/Rdiw= +github.com/fluxcd/pkg/apis/kustomize v0.3.2 h1:ULoAwOOekHf5cy6mYIwL+K6v8/cfcNVVbwfIPgWjdjg= +github.com/fluxcd/pkg/apis/kustomize v0.3.2/go.mod h1:p8iAH5TeqMBnnxkkpCNNDvWYfKlNRx89a6WKOo+hJHA= +github.com/fluxcd/pkg/apis/meta v0.12.1 h1:m5PfKAqbqWBvGp9+JRj1sv+xNkGsHwUVf+3rJ8wm6SE= +github.com/fluxcd/pkg/apis/meta v0.12.1/go.mod h1:f8YVt70/KAhqzZ7xxhjvqyzKubOYx2pAbakb/FfCEg8= +github.com/fluxcd/source-controller/api v0.22.4 h1:PJuZg6/9UN0GLhe2Mt8DJBNuC/t1BHvZAg79k7xPDcQ= +github.com/fluxcd/source-controller/api v0.22.4/go.mod h1:Vb13q9Pq+1IW/sJUZn/RSb7IU5WT86Er6uCFPCFm9L4= github.com/flynn/go-shlex v0.0.0-20150515145356-3f9db97f8568/go.mod h1:xEzjJPgXI435gkrCt3MPfRiAkVrwSbHsst4LCFVfpJc= github.com/fogleman/gg v1.2.1-0.20190220221249-0403632d5b90/go.mod h1:R/bRT+9gY/C5z7JzPU0zXsXHKM4/ayA+zqcVNZzPa1k= github.com/form3tech-oss/jwt-go v3.2.2+incompatible/go.mod h1:pbq4aXjuKjdthFRnoDwaVPLA+WlJuPGy+QneDUgJi2k= @@ -946,7 +944,6 @@ github.com/hashicorp/go-multierror v1.1.1/go.mod h1:iw975J/qwKPdAO1clOe2L8331t/9 github.com/hashicorp/go-retryablehttp v0.5.3/go.mod h1:9B5zBasrRhHXnJnui7y6sL7es7NDiJgTc6Er0maI1Xs= github.com/hashicorp/go-retryablehttp v0.6.4/go.mod h1:vAew36LZh98gCBJNLH42IQ1ER/9wtLZZ8meHqQvEYWY= github.com/hashicorp/go-retryablehttp v0.6.6/go.mod h1:vAew36LZh98gCBJNLH42IQ1ER/9wtLZZ8meHqQvEYWY= -github.com/hashicorp/go-retryablehttp v0.6.8/go.mod h1:vAew36LZh98gCBJNLH42IQ1ER/9wtLZZ8meHqQvEYWY= github.com/hashicorp/go-rootcerts v1.0.0/go.mod h1:K6zTfqpRlCUIjkwsN4Z+hiSfzSTQa6eBIzfwKfwNnHU= github.com/hashicorp/go-rootcerts v1.0.2/go.mod h1:pqUvnprVnM5bf7AOirdbb01K4ccR319Vf4pU3K5EGc8= github.com/hashicorp/go-sockaddr v1.0.0/go.mod h1:7Xibr9yA9JjQq1JpNB2Vw7kxv8xerXegt+ozgdvDeDU= @@ -2572,7 +2569,6 @@ sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.0.22/go.mod h1:LEScyz sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.0.27/go.mod h1:tq2nT0Kx7W+/f2JVE+zxYtUhdjuELJkVpNz+x/QN5R4= sigs.k8s.io/controller-runtime v0.7.0/go.mod h1:pJ3YBrJiAqMAZKi6UVGuE98ZrroV1p+pIhoHsMm9wdU= sigs.k8s.io/controller-runtime v0.10.3/go.mod h1:CQp8eyUQZ/Q7PJvnIrB6/hgfTC1kBkGylwsLgOQi1WY= -sigs.k8s.io/controller-runtime v0.11.0/go.mod h1:KKwLiTooNGu+JmLZGn9Sl3Gjmfj66eMbCQznLP5zcqA= sigs.k8s.io/controller-runtime v0.11.1 h1:7YIHT2QnHJArj/dk9aUkYhfqfK5cIxPOX5gPECfdZLU= sigs.k8s.io/controller-runtime v0.11.1/go.mod h1:KKwLiTooNGu+JmLZGn9Sl3Gjmfj66eMbCQznLP5zcqA= sigs.k8s.io/controller-tools v0.4.1/go.mod h1:G9rHdZMVlBDocIxGkK3jHLWqcTMNvveypYJwrvYKjWU= diff --git a/script/makefiles/deploy-dev.mk b/script/makefiles/deploy-dev.mk index 2c668d0d4d4..cc4417ff52f 100644 --- a/script/makefiles/deploy-dev.mk +++ b/script/makefiles/deploy-dev.mk @@ -61,7 +61,7 @@ deploy-kapp-controller: # Add the flux controllers used for testing the kubeapps-apis integration. deploy-flux-controllers: - kubectl --kubeconfig=${CLUSTER_CONFIG} apply -f https://github.com/fluxcd/flux2/releases/download/v0.27.4/install.yaml + kubectl --kubeconfig=${CLUSTER_CONFIG} apply -f https://github.com/fluxcd/flux2/releases/download/v0.28.4/install.yaml reset-dev: helm --kubeconfig=${CLUSTER_CONFIG} -n kubeapps delete kubeapps || true