Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Support Flux 2.3.0 #4225

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -233,10 +233,10 @@ download-test-crds:
for group_resource in $$group_resources; do \
group="$${group_resource%/*}"; resource="$${group_resource#*/}"; \
echo "Downloading $${group}.$${resource}"; \
curl -sL "https://raw.githubusercontent.com/fluxcd/source-controller/v1.0.0/config/crd/bases/$${group}.toolkit.fluxcd.io_$${resource}.yaml" -o "tools/testcrds/$${group}.toolkit.fluxcd.io_$${resource}.yaml"; \
curl -sL "https://raw.githubusercontent.com/fluxcd/source-controller/v1.3.0/config/crd/bases/$${group}.toolkit.fluxcd.io_$${resource}.yaml" -o "tools/testcrds/$${group}.toolkit.fluxcd.io_$${resource}.yaml"; \
done
curl -sL "https://raw.githubusercontent.com/fluxcd/kustomize-controller/v1.0.0/config/crd/bases/kustomize.toolkit.fluxcd.io_kustomizations.yaml" -o "tools/testcrds/kustomize.toolkit.fluxcd.io_kustomizations.yaml"
curl -sL "https://raw.githubusercontent.com/fluxcd/helm-controller/v0.37.0/config/crd/bases/helm.toolkit.fluxcd.io_helmreleases.yaml" -o "tools/testcrds/helm.toolkit.fluxcd.io_helmreleases.yaml"
curl -sL "https://raw.githubusercontent.com/fluxcd/kustomize-controller/v1.3.0/config/crd/bases/kustomize.toolkit.fluxcd.io_kustomizations.yaml" -o "tools/testcrds/kustomize.toolkit.fluxcd.io_kustomizations.yaml"
curl -sL "https://raw.githubusercontent.com/fluxcd/helm-controller/v1.0.1/config/crd/bases/helm.toolkit.fluxcd.io_helmreleases.yaml" -o "tools/testcrds/helm.toolkit.fluxcd.io_helmreleases.yaml"

.PHONY: help
# Thanks to https://www.thapaliya.com/en/writings/well-documented-makefiles/
Expand Down
4 changes: 2 additions & 2 deletions core/fluxsync/adapters.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package fluxsync

