From b28b5dd9b9cbbcfb4c771c84a58de78ceda8a9e9 Mon Sep 17 00:00:00 2001 From: Sunny Date: Fri, 13 Oct 2023 20:40:34 +0000 Subject: [PATCH 1/3] non-reconciliable & readiness of static objects Remove reconcile subcommand for static object APIs Alerts and Providers. Add a isStatic() method on all the object adapters to determine if they are static and don't have reconciler. The objects that don't have reconcilers are skipped from reconciliation and readiness checks like HelmRepository of type OCI. Add default ready message for `get` subcommand output for static objects, Alerts, Providers and HelmRepositories of type OCI, as ready message can't be derived for them from their status. Signed-off-by: Sunny --- cmd/flux/create_alert.go | 2 +- cmd/flux/create_alertprovider.go | 2 +- cmd/flux/create_source_helm.go | 8 +++-- cmd/flux/get_alert.go | 3 +- cmd/flux/get_alertprovider.go | 3 +- cmd/flux/get_source_helm.go | 8 ++++- cmd/flux/reconcile.go | 6 ++++ cmd/flux/reconcile_alert.go | 44 -------------------------- cmd/flux/reconcile_alertprovider.go | 44 -------------------------- cmd/flux/reconcile_helmrelease.go | 4 +++ cmd/flux/reconcile_image_repository.go | 4 +++ cmd/flux/reconcile_image_updateauto.go | 4 +++ cmd/flux/reconcile_kustomization.go | 4 +++ cmd/flux/reconcile_receiver.go | 4 +++ cmd/flux/reconcile_source_bucket.go | 4 +++ cmd/flux/reconcile_source_chart.go | 4 +++ cmd/flux/reconcile_source_git.go | 4 +++ cmd/flux/reconcile_source_helm.go | 4 +++ cmd/flux/reconcile_source_oci.go | 4 +++ cmd/flux/resume.go | 9 ++++-- cmd/flux/resume_alert.go | 4 +++ cmd/flux/resume_alertprovider.go | 4 +++ 22 files changed, 80 insertions(+), 97 deletions(-) delete mode 100644 cmd/flux/reconcile_alert.go delete mode 100644 cmd/flux/reconcile_alertprovider.go diff --git a/cmd/flux/create_alert.go b/cmd/flux/create_alert.go index 22a5d28975..e750d44fd2 100644 --- a/cmd/flux/create_alert.go +++ b/cmd/flux/create_alert.go @@ -132,7 +132,7 @@ func createAlertCmdRun(cmd *cobra.Command, args []string) error { logger.Waitingf("waiting for Alert reconciliation") if err := wait.PollUntilContextTimeout(ctx, rootArgs.pollInterval, rootArgs.timeout, true, - isObjectReadyConditionFunc(kubeClient, namespacedName, &alert)); err != nil { + isStaticObjectReadyConditionFunc(kubeClient, namespacedName, &alert)); err != nil { return err } logger.Successf("Alert %s is ready", name) diff --git a/cmd/flux/create_alertprovider.go b/cmd/flux/create_alertprovider.go index 468ec5d88d..402ff0c4f1 100644 --- a/cmd/flux/create_alertprovider.go +++ b/cmd/flux/create_alertprovider.go @@ -127,7 +127,7 @@ func createAlertProviderCmdRun(cmd *cobra.Command, args []string) error { logger.Waitingf("waiting for Provider reconciliation") if err := wait.PollUntilContextTimeout(ctx, rootArgs.pollInterval, rootArgs.timeout, true, - isObjectReadyConditionFunc(kubeClient, namespacedName, &provider)); err != nil { + isStaticObjectReadyConditionFunc(kubeClient, namespacedName, &provider)); err != nil { return err } diff --git a/cmd/flux/create_source_helm.go b/cmd/flux/create_source_helm.go index 5b46f45ea1..522e980fe7 100644 --- a/cmd/flux/create_source_helm.go +++ b/cmd/flux/create_source_helm.go @@ -230,8 +230,12 @@ func createSourceHelmCmdRun(cmd *cobra.Command, args []string) error { } logger.Waitingf("waiting for HelmRepository source reconciliation") - if err := wait.PollUntilContextTimeout(ctx, rootArgs.pollInterval, rootArgs.timeout, true, - isObjectReadyConditionFunc(kubeClient, namespacedName, helmRepository)); err != nil { + readyConditionFunc := isObjectReadyConditionFunc(kubeClient, namespacedName, helmRepository) + if helmRepository.Spec.Type == sourcev1.HelmRepositoryTypeOCI { + // HelmRepository type OCI is a static object. + readyConditionFunc = isStaticObjectReadyConditionFunc(kubeClient, namespacedName, helmRepository) + } + if err := wait.PollUntilContextTimeout(ctx, rootArgs.pollInterval, rootArgs.timeout, true, readyConditionFunc); err != nil { return err } logger.Successf("HelmRepository source reconciliation completed") diff --git a/cmd/flux/get_alert.go b/cmd/flux/get_alert.go index 9ea6c682f1..760423c3b7 100644 --- a/cmd/flux/get_alert.go +++ b/cmd/flux/get_alert.go @@ -23,6 +23,7 @@ import ( "github.com/spf13/cobra" "golang.org/x/text/cases" "golang.org/x/text/language" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" notificationv1 "github.com/fluxcd/notification-controller/api/v1beta2" @@ -77,7 +78,7 @@ func init() { func (s alertListAdapter) summariseItem(i int, includeNamespace bool, includeKind bool) []string { item := s.Items[i] - status, msg := statusAndMessage(item.Status.Conditions) + status, msg := string(metav1.ConditionTrue), "Alert is Ready" return append(nameColumns(&item, includeNamespace, includeKind), cases.Title(language.English).String(strconv.FormatBool(item.Spec.Suspend)), status, msg) } diff --git a/cmd/flux/get_alertprovider.go b/cmd/flux/get_alertprovider.go index 983cbf3362..a4c3bca6c0 100644 --- a/cmd/flux/get_alertprovider.go +++ b/cmd/flux/get_alertprovider.go @@ -20,6 +20,7 @@ import ( "fmt" "github.com/spf13/cobra" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" notificationv1 "github.com/fluxcd/notification-controller/api/v1beta2" @@ -74,7 +75,7 @@ func init() { func (s alertProviderListAdapter) summariseItem(i int, includeNamespace bool, includeKind bool) []string { item := s.Items[i] - status, msg := statusAndMessage(item.Status.Conditions) + status, msg := string(metav1.ConditionTrue), "Provider is Ready" return append(nameColumns(&item, includeNamespace, includeKind), status, msg) } diff --git a/cmd/flux/get_source_helm.go b/cmd/flux/get_source_helm.go index 173a18803b..ec131714ab 100644 --- a/cmd/flux/get_source_helm.go +++ b/cmd/flux/get_source_helm.go @@ -23,6 +23,7 @@ import ( "github.com/spf13/cobra" "golang.org/x/text/cases" "golang.org/x/text/language" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" sourcev1 "github.com/fluxcd/source-controller/api/v1beta2" @@ -82,7 +83,12 @@ func (a *helmRepositoryListAdapter) summariseItem(i int, includeNamespace bool, if item.GetArtifact() != nil { revision = item.GetArtifact().Revision } - status, msg := statusAndMessage(item.Status.Conditions) + var status, msg string + if item.Spec.Type == sourcev1.HelmRepositoryTypeOCI { + status, msg = string(metav1.ConditionTrue), "Helm repository is Ready" + } else { + status, msg = statusAndMessage(item.Status.Conditions) + } revision = utils.TruncateHex(revision) msg = utils.TruncateHex(msg) return append(nameColumns(&item, includeNamespace, includeKind), diff --git a/cmd/flux/reconcile.go b/cmd/flux/reconcile.go index 7589dcb966..c6c7a4720f 100644 --- a/cmd/flux/reconcile.go +++ b/cmd/flux/reconcile.go @@ -60,6 +60,7 @@ type reconcilable interface { GetAnnotations() map[string]string SetAnnotations(map[string]string) + isStatic() bool // is it a static object that does not have a reconciler? lastHandledReconcileRequest() string // what was the last handled reconcile request? successMessage() string // what do you want to tell people when successfully reconciled? } @@ -100,6 +101,11 @@ func (reconcile reconcileCommand) run(cmd *cobra.Command, args []string) error { return err } + if reconcile.object.isStatic() { + logger.Successf("reconciliation not supported by the object") + return nil + } + if reconcile.object.isSuspended() { return fmt.Errorf("resource is suspended") } diff --git a/cmd/flux/reconcile_alert.go b/cmd/flux/reconcile_alert.go deleted file mode 100644 index 8dd8be6132..0000000000 --- a/cmd/flux/reconcile_alert.go +++ /dev/null @@ -1,44 +0,0 @@ -/* -Copyright 2020 The Flux authors - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package main - -import ( - "github.com/spf13/cobra" - - notificationv1 "github.com/fluxcd/notification-controller/api/v1beta2" -) - -var reconcileAlertCmd = &cobra.Command{ - Use: "alert [name]", - Short: "Reconcile an Alert", - Long: `The reconcile alert command triggers a reconciliation of an Alert resource and waits for it to finish.`, - Example: ` # Trigger a reconciliation for an existing alert - flux reconcile alert main`, - ValidArgsFunction: resourceNamesCompletionFunc(notificationv1.GroupVersion.WithKind(notificationv1.AlertKind)), - RunE: reconcileCommand{ - apiType: alertType, - object: alertAdapter{¬ificationv1.Alert{}}, - }.run, -} - -func init() { - reconcileCmd.AddCommand(reconcileAlertCmd) -} - -func (obj alertAdapter) lastHandledReconcileRequest() string { - return obj.Status.GetLastHandledReconcileRequest() -} diff --git a/cmd/flux/reconcile_alertprovider.go b/cmd/flux/reconcile_alertprovider.go deleted file mode 100644 index 5c3001af1a..0000000000 --- a/cmd/flux/reconcile_alertprovider.go +++ /dev/null @@ -1,44 +0,0 @@ -/* -Copyright 2020 The Flux authors - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package main - -import ( - "github.com/spf13/cobra" - - notificationv1 "github.com/fluxcd/notification-controller/api/v1beta2" -) - -var reconcileAlertProviderCmd = &cobra.Command{ - Use: "alert-provider [name]", - Short: "Reconcile a Provider", - Long: `The reconcile alert-provider command triggers a reconciliation of a Provider resource and waits for it to finish.`, - Example: ` # Trigger a reconciliation for an existing provider - flux reconcile alert-provider slack`, - ValidArgsFunction: resourceNamesCompletionFunc(notificationv1.GroupVersion.WithKind(notificationv1.ProviderKind)), - RunE: reconcileCommand{ - apiType: alertProviderType, - object: alertProviderAdapter{¬ificationv1.Provider{}}, - }.run, -} - -func init() { - reconcileCmd.AddCommand(reconcileAlertProviderCmd) -} - -func (obj alertProviderAdapter) lastHandledReconcileRequest() string { - return obj.Status.GetLastHandledReconcileRequest() -} diff --git a/cmd/flux/reconcile_helmrelease.go b/cmd/flux/reconcile_helmrelease.go index b015aa8b2d..b55a12954d 100644 --- a/cmd/flux/reconcile_helmrelease.go +++ b/cmd/flux/reconcile_helmrelease.go @@ -81,3 +81,7 @@ func (obj helmReleaseAdapter) getSource() (reconcileSource, types.NamespacedName Namespace: ns, } } + +func (obj helmReleaseAdapter) isStatic() bool { + return false +} diff --git a/cmd/flux/reconcile_image_repository.go b/cmd/flux/reconcile_image_repository.go index c7304eb7b1..6a386c8b54 100644 --- a/cmd/flux/reconcile_image_repository.go +++ b/cmd/flux/reconcile_image_repository.go @@ -48,3 +48,7 @@ func (obj imageRepositoryAdapter) lastHandledReconcileRequest() string { func (obj imageRepositoryAdapter) successMessage() string { return fmt.Sprintf("scan fetched %d tags", obj.Status.LastScanResult.TagCount) } + +func (obj imageRepositoryAdapter) isStatic() bool { + return false +} diff --git a/cmd/flux/reconcile_image_updateauto.go b/cmd/flux/reconcile_image_updateauto.go index 2db4a1c020..95bb42df17 100644 --- a/cmd/flux/reconcile_image_updateauto.go +++ b/cmd/flux/reconcile_image_updateauto.go @@ -56,3 +56,7 @@ func (obj imageUpdateAutomationAdapter) successMessage() string { } return "automation not yet run" } + +func (obj imageUpdateAutomationAdapter) isStatic() bool { + return false +} diff --git a/cmd/flux/reconcile_kustomization.go b/cmd/flux/reconcile_kustomization.go index 99d1254512..7a18ec0264 100644 --- a/cmd/flux/reconcile_kustomization.go +++ b/cmd/flux/reconcile_kustomization.go @@ -88,3 +88,7 @@ func (obj kustomizationAdapter) getSource() (reconcileSource, types.NamespacedNa Namespace: obj.Spec.SourceRef.Namespace, } } + +func (obj kustomizationAdapter) isStatic() bool { + return false +} diff --git a/cmd/flux/reconcile_receiver.go b/cmd/flux/reconcile_receiver.go index 42a2dd24ab..1691a95da9 100644 --- a/cmd/flux/reconcile_receiver.go +++ b/cmd/flux/reconcile_receiver.go @@ -42,3 +42,7 @@ func init() { func (obj receiverAdapter) lastHandledReconcileRequest() string { return obj.Status.GetLastHandledReconcileRequest() } + +func (obj receiverAdapter) isStatic() bool { + return false +} diff --git a/cmd/flux/reconcile_source_bucket.go b/cmd/flux/reconcile_source_bucket.go index 2a2bbdbc71..68079a666e 100644 --- a/cmd/flux/reconcile_source_bucket.go +++ b/cmd/flux/reconcile_source_bucket.go @@ -48,3 +48,7 @@ func (obj bucketAdapter) lastHandledReconcileRequest() string { func (obj bucketAdapter) successMessage() string { return fmt.Sprintf("fetched revision %s", obj.Status.Artifact.Revision) } + +func (obj bucketAdapter) isStatic() bool { + return false +} diff --git a/cmd/flux/reconcile_source_chart.go b/cmd/flux/reconcile_source_chart.go index 4154061780..ead4fa7663 100644 --- a/cmd/flux/reconcile_source_chart.go +++ b/cmd/flux/reconcile_source_chart.go @@ -84,3 +84,7 @@ func (obj helmChartAdapter) getSource() (reconcileSource, types.NamespacedName) Namespace: obj.Namespace, } } + +func (obj helmChartAdapter) isStatic() bool { + return false +} diff --git a/cmd/flux/reconcile_source_git.go b/cmd/flux/reconcile_source_git.go index a42cd7b959..282564961a 100644 --- a/cmd/flux/reconcile_source_git.go +++ b/cmd/flux/reconcile_source_git.go @@ -48,3 +48,7 @@ func (obj gitRepositoryAdapter) lastHandledReconcileRequest() string { func (obj gitRepositoryAdapter) successMessage() string { return fmt.Sprintf("fetched revision %s", obj.Status.Artifact.Revision) } + +func (obj gitRepositoryAdapter) isStatic() bool { + return false +} diff --git a/cmd/flux/reconcile_source_helm.go b/cmd/flux/reconcile_source_helm.go index f559a5e4c8..a081fd0e88 100644 --- a/cmd/flux/reconcile_source_helm.go +++ b/cmd/flux/reconcile_source_helm.go @@ -60,3 +60,7 @@ func (obj helmRepositoryAdapter) successMessage() string { } return fmt.Sprintf("fetched revision %s", obj.Status.Artifact.Revision) } + +func (obj helmRepositoryAdapter) isStatic() bool { + return obj.Spec.Type == sourcev1.HelmRepositoryTypeOCI +} diff --git a/cmd/flux/reconcile_source_oci.go b/cmd/flux/reconcile_source_oci.go index ffc649f9b3..52237f2f22 100644 --- a/cmd/flux/reconcile_source_oci.go +++ b/cmd/flux/reconcile_source_oci.go @@ -48,3 +48,7 @@ func (obj ociRepositoryAdapter) lastHandledReconcileRequest() string { func (obj ociRepositoryAdapter) successMessage() string { return fmt.Sprintf("fetched revision %s", obj.Status.Artifact.Revision) } + +func (obj ociRepositoryAdapter) isStatic() bool { + return false +} diff --git a/cmd/flux/resume.go b/cmd/flux/resume.go index 4cb700a27a..5f3c8b8145 100644 --- a/cmd/flux/resume.go +++ b/cmd/flux/resume.go @@ -56,6 +56,7 @@ type resumable interface { copyable statusable setUnsuspended() + isStatic() bool successMessage() string } @@ -212,8 +213,12 @@ func (resume resumeCommand) reconcile(ctx context.Context, res resumable) reconc logger.Waitingf("waiting for %s reconciliation", resume.kind) - if err := wait.PollUntilContextTimeout(ctx, rootArgs.pollInterval, rootArgs.timeout, true, - isObjectReadyConditionFunc(resume.client, namespacedName, res.asClientObject())); err != nil { + readyConditionFunc := isObjectReadyConditionFunc(resume.client, namespacedName, res.asClientObject()) + if res.isStatic() { + readyConditionFunc = isStaticObjectReadyConditionFunc(resume.client, namespacedName, res.asClientObject()) + } + + if err := wait.PollUntilContextTimeout(ctx, rootArgs.pollInterval, rootArgs.timeout, true, readyConditionFunc); err != nil { return reconcileResponse{ resumable: res, err: err, diff --git a/cmd/flux/resume_alert.go b/cmd/flux/resume_alert.go index 713aebb38a..0b72b059fe 100644 --- a/cmd/flux/resume_alert.go +++ b/cmd/flux/resume_alert.go @@ -55,6 +55,10 @@ func (obj alertAdapter) successMessage() string { return "Alert reconciliation completed" } +func (a alertAdapter) isStatic() bool { + return true +} + func (a alertListAdapter) resumeItem(i int) resumable { return &alertAdapter{&a.AlertList.Items[i]} } diff --git a/cmd/flux/resume_alertprovider.go b/cmd/flux/resume_alertprovider.go index e0ba49b93b..40427c502e 100644 --- a/cmd/flux/resume_alertprovider.go +++ b/cmd/flux/resume_alertprovider.go @@ -55,6 +55,10 @@ func (obj alertProviderAdapter) successMessage() string { return "Provider reconciliation completed" } +func (a alertProviderAdapter) isStatic() bool { + return true +} + func (a alertProviderListAdapter) resumeItem(i int) resumable { return &alertProviderAdapter{&a.ProviderList.Items[i]} } From e901e8b6f8f740233fac01fd00b972d0a58a4df6 Mon Sep 17 00:00:00 2001 From: Sunny Date: Fri, 8 Dec 2023 14:14:25 +0000 Subject: [PATCH 2/3] Update all the references of NC v1beta2 to v1beta3 Signed-off-by: Sunny --- cmd/flux/alert.go | 2 +- cmd/flux/alert_provider.go | 2 +- cmd/flux/create_alert.go | 10 ++-- cmd/flux/create_alertprovider.go | 2 +- cmd/flux/delete_alert.go | 2 +- cmd/flux/delete_alertprovider.go | 2 +- cmd/flux/events.go | 10 ++-- cmd/flux/events_test.go | 4 +- cmd/flux/export_alert.go | 2 +- cmd/flux/export_alertprovider.go | 2 +- cmd/flux/get_alert.go | 5 +- cmd/flux/get_alertprovider.go | 5 +- cmd/flux/get_all.go | 6 +-- cmd/flux/main_test.go | 4 +- cmd/flux/resume_alert.go | 4 +- cmd/flux/resume_alertprovider.go | 4 +- cmd/flux/stats.go | 14 +++--- cmd/flux/suspend_alert.go | 2 +- cmd/flux/suspend_alertprovider.go | 2 +- cmd/flux/testdata/export/alert.yaml | 2 +- cmd/flux/testdata/export/objects.yaml | 4 +- cmd/flux/testdata/export/provider.yaml | 2 +- go.mod | 28 ++++++------ go.sum | 58 ++++++++++++------------ internal/utils/utils.go | 4 +- pkg/uninstall/uninstall.go | 6 +-- tests/azure/azure_test.go | 18 ++++---- tests/azure/go.mod | 6 +-- tests/azure/go.sum | 12 ++--- tests/azure/util_test.go | 4 +- tests/integration/azure_specific_test.go | 10 ++-- tests/integration/go.mod | 6 +-- tests/integration/go.sum | 12 ++--- tests/integration/notification_test.go | 14 +++--- tests/integration/suite_test.go | 4 +- 35 files changed, 138 insertions(+), 136 deletions(-) diff --git a/cmd/flux/alert.go b/cmd/flux/alert.go index 366a9a4af0..16310e3a82 100644 --- a/cmd/flux/alert.go +++ b/cmd/flux/alert.go @@ -19,7 +19,7 @@ package main import ( "sigs.k8s.io/controller-runtime/pkg/client" - notificationv1 "github.com/fluxcd/notification-controller/api/v1beta2" + notificationv1 "github.com/fluxcd/notification-controller/api/v1beta3" ) // notificationv1.Alert diff --git a/cmd/flux/alert_provider.go b/cmd/flux/alert_provider.go index 3ee071cef1..c370a5c038 100644 --- a/cmd/flux/alert_provider.go +++ b/cmd/flux/alert_provider.go @@ -19,7 +19,7 @@ package main import ( "sigs.k8s.io/controller-runtime/pkg/client" - notificationv1 "github.com/fluxcd/notification-controller/api/v1beta2" + notificationv1 "github.com/fluxcd/notification-controller/api/v1beta3" ) // notificationv1.Provider diff --git a/cmd/flux/create_alert.go b/cmd/flux/create_alert.go index e750d44fd2..80c8beee5b 100644 --- a/cmd/flux/create_alert.go +++ b/cmd/flux/create_alert.go @@ -28,7 +28,7 @@ import ( "sigs.k8s.io/controller-runtime/pkg/client" notificationv1 "github.com/fluxcd/notification-controller/api/v1" - notificationv1b2 "github.com/fluxcd/notification-controller/api/v1beta2" + notificationv1b3 "github.com/fluxcd/notification-controller/api/v1beta3" "github.com/fluxcd/pkg/apis/meta" "github.com/fluxcd/flux2/v2/internal/utils" @@ -96,13 +96,13 @@ func createAlertCmdRun(cmd *cobra.Command, args []string) error { logger.Generatef("generating Alert") } - alert := notificationv1b2.Alert{ + alert := notificationv1b3.Alert{ ObjectMeta: metav1.ObjectMeta{ Name: name, Namespace: *kubeconfigArgs.Namespace, Labels: sourceLabels, }, - Spec: notificationv1b2.AlertSpec{ + Spec: notificationv1b3.AlertSpec{ ProviderRef: meta.LocalObjectReference{ Name: alertArgs.providerRef, }, @@ -140,13 +140,13 @@ func createAlertCmdRun(cmd *cobra.Command, args []string) error { } func upsertAlert(ctx context.Context, kubeClient client.Client, - alert *notificationv1b2.Alert) (types.NamespacedName, error) { + alert *notificationv1b3.Alert) (types.NamespacedName, error) { namespacedName := types.NamespacedName{ Namespace: alert.GetNamespace(), Name: alert.GetName(), } - var existing notificationv1b2.Alert + var existing notificationv1b3.Alert err := kubeClient.Get(ctx, namespacedName, &existing) if err != nil { if errors.IsNotFound(err) { diff --git a/cmd/flux/create_alertprovider.go b/cmd/flux/create_alertprovider.go index 402ff0c4f1..89a8e28971 100644 --- a/cmd/flux/create_alertprovider.go +++ b/cmd/flux/create_alertprovider.go @@ -27,7 +27,7 @@ import ( "k8s.io/apimachinery/pkg/util/wait" "sigs.k8s.io/controller-runtime/pkg/client" - notificationv1 "github.com/fluxcd/notification-controller/api/v1beta2" + notificationv1 "github.com/fluxcd/notification-controller/api/v1beta3" "github.com/fluxcd/pkg/apis/meta" "github.com/fluxcd/flux2/v2/internal/utils" diff --git a/cmd/flux/delete_alert.go b/cmd/flux/delete_alert.go index f0c8ee58dc..cda9f04d2a 100644 --- a/cmd/flux/delete_alert.go +++ b/cmd/flux/delete_alert.go @@ -19,7 +19,7 @@ package main import ( "github.com/spf13/cobra" - notificationv1 "github.com/fluxcd/notification-controller/api/v1beta2" + notificationv1 "github.com/fluxcd/notification-controller/api/v1beta3" ) var deleteAlertCmd = &cobra.Command{ diff --git a/cmd/flux/delete_alertprovider.go b/cmd/flux/delete_alertprovider.go index 871f42a65d..73a54b2a1b 100644 --- a/cmd/flux/delete_alertprovider.go +++ b/cmd/flux/delete_alertprovider.go @@ -19,7 +19,7 @@ package main import ( "github.com/spf13/cobra" - notificationv1 "github.com/fluxcd/notification-controller/api/v1beta2" + notificationv1 "github.com/fluxcd/notification-controller/api/v1beta3" ) var deleteAlertProviderCmd = &cobra.Command{ diff --git a/cmd/flux/events.go b/cmd/flux/events.go index 51c3bb7c79..cf85c3f5fd 100644 --- a/cmd/flux/events.go +++ b/cmd/flux/events.go @@ -44,7 +44,7 @@ import ( imagev1 "github.com/fluxcd/image-reflector-controller/api/v1beta2" kustomizev1 "github.com/fluxcd/kustomize-controller/api/v1" notificationv1 "github.com/fluxcd/notification-controller/api/v1" - notificationv1b2 "github.com/fluxcd/notification-controller/api/v1beta2" + notificationv1b3 "github.com/fluxcd/notification-controller/api/v1beta3" sourcev1 "github.com/fluxcd/source-controller/api/v1" sourcev1b2 "github.com/fluxcd/source-controller/api/v1beta2" @@ -426,14 +426,14 @@ var fluxKindMap = refMap{ }, field: []string{"spec", "chart", "spec", "sourceRef"}, }, - notificationv1b2.AlertKind: { - gvk: notificationv1b2.GroupVersion.WithKind(notificationv1b2.AlertKind), - kind: notificationv1b2.ProviderKind, + notificationv1b3.AlertKind: { + gvk: notificationv1b3.GroupVersion.WithKind(notificationv1b3.AlertKind), + kind: notificationv1b3.ProviderKind, crossNamespaced: false, field: []string{"spec", "providerRef"}, }, notificationv1.ReceiverKind: {gvk: notificationv1.GroupVersion.WithKind(notificationv1.ReceiverKind)}, - notificationv1b2.ProviderKind: {gvk: notificationv1b2.GroupVersion.WithKind(notificationv1b2.ProviderKind)}, + notificationv1b3.ProviderKind: {gvk: notificationv1b3.GroupVersion.WithKind(notificationv1b3.ProviderKind)}, imagev1.ImagePolicyKind: { gvk: imagev1.GroupVersion.WithKind(imagev1.ImagePolicyKind), kind: imagev1.ImageRepositoryKind, diff --git a/cmd/flux/events_test.go b/cmd/flux/events_test.go index 7737f7c40a..0c208d1ef4 100644 --- a/cmd/flux/events_test.go +++ b/cmd/flux/events_test.go @@ -118,7 +118,7 @@ spec: name: podinfo-chart version: '*' --- -apiVersion: notification.toolkit.fluxcd.io/v1beta2 +apiVersion: notification.toolkit.fluxcd.io/v1beta3 kind: Alert metadata: name: webapp @@ -131,7 +131,7 @@ spec: providerRef: name: slack --- -apiVersion: notification.toolkit.fluxcd.io/v1beta2 +apiVersion: notification.toolkit.fluxcd.io/v1beta3 kind: Provider metadata: name: slack diff --git a/cmd/flux/export_alert.go b/cmd/flux/export_alert.go index 63f9f59f1c..2f15871149 100644 --- a/cmd/flux/export_alert.go +++ b/cmd/flux/export_alert.go @@ -20,7 +20,7 @@ import ( "github.com/spf13/cobra" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - notificationv1 "github.com/fluxcd/notification-controller/api/v1beta2" + notificationv1 "github.com/fluxcd/notification-controller/api/v1beta3" ) var exportAlertCmd = &cobra.Command{ diff --git a/cmd/flux/export_alertprovider.go b/cmd/flux/export_alertprovider.go index 782648cab4..e4c3ab9aa6 100644 --- a/cmd/flux/export_alertprovider.go +++ b/cmd/flux/export_alertprovider.go @@ -20,7 +20,7 @@ import ( "github.com/spf13/cobra" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - notificationv1 "github.com/fluxcd/notification-controller/api/v1beta2" + notificationv1 "github.com/fluxcd/notification-controller/api/v1beta3" ) var exportAlertProviderCmd = &cobra.Command{ diff --git a/cmd/flux/get_alert.go b/cmd/flux/get_alert.go index 760423c3b7..54b2afe6be 100644 --- a/cmd/flux/get_alert.go +++ b/cmd/flux/get_alert.go @@ -26,7 +26,7 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" - notificationv1 "github.com/fluxcd/notification-controller/api/v1beta2" + notificationv1 "github.com/fluxcd/notification-controller/api/v1beta3" ) var getAlertCmd = &cobra.Command{ @@ -92,6 +92,5 @@ func (s alertListAdapter) headers(includeNamespace bool) []string { } func (s alertListAdapter) statusSelectorMatches(i int, conditionType, conditionStatus string) bool { - item := s.Items[i] - return statusMatches(conditionType, conditionStatus, item.Status.Conditions) + return false } diff --git a/cmd/flux/get_alertprovider.go b/cmd/flux/get_alertprovider.go index a4c3bca6c0..11d50cb30a 100644 --- a/cmd/flux/get_alertprovider.go +++ b/cmd/flux/get_alertprovider.go @@ -23,7 +23,7 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" - notificationv1 "github.com/fluxcd/notification-controller/api/v1beta2" + notificationv1 "github.com/fluxcd/notification-controller/api/v1beta3" ) var getAlertProviderCmd = &cobra.Command{ @@ -88,6 +88,5 @@ func (s alertProviderListAdapter) headers(includeNamespace bool) []string { } func (s alertProviderListAdapter) statusSelectorMatches(i int, conditionType, conditionStatus string) bool { - item := s.Items[i] - return statusMatches(conditionType, conditionStatus, item.Status.Conditions) + return false } diff --git a/cmd/flux/get_all.go b/cmd/flux/get_all.go index f868b83344..27bbcfe4ea 100644 --- a/cmd/flux/get_all.go +++ b/cmd/flux/get_all.go @@ -24,7 +24,7 @@ import ( helmv2 "github.com/fluxcd/helm-controller/api/v2beta1" kustomizev1 "github.com/fluxcd/kustomize-controller/api/v1" notificationv1 "github.com/fluxcd/notification-controller/api/v1" - notificationv1b2 "github.com/fluxcd/notification-controller/api/v1beta2" + notificationv1b3 "github.com/fluxcd/notification-controller/api/v1beta3" ) var getAllCmd = &cobra.Command{ @@ -63,11 +63,11 @@ var getAllCmd = &cobra.Command{ }, { apiType: alertProviderType, - list: alertProviderListAdapter{¬ificationv1b2.ProviderList{}}, + list: alertProviderListAdapter{¬ificationv1b3.ProviderList{}}, }, { apiType: alertType, - list: &alertListAdapter{¬ificationv1b2.AlertList{}}, + list: &alertListAdapter{¬ificationv1b3.AlertList{}}, }, } diff --git a/cmd/flux/main_test.go b/cmd/flux/main_test.go index 2859d963b0..d2f9622e8b 100644 --- a/cmd/flux/main_test.go +++ b/cmd/flux/main_test.go @@ -34,6 +34,7 @@ import ( "github.com/fluxcd/flux2/v2/internal/utils" "github.com/google/go-cmp/cmp" "github.com/mattn/go-shellwords" + "k8s.io/apimachinery/pkg/api/errors" "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" k8syaml "k8s.io/apimachinery/pkg/util/yaml" "k8s.io/client-go/tools/clientcmd" @@ -112,7 +113,8 @@ func (m *testEnvKubeManager) CreateObjects(clientObjects []*unstructured.Unstruc } obj.SetResourceVersion(createObj.GetResourceVersion()) err = m.client.Status().Update(context.Background(), obj) - if err != nil { + // Updating status of static objects results in not found error. + if err != nil && !errors.IsNotFound(err) { return err } } diff --git a/cmd/flux/resume_alert.go b/cmd/flux/resume_alert.go index 0b72b059fe..a33d4f5b0e 100644 --- a/cmd/flux/resume_alert.go +++ b/cmd/flux/resume_alert.go @@ -19,7 +19,7 @@ package main import ( "github.com/spf13/cobra" - notificationv1 "github.com/fluxcd/notification-controller/api/v1beta2" + notificationv1 "github.com/fluxcd/notification-controller/api/v1beta3" ) var resumeAlertCmd = &cobra.Command{ @@ -44,7 +44,7 @@ func init() { } func (obj alertAdapter) getObservedGeneration() int64 { - return obj.Alert.Status.ObservedGeneration + return 0 } func (obj alertAdapter) setUnsuspended() { diff --git a/cmd/flux/resume_alertprovider.go b/cmd/flux/resume_alertprovider.go index 40427c502e..de95d48d0d 100644 --- a/cmd/flux/resume_alertprovider.go +++ b/cmd/flux/resume_alertprovider.go @@ -19,7 +19,7 @@ package main import ( "github.com/spf13/cobra" - notificationv1 "github.com/fluxcd/notification-controller/api/v1beta2" + notificationv1 "github.com/fluxcd/notification-controller/api/v1beta3" ) var resumeAlertProviderCmd = &cobra.Command{ @@ -44,7 +44,7 @@ func init() { } func (obj alertProviderAdapter) getObservedGeneration() int64 { - return obj.Provider.Status.ObservedGeneration + return 0 } func (obj alertProviderAdapter) setUnsuspended() { diff --git a/cmd/flux/stats.go b/cmd/flux/stats.go index 4542d498b0..196d68d6b6 100644 --- a/cmd/flux/stats.go +++ b/cmd/flux/stats.go @@ -32,7 +32,7 @@ import ( imagev1 "github.com/fluxcd/image-reflector-controller/api/v1beta2" kustomizev1 "github.com/fluxcd/kustomize-controller/api/v1" notificationv1 "github.com/fluxcd/notification-controller/api/v1" - notificationv1b2 "github.com/fluxcd/notification-controller/api/v1beta2" + notificationv1b3 "github.com/fluxcd/notification-controller/api/v1beta3" sourcev1 "github.com/fluxcd/source-controller/api/v1" sourcev1b2 "github.com/fluxcd/source-controller/api/v1beta2" @@ -111,14 +111,14 @@ func runStatsCmd(cmd *cobra.Command, args []string) error { Group: helmv2.GroupVersion.Group, }, { - Kind: notificationv1b2.AlertKind, - Version: notificationv1b2.GroupVersion.Version, - Group: notificationv1b2.GroupVersion.Group, + Kind: notificationv1b3.AlertKind, + Version: notificationv1b3.GroupVersion.Version, + Group: notificationv1b3.GroupVersion.Group, }, { - Kind: notificationv1b2.ProviderKind, - Version: notificationv1b2.GroupVersion.Version, - Group: notificationv1b2.GroupVersion.Group, + Kind: notificationv1b3.ProviderKind, + Version: notificationv1b3.GroupVersion.Version, + Group: notificationv1b3.GroupVersion.Group, }, { Kind: notificationv1.ReceiverKind, diff --git a/cmd/flux/suspend_alert.go b/cmd/flux/suspend_alert.go index 17cdd80187..67fa201a38 100644 --- a/cmd/flux/suspend_alert.go +++ b/cmd/flux/suspend_alert.go @@ -19,7 +19,7 @@ package main import ( "github.com/spf13/cobra" - notificationv1 "github.com/fluxcd/notification-controller/api/v1beta2" + notificationv1 "github.com/fluxcd/notification-controller/api/v1beta3" ) var suspendAlertCmd = &cobra.Command{ diff --git a/cmd/flux/suspend_alertprovider.go b/cmd/flux/suspend_alertprovider.go index 5a69513cb7..fa58c80eb8 100644 --- a/cmd/flux/suspend_alertprovider.go +++ b/cmd/flux/suspend_alertprovider.go @@ -19,7 +19,7 @@ package main import ( "github.com/spf13/cobra" - notificationv1 "github.com/fluxcd/notification-controller/api/v1beta2" + notificationv1 "github.com/fluxcd/notification-controller/api/v1beta3" ) var suspendAlertProviderCmd = &cobra.Command{ diff --git a/cmd/flux/testdata/export/alert.yaml b/cmd/flux/testdata/export/alert.yaml index 4619affb4d..e5ffba02c1 100644 --- a/cmd/flux/testdata/export/alert.yaml +++ b/cmd/flux/testdata/export/alert.yaml @@ -1,5 +1,5 @@ --- -apiVersion: notification.toolkit.fluxcd.io/v1beta2 +apiVersion: notification.toolkit.fluxcd.io/v1beta3 kind: Alert metadata: name: flux-system diff --git a/cmd/flux/testdata/export/objects.yaml b/cmd/flux/testdata/export/objects.yaml index aa1b6f196a..8ba599695e 100644 --- a/cmd/flux/testdata/export/objects.yaml +++ b/cmd/flux/testdata/export/objects.yaml @@ -4,7 +4,7 @@ kind: Namespace metadata: name: {{ .fluxns }} --- -apiVersion: notification.toolkit.fluxcd.io/v1beta2 +apiVersion: notification.toolkit.fluxcd.io/v1beta3 kind: Provider metadata: name: slack @@ -14,7 +14,7 @@ spec: channel: 'A channel with spacess' address: https://hooks.slack.com/services/mock --- -apiVersion: notification.toolkit.fluxcd.io/v1beta2 +apiVersion: notification.toolkit.fluxcd.io/v1beta3 kind: Alert metadata: name: flux-system diff --git a/cmd/flux/testdata/export/provider.yaml b/cmd/flux/testdata/export/provider.yaml index 671044537c..c3ca08e3cf 100644 --- a/cmd/flux/testdata/export/provider.yaml +++ b/cmd/flux/testdata/export/provider.yaml @@ -1,5 +1,5 @@ --- -apiVersion: notification.toolkit.fluxcd.io/v1beta2 +apiVersion: notification.toolkit.fluxcd.io/v1beta3 kind: Provider metadata: name: slack diff --git a/go.mod b/go.mod index ef27cffab9..393a94828f 100644 --- a/go.mod +++ b/go.mod @@ -26,7 +26,7 @@ require ( github.com/fluxcd/pkg/runtime v0.43.0 github.com/fluxcd/pkg/sourceignore v0.3.5 github.com/fluxcd/pkg/ssa v0.34.0 - github.com/fluxcd/pkg/ssh v0.9.0 + github.com/fluxcd/pkg/ssh v0.10.0 github.com/fluxcd/pkg/tar v0.4.0 github.com/fluxcd/pkg/version v0.2.2 github.com/fluxcd/source-controller/api v1.2.1 @@ -47,8 +47,8 @@ require ( github.com/spf13/cobra v1.8.0 github.com/spf13/pflag v1.0.5 github.com/theckman/yacspin v0.13.12 - golang.org/x/crypto v0.15.0 - golang.org/x/term v0.14.0 + golang.org/x/crypto v0.16.0 + golang.org/x/term v0.15.0 golang.org/x/text v0.14.0 k8s.io/api v0.28.4 k8s.io/apiextensions-apiserver v0.28.4 @@ -119,9 +119,9 @@ require ( github.com/go-fed/httpsig v1.1.0 // indirect github.com/go-git/gcfg v1.5.1-0.20230307220236-3a3c6141e376 // indirect github.com/go-git/go-billy/v5 v5.5.0 // indirect - github.com/go-openapi/jsonpointer v0.19.6 // indirect + github.com/go-openapi/jsonpointer v0.20.0 // indirect github.com/go-openapi/jsonreference v0.20.2 // indirect - github.com/go-openapi/swag v0.22.3 // indirect + github.com/go-openapi/swag v0.22.4 // indirect github.com/gogo/protobuf v1.3.2 // indirect github.com/golang-jwt/jwt/v5 v5.0.0 // indirect github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect @@ -144,7 +144,7 @@ require ( github.com/hashicorp/errwrap v1.1.0 // indirect github.com/hashicorp/go-multierror v1.1.1 // indirect github.com/hashicorp/go-retryablehttp v0.7.5 // indirect - github.com/hashicorp/go-version v1.5.0 // indirect + github.com/hashicorp/go-version v1.6.0 // indirect github.com/hashicorp/golang-lru/arc/v2 v2.0.5 // indirect github.com/hashicorp/golang-lru/v2 v2.0.5 // indirect github.com/imdario/mergo v0.3.15 // indirect @@ -197,14 +197,14 @@ require ( go.starlark.net v0.0.0-20230525235612-a134d8f9ddca // indirect golang.org/x/exp v0.0.0-20220722155223-a9213eeb770e // indirect golang.org/x/mod v0.14.0 // indirect - golang.org/x/net v0.18.0 // indirect - golang.org/x/oauth2 v0.14.0 // indirect + golang.org/x/net v0.19.0 // indirect + golang.org/x/oauth2 v0.15.0 // indirect golang.org/x/sync v0.5.0 // indirect - golang.org/x/sys v0.14.0 // indirect - golang.org/x/time v0.4.0 // indirect - golang.org/x/tools v0.15.0 // indirect + golang.org/x/sys v0.15.0 // indirect + golang.org/x/time v0.5.0 // indirect + golang.org/x/tools v0.16.0 // indirect gomodules.xyz/jsonpatch/v2 v2.4.0 // indirect - google.golang.org/appengine v1.6.7 // indirect + google.golang.org/appengine v1.6.8 // indirect google.golang.org/protobuf v1.31.0 // indirect gopkg.in/evanphx/json-patch.v5 v5.6.0 // indirect gopkg.in/inf.v0 v0.9.1 // indirect @@ -212,9 +212,9 @@ require ( gopkg.in/yaml.v2 v2.4.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect k8s.io/component-base v0.28.4 // indirect - k8s.io/klog/v2 v2.100.1 // indirect + k8s.io/klog/v2 v2.110.1 // indirect k8s.io/kube-openapi v0.0.0-20231113174909-778a5567bc1e // indirect - k8s.io/utils v0.0.0-20230726121419-3b25d923346b // indirect + k8s.io/utils v0.0.0-20231127182322-b307cd553661 // indirect sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd // indirect sigs.k8s.io/structured-merge-diff/v4 v4.4.1 // indirect ) diff --git a/go.sum b/go.sum index 823bc0d96b..fdb411ccdc 100644 --- a/go.sum +++ b/go.sum @@ -170,8 +170,8 @@ github.com/fluxcd/pkg/sourceignore v0.3.5 h1:omcHTH5X5tlPr9w1b9T7WuJTOP+o/KdVdar github.com/fluxcd/pkg/sourceignore v0.3.5/go.mod h1:6Xz3jErz8RsidsdrjUBBUGKes24rbdp/F38MnTGibEw= github.com/fluxcd/pkg/ssa v0.34.0 h1:hpMo0D7G3faieRYH39e9YD8Jl+aC2hTgUep8ojG5+LE= github.com/fluxcd/pkg/ssa v0.34.0/go.mod h1:rhVh0EtYVUOznKXlz6E7JOSgdc8xWbIwA4L5HVtJRLA= -github.com/fluxcd/pkg/ssh v0.9.0 h1:egRvg4AKarObFKXsBDZ5oBZ5PCjmQ4Q6hX+6GmrdbH0= -github.com/fluxcd/pkg/ssh v0.9.0/go.mod h1:3KKbfcFn4l+HqYdHKqcu2LO8RvFv0Kh6tYRSUtONC/8= +github.com/fluxcd/pkg/ssh v0.10.0 h1:JFz0u/CPEf3hXvmrEvUvXsc70eKh8xphqjXxZuSby9g= +github.com/fluxcd/pkg/ssh v0.10.0/go.mod h1:1lFTj3MhU9xQuaJ5PJJoh/FyRYzK54ll9NY/s2KqOZM= github.com/fluxcd/pkg/tar v0.4.0 h1:SuXpfXBIcSJ5R/yqQi2CBxBmV/i/LH0agqNAh2PWBZg= github.com/fluxcd/pkg/tar v0.4.0/go.mod h1:SyJBaQvuv2VA/rv4d1OHhCV6R8+9QKc9np193EzNHBc= github.com/fluxcd/pkg/version v0.2.2 h1:ZpVXECeLA5hIQMft11iLp6gN3cKcz6UNuVTQPw/bRdI= @@ -195,16 +195,17 @@ github.com/go-git/go-git/v5 v5.10.0/go.mod h1:1FOZ/pQnqw24ghP2n7cunVl0ON55BsjPYv github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE= github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk= -github.com/go-logr/logr v1.2.0/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= github.com/go-logr/logr v1.3.0 h1:2y3SDp0ZXuc6/cjLSZ+Q3ir+QB9T/iG5yYRXqsagWSY= github.com/go-logr/logr v1.3.0/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= github.com/go-logr/zapr v1.2.4 h1:QHVo+6stLbfJmYGkQ7uGHUCu5hnAFAj6mDe6Ea0SeOo= -github.com/go-openapi/jsonpointer v0.19.6 h1:eCs3fxoIi3Wh6vtgmLTOjdhSpiqphQ+DaPn38N2ZdrE= github.com/go-openapi/jsonpointer v0.19.6/go.mod h1:osyAmYz/mB/C3I+WsTTSgw1ONzaLJoLCyoi6/zppojs= +github.com/go-openapi/jsonpointer v0.20.0 h1:ESKJdU9ASRfaPNOPRx12IUyA1vn3R9GiE3KYD14BXdQ= +github.com/go-openapi/jsonpointer v0.20.0/go.mod h1:6PGzBjjIIumbLYysB73Klnms1mwnU4G3YHOECG3CedA= github.com/go-openapi/jsonreference v0.20.2 h1:3sVjiK66+uXK/6oQ8xgcRKcFgQ5KXa2KvnJRumpMGbE= github.com/go-openapi/jsonreference v0.20.2/go.mod h1:Bl1zwGIM8/wsvqjsOQLJ/SH+En5Ap4rVB5KVcIDZG2k= -github.com/go-openapi/swag v0.22.3 h1:yMBqmnQ0gyZvEb/+KzuWZOXgllrXT4SADYbvDaXHv/g= github.com/go-openapi/swag v0.22.3/go.mod h1:UzaqsxGiab7freDnrUUra0MwWfN/q7tE4j+VcZ0yl14= +github.com/go-openapi/swag v0.22.4 h1:QLMzNJnMGPRNDCbySlcj1x01tzU8/9LTTL9hZZZogBU= +github.com/go-openapi/swag v0.22.4/go.mod h1:UzaqsxGiab7freDnrUUra0MwWfN/q7tE4j+VcZ0yl14= github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572 h1:tfuBGBXKqDEevZMzYi5KSi8KkcZtzBcTgAUUtapy0OI= github.com/gofrs/uuid v4.4.0+incompatible h1:3qXRTX8/NbyulANqlc0lchS1gqAVxRgsuW1YrTJupqA= @@ -227,6 +228,7 @@ github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:W github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0= github.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QDs8UjoX8= github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= +github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg= github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= github.com/gomodule/redigo v1.8.2 h1:H5XSIre1MB5NbPYFp+i1NBbb5qN1W8Y8YAQoAYbkm8k= @@ -291,8 +293,9 @@ github.com/hashicorp/go-multierror v1.1.1 h1:H5DkEtf6CXdFp0N0Em5UCwQpXMWke8IA0+l github.com/hashicorp/go-multierror v1.1.1/go.mod h1:iw975J/qwKPdAO1clOe2L8331t/9/fmwbPZ6JB6eMoM= github.com/hashicorp/go-retryablehttp v0.7.5 h1:bJj+Pj19UZMIweq/iie+1u5YCdGrnxCT9yvm0e+Nd5M= github.com/hashicorp/go-retryablehttp v0.7.5/go.mod h1:Jy/gPYAdjqffZ/yFGCFV2doI5wjtH1ewM9u8iYVjtX8= -github.com/hashicorp/go-version v1.5.0 h1:O293SZ2Eg+AAYijkVK3jR786Am1bhDEh2GHT0tIVE5E= github.com/hashicorp/go-version v1.5.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= +github.com/hashicorp/go-version v1.6.0 h1:feTTfFNnjP967rlCxM/I9g701jU+RN74YKx2mOkIeek= +github.com/hashicorp/go-version v1.6.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= github.com/hashicorp/golang-lru/arc/v2 v2.0.5 h1:l2zaLDubNhW4XO3LnliVj0GXO3+/CGNJAg1dcN2Fpfw= github.com/hashicorp/golang-lru/arc/v2 v2.0.5/go.mod h1:ny6zBSQZi2JxIeYcv7kt2sH2PXJtirBN7RDhRpxPkxU= github.com/hashicorp/golang-lru/v2 v2.0.5 h1:wW7h1TG88eUIJ2i69gaE3uNVtEPIagzhGvHgwfx2Vm4= @@ -494,8 +497,8 @@ golang.org/x/crypto v0.0.0-20220525230936-793ad666bf5e/go.mod h1:IxCIyHEi3zRg3s0 golang.org/x/crypto v0.0.0-20220622213112-05595931fe9d/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= golang.org/x/crypto v0.3.1-0.20221117191849-2c476679df9a/go.mod h1:hebNnKkNXi2UzZN1eVRvBB7co0a+JxK6XbPiWVs/3J4= golang.org/x/crypto v0.9.0/go.mod h1:yrmDGqONDYtNj3tH8X9dzUun2m2lzPa9ngI6/RUPGR0= -golang.org/x/crypto v0.15.0 h1:frVn1TEaCEaZcn3Tmd7Y2b5KKPaZ+I32Q2OA3kYp5TA= -golang.org/x/crypto v0.15.0/go.mod h1:4ChreQoLWfG3xLDer1WdlH5NdlQ3+mwnQq1YTKY+72g= +golang.org/x/crypto v0.16.0 h1:mMMrFzRSCF0GvB7Ne27XVtVAaXLrPmgPC7/v0tkwHaY= +golang.org/x/crypto v0.16.0/go.mod h1:gCAAfMLgwOJRpTjQ2zCCt2OcSfYMTeZVSRtQlPC7Nq4= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20220722155223-a9213eeb770e h1:+WEEuIdZHnUeJJmEUjyYC2gfUMj69yZXw17EnHg/otA= golang.org/x/exp v0.0.0-20220722155223-a9213eeb770e/go.mod h1:Kr81I6Kryrl9sr8s2FK3vxD90NdsKWRuOIl2O4CvYbA= @@ -514,7 +517,6 @@ golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73r golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= golang.org/x/net v0.0.0-20190613194153-d28f0bde5980/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= @@ -525,11 +527,11 @@ golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug golang.org/x/net v0.2.0/go.mod h1:KqCZLdyyvdV855qA2rE3GC2aiw5xGR5TEjj8smXukLY= golang.org/x/net v0.6.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= golang.org/x/net v0.10.0/go.mod h1:0qNGK6F8kojg2nk9dLZ2mShWaEBan6FAoqfSigmmuDg= -golang.org/x/net v0.18.0 h1:mIYleuAkSbHh0tCv7RvjL3F6ZVbLjq4+R7zbOn3Kokg= -golang.org/x/net v0.18.0/go.mod h1:/czyP5RqHAH4odGYxBJ1qz0+CE5WZ+2j1YgoEo8F2jQ= +golang.org/x/net v0.19.0 h1:zTwKpTd2XuCqf8huc7Fo2iSy+4RHPd10s4KzeTnVr1c= +golang.org/x/net v0.19.0/go.mod h1:CfAk/cbD4CthTvqiEl8NpboMuiuOYsAr/7NOjZJtv1U= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= -golang.org/x/oauth2 v0.14.0 h1:P0Vrf/2538nmC0H+pEQ3MNFRRnVR7RlqyVw+bvm26z0= -golang.org/x/oauth2 v0.14.0/go.mod h1:lAtNWgaWfL4cm7j2OV8TxGi9Qb7ECORx8DktCY74OwM= +golang.org/x/oauth2 v0.15.0 h1:s8pnnxNVzjWyrvYdFUQq5llS1PX2zhPXmccZv99h7uQ= +golang.org/x/oauth2 v0.15.0/go.mod h1:q48ptWNTY5XWf+JNten23lcvHpLJ0ZSxF5ttTHKVCAM= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -569,28 +571,28 @@ golang.org/x/sys v0.3.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.14.0 h1:Vz7Qs629MkJkGyHxUlRHizWJRG2j8fbQKjELVSNhy7Q= -golang.org/x/sys v0.14.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.15.0 h1:h48lPFYpsTvQJZF4EKyI4aLHaev3CxivZmv7yZig9pc= +golang.org/x/sys v0.15.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/term v0.0.0-20220526004731-065cf7ba2467/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/term v0.2.0/go.mod h1:TVmDHMZPmdnySmBfhjOoOdhjzdE1h4u1VwSiw2l1Nuc= golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k= golang.org/x/term v0.8.0/go.mod h1:xPskH00ivmX89bAKVGSKKtLOWNx2+17Eiy94tnKShWo= -golang.org/x/term v0.14.0 h1:LGK9IlZ8T9jvdy6cTdfKUCltatMFOehAQo9SRC46UQ8= -golang.org/x/term v0.14.0/go.mod h1:TySc+nGkYR6qt8km8wUhuFRTVSMIX3XPR58y2lC8vww= +golang.org/x/term v0.15.0 h1:y/Oo/a/q3IXu26lQgl04j/gjuBDOBlx7X6Om1j2CPW4= +golang.org/x/term v0.15.0/go.mod h1:BDl952bC7+uMoWR75FIrCDx79TPU9oHkTZ9yRbYOrX0= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= -golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= +golang.org/x/text v0.3.8/go.mod h1:E6s5w1FMmriuDzIBO73fBruAKo1PCIq6d2Q6DHfQ8WQ= golang.org/x/text v0.4.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= golang.org/x/text v0.9.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ= golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= -golang.org/x/time v0.4.0 h1:Z81tqI5ddIoXDPvVQ7/7CC9TnLM7ubaFG2qXYd5BbYY= -golang.org/x/time v0.4.0/go.mod h1:3BpzKBy/shNhVucY/MWOyx10tF3SFh9QdLuxbVysPQM= +golang.org/x/time v0.5.0 h1:o7cqy6amK/52YcAKIPlM3a+Fpj35zvRj2TP+e1xFSfk= +golang.org/x/time v0.5.0/go.mod h1:3BpzKBy/shNhVucY/MWOyx10tF3SFh9QdLuxbVysPQM= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= @@ -601,8 +603,8 @@ golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roY golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= golang.org/x/tools v0.6.0/go.mod h1:Xwgl3UAJ/d3gWutnCtw505GrjyAbvKui8lOU390QaIU= -golang.org/x/tools v0.15.0 h1:zdAyfUGbYmuVokhzVmghFl2ZJh5QhcfebBgmVPFYA+8= -golang.org/x/tools v0.15.0/go.mod h1:hpksKq4dtpQWS1uQ61JkdqWM3LscIS6Slf+VVkm+wQk= +golang.org/x/tools v0.16.0 h1:GO788SKMRunPIBCXiQyo2AaexLstOrVhuAL5YwsckQM= +golang.org/x/tools v0.16.0/go.mod h1:kYVVN6I1mBNoB1OX+noeBjbRk4IUEPa7JJ+TJMEooJ0= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= @@ -611,8 +613,8 @@ gomodules.xyz/jsonpatch/v2 v2.4.0 h1:Ci3iUJyx9UeRx7CeFN8ARgGbkESwJK+KB9lLcWxY/Zw gomodules.xyz/jsonpatch/v2 v2.4.0/go.mod h1:AH3dM2RI6uoBZxn3LVrfvJ3E0/9dG4cSrbuBJT4moAY= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= -google.golang.org/appengine v1.6.7 h1:FZR1q0exgwxzPzp/aF+VccGrSfxfPpkBqjIIEq3ru6c= -google.golang.org/appengine v1.6.7/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= +google.golang.org/appengine v1.6.8 h1:IhEN5q69dyKagZPYMSdIjS2HqprW324FRQZJcGqPAsM= +google.golang.org/appengine v1.6.8/go.mod h1:1jJ3jBArFh5pcgW8gCtRJnepW8FzD1V44FJffLiz/Ds= google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo= @@ -666,14 +668,14 @@ k8s.io/client-go v0.28.4 h1:Np5ocjlZcTrkyRJ3+T3PkXDpe4UpatQxj85+xjaD2wY= k8s.io/client-go v0.28.4/go.mod h1:0VDZFpgoZfelyP5Wqu0/r/TRYcLYuJ2U1KEeoaPa1N4= k8s.io/component-base v0.28.4 h1:c/iQLWPdUgI90O+T9TeECg8o7N3YJTiuz2sKxILYcYo= k8s.io/component-base v0.28.4/go.mod h1:m9hR0uvqXDybiGL2nf/3Lf0MerAfQXzkfWhUY58JUbU= -k8s.io/klog/v2 v2.100.1 h1:7WCHKK6K8fNhTqfBhISHQ97KrnJNFZMcQvKp7gP/tmg= -k8s.io/klog/v2 v2.100.1/go.mod h1:y1WjHnz7Dj687irZUWR/WLkLc5N1YHtjLdmgWjndZn0= +k8s.io/klog/v2 v2.110.1 h1:U/Af64HJf7FcwMcXyKm2RPM22WZzyR7OSpYj5tg3cL0= +k8s.io/klog/v2 v2.110.1/go.mod h1:YGtd1984u+GgbuZ7e08/yBuAfKLSO0+uR1Fhi6ExXjo= k8s.io/kube-openapi v0.0.0-20231113174909-778a5567bc1e h1:snPmy96t93RredGRjKfMFt+gvxuVAncqSAyBveJtr4Q= k8s.io/kube-openapi v0.0.0-20231113174909-778a5567bc1e/go.mod h1:AsvuZPBlUDVuCdzJ87iajxtXuR9oktsTctW/R9wwouA= k8s.io/kubectl v0.28.4 h1:gWpUXW/T7aFne+rchYeHkyB8eVDl5UZce8G4X//kjUQ= k8s.io/kubectl v0.28.4/go.mod h1:CKOccVx3l+3MmDbkXtIUtibq93nN2hkDR99XDCn7c/c= -k8s.io/utils v0.0.0-20230726121419-3b25d923346b h1:sgn3ZU783SCgtaSJjpcVVlRqd6GSnlTLKgpAAttJvpI= -k8s.io/utils v0.0.0-20230726121419-3b25d923346b/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= +k8s.io/utils v0.0.0-20231127182322-b307cd553661 h1:FepOBzJ0GXm8t0su67ln2wAZjbQ6RxQGZDnzuLcrUTI= +k8s.io/utils v0.0.0-20231127182322-b307cd553661/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= sigs.k8s.io/controller-runtime v0.16.3 h1:2TuvuokmfXvDUamSx1SuAOO3eTyye+47mJCigwG62c4= sigs.k8s.io/controller-runtime v0.16.3/go.mod h1:j7bialYoSn142nv9sCOJmQgDXQXxnroFU4VnX/brVJ0= sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd h1:EDPBXCAspyGV4jQlpZSudPeMmr1bNJefnuqLsRAsHZo= diff --git a/internal/utils/utils.go b/internal/utils/utils.go index c5d8ec88ad..e820372ac7 100644 --- a/internal/utils/utils.go +++ b/internal/utils/utils.go @@ -46,7 +46,7 @@ import ( imagereflectv1 "github.com/fluxcd/image-reflector-controller/api/v1beta2" kustomizev1 "github.com/fluxcd/kustomize-controller/api/v1" notificationv1 "github.com/fluxcd/notification-controller/api/v1" - notificationv1b2 "github.com/fluxcd/notification-controller/api/v1beta2" + notificationv1b3 "github.com/fluxcd/notification-controller/api/v1beta3" "github.com/fluxcd/pkg/apis/meta" runclient "github.com/fluxcd/pkg/runtime/client" "github.com/fluxcd/pkg/version" @@ -133,7 +133,7 @@ func NewScheme() *apiruntime.Scheme { _ = kustomizev1.AddToScheme(scheme) _ = helmv2.AddToScheme(scheme) _ = notificationv1.AddToScheme(scheme) - _ = notificationv1b2.AddToScheme(scheme) + _ = notificationv1b3.AddToScheme(scheme) _ = imagereflectv1.AddToScheme(scheme) _ = imageautov1.AddToScheme(scheme) return scheme diff --git a/pkg/uninstall/uninstall.go b/pkg/uninstall/uninstall.go index 744cb04e95..92d7ffc2d0 100644 --- a/pkg/uninstall/uninstall.go +++ b/pkg/uninstall/uninstall.go @@ -35,7 +35,7 @@ import ( imagev1 "github.com/fluxcd/image-reflector-controller/api/v1beta2" kustomizev1 "github.com/fluxcd/kustomize-controller/api/v1" notificationv1 "github.com/fluxcd/notification-controller/api/v1" - notificationv1b2 "github.com/fluxcd/notification-controller/api/v1beta2" + notificationv1b3 "github.com/fluxcd/notification-controller/api/v1beta3" sourcev1 "github.com/fluxcd/source-controller/api/v1" sourcev1b2 "github.com/fluxcd/source-controller/api/v1beta2" ) @@ -243,7 +243,7 @@ func Finalizers(ctx context.Context, logger log.Logger, kubeClient client.Client } } { - var list notificationv1b2.AlertList + var list notificationv1b3.AlertList if err := kubeClient.List(ctx, &list, client.InNamespace("")); err == nil { for i := range list.Items { r := list.Items[i] @@ -258,7 +258,7 @@ func Finalizers(ctx context.Context, logger log.Logger, kubeClient client.Client } } { - var list notificationv1b2.ProviderList + var list notificationv1b3.ProviderList if err := kubeClient.List(ctx, &list, client.InNamespace("")); err == nil { for i := range list.Items { r := list.Items[i] diff --git a/tests/azure/azure_test.go b/tests/azure/azure_test.go index 6209ec9b5b..57384156a7 100644 --- a/tests/azure/azure_test.go +++ b/tests/azure/azure_test.go @@ -53,7 +53,7 @@ import ( reflectorv1beta2 "github.com/fluxcd/image-reflector-controller/api/v1beta2" kustomizev1 "github.com/fluxcd/kustomize-controller/api/v1" notiv1 "github.com/fluxcd/notification-controller/api/v1" - notiv1beta2 "github.com/fluxcd/notification-controller/api/v1beta2" + notiv1beta3 "github.com/fluxcd/notification-controller/api/v1beta3" eventv1 "github.com/fluxcd/pkg/apis/event/v1beta1" "github.com/fluxcd/pkg/apis/meta" sourcev1 "github.com/fluxcd/source-controller/api/v1" @@ -681,14 +681,14 @@ func TestAzureDevOpsCommitStatus(t *testing.T) { } return nil }) - provider := notiv1beta2.Provider{ + provider := notiv1beta3.Provider{ ObjectMeta: metav1.ObjectMeta{ Name: "azuredevops", Namespace: name, }, } _, err = controllerutil.CreateOrUpdate(ctx, cfg.kubeClient, &provider, func() error { - provider.Spec = notiv1beta2.ProviderSpec{ + provider.Spec = notiv1beta3.ProviderSpec{ Type: "azuredevops", Address: repoUrl, SecretRef: &meta.LocalObjectReference{ @@ -698,14 +698,14 @@ func TestAzureDevOpsCommitStatus(t *testing.T) { return nil }) require.NoError(t, err) - alert := notiv1beta2.Alert{ + alert := notiv1beta3.Alert{ ObjectMeta: metav1.ObjectMeta{ Name: "azuredevops", Namespace: name, }, } _, err = controllerutil.CreateOrUpdate(ctx, cfg.kubeClient, &alert, func() error { - alert.Spec = notiv1beta2.AlertSpec{ + alert.Spec = notiv1beta3.AlertSpec{ ProviderRef: meta.LocalObjectReference{ Name: provider.Name, }, @@ -809,14 +809,14 @@ func TestEventHubNotification(t *testing.T) { } return nil }) - provider := notiv1beta2.Provider{ + provider := notiv1beta3.Provider{ ObjectMeta: metav1.ObjectMeta{ Name: name, Namespace: name, }, } _, err = controllerutil.CreateOrUpdate(ctx, cfg.kubeClient, &provider, func() error { - provider.Spec = notiv1beta2.ProviderSpec{ + provider.Spec = notiv1beta3.ProviderSpec{ Type: "azureeventhub", Address: repoUrl, SecretRef: &meta.LocalObjectReference{ @@ -826,14 +826,14 @@ func TestEventHubNotification(t *testing.T) { return nil }) require.NoError(t, err) - alert := notiv1beta2.Alert{ + alert := notiv1beta3.Alert{ ObjectMeta: metav1.ObjectMeta{ Name: name, Namespace: name, }, } _, err = controllerutil.CreateOrUpdate(ctx, cfg.kubeClient, &alert, func() error { - alert.Spec = notiv1beta2.AlertSpec{ + alert.Spec = notiv1beta3.AlertSpec{ ProviderRef: meta.LocalObjectReference{ Name: provider.Name, }, diff --git a/tests/azure/go.mod b/tests/azure/go.mod index 8502c2b471..10b790b85e 100644 --- a/tests/azure/go.mod +++ b/tests/azure/go.mod @@ -9,14 +9,14 @@ require ( github.com/Azure/azure-event-hubs-go/v3 v3.6.1 github.com/fluxcd/helm-controller/api v0.36.2 github.com/fluxcd/image-automation-controller/api v0.36.1 - github.com/fluxcd/image-reflector-controller/api v0.30.0 + github.com/fluxcd/image-reflector-controller/api v0.31.0 github.com/fluxcd/kustomize-controller/api v1.1.1 - github.com/fluxcd/notification-controller/api v1.1.0 + github.com/fluxcd/notification-controller/api v1.2.1 github.com/fluxcd/pkg/apis/event v0.6.0 github.com/fluxcd/pkg/apis/meta v1.2.0 github.com/fluxcd/pkg/git v0.15.0 github.com/fluxcd/pkg/git/gogit v0.15.0 - github.com/fluxcd/source-controller/api v1.1.2 + github.com/fluxcd/source-controller/api v1.2.1 github.com/go-git/go-git/v5 v5.10.0 github.com/hashicorp/hc-install v0.5.2 github.com/hashicorp/terraform-exec v0.18.1 diff --git a/tests/azure/go.sum b/tests/azure/go.sum index b53c5f9fa8..1beaaa1a57 100644 --- a/tests/azure/go.sum +++ b/tests/azure/go.sum @@ -71,12 +71,12 @@ github.com/fluxcd/helm-controller/api v0.36.2 h1:9JaTc91yocG1oQkM/GMfpZ/nGPpliRj github.com/fluxcd/helm-controller/api v0.36.2/go.mod h1:zkcRy3PxG0NoxSY5SjiSA5tWOGa6spIbWsChQY8FXqM= github.com/fluxcd/image-automation-controller/api v0.36.1 h1:Knd4SSm/bJ0iqvYcQq87uDaT/mW9poM1jOvHpJ/4tzk= github.com/fluxcd/image-automation-controller/api v0.36.1/go.mod h1:IsjdBtgm71KHRGDTZZZiGYdWGoJ5VjenE9F4ueADM/o= -github.com/fluxcd/image-reflector-controller/api v0.30.0 h1:DiWj+4tcbnaSqZs1Pfkyt3uSy47wg3dsNMgbFE50pYc= -github.com/fluxcd/image-reflector-controller/api v0.30.0/go.mod h1:hv57KwIzoPyy7Vu4PFcIf21eu0N3p/HbijygcuNgf8c= +github.com/fluxcd/image-reflector-controller/api v0.31.0 h1:9t5zj7ufo9/d57gpcZsD6YAIxFz0vtLH4jXCj379srE= +github.com/fluxcd/image-reflector-controller/api v0.31.0/go.mod h1:/EcjOa/EYi8sSBHcGrBkLjMjNNfC7xXMxqG9phBORCo= github.com/fluxcd/kustomize-controller/api v1.1.1 h1:pQcAzvBC3cFGOCgk0zrcsO1Kjtal1tvd6rHXkyp2R78= github.com/fluxcd/kustomize-controller/api v1.1.1/go.mod h1:FHJTX6c0+CznUNGMol5+Uc4lQsYRxWgpmIRK/xDCghA= -github.com/fluxcd/notification-controller/api v1.1.0 h1:qx5t5DmArfPLxG2bsYZXIqDXLnijUddlHeRfciALwQw= -github.com/fluxcd/notification-controller/api v1.1.0/go.mod h1:6MqWVQeI5yrYR7zp0GFqsfXitNPGJrnfOWxO2w3jylg= +github.com/fluxcd/notification-controller/api v1.2.1 h1:yPQZ7ppYvazxl/Vsespbx9VlVyopH7p8pKGzZTNxI0c= +github.com/fluxcd/notification-controller/api v1.2.1/go.mod h1:1sWTpAXkga5zkXOgFoR+NIJgHNclBcfAHUJ/rMAjnYY= github.com/fluxcd/pkg/apis/acl v0.1.0 h1:EoAl377hDQYL3WqanWCdifauXqXbMyFuK82NnX6pH4Q= github.com/fluxcd/pkg/apis/acl v0.1.0/go.mod h1:zfEZzz169Oap034EsDhmCAGgnWlcWmIObZjYMusoXS8= github.com/fluxcd/pkg/apis/event v0.6.0 h1:AUaeee1CGWb65BLqVximHXG8Gcu6vWuYONIq6tVpjgo= @@ -94,8 +94,8 @@ github.com/fluxcd/pkg/ssh v0.9.0 h1:egRvg4AKarObFKXsBDZ5oBZ5PCjmQ4Q6hX+6GmrdbH0= github.com/fluxcd/pkg/ssh v0.9.0/go.mod h1:3KKbfcFn4l+HqYdHKqcu2LO8RvFv0Kh6tYRSUtONC/8= github.com/fluxcd/pkg/version v0.2.2 h1:ZpVXECeLA5hIQMft11iLp6gN3cKcz6UNuVTQPw/bRdI= github.com/fluxcd/pkg/version v0.2.2/go.mod h1:NGnh/no8S6PyfCDxRFrPY3T5BUnqP48MxfxNRU0z8C0= -github.com/fluxcd/source-controller/api v1.1.2 h1:FfKDKVWnopo+Q2pOAxgHEjrtr4MP41L8aapR4mqBhBk= -github.com/fluxcd/source-controller/api v1.1.2/go.mod h1:ZLkaUd1KQIjtLPCvO63Ni5zpnSTVBAkeRgFBzMItbDQ= +github.com/fluxcd/source-controller/api v1.2.1 h1:zWRfwMB/BkV0A/duZQwHEcrE/abWJQt7DUgYTzn4IzM= +github.com/fluxcd/source-controller/api v1.2.1/go.mod h1:n+PMCJXl/AYCjWHn5N/MUuoIFKfDg4kCDviFIa7fDvI= github.com/fortytw2/leaktest v1.3.0 h1:u8491cBMTQ8ft8aeV+adlcytMZylmA5nnwwkRZjI8vw= github.com/fsnotify/fsnotify v1.6.0 h1:n+5WquG0fcWoWp6xPWfHdbskMCQaFnG6PfBrh1Ky4HY= github.com/gliderlabs/ssh v0.3.5 h1:OcaySEmAQJgyYcArR+gGGTHCyE7nvhEMTlYY+Dp8CpY= diff --git a/tests/azure/util_test.go b/tests/azure/util_test.go index 7c4f4083d4..836ea3a2a7 100644 --- a/tests/azure/util_test.go +++ b/tests/azure/util_test.go @@ -40,7 +40,7 @@ import ( reflectorv1beta2 "github.com/fluxcd/image-reflector-controller/api/v1beta2" kustomizev1 "github.com/fluxcd/kustomize-controller/api/v1" notiv1 "github.com/fluxcd/notification-controller/api/v1" - notiv1beta2 "github.com/fluxcd/notification-controller/api/v1beta2" + notiv1beta3 "github.com/fluxcd/notification-controller/api/v1beta3" "github.com/fluxcd/pkg/apis/meta" "github.com/fluxcd/pkg/git" "github.com/fluxcd/pkg/git/gogit" @@ -96,7 +96,7 @@ func getKubernetesCredentials(kubeconfig, aksHost, aksCert, aksKey, aksCa string if err != nil { return "", nil, err } - err = notiv1beta2.AddToScheme(scheme.Scheme) + err = notiv1beta3.AddToScheme(scheme.Scheme) if err != nil { return "", nil, err } diff --git a/tests/integration/azure_specific_test.go b/tests/integration/azure_specific_test.go index 536de39429..2f9d6fc7f1 100644 --- a/tests/integration/azure_specific_test.go +++ b/tests/integration/azure_specific_test.go @@ -38,7 +38,7 @@ import ( kustomizev1 "github.com/fluxcd/kustomize-controller/api/v1" notiv1 "github.com/fluxcd/notification-controller/api/v1" - notiv1beta2 "github.com/fluxcd/notification-controller/api/v1beta2" + notiv1beta3 "github.com/fluxcd/notification-controller/api/v1beta3" "github.com/fluxcd/pkg/apis/meta" sourcev1 "github.com/fluxcd/source-controller/api/v1" ) @@ -109,12 +109,12 @@ metadata: g.Expect(testEnv.Create(ctx, &secret)).To(Succeed()) defer testEnv.Delete(ctx, &secret) - provider := notiv1beta2.Provider{ + provider := notiv1beta3.Provider{ ObjectMeta: metav1.ObjectMeta{ Name: "azuredevops", Namespace: testID, }, - Spec: notiv1beta2.ProviderSpec{ + Spec: notiv1beta3.ProviderSpec{ Type: "azuredevops", Address: repoUrl, SecretRef: &meta.LocalObjectReference{ @@ -125,12 +125,12 @@ metadata: g.Expect(testEnv.Create(ctx, &provider)).To(Succeed()) defer testEnv.Delete(ctx, &provider) - alert := notiv1beta2.Alert{ + alert := notiv1beta3.Alert{ ObjectMeta: metav1.ObjectMeta{ Name: "azuredevops", Namespace: testID, }, - Spec: notiv1beta2.AlertSpec{ + Spec: notiv1beta3.AlertSpec{ ProviderRef: meta.LocalObjectReference{ Name: provider.Name, }, diff --git a/tests/integration/go.mod b/tests/integration/go.mod index 1468f0e328..091b691af9 100644 --- a/tests/integration/go.mod +++ b/tests/integration/go.mod @@ -7,15 +7,15 @@ require ( github.com/Azure/azure-event-hubs-go/v3 v3.6.0 github.com/fluxcd/helm-controller/api v0.36.2 github.com/fluxcd/image-automation-controller/api v0.36.1 - github.com/fluxcd/image-reflector-controller/api v0.30.0 + github.com/fluxcd/image-reflector-controller/api v0.31.0 github.com/fluxcd/kustomize-controller/api v1.1.1 - github.com/fluxcd/notification-controller/api v1.1.0 + github.com/fluxcd/notification-controller/api v1.2.1 github.com/fluxcd/pkg/apis/event v0.6.0 github.com/fluxcd/pkg/apis/meta v1.2.0 github.com/fluxcd/pkg/git v0.15.0 github.com/fluxcd/pkg/git/gogit v0.15.0 github.com/fluxcd/pkg/runtime v0.43.0 - github.com/fluxcd/source-controller/api v1.1.2 + github.com/fluxcd/source-controller/api v1.2.1 github.com/fluxcd/test-infra/tftestenv v0.0.0-20230831142147-627bca8e7916 github.com/go-git/go-git/v5 v5.10.0 github.com/google/go-containerregistry v0.16.1 diff --git a/tests/integration/go.sum b/tests/integration/go.sum index e4b352c415..b28d601065 100644 --- a/tests/integration/go.sum +++ b/tests/integration/go.sum @@ -126,12 +126,12 @@ github.com/fluxcd/helm-controller/api v0.36.2 h1:9JaTc91yocG1oQkM/GMfpZ/nGPpliRj github.com/fluxcd/helm-controller/api v0.36.2/go.mod h1:zkcRy3PxG0NoxSY5SjiSA5tWOGa6spIbWsChQY8FXqM= github.com/fluxcd/image-automation-controller/api v0.36.1 h1:Knd4SSm/bJ0iqvYcQq87uDaT/mW9poM1jOvHpJ/4tzk= github.com/fluxcd/image-automation-controller/api v0.36.1/go.mod h1:IsjdBtgm71KHRGDTZZZiGYdWGoJ5VjenE9F4ueADM/o= -github.com/fluxcd/image-reflector-controller/api v0.30.0 h1:DiWj+4tcbnaSqZs1Pfkyt3uSy47wg3dsNMgbFE50pYc= -github.com/fluxcd/image-reflector-controller/api v0.30.0/go.mod h1:hv57KwIzoPyy7Vu4PFcIf21eu0N3p/HbijygcuNgf8c= +github.com/fluxcd/image-reflector-controller/api v0.31.0 h1:9t5zj7ufo9/d57gpcZsD6YAIxFz0vtLH4jXCj379srE= +github.com/fluxcd/image-reflector-controller/api v0.31.0/go.mod h1:/EcjOa/EYi8sSBHcGrBkLjMjNNfC7xXMxqG9phBORCo= github.com/fluxcd/kustomize-controller/api v1.1.1 h1:pQcAzvBC3cFGOCgk0zrcsO1Kjtal1tvd6rHXkyp2R78= github.com/fluxcd/kustomize-controller/api v1.1.1/go.mod h1:FHJTX6c0+CznUNGMol5+Uc4lQsYRxWgpmIRK/xDCghA= -github.com/fluxcd/notification-controller/api v1.1.0 h1:qx5t5DmArfPLxG2bsYZXIqDXLnijUddlHeRfciALwQw= -github.com/fluxcd/notification-controller/api v1.1.0/go.mod h1:6MqWVQeI5yrYR7zp0GFqsfXitNPGJrnfOWxO2w3jylg= +github.com/fluxcd/notification-controller/api v1.2.1 h1:yPQZ7ppYvazxl/Vsespbx9VlVyopH7p8pKGzZTNxI0c= +github.com/fluxcd/notification-controller/api v1.2.1/go.mod h1:1sWTpAXkga5zkXOgFoR+NIJgHNclBcfAHUJ/rMAjnYY= github.com/fluxcd/pkg/apis/acl v0.1.0 h1:EoAl377hDQYL3WqanWCdifauXqXbMyFuK82NnX6pH4Q= github.com/fluxcd/pkg/apis/acl v0.1.0/go.mod h1:zfEZzz169Oap034EsDhmCAGgnWlcWmIObZjYMusoXS8= github.com/fluxcd/pkg/apis/event v0.6.0 h1:AUaeee1CGWb65BLqVximHXG8Gcu6vWuYONIq6tVpjgo= @@ -151,8 +151,8 @@ github.com/fluxcd/pkg/ssh v0.9.0 h1:egRvg4AKarObFKXsBDZ5oBZ5PCjmQ4Q6hX+6GmrdbH0= github.com/fluxcd/pkg/ssh v0.9.0/go.mod h1:3KKbfcFn4l+HqYdHKqcu2LO8RvFv0Kh6tYRSUtONC/8= github.com/fluxcd/pkg/version v0.2.2 h1:ZpVXECeLA5hIQMft11iLp6gN3cKcz6UNuVTQPw/bRdI= github.com/fluxcd/pkg/version v0.2.2/go.mod h1:NGnh/no8S6PyfCDxRFrPY3T5BUnqP48MxfxNRU0z8C0= -github.com/fluxcd/source-controller/api v1.1.2 h1:FfKDKVWnopo+Q2pOAxgHEjrtr4MP41L8aapR4mqBhBk= -github.com/fluxcd/source-controller/api v1.1.2/go.mod h1:ZLkaUd1KQIjtLPCvO63Ni5zpnSTVBAkeRgFBzMItbDQ= +github.com/fluxcd/source-controller/api v1.2.1 h1:zWRfwMB/BkV0A/duZQwHEcrE/abWJQt7DUgYTzn4IzM= +github.com/fluxcd/source-controller/api v1.2.1/go.mod h1:n+PMCJXl/AYCjWHn5N/MUuoIFKfDg4kCDviFIa7fDvI= github.com/fluxcd/test-infra/tftestenv v0.0.0-20230831142147-627bca8e7916 h1:w9UGknpfAGbiObQALZiuWYGeriAU1wKCFTmI2tj/96M= github.com/fluxcd/test-infra/tftestenv v0.0.0-20230831142147-627bca8e7916/go.mod h1:liFlLEXgambGVdWSJ4JzbIHf1Vjpp1HwUyPazPIVZug= github.com/flynn/go-shlex v0.0.0-20150515145356-3f9db97f8568/go.mod h1:xEzjJPgXI435gkrCt3MPfRiAkVrwSbHsst4LCFVfpJc= diff --git a/tests/integration/notification_test.go b/tests/integration/notification_test.go index 4ea016920b..6df2d145f2 100644 --- a/tests/integration/notification_test.go +++ b/tests/integration/notification_test.go @@ -31,7 +31,7 @@ import ( kustomizev1 "github.com/fluxcd/kustomize-controller/api/v1" notiv1 "github.com/fluxcd/notification-controller/api/v1" - notiv1beta2 "github.com/fluxcd/notification-controller/api/v1beta2" + notiv1beta3 "github.com/fluxcd/notification-controller/api/v1beta3" events "github.com/fluxcd/pkg/apis/event/v1beta1" "github.com/fluxcd/pkg/apis/meta" sourcev1 "github.com/fluxcd/source-controller/api/v1" @@ -66,12 +66,12 @@ metadata: g.Expect(testEnv.Create(ctx, &namespace)).To(Succeed()) defer testEnv.Delete(ctx, &namespace) - provider := notiv1beta2.Provider{ + provider := notiv1beta3.Provider{ ObjectMeta: metav1.ObjectMeta{ Name: testID, Namespace: testID, }, - Spec: notiv1beta2.ProviderSpec{ + Spec: notiv1beta3.ProviderSpec{ Type: cfg.notificationCfg.providerType, Address: cfg.notificationCfg.providerAddress, Channel: cfg.notificationCfg.providerChannel, @@ -98,12 +98,12 @@ metadata: g.Expect(testEnv.Create(ctx, &provider)).To(Succeed()) defer testEnv.Delete(ctx, &provider) - alert := notiv1beta2.Alert{ + alert := notiv1beta3.Alert{ ObjectMeta: metav1.ObjectMeta{ Name: testID, Namespace: testID, }, - Spec: notiv1beta2.AlertSpec{ + Spec: notiv1beta3.AlertSpec{ ProviderRef: meta.LocalObjectReference{ Name: provider.Name, }, @@ -121,7 +121,7 @@ metadata: g.Eventually(func() bool { nn := types.NamespacedName{Name: provider.Name, Namespace: provider.Namespace} - obj := ¬iv1beta2.Provider{} + obj := ¬iv1beta3.Provider{} err := testEnv.Get(ctx, nn, obj) if err != nil { return false @@ -132,7 +132,7 @@ metadata: } nn = types.NamespacedName{Name: alert.Name, Namespace: alert.Namespace} - alertObj := ¬iv1beta2.Alert{} + alertObj := ¬iv1beta3.Alert{} err = testEnv.Get(ctx, nn, alertObj) if err != nil { return false diff --git a/tests/integration/suite_test.go b/tests/integration/suite_test.go index 8044c46cbc..87c0fdb09d 100644 --- a/tests/integration/suite_test.go +++ b/tests/integration/suite_test.go @@ -34,7 +34,7 @@ import ( automationv1beta1 "github.com/fluxcd/image-automation-controller/api/v1beta1" reflectorv1beta2 "github.com/fluxcd/image-reflector-controller/api/v1beta2" kustomizev1 "github.com/fluxcd/kustomize-controller/api/v1" - notiv1beta2 "github.com/fluxcd/notification-controller/api/v1beta2" + notiv1beta3 "github.com/fluxcd/notification-controller/api/v1beta3" "github.com/fluxcd/pkg/git" sourcev1 "github.com/fluxcd/source-controller/api/v1" sourcev1beta2 "github.com/fluxcd/source-controller/api/v1beta2" @@ -166,7 +166,7 @@ func init() { utilruntime.Must(helmv2beta1.AddToScheme(scheme.Scheme)) utilruntime.Must(reflectorv1beta2.AddToScheme(scheme.Scheme)) utilruntime.Must(automationv1beta1.AddToScheme(scheme.Scheme)) - utilruntime.Must(notiv1beta2.AddToScheme(scheme.Scheme)) + utilruntime.Must(notiv1beta3.AddToScheme(scheme.Scheme)) random = rand.New(rand.NewSource(time.Now().UnixNano())) } From 2649bfb3a301d23318308095ad91a4d2ccc7c9d6 Mon Sep 17 00:00:00 2001 From: Sunny Date: Fri, 8 Dec 2023 14:39:53 +0000 Subject: [PATCH 3/3] tests/int: do not wait for static objects HelmRepo OCI, Alerts and Providers are static objects and don't need to be checked for readiness. Signed-off-by: Sunny --- tests/integration/notification_test.go | 27 -------------------------- tests/integration/oci_test.go | 17 +--------------- 2 files changed, 1 insertion(+), 43 deletions(-) diff --git a/tests/integration/notification_test.go b/tests/integration/notification_test.go index 6df2d145f2..ef154147fb 100644 --- a/tests/integration/notification_test.go +++ b/tests/integration/notification_test.go @@ -27,7 +27,6 @@ import ( . "github.com/onsi/gomega" corev1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/types" kustomizev1 "github.com/fluxcd/kustomize-controller/api/v1" notiv1 "github.com/fluxcd/notification-controller/api/v1" @@ -119,32 +118,6 @@ metadata: g.Expect(testEnv.Create(ctx, &alert)).ToNot(HaveOccurred()) defer testEnv.Delete(ctx, &alert) - g.Eventually(func() bool { - nn := types.NamespacedName{Name: provider.Name, Namespace: provider.Namespace} - obj := ¬iv1beta3.Provider{} - err := testEnv.Get(ctx, nn, obj) - if err != nil { - return false - } - if err := checkReadyCondition(obj); err != nil { - t.Log(err) - return false - } - - nn = types.NamespacedName{Name: alert.Name, Namespace: alert.Namespace} - alertObj := ¬iv1beta3.Alert{} - err = testEnv.Get(ctx, nn, alertObj) - if err != nil { - return false - } - if err := checkReadyCondition(alertObj); err != nil { - t.Log(err) - return false - } - - return true - }, testTimeout, testInterval).Should(BeTrue()) - modifyKsSpec := func(spec *kustomizev1.KustomizationSpec) { spec.Interval = metav1.Duration{Duration: 30 * time.Second} spec.HealthChecks = []meta.NamespacedObjectKindReference{ diff --git a/tests/integration/oci_test.go b/tests/integration/oci_test.go index c95e07d6d7..497883646d 100644 --- a/tests/integration/oci_test.go +++ b/tests/integration/oci_test.go @@ -49,7 +49,7 @@ func TestOCIHelmRelease(t *testing.T) { err := pushImagesFromURL(repoURL, "ghcr.io/stefanprodan/charts/podinfo:6.2.0", []string{"6.2.0"}) g.Expect(err).ToNot(HaveOccurred()) - // Create HelmRepository and wait for it to sync + // Create HelmRepository. helmRepository := sourcev1.HelmRepository{ ObjectMeta: metav1.ObjectMeta{Name: testID, Namespace: testID}, Spec: sourcev1.HelmRepositorySpec{ @@ -66,21 +66,6 @@ func TestOCIHelmRelease(t *testing.T) { g.Expect(testEnv.Create(ctx, &helmRepository)).To(Succeed()) defer testEnv.Delete(ctx, &helmRepository) - g.Eventually(func() bool { - obj := &sourcev1.HelmRepository{} - nn := types.NamespacedName{Name: helmRepository.Name, Namespace: helmRepository.Namespace} - err := testEnv.Get(ctx, nn, obj) - if err != nil { - t.Logf("error getting helm repository %s", err.Error()) - return false - } - if err := checkReadyCondition(obj); err != nil { - t.Logf("%v", err) - return false - } - return true - }, testTimeout, testInterval).Should(BeTrue()) - // create helm release helmRelease := helmv2.HelmRelease{ ObjectMeta: metav1.ObjectMeta{Name: testID, Namespace: testID},