Update image-reflector API to v1beta2

Signed-off-by: Sunny <darkowlzz@protonmail.com>
pull/3585/head
Sunny 2 years ago
parent 4a871cdf10
commit 9dd98fb2b2

@ -28,7 +28,7 @@ import (
"github.com/fluxcd/pkg/apis/meta" "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{ var createImagePolicyCmd = &cobra.Command{

@ -26,7 +26,7 @@ import (
"github.com/fluxcd/pkg/apis/meta" "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{ var createImageRepositoryCmd = &cobra.Command{

@ -19,7 +19,7 @@ package main
import ( import (
"github.com/spf13/cobra" "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{ var deleteImagePolicyCmd = &cobra.Command{

@ -19,7 +19,7 @@ package main
import ( import (
"github.com/spf13/cobra" "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{ var deleteImageRepositoryCmd = &cobra.Command{

@ -20,7 +20,7 @@ import (
"github.com/spf13/cobra" "github.com/spf13/cobra"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" 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{ var exportImagePolicyCmd = &cobra.Command{

@ -20,7 +20,7 @@ import (
"github.com/spf13/cobra" "github.com/spf13/cobra"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" 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{ var exportImageRepositoryCmd = &cobra.Command{

@ -22,7 +22,7 @@ import (
"github.com/spf13/cobra" "github.com/spf13/cobra"
autov1 "github.com/fluxcd/image-automation-controller/api/v1beta1" 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{ var getImageAllCmd = &cobra.Command{

@ -22,7 +22,7 @@ import (
"github.com/spf13/cobra" "github.com/spf13/cobra"
"k8s.io/apimachinery/pkg/runtime" "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{ var getImagePolicyCmd = &cobra.Command{

@ -25,7 +25,7 @@ import (
"github.com/spf13/cobra" "github.com/spf13/cobra"
"k8s.io/apimachinery/pkg/runtime" "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{ var getImageRepositoryCmd = &cobra.Command{

@ -20,7 +20,7 @@ import (
"sigs.k8s.io/controller-runtime/pkg/client" "sigs.k8s.io/controller-runtime/pkg/client"
autov1 "github.com/fluxcd/image-automation-controller/api/v1beta1" 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 // These are general-purpose adapters for attaching methods to, for

@ -21,7 +21,7 @@ import (
"github.com/spf13/cobra" "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{ var reconcileImageRepositoryCmd = &cobra.Command{

@ -19,7 +19,7 @@ package main
import ( import (
"github.com/spf13/cobra" "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{ var resumeImageRepositoryCmd = &cobra.Command{

@ -19,7 +19,7 @@ package main
import ( import (
"github.com/spf13/cobra" "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{ var suspendImageRepositoryCmd = &cobra.Command{

@ -1,5 +1,5 @@
--- ---
apiVersion: image.toolkit.fluxcd.io/v1beta1 apiVersion: image.toolkit.fluxcd.io/v1beta2
kind: ImagePolicy kind: ImagePolicy
metadata: metadata:
name: flux-system name: flux-system

@ -1,10 +1,13 @@
--- ---
apiVersion: image.toolkit.fluxcd.io/v1beta1 apiVersion: image.toolkit.fluxcd.io/v1beta2
kind: ImageRepository kind: ImageRepository
metadata: metadata:
name: flux-system name: flux-system
namespace: {{ .fluxns }} namespace: {{ .fluxns }}
spec: spec:
exclusionList:
- ^.*\.sig$
image: ghcr.io/test/podinfo image: ghcr.io/test/podinfo
interval: 1m0s interval: 1m0s
provider: generic

@ -30,7 +30,7 @@ spec:
- kind: "Kustomization" - kind: "Kustomization"
name: "*" name: "*"
--- ---
apiVersion: image.toolkit.fluxcd.io/v1beta1 apiVersion: image.toolkit.fluxcd.io/v1beta2
kind: ImageRepository kind: ImageRepository
metadata: metadata:
name: flux-system name: flux-system
@ -39,7 +39,7 @@ spec:
image: ghcr.io/test/podinfo image: ghcr.io/test/podinfo
interval: 1m0s interval: 1m0s
--- ---
apiVersion: image.toolkit.fluxcd.io/v1beta1 apiVersion: image.toolkit.fluxcd.io/v1beta2
kind: ImagePolicy kind: ImagePolicy
metadata: metadata:
name: flux-system name: flux-system

@ -1,2 +1,2 @@
NAME LATEST IMAGE READY MESSAGE 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 podinfo-regex ghcr.io/stefanprodan/podinfo:5.0.0 True Latest image tag for 'ghcr.io/stefanprodan/podinfo' resolved to 5.0.0

@ -1,2 +1,2 @@
NAME LATEST IMAGE READY MESSAGE 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 podinfo-semver ghcr.io/stefanprodan/podinfo:5.0.3 True Latest image tag for 'ghcr.io/stefanprodan/podinfo' resolved to 5.0.3

@ -11,7 +11,7 @@ require (
github.com/fluxcd/go-git/v5 v5.0.0-20221219190809-2e5c9d01cfc4 github.com/fluxcd/go-git/v5 v5.0.0-20221219190809-2e5c9d01cfc4
github.com/fluxcd/helm-controller/api v0.29.0 github.com/fluxcd/helm-controller/api v0.29.0
github.com/fluxcd/image-automation-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/kustomize-controller/api v0.33.0
github.com/fluxcd/notification-controller/api v0.31.0 github.com/fluxcd/notification-controller/api v0.31.0
github.com/fluxcd/pkg/apis/meta v0.19.0 github.com/fluxcd/pkg/apis/meta v0.19.0
@ -49,7 +49,7 @@ require (
k8s.io/client-go v0.26.1 k8s.io/client-go v0.26.1
k8s.io/kubectl v0.26.1 k8s.io/kubectl v0.26.1
sigs.k8s.io/cli-utils v0.34.0 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/api v0.12.1
sigs.k8s.io/kustomize/kyaml v0.13.9 sigs.k8s.io/kustomize/kyaml v0.13.9
sigs.k8s.io/yaml v1.3.0 sigs.k8s.io/yaml v1.3.0

@ -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/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 h1:86g4NgPCzfBaE4CRKc2EtyaVrEdbFVs81KLOz4vHZjA=
github.com/fluxcd/image-automation-controller/api v0.29.0/go.mod h1:mmRgP6i2TzEQUzIIjay0G7fPb6Y11Qzw1CTD7aj1zMc= 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.25.0 h1:tK0Hc7Xxr5z6wtBvLTX/cEwjt9YZdidwQ6JQRZuni3w=
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/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 h1:ELTDIBC9dYaQjwIOtQxXAX2S4ydD6VQbmgf9p8wxIpE=
github.com/fluxcd/kustomize-controller/api v0.33.0/go.mod h1:6dVUIhT3Dge4Fyljv/qILYygwUTpAXl5IDjoOFLebfE= 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= 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= 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 h1:zCUitt54f0/MYj/ajVFnG6XSXMhpZ72O/3RewIchW8w=
sigs.k8s.io/cli-utils v0.34.0/go.mod h1:EXyMwPMu9OL+LRnj0JEMsGG/fRvbgFadcVlSnE8RhFs= 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.4 h1:Kd/Qgx5pd2XUL08eOV2vwIq3L9GhIbJ5Nxengbd4/0M=
sigs.k8s.io/controller-runtime v0.14.2/go.mod h1:WqIdsAY6JBsjfc/CqO0CORmNtoCtE4S6qbPc9s68h+0= 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 h1:EDPBXCAspyGV4jQlpZSudPeMmr1bNJefnuqLsRAsHZo=
sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd/go.mod h1:B8JuhiUyNFVKdsE8h686QcCxMaH6HrOAZj4vswFpcB0= 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= sigs.k8s.io/kustomize/api v0.12.1 h1:7YM7gW3kYBwtKvoY216ZzY+8hM+lV53LUayghNRJ0vM=

@ -43,7 +43,7 @@ import (
helmv2 "github.com/fluxcd/helm-controller/api/v2beta1" helmv2 "github.com/fluxcd/helm-controller/api/v2beta1"
imageautov1 "github.com/fluxcd/image-automation-controller/api/v1beta1" 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" kustomizev1 "github.com/fluxcd/kustomize-controller/api/v1beta2"
notificationv1 "github.com/fluxcd/notification-controller/api/v1beta2" notificationv1 "github.com/fluxcd/notification-controller/api/v1beta2"
"github.com/fluxcd/pkg/apis/meta" "github.com/fluxcd/pkg/apis/meta"

@ -1,8 +1,8 @@
apiVersion: kustomize.config.k8s.io/v1beta1 apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization kind: Kustomization
resources: 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.25.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.deployment.yaml
- account.yaml - account.yaml
transformers: transformers:
- labels.yaml - labels.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/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/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/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 - https://github.com/fluxcd/image-automation-controller/releases/download/v0.29.0/image-automation-controller.crds.yaml

@ -32,7 +32,7 @@ import (
"github.com/fluxcd/flux2/pkg/manifestgen" "github.com/fluxcd/flux2/pkg/manifestgen"
helmv2 "github.com/fluxcd/helm-controller/api/v2beta1" helmv2 "github.com/fluxcd/helm-controller/api/v2beta1"
autov1 "github.com/fluxcd/image-automation-controller/api/v1beta1" 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" kustomizev1 "github.com/fluxcd/kustomize-controller/api/v1beta2"
notificationv1 "github.com/fluxcd/notification-controller/api/v1beta2" notificationv1 "github.com/fluxcd/notification-controller/api/v1beta2"
sourcev1 "github.com/fluxcd/source-controller/api/v1beta2" sourcev1 "github.com/fluxcd/source-controller/api/v1beta2"

@ -31,7 +31,7 @@ import (
"time" "time"
eventhub "github.com/Azure/azure-event-hubs-go/v3" 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/fs"
"github.com/hashicorp/hc-install/product" "github.com/hashicorp/hc-install/product"
"github.com/hashicorp/hc-install/src" "github.com/hashicorp/hc-install/src"
@ -50,7 +50,7 @@ import (
extgogit "github.com/fluxcd/go-git/v5" extgogit "github.com/fluxcd/go-git/v5"
"github.com/fluxcd/go-git/v5/plumbing" "github.com/fluxcd/go-git/v5/plumbing"
automationv1beta1 "github.com/fluxcd/image-automation-controller/api/v1beta1" 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" kustomizev1 "github.com/fluxcd/kustomize-controller/api/v1beta2"
notiv1beta1 "github.com/fluxcd/notification-controller/api/v1beta2" notiv1beta1 "github.com/fluxcd/notification-controller/api/v1beta2"
eventv1 "github.com/fluxcd/pkg/apis/event/v1beta1" eventv1 "github.com/fluxcd/pkg/apis/event/v1beta1"
@ -441,14 +441,14 @@ func TestImageRepositoryACR(t *testing.T) {
return nil return nil
}) })
require.NoError(t, err) require.NoError(t, err)
imageRepository := reflectorv1beta1.ImageRepository{ imageRepository := reflectorv1beta2.ImageRepository{
ObjectMeta: metav1.ObjectMeta{ ObjectMeta: metav1.ObjectMeta{
Name: "podinfo", Name: "podinfo",
Namespace: name, Namespace: name,
}, },
} }
_, err = controllerutil.CreateOrUpdate(ctx, cfg.kubeClient, &imageRepository, func() error { _, 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), Image: fmt.Sprintf("%s/container/podinfo", cfg.acr.url),
Interval: metav1.Duration{ Interval: metav1.Duration{
Duration: 1 * time.Minute, Duration: 1 * time.Minute,
@ -460,19 +460,19 @@ func TestImageRepositoryACR(t *testing.T) {
return nil return nil
}) })
require.NoError(t, err) require.NoError(t, err)
imagePolicy := reflectorv1beta1.ImagePolicy{ imagePolicy := reflectorv1beta2.ImagePolicy{
ObjectMeta: metav1.ObjectMeta{ ObjectMeta: metav1.ObjectMeta{
Name: "podinfo", Name: "podinfo",
Namespace: name, Namespace: name,
}, },
} }
_, err = controllerutil.CreateOrUpdate(ctx, cfg.kubeClient, &imagePolicy, func() error { _, err = controllerutil.CreateOrUpdate(ctx, cfg.kubeClient, &imagePolicy, func() error {
imagePolicy.Spec = reflectorv1beta1.ImagePolicySpec{ imagePolicy.Spec = reflectorv1beta2.ImagePolicySpec{
ImageRepositoryRef: meta.NamespacedObjectReference{ ImageRepositoryRef: meta.NamespacedObjectReference{
Name: imageRepository.Name, Name: imageRepository.Name,
}, },
Policy: reflectorv1beta1.ImagePolicyChoice{ Policy: reflectorv1beta2.ImagePolicyChoice{
SemVer: &reflectorv1beta1.SemVerPolicy{ SemVer: &reflectorv1beta2.SemVerPolicy{
Range: "1.0.x", Range: "1.0.x",
}, },
}, },

@ -7,7 +7,7 @@ require (
github.com/fluxcd/go-git/v5 v5.0.0-20221219190809-2e5c9d01cfc4 github.com/fluxcd/go-git/v5 v5.0.0-20221219190809-2e5c9d01cfc4
github.com/fluxcd/helm-controller/api v0.28.1 github.com/fluxcd/helm-controller/api v0.28.1
github.com/fluxcd/image-automation-controller/api v0.28.0 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/kustomize-controller/api v0.32.0
github.com/fluxcd/notification-controller/api v0.30.2 github.com/fluxcd/notification-controller/api v0.30.2
github.com/fluxcd/pkg/apis/event v0.3.0 github.com/fluxcd/pkg/apis/event v0.3.0
@ -24,7 +24,7 @@ require (
k8s.io/api v0.26.1 k8s.io/api v0.26.1
k8s.io/apimachinery v0.26.1 k8s.io/apimachinery v0.26.1
k8s.io/client-go 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 // Fix CVE-2022-32149

@ -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/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 h1:BYiOP28h/QRuZTZixlmMJ3RnQw+FGAn54nVsoUjNXi8=
github.com/fluxcd/image-automation-controller/api v0.28.0/go.mod h1:ztBI5X/dEzZuJOf7igqnx6ZvrSGtrXLmCvP5ieb3fWc= 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.25.0 h1:tK0Hc7Xxr5z6wtBvLTX/cEwjt9YZdidwQ6JQRZuni3w=
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/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 h1:5QGLV5xRI8S3tUFJNV+vVzy/pdl0d6Ua0AccWwGRKfs=
github.com/fluxcd/kustomize-controller/api v0.32.0/go.mod h1:t2pqIe1SMzdZIAG/aietrg3XpRXmpcubf0uxDJOryEA= 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= 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/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/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0=
rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= 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.4 h1:Kd/Qgx5pd2XUL08eOV2vwIq3L9GhIbJ5Nxengbd4/0M=
sigs.k8s.io/controller-runtime v0.14.2/go.mod h1:WqIdsAY6JBsjfc/CqO0CORmNtoCtE4S6qbPc9s68h+0= 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 h1:EDPBXCAspyGV4jQlpZSudPeMmr1bNJefnuqLsRAsHZo=
sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd/go.mod h1:B8JuhiUyNFVKdsE8h686QcCxMaH6HrOAZj4vswFpcB0= 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= sigs.k8s.io/structured-merge-diff/v4 v4.2.3 h1:PRbqxJClWWYMNV1dhaG4NsibJbArud9kFxnAMREiWFE=

@ -42,7 +42,7 @@ import (
"github.com/fluxcd/go-git/v5/plumbing/transport/http" "github.com/fluxcd/go-git/v5/plumbing/transport/http"
helmv2beta1 "github.com/fluxcd/helm-controller/api/v2beta1" helmv2beta1 "github.com/fluxcd/helm-controller/api/v2beta1"
automationv1beta1 "github.com/fluxcd/image-automation-controller/api/v1beta1" 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" kustomizev1 "github.com/fluxcd/kustomize-controller/api/v1beta2"
notiv1beta1 "github.com/fluxcd/notification-controller/api/v1beta2" notiv1beta1 "github.com/fluxcd/notification-controller/api/v1beta2"
"github.com/fluxcd/pkg/apis/meta" "github.com/fluxcd/pkg/apis/meta"
@ -83,7 +83,7 @@ func getKubernetesCredentials(kubeconfig, aksHost, aksCert, aksKey, aksCa string
if err != nil { if err != nil {
return "", nil, err return "", nil, err
} }
err = reflectorv1beta1.AddToScheme(scheme.Scheme) err = reflectorv1beta2.AddToScheme(scheme.Scheme)
if err != nil { if err != nil {
return "", nil, err return "", nil, err
} }

@ -1,4 +1,4 @@
apiVersion: image.toolkit.fluxcd.io/v1beta1 apiVersion: image.toolkit.fluxcd.io/v1beta2
kind: ImageRepository kind: ImageRepository
metadata: metadata:
name: podinfo name: podinfo
@ -7,7 +7,7 @@ spec:
image: ghcr.io/stefanprodan/podinfo image: ghcr.io/stefanprodan/podinfo
interval: 1m0s interval: 1m0s
--- ---
apiVersion: image.toolkit.fluxcd.io/v1beta1 apiVersion: image.toolkit.fluxcd.io/v1beta2
kind: ImagePolicy kind: ImagePolicy
metadata: metadata:
name: podinfo name: podinfo

Loading…
Cancel
Save