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

Add latest flux version for Flux discovery. #4166

Merged
merged 1 commit into from
Dec 30, 2023
Merged
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
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,7 @@ download-test-crds:
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"; \
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.35.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/helm-controller/v0.37.0/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
7 changes: 1 addition & 6 deletions cmd/gitops/create/terraform/cmd.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,14 +57,9 @@ gitops create terraform -n default my-resource --source GitRepository/my-project
kubeConfigArgs.Namespace = &namespace
kubeConfigArgs.Context = &context

cfg, err := kubeConfigArgs.ToRESTConfig()
if err != nil {
return err
}

v := viper.New()
v.Set("namespace", namespace)
if err := app.Init(cfg, v); err != nil {
if err := app.Init(kubeConfigArgs, v); err != nil {
return err
}

Expand Down
10 changes: 3 additions & 7 deletions cmd/gitops/delete/terraform/cmd.go
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
package terraform

import (
"os"

"github.com/spf13/cobra"
"github.com/spf13/viper"
"github.com/weaveworks/tf-controller/tfctl"
"github.com/weaveworks/weave-gitops/cmd/gitops/config"
"github.com/weaveworks/weave-gitops/pkg/run"
"k8s.io/cli-runtime/pkg/genericclioptions"
"os"
)

var kubeConfigArgs *genericclioptions.ConfigFlags
Expand Down Expand Up @@ -38,14 +39,9 @@ gitops delete terraform -n default my-resource
kubeConfigArgs.Namespace = &namespace
kubeConfigArgs.Context = &context

cfg, err := kubeConfigArgs.ToRESTConfig()
if err != nil {
return err
}

v := viper.New()
v.Set("namespace", namespace)
if err := app.Init(cfg, v); err != nil {
if err := app.Init(kubeConfigArgs, v); err != nil {
return err
}

Expand Down
10 changes: 3 additions & 7 deletions cmd/gitops/replan/terraform/cmd.go
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
package terraform

import (
"os"

"github.com/spf13/cobra"
"github.com/spf13/viper"
"github.com/weaveworks/tf-controller/tfctl"
"github.com/weaveworks/weave-gitops/cmd/gitops/config"
"github.com/weaveworks/weave-gitops/pkg/run"
"k8s.io/cli-runtime/pkg/genericclioptions"
"os"
)

var kubeConfigArgs *genericclioptions.ConfigFlags
Expand Down Expand Up @@ -38,14 +39,9 @@ gitops replan terraform --namespace flux-system my-resource
kubeConfigArgs.Namespace = &namespace
kubeConfigArgs.Context = &context

cfg, err := kubeConfigArgs.ToRESTConfig()
if err != nil {
return err
}

v := viper.New()
v.Set("namespace", namespace)
if err := app.Init(cfg, v); err != nil {
if err := app.Init(kubeConfigArgs, v); err != nil {
return err
}

Expand Down
10 changes: 3 additions & 7 deletions cmd/gitops/resume/terraform/cmd.go
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
package terraform

import (
"os"

"github.com/spf13/cobra"
"github.com/spf13/viper"
"github.com/weaveworks/tf-controller/tfctl"
"github.com/weaveworks/weave-gitops/cmd/gitops/config"
"github.com/weaveworks/weave-gitops/pkg/run"
"k8s.io/cli-runtime/pkg/genericclioptions"
"os"
)

var kubeConfigArgs *genericclioptions.ConfigFlags
Expand Down Expand Up @@ -38,14 +39,9 @@ gitops resume terraform --namespace flux-system my-resource
kubeConfigArgs.Namespace = &namespace
kubeConfigArgs.Context = &context

cfg, err := kubeConfigArgs.ToRESTConfig()
if err != nil {
return err
}

v := viper.New()
v.Set("namespace", namespace)
if err := app.Init(cfg, v); err != nil {
if err := app.Init(kubeConfigArgs, v); err != nil {
return err
}

Expand Down
10 changes: 3 additions & 7 deletions cmd/gitops/suspend/terraform/cmd.go
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
package terraform

import (
"os"

"github.com/spf13/cobra"
"github.com/spf13/viper"
"github.com/weaveworks/tf-controller/tfctl"
"github.com/weaveworks/weave-gitops/cmd/gitops/config"
"github.com/weaveworks/weave-gitops/pkg/run"
"k8s.io/cli-runtime/pkg/genericclioptions"
"os"
)

var kubeConfigArgs *genericclioptions.ConfigFlags
Expand Down Expand Up @@ -38,14 +39,9 @@ gitops suspend terraform --namespace flux-system my-resource
kubeConfigArgs.Namespace = &namespace
kubeConfigArgs.Context = &context

cfg, err := kubeConfigArgs.ToRESTConfig()
if err != nil {
return err
}

v := viper.New()
v.Set("namespace", namespace)
if err := app.Init(cfg, v); err != nil {
if err := app.Init(kubeConfigArgs, v); err != nil {
return err
}

Expand Down
2 changes: 1 addition & 1 deletion core/fluxsync/adapters.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package fluxsync

import (
helmv2 "github.com/fluxcd/helm-controller/api/v2beta1"
helmv2 "github.com/fluxcd/helm-controller/api/v2beta2"
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
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/v2beta1"
helmv2 "github.com/fluxcd/helm-controller/api/v2beta2"
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/v2beta1"
helmv2 "github.com/fluxcd/helm-controller/api/v2beta2"
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/v2beta1"
helmv2 "github.com/fluxcd/helm-controller/api/v2beta2"
"github.com/weaveworks/weave-gitops/core/clustersmngr"
pb "github.com/weaveworks/weave-gitops/pkg/api/core"
)
Expand Down
Loading
Loading