import (
helmv2 "github.com/fluxcd/helm-controller/api/v2beta2"
imgautomationv1 "github.com/fluxcd/image-automation-controller/api/v1beta1"
helmv2 "github.com/fluxcd/helm-controller/api/v2"
imgautomationv1 "github.com/fluxcd/image-automation-controller/api/v1beta2"
reflectorv1 "github.com/fluxcd/image-reflector-controller/api/v1beta2"
kustomizev1 "github.com/fluxcd/kustomize-controller/api/v1"
"github.com/fluxcd/pkg/apis/meta"
Expand Down
2 changes: 1 addition & 1 deletion core/server/events_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (

"testing"

helmv2 "github.com/fluxcd/helm-controller/api/v2beta2"
helmv2 "github.com/fluxcd/helm-controller/api/v2"
kustomizev1 "github.com/fluxcd/kustomize-controller/api/v1"
. "github.com/onsi/gomega"
pb "github.com/weaveworks/weave-gitops/pkg/api/core"
Expand Down
2 changes: 1 addition & 1 deletion core/server/fluxruntime.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import (
"k8s.io/apimachinery/pkg/types"
"sigs.k8s.io/controller-runtime/pkg/client"

helmv2 "github.com/fluxcd/helm-controller/api/v2beta2"
helmv2 "github.com/fluxcd/helm-controller/api/v2"
kustomizev1 "github.com/fluxcd/kustomize-controller/api/v1"
appsv1 "k8s.io/api/apps/v1"
v1 "k8s.io/api/core/v1"
Expand Down
2 changes: 1 addition & 1 deletion core/server/helm_release.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"fmt"
"strings"

helmv2 "github.com/fluxcd/helm-controller/api/v2beta2"
helmv2 "github.com/fluxcd/helm-controller/api/v2"
"github.com/weaveworks/weave-gitops/core/clustersmngr"
pb "github.com/weaveworks/weave-gitops/pkg/api/core"
)
Expand Down
5 changes: 3 additions & 2 deletions core/server/inventory.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,12 @@ import (
"encoding/base64"
"encoding/json"
"fmt"
"github.com/fluxcd/helm-controller/api/v2"
"io"
"strings"
"sync"

helmv2 "github.com/fluxcd/helm-controller/api/v2beta2"
helmv2 "github.com/fluxcd/helm-controller/api/v2"
kustomizev1 "github.com/fluxcd/kustomize-controller/api/v1"
"github.com/fluxcd/pkg/ssa"
"github.com/go-logr/logr"
Expand Down Expand Up @@ -153,7 +154,7 @@ func (cs *coreServer) getHelmReleaseInventory(ctx context.Context, k8sClient cli
}

// Returns the list of resources applied in the helm chart.
func getHelmReleaseObjects(ctx context.Context, k8sClient client.Client, helmRelease *helmv2.HelmRelease) ([]*unstructured.Unstructured, error) {
func getHelmReleaseObjects(ctx context.Context, k8sClient client.Client, helmRelease *v2.HelmRelease) ([]*unstructured.Unstructured, error) {
secretName := secretNameFromHelmRelease(helmRelease)
if secretName == nil {
// skip release if it failed to install
Expand Down
2 changes: 1 addition & 1 deletion core/server/objects.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"errors"
"fmt"

helmv2 "github.com/fluxcd/helm-controller/api/v2beta2"
helmv2 "github.com/fluxcd/helm-controller/api/v2"
kustomizev1 "github.com/fluxcd/kustomize-controller/api/v1"
"github.com/hashicorp/go-multierror"
"github.com/weaveworks/weave-gitops/core/clustersmngr"
Expand Down
2 changes: 1 addition & 1 deletion core/server/objects_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (

sourcev1b2 "github.com/fluxcd/source-controller/api/v1beta2"

helmv2 "github.com/fluxcd/helm-controller/api/v2beta2"
helmv2 "github.com/fluxcd/helm-controller/api/v2"
kustomizev1 "github.com/fluxcd/kustomize-controller/api/v1"
sourcev1 "github.com/fluxcd/source-controller/api/v1"
. "github.com/onsi/gomega"
Expand Down
2 changes: 1 addition & 1 deletion core/server/sync_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"testing"
"time"

helmv2 "github.com/fluxcd/helm-controller/api/v2beta2"
helmv2 "github.com/fluxcd/helm-controller/api/v2"
imgautomationv1 "github.com/fluxcd/image-automation-controller/api/v1beta1"
reflectorv1 "github.com/fluxcd/image-reflector-controller/api/v1beta2"
kustomizev1 "github.com/fluxcd/kustomize-controller/api/v1"
Expand Down
74 changes: 39 additions & 35 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,17 @@ require (
github.com/coreos/go-oidc/v3 v3.4.0
github.com/fluxcd/cli-utils v0.36.0-flux.2
github.com/fluxcd/go-git-providers v0.16.0
github.com/fluxcd/helm-controller/api v0.37.0
github.com/fluxcd/image-automation-controller/api v0.33.1
github.com/fluxcd/helm-controller/api v1.1.0
github.com/fluxcd/image-automation-controller/api v0.39.0
github.com/fluxcd/image-reflector-controller/api v0.27.2
github.com/fluxcd/kustomize-controller/api v1.0.0
github.com/fluxcd/notification-controller/api v1.0.0
github.com/fluxcd/pkg/apis/meta v1.2.0
github.com/fluxcd/pkg/apis/meta v1.6.1
github.com/fluxcd/pkg/runtime v0.43.2
github.com/fluxcd/pkg/ssa v0.35.0
github.com/fluxcd/source-controller/api v1.2.2
github.com/fluxcd/source-controller/api v1.4.0
github.com/go-git/go-git/v5 v5.11.0
github.com/go-logr/logr v1.3.0
github.com/go-logr/logr v1.4.2
github.com/go-logr/zapr v1.3.0
github.com/go-resty/resty/v2 v2.7.0
github.com/golang-jwt/jwt/v4 v4.5.1
Expand All @@ -35,33 +35,33 @@ require (
github.com/maxbrunsfeld/counterfeiter/v6 v6.7.0
github.com/minio/minio-go/v7 v7.0.31
github.com/oauth2-proxy/mockoidc v0.0.0-20220308204021-b9169deeb282
github.com/onsi/ginkgo/v2 v2.13.2
github.com/onsi/gomega v1.30.0
github.com/onsi/ginkgo/v2 v2.19.0
github.com/onsi/gomega v1.33.1
github.com/pkg/browser v0.0.0-20210911075715-681adbf594b8
github.com/pkg/errors v0.9.1
github.com/slok/go-http-metrics v0.10.0
github.com/spf13/cobra v1.8.0
github.com/spf13/cobra v1.8.1
github.com/spf13/viper v1.16.0
github.com/tomwright/dasel v1.22.1
github.com/weaveworks/policy-agent/api v1.0.5
github.com/weaveworks/tf-controller/tfctl v0.0.0-20231228180612-918cb6250720
github.com/yannh/kubeconform v0.5.0
go.uber.org/zap v1.26.0
golang.org/x/crypto v0.26.0
golang.org/x/crypto v0.27.0
golang.org/x/oauth2 v0.23.0
google.golang.org/genproto/googleapis/api v0.0.0-20241021214115-324edc3d5d38
google.golang.org/grpc v1.67.1
google.golang.org/protobuf v1.35.1
gopkg.in/square/go-jose.v2 v2.6.0
gopkg.in/yaml.v3 v3.0.1
gotest.tools v2.2.0+incompatible
k8s.io/api v0.28.4
k8s.io/apiextensions-apiserver v0.28.4
k8s.io/apimachinery v0.28.4
k8s.io/api v0.31.1
k8s.io/apiextensions-apiserver v0.31.1
k8s.io/apimachinery v0.31.1
k8s.io/cli-runtime v0.28.4
k8s.io/client-go v0.28.4
k8s.io/client-go v0.31.1
sigs.k8s.io/cli-utils v0.35.0
sigs.k8s.io/controller-runtime v0.16.3
sigs.k8s.io/controller-runtime v0.19.0
sigs.k8s.io/kustomize/api v0.16.0
sigs.k8s.io/yaml v1.4.0
)
Expand All @@ -71,30 +71,32 @@ require (
github.com/Masterminds/sprig v2.22.0+incompatible // indirect
github.com/aws/aws-sdk-go v1.44.137 // indirect
github.com/chai2010/gettext-go v1.0.2 // indirect
github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e // indirect
github.com/chzyer/readline v1.5.1 // indirect
github.com/cloudflare/circl v1.3.7 // indirect
github.com/cyphar/filepath-securejoin v0.2.4 // indirect
github.com/dustin/go-humanize v1.0.1 // indirect
github.com/emicklei/go-restful/v3 v3.11.0 // indirect
github.com/evanphx/json-patch/v5 v5.7.0 // indirect
github.com/evanphx/json-patch/v5 v5.9.0 // indirect
github.com/fatih/color v1.16.0 // indirect
github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572 // indirect
github.com/fxamacker/cbor/v2 v2.7.0 // indirect
github.com/go-task/slim-sprig/v3 v3.0.0 // indirect
github.com/gogo/protobuf v1.3.2 // indirect
github.com/golang-jwt/jwt v3.2.2+incompatible // indirect
github.com/google/gnostic-models v0.6.8 // indirect
github.com/google/go-github/v52 v52.0.0 // indirect
github.com/google/pprof v0.0.0-20210720184732-4bb14d4b1be1 // indirect
github.com/google/pprof v0.0.0-20240525223248-4bfdf5a9a2af // indirect
github.com/google/uuid v1.6.0 // indirect
github.com/gorilla/websocket v1.5.0 // indirect
github.com/hako/durafmt v0.0.0-20210608085754-5c1018a4e16b // indirect
github.com/hashicorp/errwrap v1.1.0 // indirect
github.com/iancoleman/strcase v0.1.2 // indirect
github.com/klauspost/cpuid v1.3.1 // indirect
github.com/klauspost/cpuid/v2 v2.2.5 // indirect
github.com/mattn/go-colorable v0.1.13 // indirect
github.com/matttproud/golang_protobuf_extensions/v2 v2.0.0 // indirect
github.com/minio/md5-simd v1.1.0 // indirect
github.com/minio/sha256-simd v1.0.0 // indirect
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect
github.com/mxk/go-flowrate v0.0.0-20140419014527-cca7078d478f // indirect
github.com/olekukonko/tablewriter v0.0.5 // indirect
github.com/pelletier/go-toml/v2 v2.0.8 // indirect
github.com/pjbgf/sha1cd v0.3.0 // indirect
Expand All @@ -105,12 +107,14 @@ require (
github.com/skeema/knownhosts v1.2.1 // indirect
github.com/theckman/yacspin v0.13.12 // indirect
github.com/weaveworks/tf-controller/api v0.0.0-20231212164812-c222d7f1024a // indirect
github.com/x448/float16 v0.8.4 // indirect
github.com/xeipuuv/gojsonpointer v0.0.0-20190905194746-02993c407bfb // indirect
github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415 // indirect
github.com/xeipuuv/gojsonschema v1.2.0 // indirect
golang.org/x/exp v0.0.0-20231206192017-f3f8817b8deb // indirect
golang.org/x/sync v0.9.0 // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20241021214115-324edc3d5d38 // indirect
gopkg.in/evanphx/json-patch.v4 v4.12.0 // indirect
gopkg.in/evanphx/json-patch.v5 v5.7.0 // indirect
gopkg.in/yaml.v2 v2.4.0 // indirect
)
Expand All @@ -126,15 +130,15 @@ require (
github.com/beorn7/perks v1.0.1 // indirect
github.com/cespare/xxhash/v2 v2.3.0 // indirect
github.com/clbanning/mxj/v2 v2.3.3-0.20201214204241-e937bdee5a3e // indirect
github.com/cpuguy83/go-md2man/v2 v2.0.3 // indirect
github.com/cpuguy83/go-md2man/v2 v2.0.4 // indirect
github.com/danwakefield/fnmatch v0.0.0-20160403171240-cbb64ac3d964 // indirect
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect
github.com/dlclark/regexp2 v1.4.0 // indirect
github.com/emirpasic/gods v1.18.1 // indirect
github.com/evanphx/json-patch v5.7.0+incompatible // indirect
github.com/exponent-io/jsonpath v0.0.0-20210407135951-1de76d718b3f // indirect
github.com/fluxcd/pkg/apis/acl v0.1.0 // indirect
github.com/fluxcd/pkg/apis/kustomize v1.2.0 // indirect
github.com/fluxcd/pkg/apis/acl v0.3.0 // indirect
github.com/fluxcd/pkg/apis/kustomize v1.6.1 // indirect
github.com/fsnotify/fsnotify v1.7.0 // indirect
github.com/go-errors/errors v1.5.1 // indirect
github.com/go-git/gcfg v1.5.1-0.20230307220236-3a3c6141e376 // indirect
Expand Down Expand Up @@ -168,17 +172,17 @@ require (
github.com/mitchellh/go-wordwrap v1.0.1 // indirect
github.com/mitchellh/mapstructure v1.5.0 // indirect
github.com/mitchellh/reflectwalk v1.0.2 // indirect
github.com/moby/spdystream v0.2.0 // indirect
github.com/moby/spdystream v0.4.0 // indirect
github.com/moby/term v0.5.0 // indirect
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
github.com/modern-go/reflect2 v1.0.2 // indirect
github.com/monochromegane/go-gitignore v0.0.0-20200626010858-205db1a8cc00 // indirect
github.com/pelletier/go-toml v1.9.5 // indirect
github.com/peterbourgon/diskv v2.0.1+incompatible // indirect
github.com/prometheus/client_golang v1.17.0
github.com/prometheus/client_model v0.5.0 // indirect
github.com/prometheus/common v0.45.0 // indirect
github.com/prometheus/procfs v0.12.0 // indirect
github.com/prometheus/client_golang v1.19.1
github.com/prometheus/client_model v0.6.1 // indirect
github.com/prometheus/common v0.55.0 // indirect
github.com/prometheus/procfs v0.15.1 // indirect
github.com/rivo/uniseg v0.2.0 // indirect
github.com/russross/blackfriday/v2 v2.1.0 // indirect
github.com/sergi/go-diff v1.3.1 // indirect
Expand All @@ -194,21 +198,21 @@ require (
go.starlark.net v0.0.0-20231121155337-90ade8b19d09 // indirect
go.uber.org/multierr v1.11.0 // indirect
golang.org/x/mod v0.17.0 // indirect
golang.org/x/net v0.28.0
golang.org/x/sys v0.24.0 // indirect
golang.org/x/term v0.23.0
golang.org/x/net v0.29.0
golang.org/x/sys v0.25.0 // indirect
golang.org/x/term v0.24.0
golang.org/x/text v0.20.0 // indirect
golang.org/x/time v0.5.0 // indirect
golang.org/x/tools v0.21.1-0.20240531212143-b6235391adb3 // indirect
gomodules.xyz/jsonpatch/v2 v2.4.0 // indirect
gopkg.in/inf.v0 v0.9.1 // indirect
gopkg.in/ini.v1 v1.67.0 // indirect
gopkg.in/warnings.v0 v0.1.2 // indirect
k8s.io/component-base v0.28.4 // indirect
k8s.io/klog/v2 v2.110.1 // indirect
k8s.io/kube-openapi v0.0.0-20231206194836-bf4651e18aa8 // indirect
k8s.io/component-base v0.31.1 // indirect
k8s.io/klog/v2 v2.130.1 // indirect
k8s.io/kube-openapi v0.0.0-20240228011516-70dd3763d340 // indirect
k8s.io/kubectl v0.28.4
k8s.io/utils v0.0.0-20231127182322-b307cd553661 // indirect
k8s.io/utils v0.0.0-20240711033017-18e509b52bc8 // indirect
sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd // indirect
sigs.k8s.io/kustomize/kyaml v0.16.0
sigs.k8s.io/structured-merge-diff/v4 v4.4.1 // indirect
Expand Down
Loading
Loading