From 9dd98fb2b20f87e4119785405e8d33ab178e472f Mon Sep 17 00:00:00 2001 From: Sunny Date: Thu, 16 Feb 2023 19:02:48 +0000 Subject: [PATCH] Update image-reflector API to v1beta2 Signed-off-by: Sunny --- cmd/flux/create_image_policy.go | 2 +- cmd/flux/create_image_repository.go | 2 +- cmd/flux/delete_image_policy.go | 2 +- cmd/flux/delete_image_repository.go | 2 +- cmd/flux/export_image_policy.go | 2 +- cmd/flux/export_image_repository.go | 2 +- cmd/flux/get_image_all.go | 2 +- cmd/flux/get_image_policy.go | 2 +- cmd/flux/get_image_repository.go | 2 +- cmd/flux/image.go | 2 +- cmd/flux/reconcile_image_repository.go | 2 +- cmd/flux/resume_image_repository.go | 2 +- cmd/flux/suspend_image_repository.go | 2 +- cmd/flux/testdata/export/image-policy.yaml | 2 +- cmd/flux/testdata/export/image-repo.yaml | 5 ++++- cmd/flux/testdata/export/objects.yaml | 4 ++-- .../testdata/image/get_image_policy_regex.golden | 4 ++-- .../image/get_image_policy_semver.golden | 4 ++-- go.mod | 4 ++-- go.sum | 8 ++++---- internal/utils/utils.go | 2 +- .../kustomization.yaml | 4 ++-- manifests/crds/kustomization.yaml | 2 +- pkg/uninstall/uninstall.go | 2 +- tests/azure/azure_test.go | 16 ++++++++-------- tests/azure/go.mod | 4 ++-- tests/azure/go.sum | 8 ++++---- tests/azure/util_test.go | 4 ++-- tests/image-automation/auto.yaml | 4 ++-- 29 files changed, 53 insertions(+), 50 deletions(-) diff --git a/cmd/flux/create_image_policy.go b/cmd/flux/create_image_policy.go index b9d8eb1a..0b9564ae 100644 --- a/cmd/flux/create_image_policy.go +++ b/cmd/flux/create_image_policy.go @@ -28,7 +28,7 @@ import ( "github.com/fluxcd/pkg/apis/meta" - imagev1 "github.com/fluxcd/image-reflector-controller/api/v1beta1" + imagev1 "github.com/fluxcd/image-reflector-controller/api/v1beta2" ) var createImagePolicyCmd = &cobra.Command{ diff --git a/cmd/flux/create_image_repository.go b/cmd/flux/create_image_repository.go index 140658f3..d4ce1fe6 100644 --- a/cmd/flux/create_image_repository.go +++ b/cmd/flux/create_image_repository.go @@ -26,7 +26,7 @@ import ( "github.com/fluxcd/pkg/apis/meta" - imagev1 "github.com/fluxcd/image-reflector-controller/api/v1beta1" + imagev1 "github.com/fluxcd/image-reflector-controller/api/v1beta2" ) var createImageRepositoryCmd = &cobra.Command{ diff --git a/cmd/flux/delete_image_policy.go b/cmd/flux/delete_image_policy.go index e86924da..7d02f742 100644 --- a/cmd/flux/delete_image_policy.go +++ b/cmd/flux/delete_image_policy.go @@ -19,7 +19,7 @@ package main import ( "github.com/spf13/cobra" - imagev1 "github.com/fluxcd/image-reflector-controller/api/v1beta1" + imagev1 "github.com/fluxcd/image-reflector-controller/api/v1beta2" ) var deleteImagePolicyCmd = &cobra.Command{ diff --git a/cmd/flux/delete_image_repository.go b/cmd/flux/delete_image_repository.go index a8769788..de5388a6 100644 --- a/cmd/flux/delete_image_repository.go +++ b/cmd/flux/delete_image_repository.go @@ -19,7 +19,7 @@ package main import ( "github.com/spf13/cobra" - imagev1 "github.com/fluxcd/image-reflector-controller/api/v1beta1" + imagev1 "github.com/fluxcd/image-reflector-controller/api/v1beta2" ) var deleteImageRepositoryCmd = &cobra.Command{ diff --git a/cmd/flux/export_image_policy.go b/cmd/flux/export_image_policy.go index 5302dd63..7bc24273 100644 --- a/cmd/flux/export_image_policy.go +++ b/cmd/flux/export_image_policy.go @@ -20,7 +20,7 @@ import ( "github.com/spf13/cobra" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - imagev1 "github.com/fluxcd/image-reflector-controller/api/v1beta1" + imagev1 "github.com/fluxcd/image-reflector-controller/api/v1beta2" ) var exportImagePolicyCmd = &cobra.Command{ diff --git a/cmd/flux/export_image_repository.go b/cmd/flux/export_image_repository.go index 13f72f7d..29485789 100644 --- a/cmd/flux/export_image_repository.go +++ b/cmd/flux/export_image_repository.go @@ -20,7 +20,7 @@ import ( "github.com/spf13/cobra" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - imagev1 "github.com/fluxcd/image-reflector-controller/api/v1beta1" + imagev1 "github.com/fluxcd/image-reflector-controller/api/v1beta2" ) var exportImageRepositoryCmd = &cobra.Command{ diff --git a/cmd/flux/get_image_all.go b/cmd/flux/get_image_all.go index f554232e..f861a26b 100644 --- a/cmd/flux/get_image_all.go +++ b/cmd/flux/get_image_all.go @@ -22,7 +22,7 @@ import ( "github.com/spf13/cobra" autov1 "github.com/fluxcd/image-automation-controller/api/v1beta1" - imagev1 "github.com/fluxcd/image-reflector-controller/api/v1beta1" + imagev1 "github.com/fluxcd/image-reflector-controller/api/v1beta2" ) var getImageAllCmd = &cobra.Command{ diff --git a/cmd/flux/get_image_policy.go b/cmd/flux/get_image_policy.go index a853817e..9d261fe8 100644 --- a/cmd/flux/get_image_policy.go +++ b/cmd/flux/get_image_policy.go @@ -22,7 +22,7 @@ import ( "github.com/spf13/cobra" "k8s.io/apimachinery/pkg/runtime" - imagev1 "github.com/fluxcd/image-reflector-controller/api/v1beta1" + imagev1 "github.com/fluxcd/image-reflector-controller/api/v1beta2" ) var getImagePolicyCmd = &cobra.Command{ diff --git a/cmd/flux/get_image_repository.go b/cmd/flux/get_image_repository.go index 3b190b7d..0e9bf865 100644 --- a/cmd/flux/get_image_repository.go +++ b/cmd/flux/get_image_repository.go @@ -25,7 +25,7 @@ import ( "github.com/spf13/cobra" "k8s.io/apimachinery/pkg/runtime" - imagev1 "github.com/fluxcd/image-reflector-controller/api/v1beta1" + imagev1 "github.com/fluxcd/image-reflector-controller/api/v1beta2" ) var getImageRepositoryCmd = &cobra.Command{ diff --git a/cmd/flux/image.go b/cmd/flux/image.go index 4659788b..38c264a7 100644 --- a/cmd/flux/image.go +++ b/cmd/flux/image.go @@ -20,7 +20,7 @@ import ( "sigs.k8s.io/controller-runtime/pkg/client" autov1 "github.com/fluxcd/image-automation-controller/api/v1beta1" - imagev1 "github.com/fluxcd/image-reflector-controller/api/v1beta1" + imagev1 "github.com/fluxcd/image-reflector-controller/api/v1beta2" ) // These are general-purpose adapters for attaching methods to, for diff --git a/cmd/flux/reconcile_image_repository.go b/cmd/flux/reconcile_image_repository.go index efd89e9c..04e20d04 100644 --- a/cmd/flux/reconcile_image_repository.go +++ b/cmd/flux/reconcile_image_repository.go @@ -21,7 +21,7 @@ import ( "github.com/spf13/cobra" - imagev1 "github.com/fluxcd/image-reflector-controller/api/v1beta1" + imagev1 "github.com/fluxcd/image-reflector-controller/api/v1beta2" ) var reconcileImageRepositoryCmd = &cobra.Command{ diff --git a/cmd/flux/resume_image_repository.go b/cmd/flux/resume_image_repository.go index b0c15b18..a5e69c26 100644 --- a/cmd/flux/resume_image_repository.go +++ b/cmd/flux/resume_image_repository.go @@ -19,7 +19,7 @@ package main import ( "github.com/spf13/cobra" - imagev1 "github.com/fluxcd/image-reflector-controller/api/v1beta1" + imagev1 "github.com/fluxcd/image-reflector-controller/api/v1beta2" ) var resumeImageRepositoryCmd = &cobra.Command{ diff --git a/cmd/flux/suspend_image_repository.go b/cmd/flux/suspend_image_repository.go index 826c4de4..000708cb 100644 --- a/cmd/flux/suspend_image_repository.go +++ b/cmd/flux/suspend_image_repository.go @@ -19,7 +19,7 @@ package main import ( "github.com/spf13/cobra" - imagev1 "github.com/fluxcd/image-reflector-controller/api/v1beta1" + imagev1 "github.com/fluxcd/image-reflector-controller/api/v1beta2" ) var suspendImageRepositoryCmd = &cobra.Command{ diff --git a/cmd/flux/testdata/export/image-policy.yaml b/cmd/flux/testdata/export/image-policy.yaml index 4a1bcbca..d61b535e 100644 --- a/cmd/flux/testdata/export/image-policy.yaml +++ b/cmd/flux/testdata/export/image-policy.yaml @@ -1,5 +1,5 @@ --- -apiVersion: image.toolkit.fluxcd.io/v1beta1 +apiVersion: image.toolkit.fluxcd.io/v1beta2 kind: ImagePolicy metadata: name: flux-system diff --git a/cmd/flux/testdata/export/image-repo.yaml b/cmd/flux/testdata/export/image-repo.yaml index 959126be..ca472928 100644 --- a/cmd/flux/testdata/export/image-repo.yaml +++ b/cmd/flux/testdata/export/image-repo.yaml @@ -1,10 +1,13 @@ --- -apiVersion: image.toolkit.fluxcd.io/v1beta1 +apiVersion: image.toolkit.fluxcd.io/v1beta2 kind: ImageRepository metadata: name: flux-system namespace: {{ .fluxns }} spec: + exclusionList: + - ^.*\.sig$ image: ghcr.io/test/podinfo interval: 1m0s + provider: generic diff --git a/cmd/flux/testdata/export/objects.yaml b/cmd/flux/testdata/export/objects.yaml index 426a6e00..b052199d 100644 --- a/cmd/flux/testdata/export/objects.yaml +++ b/cmd/flux/testdata/export/objects.yaml @@ -30,7 +30,7 @@ spec: - kind: "Kustomization" name: "*" --- -apiVersion: image.toolkit.fluxcd.io/v1beta1 +apiVersion: image.toolkit.fluxcd.io/v1beta2 kind: ImageRepository metadata: name: flux-system @@ -39,7 +39,7 @@ spec: image: ghcr.io/test/podinfo interval: 1m0s --- -apiVersion: image.toolkit.fluxcd.io/v1beta1 +apiVersion: image.toolkit.fluxcd.io/v1beta2 kind: ImagePolicy metadata: name: flux-system diff --git a/cmd/flux/testdata/image/get_image_policy_regex.golden b/cmd/flux/testdata/image/get_image_policy_regex.golden index b7cf40a9..9f654d4e 100644 --- a/cmd/flux/testdata/image/get_image_policy_regex.golden +++ b/cmd/flux/testdata/image/get_image_policy_regex.golden @@ -1,2 +1,2 @@ -NAME LATEST IMAGE READY MESSAGE -podinfo-regex ghcr.io/stefanprodan/podinfo:5.0.0 True Latest image tag for 'ghcr.io/stefanprodan/podinfo' resolved to: 5.0.0 +NAME LATEST IMAGE READY MESSAGE +podinfo-regex ghcr.io/stefanprodan/podinfo:5.0.0 True Latest image tag for 'ghcr.io/stefanprodan/podinfo' resolved to 5.0.0 diff --git a/cmd/flux/testdata/image/get_image_policy_semver.golden b/cmd/flux/testdata/image/get_image_policy_semver.golden index 30ce52b7..7100445e 100644 --- a/cmd/flux/testdata/image/get_image_policy_semver.golden +++ b/cmd/flux/testdata/image/get_image_policy_semver.golden @@ -1,2 +1,2 @@ -NAME LATEST IMAGE READY MESSAGE -podinfo-semver ghcr.io/stefanprodan/podinfo:5.0.3 True Latest image tag for 'ghcr.io/stefanprodan/podinfo' resolved to: 5.0.3 +NAME LATEST IMAGE READY MESSAGE +podinfo-semver ghcr.io/stefanprodan/podinfo:5.0.3 True Latest image tag for 'ghcr.io/stefanprodan/podinfo' resolved to 5.0.3 diff --git a/go.mod b/go.mod index e32b48af..c64240e3 100644 --- a/go.mod +++ b/go.mod @@ -11,7 +11,7 @@ require ( github.com/fluxcd/go-git/v5 v5.0.0-20221219190809-2e5c9d01cfc4 github.com/fluxcd/helm-controller/api v0.29.0 github.com/fluxcd/image-automation-controller/api v0.29.0 - github.com/fluxcd/image-reflector-controller/api v0.24.0 + github.com/fluxcd/image-reflector-controller/api v0.25.0 github.com/fluxcd/kustomize-controller/api v0.33.0 github.com/fluxcd/notification-controller/api v0.31.0 github.com/fluxcd/pkg/apis/meta v0.19.0 @@ -49,7 +49,7 @@ require ( k8s.io/client-go v0.26.1 k8s.io/kubectl v0.26.1 sigs.k8s.io/cli-utils v0.34.0 - sigs.k8s.io/controller-runtime v0.14.2 + sigs.k8s.io/controller-runtime v0.14.4 sigs.k8s.io/kustomize/api v0.12.1 sigs.k8s.io/kustomize/kyaml v0.13.9 sigs.k8s.io/yaml v1.3.0 diff --git a/go.sum b/go.sum index 32db9696..aa65c0e3 100644 --- a/go.sum +++ b/go.sum @@ -203,8 +203,8 @@ github.com/fluxcd/helm-controller/api v0.29.0 h1:aoyI2fQNR/8rmUCz6l4kqQzgS3oAvP3 github.com/fluxcd/helm-controller/api v0.29.0/go.mod h1:BXivPOvBtSKRmcs2HdAtlR5hlC0UGU5Zg847KmtXvkQ= github.com/fluxcd/image-automation-controller/api v0.29.0 h1:86g4NgPCzfBaE4CRKc2EtyaVrEdbFVs81KLOz4vHZjA= github.com/fluxcd/image-automation-controller/api v0.29.0/go.mod h1:mmRgP6i2TzEQUzIIjay0G7fPb6Y11Qzw1CTD7aj1zMc= -github.com/fluxcd/image-reflector-controller/api v0.24.0 h1:F0X+IaRSPAWeV5ZDzeqw7hKbq74AmxLSU/SwdXCcc3c= -github.com/fluxcd/image-reflector-controller/api v0.24.0/go.mod h1:F4l0tBvVk2XAKoRt4xzZmj+XmuaD6fc44n8waAEZMjE= +github.com/fluxcd/image-reflector-controller/api v0.25.0 h1:tK0Hc7Xxr5z6wtBvLTX/cEwjt9YZdidwQ6JQRZuni3w= +github.com/fluxcd/image-reflector-controller/api v0.25.0/go.mod h1:VXMXfQ5nLZtP+VKuqxYlQOyJ5aFjvC8YpFp1fSwcEAQ= github.com/fluxcd/kustomize-controller/api v0.33.0 h1:ELTDIBC9dYaQjwIOtQxXAX2S4ydD6VQbmgf9p8wxIpE= github.com/fluxcd/kustomize-controller/api v0.33.0/go.mod h1:6dVUIhT3Dge4Fyljv/qILYygwUTpAXl5IDjoOFLebfE= github.com/fluxcd/notification-controller/api v0.31.0 h1:KcxsVwL1DU1BGro0raAt5+FwHCgGJwNsa915DdrAehs= @@ -1022,8 +1022,8 @@ rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= sigs.k8s.io/cli-utils v0.34.0 h1:zCUitt54f0/MYj/ajVFnG6XSXMhpZ72O/3RewIchW8w= sigs.k8s.io/cli-utils v0.34.0/go.mod h1:EXyMwPMu9OL+LRnj0JEMsGG/fRvbgFadcVlSnE8RhFs= -sigs.k8s.io/controller-runtime v0.14.2 h1:P6IwDhbsRWsBClt/8/h8Zy36bCuGuW5Op7MHpFrN/60= -sigs.k8s.io/controller-runtime v0.14.2/go.mod h1:WqIdsAY6JBsjfc/CqO0CORmNtoCtE4S6qbPc9s68h+0= +sigs.k8s.io/controller-runtime v0.14.4 h1:Kd/Qgx5pd2XUL08eOV2vwIq3L9GhIbJ5Nxengbd4/0M= +sigs.k8s.io/controller-runtime v0.14.4/go.mod h1:WqIdsAY6JBsjfc/CqO0CORmNtoCtE4S6qbPc9s68h+0= sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd h1:EDPBXCAspyGV4jQlpZSudPeMmr1bNJefnuqLsRAsHZo= sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd/go.mod h1:B8JuhiUyNFVKdsE8h686QcCxMaH6HrOAZj4vswFpcB0= sigs.k8s.io/kustomize/api v0.12.1 h1:7YM7gW3kYBwtKvoY216ZzY+8hM+lV53LUayghNRJ0vM= diff --git a/internal/utils/utils.go b/internal/utils/utils.go index ab9abe2e..8b876bdf 100644 --- a/internal/utils/utils.go +++ b/internal/utils/utils.go @@ -43,7 +43,7 @@ import ( helmv2 "github.com/fluxcd/helm-controller/api/v2beta1" imageautov1 "github.com/fluxcd/image-automation-controller/api/v1beta1" - imagereflectv1 "github.com/fluxcd/image-reflector-controller/api/v1beta1" + imagereflectv1 "github.com/fluxcd/image-reflector-controller/api/v1beta2" kustomizev1 "github.com/fluxcd/kustomize-controller/api/v1beta2" notificationv1 "github.com/fluxcd/notification-controller/api/v1beta2" "github.com/fluxcd/pkg/apis/meta" diff --git a/manifests/bases/image-reflector-controller/kustomization.yaml b/manifests/bases/image-reflector-controller/kustomization.yaml index ec599097..a854e6b5 100644 --- a/manifests/bases/image-reflector-controller/kustomization.yaml +++ b/manifests/bases/image-reflector-controller/kustomization.yaml @@ -1,8 +1,8 @@ apiVersion: kustomize.config.k8s.io/v1beta1 kind: Kustomization resources: -- https://github.com/fluxcd/image-reflector-controller/releases/download/v0.24.0/image-reflector-controller.crds.yaml -- https://github.com/fluxcd/image-reflector-controller/releases/download/v0.24.0/image-reflector-controller.deployment.yaml +- https://github.com/fluxcd/image-reflector-controller/releases/download/v0.25.0/image-reflector-controller.crds.yaml +- https://github.com/fluxcd/image-reflector-controller/releases/download/v0.25.0/image-reflector-controller.deployment.yaml - account.yaml transformers: - labels.yaml diff --git a/manifests/crds/kustomization.yaml b/manifests/crds/kustomization.yaml index 4fe699f4..d0ef5470 100644 --- a/manifests/crds/kustomization.yaml +++ b/manifests/crds/kustomization.yaml @@ -5,5 +5,5 @@ resources: - https://github.com/fluxcd/kustomize-controller/releases/download/v0.33.0/kustomize-controller.crds.yaml - https://github.com/fluxcd/helm-controller/releases/download/v0.29.0/helm-controller.crds.yaml - https://github.com/fluxcd/notification-controller/releases/download/v0.31.0/notification-controller.crds.yaml -- https://github.com/fluxcd/image-reflector-controller/releases/download/v0.24.0/image-reflector-controller.crds.yaml +- https://github.com/fluxcd/image-reflector-controller/releases/download/v0.25.0/image-reflector-controller.crds.yaml - https://github.com/fluxcd/image-automation-controller/releases/download/v0.29.0/image-automation-controller.crds.yaml diff --git a/pkg/uninstall/uninstall.go b/pkg/uninstall/uninstall.go index 0ec48176..ce32328b 100644 --- a/pkg/uninstall/uninstall.go +++ b/pkg/uninstall/uninstall.go @@ -32,7 +32,7 @@ import ( "github.com/fluxcd/flux2/pkg/manifestgen" helmv2 "github.com/fluxcd/helm-controller/api/v2beta1" autov1 "github.com/fluxcd/image-automation-controller/api/v1beta1" - imagev1 "github.com/fluxcd/image-reflector-controller/api/v1beta1" + imagev1 "github.com/fluxcd/image-reflector-controller/api/v1beta2" kustomizev1 "github.com/fluxcd/kustomize-controller/api/v1beta2" notificationv1 "github.com/fluxcd/notification-controller/api/v1beta2" sourcev1 "github.com/fluxcd/source-controller/api/v1beta2" diff --git a/tests/azure/azure_test.go b/tests/azure/azure_test.go index 30fde85a..5a20e94a 100644 --- a/tests/azure/azure_test.go +++ b/tests/azure/azure_test.go @@ -31,7 +31,7 @@ import ( "time" eventhub "github.com/Azure/azure-event-hubs-go/v3" - "github.com/hashicorp/hc-install" + install "github.com/hashicorp/hc-install" "github.com/hashicorp/hc-install/fs" "github.com/hashicorp/hc-install/product" "github.com/hashicorp/hc-install/src" @@ -50,7 +50,7 @@ import ( extgogit "github.com/fluxcd/go-git/v5" "github.com/fluxcd/go-git/v5/plumbing" automationv1beta1 "github.com/fluxcd/image-automation-controller/api/v1beta1" - reflectorv1beta1 "github.com/fluxcd/image-reflector-controller/api/v1beta1" + reflectorv1beta2 "github.com/fluxcd/image-reflector-controller/api/v1beta2" kustomizev1 "github.com/fluxcd/kustomize-controller/api/v1beta2" notiv1beta1 "github.com/fluxcd/notification-controller/api/v1beta2" eventv1 "github.com/fluxcd/pkg/apis/event/v1beta1" @@ -441,14 +441,14 @@ func TestImageRepositoryACR(t *testing.T) { return nil }) require.NoError(t, err) - imageRepository := reflectorv1beta1.ImageRepository{ + imageRepository := reflectorv1beta2.ImageRepository{ ObjectMeta: metav1.ObjectMeta{ Name: "podinfo", Namespace: name, }, } _, err = controllerutil.CreateOrUpdate(ctx, cfg.kubeClient, &imageRepository, func() error { - imageRepository.Spec = reflectorv1beta1.ImageRepositorySpec{ + imageRepository.Spec = reflectorv1beta2.ImageRepositorySpec{ Image: fmt.Sprintf("%s/container/podinfo", cfg.acr.url), Interval: metav1.Duration{ Duration: 1 * time.Minute, @@ -460,19 +460,19 @@ func TestImageRepositoryACR(t *testing.T) { return nil }) require.NoError(t, err) - imagePolicy := reflectorv1beta1.ImagePolicy{ + imagePolicy := reflectorv1beta2.ImagePolicy{ ObjectMeta: metav1.ObjectMeta{ Name: "podinfo", Namespace: name, }, } _, err = controllerutil.CreateOrUpdate(ctx, cfg.kubeClient, &imagePolicy, func() error { - imagePolicy.Spec = reflectorv1beta1.ImagePolicySpec{ + imagePolicy.Spec = reflectorv1beta2.ImagePolicySpec{ ImageRepositoryRef: meta.NamespacedObjectReference{ Name: imageRepository.Name, }, - Policy: reflectorv1beta1.ImagePolicyChoice{ - SemVer: &reflectorv1beta1.SemVerPolicy{ + Policy: reflectorv1beta2.ImagePolicyChoice{ + SemVer: &reflectorv1beta2.SemVerPolicy{ Range: "1.0.x", }, }, diff --git a/tests/azure/go.mod b/tests/azure/go.mod index f12fc094..88f0fa44 100644 --- a/tests/azure/go.mod +++ b/tests/azure/go.mod @@ -7,7 +7,7 @@ require ( github.com/fluxcd/go-git/v5 v5.0.0-20221219190809-2e5c9d01cfc4 github.com/fluxcd/helm-controller/api v0.28.1 github.com/fluxcd/image-automation-controller/api v0.28.0 - github.com/fluxcd/image-reflector-controller/api v0.23.1 + github.com/fluxcd/image-reflector-controller/api v0.25.0 github.com/fluxcd/kustomize-controller/api v0.32.0 github.com/fluxcd/notification-controller/api v0.30.2 github.com/fluxcd/pkg/apis/event v0.3.0 @@ -24,7 +24,7 @@ require ( k8s.io/api v0.26.1 k8s.io/apimachinery v0.26.1 k8s.io/client-go v0.26.1 - sigs.k8s.io/controller-runtime v0.14.2 + sigs.k8s.io/controller-runtime v0.14.4 ) // Fix CVE-2022-32149 diff --git a/tests/azure/go.sum b/tests/azure/go.sum index c6767602..a83bc3a9 100644 --- a/tests/azure/go.sum +++ b/tests/azure/go.sum @@ -132,8 +132,8 @@ github.com/fluxcd/helm-controller/api v0.28.1 h1:2qjZymRAbl/OqId2lpKCzuleKhId34X github.com/fluxcd/helm-controller/api v0.28.1/go.mod h1:/qCtlP718rveiAL7Mova4fGAk0aZv2qyYQn87zcUNhs= github.com/fluxcd/image-automation-controller/api v0.28.0 h1:BYiOP28h/QRuZTZixlmMJ3RnQw+FGAn54nVsoUjNXi8= github.com/fluxcd/image-automation-controller/api v0.28.0/go.mod h1:ztBI5X/dEzZuJOf7igqnx6ZvrSGtrXLmCvP5ieb3fWc= -github.com/fluxcd/image-reflector-controller/api v0.23.1 h1:ysYzSDhFV5JPzrhTnyabbjFne6GyXsH3Sk/Kd58+Rwk= -github.com/fluxcd/image-reflector-controller/api v0.23.1/go.mod h1:uomyKK0ZWFOsG40wqmCJvIN8OpAiPKFteXe+cdhB/Z0= +github.com/fluxcd/image-reflector-controller/api v0.25.0 h1:tK0Hc7Xxr5z6wtBvLTX/cEwjt9YZdidwQ6JQRZuni3w= +github.com/fluxcd/image-reflector-controller/api v0.25.0/go.mod h1:VXMXfQ5nLZtP+VKuqxYlQOyJ5aFjvC8YpFp1fSwcEAQ= github.com/fluxcd/kustomize-controller/api v0.32.0 h1:5QGLV5xRI8S3tUFJNV+vVzy/pdl0d6Ua0AccWwGRKfs= github.com/fluxcd/kustomize-controller/api v0.32.0/go.mod h1:t2pqIe1SMzdZIAG/aietrg3XpRXmpcubf0uxDJOryEA= github.com/fluxcd/notification-controller/api v0.30.2 h1:IOxRm/ALdKTk6Xwwc3Tpsfybze3/zVruaI3GN6F+KrA= @@ -739,8 +739,8 @@ k8s.io/utils v0.0.0-20221128185143-99ec85e7a448/go.mod h1:OLgZIPagt7ERELqWJFomSt rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= -sigs.k8s.io/controller-runtime v0.14.2 h1:P6IwDhbsRWsBClt/8/h8Zy36bCuGuW5Op7MHpFrN/60= -sigs.k8s.io/controller-runtime v0.14.2/go.mod h1:WqIdsAY6JBsjfc/CqO0CORmNtoCtE4S6qbPc9s68h+0= +sigs.k8s.io/controller-runtime v0.14.4 h1:Kd/Qgx5pd2XUL08eOV2vwIq3L9GhIbJ5Nxengbd4/0M= +sigs.k8s.io/controller-runtime v0.14.4/go.mod h1:WqIdsAY6JBsjfc/CqO0CORmNtoCtE4S6qbPc9s68h+0= sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd h1:EDPBXCAspyGV4jQlpZSudPeMmr1bNJefnuqLsRAsHZo= sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd/go.mod h1:B8JuhiUyNFVKdsE8h686QcCxMaH6HrOAZj4vswFpcB0= sigs.k8s.io/structured-merge-diff/v4 v4.2.3 h1:PRbqxJClWWYMNV1dhaG4NsibJbArud9kFxnAMREiWFE= diff --git a/tests/azure/util_test.go b/tests/azure/util_test.go index f06cfccd..f2e8cc31 100644 --- a/tests/azure/util_test.go +++ b/tests/azure/util_test.go @@ -42,7 +42,7 @@ import ( "github.com/fluxcd/go-git/v5/plumbing/transport/http" helmv2beta1 "github.com/fluxcd/helm-controller/api/v2beta1" automationv1beta1 "github.com/fluxcd/image-automation-controller/api/v1beta1" - reflectorv1beta1 "github.com/fluxcd/image-reflector-controller/api/v1beta1" + reflectorv1beta2 "github.com/fluxcd/image-reflector-controller/api/v1beta2" kustomizev1 "github.com/fluxcd/kustomize-controller/api/v1beta2" notiv1beta1 "github.com/fluxcd/notification-controller/api/v1beta2" "github.com/fluxcd/pkg/apis/meta" @@ -83,7 +83,7 @@ func getKubernetesCredentials(kubeconfig, aksHost, aksCert, aksKey, aksCa string if err != nil { return "", nil, err } - err = reflectorv1beta1.AddToScheme(scheme.Scheme) + err = reflectorv1beta2.AddToScheme(scheme.Scheme) if err != nil { return "", nil, err } diff --git a/tests/image-automation/auto.yaml b/tests/image-automation/auto.yaml index 321012c0..8f71c881 100644 --- a/tests/image-automation/auto.yaml +++ b/tests/image-automation/auto.yaml @@ -1,4 +1,4 @@ -apiVersion: image.toolkit.fluxcd.io/v1beta1 +apiVersion: image.toolkit.fluxcd.io/v1beta2 kind: ImageRepository metadata: name: podinfo @@ -7,7 +7,7 @@ spec: image: ghcr.io/stefanprodan/podinfo interval: 1m0s --- -apiVersion: image.toolkit.fluxcd.io/v1beta1 +apiVersion: image.toolkit.fluxcd.io/v1beta2 kind: ImagePolicy metadata: name: podinfo