Skip to content

Commit

Permalink
Updated the major version
Browse files Browse the repository at this point in the history
  • Loading branch information
hussnain612 committed Aug 16, 2022
1 parent eabad1c commit 174d429
Show file tree
Hide file tree
Showing 36 changed files with 108 additions and 108 deletions.
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/stakater/IngressMonitorController
module github.com/stakater/IngressMonitorController/v2

go 1.15

Expand Down
10 changes: 5 additions & 5 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,11 @@ import (
"sigs.k8s.io/controller-runtime/pkg/log/zap"

routev1 "github.com/openshift/api/route/v1"
endpointmonitorv1alpha1 "github.com/stakater/IngressMonitorController/api/v1alpha1"
"github.com/stakater/IngressMonitorController/pkg/config"
"github.com/stakater/IngressMonitorController/pkg/controllers"
"github.com/stakater/IngressMonitorController/pkg/kube"
"github.com/stakater/IngressMonitorController/pkg/monitors"
endpointmonitorv1alpha1 "github.com/stakater/IngressMonitorController/v2/api/v1alpha1"
"github.com/stakater/IngressMonitorController/v2/pkg/config"
"github.com/stakater/IngressMonitorController/v2/pkg/controllers"
"github.com/stakater/IngressMonitorController/v2/pkg/kube"
"github.com/stakater/IngressMonitorController/v2/pkg/monitors"
//+kubebuilder:scaffold:imports
)

Expand Down
2 changes: 1 addition & 1 deletion pkg/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (
yaml "gopkg.in/yaml.v2"
logf "sigs.k8s.io/controller-runtime/pkg/log"

"github.com/stakater/IngressMonitorController/pkg/secret"
"github.com/stakater/IngressMonitorController/v2/pkg/secret"
"sigs.k8s.io/controller-runtime/pkg/client"
)

Expand Down
8 changes: 4 additions & 4 deletions pkg/controllers/endpointmonitor_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,16 +22,16 @@ import (
"time"

"github.com/go-logr/logr"
"github.com/stakater/IngressMonitorController/pkg/config"
"github.com/stakater/IngressMonitorController/pkg/monitors"
"github.com/stakater/IngressMonitorController/pkg/util"
"github.com/stakater/IngressMonitorController/v2/pkg/config"
"github.com/stakater/IngressMonitorController/v2/pkg/monitors"
"github.com/stakater/IngressMonitorController/v2/pkg/util"
"k8s.io/apimachinery/pkg/api/errors"
"k8s.io/apimachinery/pkg/runtime"
ctrl "sigs.k8s.io/controller-runtime"
"sigs.k8s.io/controller-runtime/pkg/client"
"sigs.k8s.io/controller-runtime/pkg/reconcile"

endpointmonitorv1alpha1 "github.com/stakater/IngressMonitorController/api/v1alpha1"
endpointmonitorv1alpha1 "github.com/stakater/IngressMonitorController/v2/api/v1alpha1"
)

// EndpointMonitorReconciler reconciles a EndpointMonitor object
Expand Down
8 changes: 4 additions & 4 deletions pkg/controllers/endpointmonitor_created.go
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
package controllers

import (
endpointmonitorv1alpha1 "github.com/stakater/IngressMonitorController/api/v1alpha1"
"github.com/stakater/IngressMonitorController/pkg/kube/util"
"github.com/stakater/IngressMonitorController/pkg/models"
"github.com/stakater/IngressMonitorController/pkg/monitors"
endpointmonitorv1alpha1 "github.com/stakater/IngressMonitorController/v2/api/v1alpha1"
"github.com/stakater/IngressMonitorController/v2/pkg/kube/util"
"github.com/stakater/IngressMonitorController/v2/pkg/models"
"github.com/stakater/IngressMonitorController/v2/pkg/monitors"

"sigs.k8s.io/controller-runtime/pkg/reconcile"
)
Expand Down
6 changes: 3 additions & 3 deletions pkg/controllers/endpointmonitor_deleted.go
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
package controllers

import (
endpointmonitorv1alpha1 "github.com/stakater/IngressMonitorController/api/v1alpha1"
"github.com/stakater/IngressMonitorController/pkg/config"
"github.com/stakater/IngressMonitorController/pkg/monitors"
endpointmonitorv1alpha1 "github.com/stakater/IngressMonitorController/v2/api/v1alpha1"
"github.com/stakater/IngressMonitorController/v2/pkg/config"
"github.com/stakater/IngressMonitorController/v2/pkg/monitors"

"sigs.k8s.io/controller-runtime/pkg/reconcile"
)
Expand Down
8 changes: 4 additions & 4 deletions pkg/controllers/endpointmonitor_updated.go
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
package controllers

