Skip to content

Commit

Permalink
Fix module version
Browse files Browse the repository at this point in the history
  • Loading branch information
majst01 committed Oct 12, 2023
1 parent c552979 commit 111e73b
Show file tree
Hide file tree
Showing 20 changed files with 44 additions and 44 deletions.
6 changes: 3 additions & 3 deletions controllers/clusterwidenetworkpolicy_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import (
"fmt"
"time"

"github.com/metal-stack/firewall-controller/pkg/dns"
"github.com/metal-stack/firewall-controller/pkg/nftables"
"github.com/metal-stack/firewall-controller/v2/pkg/dns"
"github.com/metal-stack/firewall-controller/v2/pkg/nftables"

"github.com/go-logr/logr"

Expand All @@ -21,7 +21,7 @@ import (
"sigs.k8s.io/controller-runtime/pkg/source"

firewallv2 "github.com/metal-stack/firewall-controller-manager/api/v2"
firewallv1 "github.com/metal-stack/firewall-controller/api/v1"
firewallv1 "github.com/metal-stack/firewall-controller/v2/api/v1"
)

// ClusterwideNetworkPolicyReconciler reconciles a ClusterwideNetworkPolicy object
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import (
ctrl "sigs.k8s.io/controller-runtime"
"sigs.k8s.io/controller-runtime/pkg/client"

firewallv1 "github.com/metal-stack/firewall-controller/api/v1"
firewallv1 "github.com/metal-stack/firewall-controller/v2/api/v1"
)

// ClusterwideNetworkPolicyValidationReconciler validates a ClusterwideNetworkPolicy object
Expand Down
2 changes: 1 addition & 1 deletion controllers/droptailer_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import (
"sigs.k8s.io/controller-runtime/pkg/source"

"github.com/go-logr/logr"
firewallv1 "github.com/metal-stack/firewall-controller/api/v1"
firewallv1 "github.com/metal-stack/firewall-controller/v2/api/v1"

"github.com/txn2/txeh"
corev1 "k8s.io/api/core/v1"
Expand Down
8 changes: 4 additions & 4 deletions controllers/firewall_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,10 @@ import (

firewallv2 "github.com/metal-stack/firewall-controller-manager/api/v2"
"github.com/metal-stack/firewall-controller-manager/api/v2/helper"
firewallv1 "github.com/metal-stack/firewall-controller/api/v1"
"github.com/metal-stack/firewall-controller/pkg/network"
"github.com/metal-stack/firewall-controller/pkg/nftables"
"github.com/metal-stack/firewall-controller/pkg/updater"
firewallv1 "github.com/metal-stack/firewall-controller/v2/api/v1"
"github.com/metal-stack/firewall-controller/v2/pkg/network"
"github.com/metal-stack/firewall-controller/v2/pkg/nftables"
"github.com/metal-stack/firewall-controller/v2/pkg/updater"
)

// FirewallReconciler reconciles a Firewall object
Expand Down
2 changes: 1 addition & 1 deletion controllers/firewall_controller_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"reflect"
"testing"

firewallv1 "github.com/metal-stack/firewall-controller/api/v1"
firewallv1 "github.com/metal-stack/firewall-controller/v2/api/v1"
corev1 "k8s.io/api/core/v1"
networking "k8s.io/api/networking/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
Expand Down
6 changes: 3 additions & 3 deletions controllers/firewall_monitor_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ import (

"github.com/go-logr/logr"
firewallv2 "github.com/metal-stack/firewall-controller-manager/api/v2"
firewallv1 "github.com/metal-stack/firewall-controller/api/v1"
"github.com/metal-stack/firewall-controller/pkg/collector"
"github.com/metal-stack/firewall-controller/pkg/suricata"
firewallv1 "github.com/metal-stack/firewall-controller/v2/api/v1"
"github.com/metal-stack/firewall-controller/v2/pkg/collector"
"github.com/metal-stack/firewall-controller/v2/pkg/suricata"
"github.com/metal-stack/v"
apierrors "k8s.io/apimachinery/pkg/api/errors"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module github.com/metal-stack/firewall-controller
module github.com/metal-stack/firewall-controller/v2

go 1.21

Expand Down
21 changes: 10 additions & 11 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,16 +25,15 @@ import (
"k8s.io/client-go/rest"
"k8s.io/client-go/tools/clientcmd"
ctrl "sigs.k8s.io/controller-runtime"
"sigs.k8s.io/controller-runtime/pkg/client"
controllerclient "sigs.k8s.io/controller-runtime/pkg/client"

firewallv2 "github.com/metal-stack/firewall-controller-manager/api/v2"
"github.com/metal-stack/firewall-controller-manager/api/v2/helper"

firewallv1 "github.com/metal-stack/firewall-controller/api/v1"
"github.com/metal-stack/firewall-controller/controllers"
"github.com/metal-stack/firewall-controller/pkg/sysctl"
"github.com/metal-stack/firewall-controller/pkg/updater"
firewallv1 "github.com/metal-stack/firewall-controller/v2/api/v1"
"github.com/metal-stack/firewall-controller/v2/controllers"
"github.com/metal-stack/firewall-controller/v2/pkg/sysctl"
"github.com/metal-stack/firewall-controller/v2/pkg/updater"
// +kubebuilder:scaffold:imports
)

Expand Down Expand Up @@ -217,7 +216,7 @@ func main() {
l.Fatalw("unable to create shoot manager", "error", err)
}

shootClient, err := client.New(shootConfig, client.Options{Scheme: scheme})
shootClient, err := controllerclient.New(shootConfig, controllerclient.Options{Scheme: scheme})
if err != nil {
l.Fatalw("unable to create shoot client", "error", err)
}
Expand Down Expand Up @@ -351,9 +350,9 @@ func isFirewallV2GVKPresent(config *rest.Config) error {
return fmt.Errorf("client cannot find firewall v2 resource on server side, assuming that this firewall was provisioned with shoot client in the past")
}

func findResponsibleFirewall(ctx context.Context, seed client.Client, firewallName, seedNamespace string) (*firewallv2.Firewall, error) {
func findResponsibleFirewall(ctx context.Context, seed controllerclient.Client, firewallName, seedNamespace string) (*firewallv2.Firewall, error) {
fwList := &firewallv2.FirewallList{}
err := seed.List(ctx, fwList, &client.ListOptions{
err := seed.List(ctx, fwList, &controllerclient.ListOptions{
Namespace: seedNamespace,
})
if err != nil {
Expand Down Expand Up @@ -391,7 +390,7 @@ func getSeedNamespace(rawKubeconfig []byte) (string, error) {
return "", fmt.Errorf("unable to figure out seed namespace from kubeconfig")
}

func controllerMigration(ctx context.Context, log logr.Logger, c client.Client, firewallName, seedNamespace string) error {
func controllerMigration(ctx context.Context, log logr.Logger, c controllerclient.Client, firewallName, seedNamespace string) error {
// changing from existing shoot kubeconfig from deployments before firewall-controller-manager
// to seed kubeconfig by trying to use an offered migration secret in the shoot's firewall namespace.

Expand All @@ -401,7 +400,7 @@ func controllerMigration(ctx context.Context, log logr.Logger, c client.Client,
Namespace: firewallv2.FirewallShootNamespace,
},
}
err := c.Get(ctx, client.ObjectKeyFromObject(migrationSecret), migrationSecret)
err := c.Get(ctx, controllerclient.ObjectKeyFromObject(migrationSecret), migrationSecret)
if err != nil {
return fmt.Errorf("no migration secret found, cannot run with shoot client: %w", err)
}
Expand All @@ -415,7 +414,7 @@ func controllerMigration(ctx context.Context, log logr.Logger, c client.Client,
return fmt.Errorf("unable to create rest config from migration secret: %w", err)
}

seed, err := client.New(seedConfig, client.Options{
seed, err := controllerclient.New(seedConfig, controllerclient.Options{
Scheme: scheme,
})
if err != nil {
Expand Down
2 changes: 1 addition & 1 deletion pkg/dns/dnscache.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import (
dnsgo "github.com/miekg/dns"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"

firewallv1 "github.com/metal-stack/firewall-controller/api/v1"
firewallv1 "github.com/metal-stack/firewall-controller/v2/api/v1"
)

type IPVersion string
Expand Down
2 changes: 1 addition & 1 deletion pkg/dns/dnscache_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (

"github.com/go-logr/logr"

firewallv1 "github.com/metal-stack/firewall-controller/api/v1"
firewallv1 "github.com/metal-stack/firewall-controller/v2/api/v1"
)

func Test_GetSetsForFQDN(t *testing.T) {
Expand Down
7 changes: 4 additions & 3 deletions pkg/dns/dnsproxy.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,17 @@ package dns
import (
"context"
"fmt"
"github.com/metal-stack/metal-networker/pkg/netconf"
"net"
"strconv"

firewallv1 "github.com/metal-stack/firewall-controller/api/v1"
"github.com/metal-stack/metal-networker/pkg/netconf"

firewallv1 "github.com/metal-stack/firewall-controller/v2/api/v1"

"github.com/go-logr/logr"
dnsgo "github.com/miekg/dns"

"github.com/metal-stack/firewall-controller/pkg/network"
"github.com/metal-stack/firewall-controller/v2/pkg/network"
)

const (
Expand Down
6 changes: 3 additions & 3 deletions pkg/nftables/firewall.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ import (
"os/exec"
"path/filepath"

"github.com/metal-stack/firewall-controller/pkg/dns"
"github.com/metal-stack/firewall-controller/v2/pkg/dns"

"github.com/metal-stack/firewall-controller/pkg/network"
"github.com/metal-stack/firewall-controller/v2/pkg/network"

"github.com/go-logr/logr"
"github.com/vishvananda/netlink"
Expand All @@ -21,7 +21,7 @@ import (
"github.com/metal-stack/metal-networker/pkg/netconf"

firewallv2 "github.com/metal-stack/firewall-controller-manager/api/v2"
firewallv1 "github.com/metal-stack/firewall-controller/api/v1"
firewallv1 "github.com/metal-stack/firewall-controller/v2/api/v1"
)

const (
Expand Down
6 changes: 3 additions & 3 deletions pkg/nftables/mocks/mock_fqdncache.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion pkg/nftables/networkpolicy.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (

networkingv1 "k8s.io/api/networking/v1"

firewallv1 "github.com/metal-stack/firewall-controller/api/v1"
firewallv1 "github.com/metal-stack/firewall-controller/v2/api/v1"
)

type ruleBase struct {
Expand Down
4 changes: 2 additions & 2 deletions pkg/nftables/networkpolicy_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ import (
"k8s.io/apimachinery/pkg/util/intstr"
"k8s.io/utils/pointer"

firewallv1 "github.com/metal-stack/firewall-controller/api/v1"
"github.com/metal-stack/firewall-controller/pkg/nftables/mocks"
firewallv1 "github.com/metal-stack/firewall-controller/v2/api/v1"
"github.com/metal-stack/firewall-controller/v2/pkg/nftables/mocks"
)

func port(p int) *intstr.IntOrString {
Expand Down
2 changes: 1 addition & 1 deletion pkg/nftables/ratelimit_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
mn "github.com/metal-stack/metal-lib/pkg/net"

firewallv2 "github.com/metal-stack/firewall-controller-manager/api/v2"
firewallv1 "github.com/metal-stack/firewall-controller/api/v1"
firewallv1 "github.com/metal-stack/firewall-controller/v2/api/v1"
)

func TestRateLimitRules(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion pkg/nftables/rendering.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
"strings"
"text/template"

"github.com/metal-stack/firewall-controller/pkg/dns"
"github.com/metal-stack/firewall-controller/v2/pkg/dns"
)

// firewallRenderingData holds the data available in the nftables template
Expand Down
2 changes: 1 addition & 1 deletion pkg/nftables/rendering_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (

"github.com/google/go-cmp/cmp"

"github.com/metal-stack/firewall-controller/pkg/dns"
"github.com/metal-stack/firewall-controller/v2/pkg/dns"
)

func TestFirewallRenderingData_renderString(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion pkg/nftables/snat_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import (
networking "k8s.io/api/networking/v1"

firewallv2 "github.com/metal-stack/firewall-controller-manager/api/v2"
firewallv1 "github.com/metal-stack/firewall-controller/api/v1"
firewallv1 "github.com/metal-stack/firewall-controller/v2/api/v1"
)

func TestSnatRules(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion pkg/updater/updater.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (

"github.com/go-logr/logr"
firewallv2 "github.com/metal-stack/firewall-controller-manager/api/v2"
firewallv1 "github.com/metal-stack/firewall-controller/api/v1"
firewallv1 "github.com/metal-stack/firewall-controller/v2/api/v1"
corev1 "k8s.io/api/core/v1"
"k8s.io/client-go/tools/record"
)
Expand Down

0 comments on commit 111e73b

Please sign in to comment.