import (
endpointmonitorv1alpha1 "github.com/stakater/IngressMonitorController/api/v1alpha1"
"github.com/stakater/IngressMonitorController/pkg/kube/util"
"github.com/stakater/IngressMonitorController/pkg/models"
"github.com/stakater/IngressMonitorController/pkg/monitors"
endpointmonitorv1alpha1 "github.com/stakater/IngressMonitorController/v2/api/v1alpha1"
"github.com/stakater/IngressMonitorController/v2/pkg/kube/util"
"github.com/stakater/IngressMonitorController/v2/pkg/models"
"github.com/stakater/IngressMonitorController/v2/pkg/monitors"

"sigs.k8s.io/controller-runtime/pkg/reconcile"
)
Expand Down
4 changes: 2 additions & 2 deletions pkg/controllers/endpointmonitor_util.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package controllers

import (
"github.com/stakater/IngressMonitorController/pkg/models"
"github.com/stakater/IngressMonitorController/pkg/monitors"
"github.com/stakater/IngressMonitorController/v2/pkg/models"
"github.com/stakater/IngressMonitorController/v2/pkg/monitors"
)

func findMonitorByName(monitorService monitors.MonitorServiceProxy, monitorName string) *models.Monitor {
Expand Down
6 changes: 3 additions & 3 deletions pkg/kube/util/url.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@ import (
"errors"

routev1 "github.com/openshift/api/route/v1"
"github.com/stakater/IngressMonitorController/pkg/kube"
"github.com/stakater/IngressMonitorController/pkg/kube/wrappers"
"github.com/stakater/IngressMonitorController/v2/pkg/kube"
"github.com/stakater/IngressMonitorController/v2/pkg/kube/wrappers"
"k8s.io/api/extensions/v1beta1"
"k8s.io/apimachinery/pkg/types"
"sigs.k8s.io/controller-runtime/pkg/client"
logf "sigs.k8s.io/controller-runtime/pkg/log"

endpointmonitorv1alpha1 "github.com/stakater/IngressMonitorController/api/v1alpha1"
endpointmonitorv1alpha1 "github.com/stakater/IngressMonitorController/v2/api/v1alpha1"
)

var log = logf.Log.WithName("config")
Expand Down
2 changes: 1 addition & 1 deletion pkg/kube/wrappers/ingress-wrapper_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package wrappers
import (
"testing"

"github.com/stakater/IngressMonitorController/pkg/util"
"github.com/stakater/IngressMonitorController/v2/pkg/util"
"k8s.io/api/extensions/v1beta1"
"sigs.k8s.io/controller-runtime/pkg/client"
fakekubeclient "sigs.k8s.io/controller-runtime/pkg/client/fake"
Expand Down
2 changes: 1 addition & 1 deletion pkg/kube/wrappers/routeWrapper_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"testing"

routev1 "github.com/openshift/api/route/v1"
"github.com/stakater/IngressMonitorController/pkg/util"
"github.com/stakater/IngressMonitorController/v2/pkg/util"
"sigs.k8s.io/controller-runtime/pkg/client"
fakekubeclient "sigs.k8s.io/controller-runtime/pkg/client/fake"
)
Expand Down
4 changes: 2 additions & 2 deletions pkg/monitors/appinsights/appinsights-monitor.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ import (
insightsAlert "github.com/Azure/azure-sdk-for-go/services/preview/monitor/mgmt/2018-03-01/insights"
"github.com/Azure/go-autorest/autorest/azure/auth"
"github.com/kelseyhightower/envconfig"
"github.com/stakater/IngressMonitorController/pkg/config"
"github.com/stakater/IngressMonitorController/pkg/models"
"github.com/stakater/IngressMonitorController/v2/pkg/config"
"github.com/stakater/IngressMonitorController/v2/pkg/models"
logf "sigs.k8s.io/controller-runtime/pkg/log"
)

Expand Down
4 changes: 2 additions & 2 deletions pkg/monitors/appinsights/appinsights-monitor_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ import (

"github.com/Azure/azure-sdk-for-go/services/appinsights/mgmt/2015-05-01/insights"
insightsAlert "github.com/Azure/azure-sdk-for-go/services/preview/monitor/mgmt/2018-03-01/insights"
endpointmonitorv1alpha1 "github.com/stakater/IngressMonitorController/api/v1alpha1"
"github.com/stakater/IngressMonitorController/pkg/models"
endpointmonitorv1alpha1 "github.com/stakater/IngressMonitorController/v2/api/v1alpha1"
"github.com/stakater/IngressMonitorController/v2/pkg/models"
)

func TestAppinsightsMonitorService_createWebTest(t *testing.T) {
Expand Down
4 changes: 2 additions & 2 deletions pkg/monitors/appinsights/util.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import (
"fmt"

"github.com/Azure/azure-sdk-for-go/services/appinsights/mgmt/2015-05-01/insights"
endpointmonitorv1alpha1 "github.com/stakater/IngressMonitorController/api/v1alpha1"
"github.com/stakater/IngressMonitorController/pkg/models"
endpointmonitorv1alpha1 "github.com/stakater/IngressMonitorController/v2/api/v1alpha1"
"github.com/stakater/IngressMonitorController/v2/pkg/models"
)

// isAlertEnabled returns true if Alertrule is required
Expand Down
6 changes: 3 additions & 3 deletions pkg/monitors/gcloud/gcloud-monitor.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ import (
monitoredres "google.golang.org/genproto/googleapis/api/monitoredres"
monitoringpb "google.golang.org/genproto/googleapis/monitoring/v3"

endpointmonitorv1alpha1 "github.com/stakater/IngressMonitorController/api/v1alpha1"
"github.com/stakater/IngressMonitorController/pkg/config"
"github.com/stakater/IngressMonitorController/pkg/models"
endpointmonitorv1alpha1 "github.com/stakater/IngressMonitorController/v2/api/v1alpha1"
"github.com/stakater/IngressMonitorController/v2/pkg/config"
"github.com/stakater/IngressMonitorController/v2/pkg/models"
)

var log = logf.Log.WithName("gcloud-monitor")
Expand Down
6 changes: 3 additions & 3 deletions pkg/monitors/gcloud/gcloud-monitor_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ package gcloud
import (
"testing"

"github.com/stakater/IngressMonitorController/pkg/config"
"github.com/stakater/IngressMonitorController/pkg/models"
"github.com/stakater/IngressMonitorController/pkg/util"
"github.com/stakater/IngressMonitorController/v2/pkg/config"
"github.com/stakater/IngressMonitorController/v2/pkg/models"
"github.com/stakater/IngressMonitorController/v2/pkg/util"
)

func TestAddMonitorWithCorrectValues(t *testing.T) {
Expand Down
20 changes: 10 additions & 10 deletions pkg/monitors/monitor-proxy.go
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
package monitors

import (
endpointmonitorv1alpha1 "github.com/stakater/IngressMonitorController/api/v1alpha1"
"github.com/stakater/IngressMonitorController/pkg/config"
"github.com/stakater/IngressMonitorController/pkg/models"
"github.com/stakater/IngressMonitorController/pkg/monitors/appinsights"
"github.com/stakater/IngressMonitorController/pkg/monitors/gcloud"
"github.com/stakater/IngressMonitorController/pkg/monitors/pingdom"
"github.com/stakater/IngressMonitorController/pkg/monitors/statuscake"
"github.com/stakater/IngressMonitorController/pkg/monitors/updown"
"github.com/stakater/IngressMonitorController/pkg/monitors/uptime"
"github.com/stakater/IngressMonitorController/pkg/monitors/uptimerobot"
endpointmonitorv1alpha1 "github.com/stakater/IngressMonitorController/v2/api/v1alpha1"
"github.com/stakater/IngressMonitorController/v2/pkg/config"
"github.com/stakater/IngressMonitorController/v2/pkg/models"
"github.com/stakater/IngressMonitorController/v2/pkg/monitors/appinsights"
"github.com/stakater/IngressMonitorController/v2/pkg/monitors/gcloud"
"github.com/stakater/IngressMonitorController/v2/pkg/monitors/pingdom"
"github.com/stakater/IngressMonitorController/v2/pkg/monitors/statuscake"
"github.com/stakater/IngressMonitorController/v2/pkg/monitors/updown"
"github.com/stakater/IngressMonitorController/v2/pkg/monitors/uptime"
"github.com/stakater/IngressMonitorController/v2/pkg/monitors/uptimerobot"
logf "sigs.k8s.io/controller-runtime/pkg/log"
)

Expand Down
2 changes: 1 addition & 1 deletion pkg/monitors/monitor-proxy_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package monitors
import (
"testing"

"github.com/stakater/IngressMonitorController/pkg/util"
"github.com/stakater/IngressMonitorController/v2/pkg/util"
)

func TestMonitorServiceProxyOfTypeWithCorrectType(t *testing.T) {
Expand Down
4 changes: 2 additions & 2 deletions pkg/monitors/monitor-service.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ package monitors
import (
"strings"

"github.com/stakater/IngressMonitorController/pkg/config"
"github.com/stakater/IngressMonitorController/pkg/models"
"github.com/stakater/IngressMonitorController/v2/pkg/config"
"github.com/stakater/IngressMonitorController/v2/pkg/models"
)

type MonitorService interface {
Expand Down
8 changes: 4 additions & 4 deletions pkg/monitors/pingdom/pingdom-monitor.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ import (
logf "sigs.k8s.io/controller-runtime/pkg/log"

"github.com/russellcardullo/go-pingdom/pingdom"
endpointmonitorv1alpha1 "github.com/stakater/IngressMonitorController/api/v1alpha1"
"github.com/stakater/IngressMonitorController/pkg/config"
"github.com/stakater/IngressMonitorController/pkg/models"
"github.com/stakater/IngressMonitorController/pkg/util"
endpointmonitorv1alpha1 "github.com/stakater/IngressMonitorController/v2/api/v1alpha1"
"github.com/stakater/IngressMonitorController/v2/pkg/config"
"github.com/stakater/IngressMonitorController/v2/pkg/models"
"github.com/stakater/IngressMonitorController/v2/pkg/util"
)

var log = logf.Log.WithName("pingdom")
Expand Down
6 changes: 3 additions & 3 deletions pkg/monitors/pingdom/pingdom-monitor_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ import (
"net/url"
"testing"

"github.com/stakater/IngressMonitorController/pkg/config"
"github.com/stakater/IngressMonitorController/pkg/models"
"github.com/stakater/IngressMonitorController/pkg/util"
"github.com/stakater/IngressMonitorController/v2/pkg/config"
"github.com/stakater/IngressMonitorController/v2/pkg/models"
"github.com/stakater/IngressMonitorController/v2/pkg/util"
)

func TestAddMonitorWithCorrectValues(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion pkg/monitors/statuscake/statuscake-mappers.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package statuscake
import (
"strconv"

"github.com/stakater/IngressMonitorController/pkg/models"
"github.com/stakater/IngressMonitorController/v2/pkg/models"
)

//StatusCakeMonitorMonitorToBaseMonitorMapper function to map Statuscake structure to Monitor
Expand Down
6 changes: 3 additions & 3 deletions pkg/monitors/statuscake/statuscake-monitor.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ import (

logf "sigs.k8s.io/controller-runtime/pkg/log"

endpointmonitorv1alpha1 "github.com/stakater/IngressMonitorController/api/v1alpha1"
"github.com/stakater/IngressMonitorController/pkg/config"
"github.com/stakater/IngressMonitorController/pkg/models"
endpointmonitorv1alpha1 "github.com/stakater/IngressMonitorController/v2/api/v1alpha1"
"github.com/stakater/IngressMonitorController/v2/pkg/config"
"github.com/stakater/IngressMonitorController/v2/pkg/models"
)

var log = logf.Log.WithName("statuscake-monitor")
Expand Down
8 changes: 4 additions & 4 deletions pkg/monitors/statuscake/statuscake-monitor_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ import (
"testing"
"time"

endpointmonitorv1alpha1 "github.com/stakater/IngressMonitorController/api/v1alpha1"
"github.com/stakater/IngressMonitorController/pkg/config"
"github.com/stakater/IngressMonitorController/pkg/models"
"github.com/stakater/IngressMonitorController/pkg/util"
endpointmonitorv1alpha1 "github.com/stakater/IngressMonitorController/v2/api/v1alpha1"
"github.com/stakater/IngressMonitorController/v2/pkg/config"
"github.com/stakater/IngressMonitorController/v2/pkg/models"
"github.com/stakater/IngressMonitorController/v2/pkg/util"
"gotest.tools/assert"
)

Expand Down
6 changes: 3 additions & 3 deletions pkg/monitors/updown/updown-monitor.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ import (
logf "sigs.k8s.io/controller-runtime/pkg/log"

"github.com/antoineaugusti/updown"
endpointmonitorv1alpha1 "github.com/stakater/IngressMonitorController/api/v1alpha1"
"github.com/stakater/IngressMonitorController/pkg/config"
"github.com/stakater/IngressMonitorController/pkg/models"
endpointmonitorv1alpha1 "github.com/stakater/IngressMonitorController/v2/api/v1alpha1"
"github.com/stakater/IngressMonitorController/v2/pkg/config"
"github.com/stakater/IngressMonitorController/v2/pkg/models"
)

const (
Expand Down
8 changes: 4 additions & 4 deletions pkg/monitors/updown/updown-monitor_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ import (
"testing"
"time"

endpointmonitorv1alpha1 "github.com/stakater/IngressMonitorController/api/v1alpha1"
"github.com/stakater/IngressMonitorController/pkg/config"
"github.com/stakater/IngressMonitorController/pkg/models"
"github.com/stakater/IngressMonitorController/pkg/util"
endpointmonitorv1alpha1 "github.com/stakater/IngressMonitorController/v2/api/v1alpha1"
"github.com/stakater/IngressMonitorController/v2/pkg/config"
"github.com/stakater/IngressMonitorController/v2/pkg/models"
"github.com/stakater/IngressMonitorController/v2/pkg/util"
"github.com/stretchr/testify/assert"
)

Expand Down
4 changes: 2 additions & 2 deletions pkg/monitors/uptime/uptime-mappers.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import (
"strconv"
"strings"

endpointmonitorv1alpha1 "github.com/stakater/IngressMonitorController/api/v1alpha1"
"github.com/stakater/IngressMonitorController/pkg/models"
endpointmonitorv1alpha1 "github.com/stakater/IngressMonitorController/v2/api/v1alpha1"
"github.com/stakater/IngressMonitorController/v2/pkg/models"
)

func UptimeMonitorMonitorToBaseMonitorMapper(uptimeMonitor UptimeMonitorMonitor) *models.Monitor {
Expand Down
4 changes: 2 additions & 2 deletions pkg/monitors/uptime/uptime-mappers_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import (
"strconv"
"testing"

endpointmonitorv1alpha1 "github.com/stakater/IngressMonitorController/api/v1alpha1"
"github.com/stakater/IngressMonitorController/pkg/models"
endpointmonitorv1alpha1 "github.com/stakater/IngressMonitorController/v2/api/v1alpha1"
"github.com/stakater/IngressMonitorController/v2/pkg/models"
)

func TestUptimeMonitorMonitorToBaseMonitorMapper(t *testing.T) {
Expand Down
10 changes: 5 additions & 5 deletions pkg/monitors/uptime/uptime-monitor.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@ import (
gocache "github.com/patrickmn/go-cache"
logf "sigs.k8s.io/controller-runtime/pkg/log"

endpointmonitorv1alpha1 "github.com/stakater/IngressMonitorController/api/v1alpha1"
"github.com/stakater/IngressMonitorController/pkg/config"
"github.com/stakater/IngressMonitorController/pkg/http"
"github.com/stakater/IngressMonitorController/pkg/models"
"github.com/stakater/IngressMonitorController/pkg/util"
endpointmonitorv1alpha1 "github.com/stakater/IngressMonitorController/v2/api/v1alpha1"
"github.com/stakater/IngressMonitorController/v2/pkg/config"
"github.com/stakater/IngressMonitorController/v2/pkg/http"
"github.com/stakater/IngressMonitorController/v2/pkg/models"
"github.com/stakater/IngressMonitorController/v2/pkg/util"
)

var cache = gocache.New(5*time.Minute, 5*time.Minute)
Expand Down
8 changes: 4 additions & 4 deletions pkg/monitors/uptime/uptime-monitor_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ package uptime
import (
"testing"

endpointmonitorv1alpha1 "github.com/stakater/IngressMonitorController/api/v1alpha1"
"github.com/stakater/IngressMonitorController/pkg/config"
"github.com/stakater/IngressMonitorController/pkg/models"
"github.com/stakater/IngressMonitorController/pkg/util"
endpointmonitorv1alpha1 "github.com/stakater/IngressMonitorController/v2/api/v1alpha1"
"github.com/stakater/IngressMonitorController/v2/pkg/config"
"github.com/stakater/IngressMonitorController/v2/pkg/models"
"github.com/stakater/IngressMonitorController/v2/pkg/util"
)

func TestGetAllMonitors(t *testing.T) {
Expand Down
Loading

0 comments on commit 174d429

Please sign in to comment.