Skip to content

Commit 39e1141

Browse files
authored
Merge pull request #394 from stakater/lint-fix
Update golang and lint version
2 parents 985aa65 + 9e74913 commit 39e1141

File tree

6 files changed

+89
-20
lines changed

6 files changed

+89
-20
lines changed

.github/workflows/pull_request.yml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ on:
1212
- 'config/'
1313
env:
1414
DOCKER_FILE_PATH: Dockerfile
15-
GOLANG_VERSION: 1.16
15+
GOLANG_VERSION: 1.18
1616
KUBERNETES_VERSION: "1.20.2"
1717
KIND_VERSION: "0.11.1"
1818

@@ -34,7 +34,7 @@ jobs:
3434
go-version: ${{ env.GOLANG_VERSION }}
3535

3636
- name: Lint
37-
uses: golangci/golangci-lint-action@v2.3.0
37+
uses: golangci/golangci-lint-action@v2.5.2
3838
with:
3939
version: v1.45.2
4040
only-new-issues: false
@@ -50,7 +50,6 @@ jobs:
5050
sudo install ./kubectl /usr/local/bin/ && rm kubectl
5151
kubectl version --short --client
5252
kubectl version --short --client | grep -q ${KUBERNETES_VERSION}
53-
5453
- name: Install Kind
5554
run: |
5655
curl -L -o kind https://github.com/kubernetes-sigs/kind/releases/download/v${KIND_VERSION}/kind-linux-amd64
@@ -67,7 +66,7 @@ jobs:
6766
kubectl cluster-info
6867
make install
6968
mkdir -p .local
70-
echo "${{ secrets.SECRET_KUBERNETES_RESOURCES }}" > .local/test-config.yaml
69+
echo "${{ secrets.SECRET_KUBERNETES_RESOURCES }}" | base64 --decode > .local/test-config.yaml
7170
7271
- name: Test
7372
run: make test

.github/workflows/push.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ on:
1414
env:
1515
DOCKER_FILE_PATH: Dockerfile
1616
BUNDLE_DOCKER_FILE_PATH: bundle.Dockerfile
17-
GOLANG_VERSION: 1.16
17+
GOLANG_VERSION: 1.18
1818
OPERATOR_SDK_VERSION: "1.6.2"
1919
KUSTOMIZE_VERSION: "3.5.4"
2020
KUBERNETES_VERSION: "1.20.2"
@@ -41,7 +41,7 @@ jobs:
4141
go-version: ${{ env.GOLANG_VERSION }}
4242

4343
- name: Lint
44-
uses: golangci/golangci-lint-action@v2.3.0
44+
uses: golangci/golangci-lint-action@v2.5.2
4545
with:
4646
version: v1.45.2
4747
only-new-issues: false
@@ -74,7 +74,7 @@ jobs:
7474
kubectl cluster-info
7575
make install
7676
mkdir -p .local
77-
echo "${{ secrets.SECRET_KUBERNETES_RESOURCES }}" > .local/test-config.yaml
77+
echo "${{ secrets.SECRET_KUBERNETES_RESOURCES }}" | base64 --decode > .local/test-config.yaml
7878
7979
- name: Test
8080
run: make test

.github/workflows/release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ on:
66
- "v*"
77

88
env:
9-
GOLANG_VERSION: 1.16
9+
GOLANG_VERSION: 1.18
1010

1111
jobs:
1212
build:

go.mod

Lines changed: 70 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,38 +1,98 @@
11
module github.com/stakater/IngressMonitorController
22

3-
go 1.15
3+
go 1.18
44

55
require (
66
cloud.google.com/go v0.54.0
77
github.com/Azure/azure-sdk-for-go v44.0.0+incompatible
88
github.com/Azure/go-autorest/autorest/azure/auth v0.5.0
9-
github.com/Azure/go-autorest/autorest/to v0.4.0 // indirect
10-
github.com/Azure/go-autorest/autorest/validation v0.3.0 // indirect
119
github.com/antoineaugusti/updown v0.0.0-20190412074625-d590ab97f115
1210
github.com/go-logr/logr v0.3.0
1311
github.com/kelseyhightower/envconfig v1.4.0
14-
github.com/onsi/ginkgo v1.15.0 // indirect
15-
github.com/onsi/gomega v1.10.5 // indirect
1612
github.com/openshift/api v0.0.0-20200526144822-34f54f12813a
1713
github.com/patrickmn/go-cache v2.1.0+incompatible
1814
github.com/russellcardullo/go-pingdom v1.3.0
1915
github.com/stakater/operator-utils v0.1.13
2016
github.com/stretchr/testify v1.6.1
21-
golang.org/x/crypto v0.0.0-20201012173705-84dcc777aaee // indirect
22-
golang.org/x/mod v0.4.2 // indirect
23-
golang.org/x/tools v0.1.0 // indirect
2417
google.golang.org/api v0.20.0
2518
google.golang.org/genproto v0.0.0-20201110150050-8816d57aaa9a
26-
google.golang.org/grpc v1.30.0 // indirect
2719
gopkg.in/yaml.v2 v2.3.0
2820
gotest.tools v2.2.0+incompatible
2921
k8s.io/api v0.20.2
30-
k8s.io/apiextensions-apiserver v0.20.2 // indirect
3122
k8s.io/apimachinery v0.20.2
3223
k8s.io/client-go v0.20.2
3324
sigs.k8s.io/controller-runtime v0.8.3
3425
)
3526

27+
require (
28+
github.com/Azure/go-autorest v14.2.0+incompatible // indirect
29+
github.com/Azure/go-autorest/autorest v0.11.1 // indirect
30+
github.com/Azure/go-autorest/autorest/adal v0.9.5 // indirect
31+
github.com/Azure/go-autorest/autorest/azure/cli v0.4.0 // indirect
32+
github.com/Azure/go-autorest/autorest/date v0.3.0 // indirect
33+
github.com/Azure/go-autorest/autorest/to v0.4.0 // indirect
34+
github.com/Azure/go-autorest/autorest/validation v0.3.0 // indirect
35+
github.com/Azure/go-autorest/logger v0.2.0 // indirect
36+
github.com/Azure/go-autorest/tracing v0.6.0 // indirect
37+
github.com/beorn7/perks v1.0.1 // indirect
38+
github.com/cespare/xxhash/v2 v2.1.1 // indirect
39+
github.com/davecgh/go-spew v1.1.1 // indirect
40+
github.com/dimchansky/utfbom v1.1.0 // indirect
41+
github.com/evanphx/json-patch v4.9.0+incompatible // indirect
42+
github.com/form3tech-oss/jwt-go v3.2.2+incompatible // indirect
43+
github.com/fsnotify/fsnotify v1.4.9 // indirect
44+
github.com/go-logr/zapr v0.2.0 // indirect
45+
github.com/gogo/protobuf v1.3.1 // indirect
46+
github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e // indirect
47+
github.com/golang/protobuf v1.4.3 // indirect
48+
github.com/google/go-cmp v0.5.5 // indirect
49+
github.com/google/gofuzz v1.1.0 // indirect
50+
github.com/google/uuid v1.1.2 // indirect
51+
github.com/googleapis/gax-go/v2 v2.0.5 // indirect
52+
github.com/googleapis/gnostic v0.5.1 // indirect
53+
github.com/hashicorp/golang-lru v0.5.4 // indirect
54+
github.com/imdario/mergo v0.3.10 // indirect
55+
github.com/json-iterator/go v1.1.10 // indirect
56+
github.com/matttproud/golang_protobuf_extensions v1.0.2-0.20181231171920-c182affec369 // indirect
57+
github.com/mitchellh/go-homedir v1.1.0 // indirect
58+
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
59+
github.com/modern-go/reflect2 v1.0.1 // indirect
60+
github.com/onsi/ginkgo v1.15.0 // indirect
61+
github.com/onsi/gomega v1.10.5 // indirect
62+
github.com/pkg/errors v0.9.1 // indirect
63+
github.com/pmezard/go-difflib v1.0.0 // indirect
64+
github.com/prometheus/client_golang v1.7.1 // indirect
65+
github.com/prometheus/client_model v0.2.0 // indirect
66+
github.com/prometheus/common v0.10.0 // indirect
67+
github.com/prometheus/procfs v0.2.0 // indirect
68+
github.com/spf13/pflag v1.0.5 // indirect
69+
go.opencensus.io v0.22.3 // indirect
70+
go.uber.org/atomic v1.6.0 // indirect
71+
go.uber.org/multierr v1.5.0 // indirect
72+
go.uber.org/zap v1.15.0 // indirect
73+
golang.org/x/crypto v0.0.0-20201012173705-84dcc777aaee // indirect
74+
golang.org/x/mod v0.4.2 // indirect
75+
golang.org/x/net v0.0.0-20201202161906-c7110b5ffcbb // indirect
76+
golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d // indirect
77+
golang.org/x/sys v0.0.0-20210119212857-b64e53b001e4 // indirect
78+
golang.org/x/text v0.3.4 // indirect
79+
golang.org/x/time v0.0.0-20200630173020-3af7569d3a1e // indirect
80+
golang.org/x/tools v0.1.0 // indirect
81+
gomodules.xyz/jsonpatch/v2 v2.1.0 // indirect
82+
google.golang.org/appengine v1.6.6 // indirect
83+
google.golang.org/grpc v1.30.0 // indirect
84+
google.golang.org/protobuf v1.25.0 // indirect
85+
gopkg.in/inf.v0 v0.9.1 // indirect
86+
gopkg.in/yaml.v3 v3.0.0-20200615113413-eeeca48fe776 // indirect
87+
k8s.io/apiextensions-apiserver v0.20.2 // indirect
88+
k8s.io/component-base v0.20.2 // indirect
89+
k8s.io/klog/v2 v2.4.0 // indirect
90+
k8s.io/kube-openapi v0.0.0-20201113171705-d219536bb9fd // indirect
91+
k8s.io/utils v0.0.0-20210111153108-fddb29f9d009 // indirect
92+
sigs.k8s.io/structured-merge-diff/v4 v4.0.2 // indirect
93+
sigs.k8s.io/yaml v1.2.0 // indirect
94+
)
95+
3696
replace github.com/stakater/IngressMonitorController => ./github.com/stakater/IngressMonitorController
3797

3898
// replace k8s.io/client-go => k8s.io/client-go v0.18.2

go.sum

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,6 @@ github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kB
7878
github.com/bketelsen/crypt v0.0.3-0.20200106085610-5cbc8cc4026c/go.mod h1:MKsuJmJgSg28kpZDP6UIiPt0e0Oz0kqKNGyRaWEPv84=
7979
github.com/blang/semver v3.5.1+incompatible/go.mod h1:kRBLl5iJ+tD4TcOOxsy/0fnwebNt5EWlYSAyrTnjyyk=
8080
github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU=
81-
github.com/cespare/xxhash v1.1.0 h1:a6HrQnmkObjyL+Gs60czilIUGqrzKutQD6XZog3p+ko=
8281
github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc=
8382
github.com/cespare/xxhash/v2 v2.1.1 h1:6MnRN8NT7+YBpUIWxHtefFZOKTAPgGjpQSxqLNn0+qY=
8483
github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs=
@@ -761,7 +760,6 @@ k8s.io/gengo v0.0.0-20200114144118-36b2048a9120/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8
761760
k8s.io/gengo v0.0.0-20200413195148-3a45101e95ac/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0=
762761
k8s.io/gengo v0.0.0-20201113003025-83324d819ded/go.mod h1:FiNAH4ZV3gBg2Kwh89tzAEV2be7d5xI0vBa/VySYy3E=
763762
k8s.io/klog v0.0.0-20181102134211-b9b56d5dfc92/go.mod h1:Gq+BEi5rUBO/HRz0bTSXDUcqjScdoY3a9IHpCEIOOfk=
764-
k8s.io/klog v1.0.0 h1:Pt+yjF5aB1xDSVbau4VsWe+dQNzA0qv1LlXdC2dF6Q8=
765763
k8s.io/klog v1.0.0/go.mod h1:4Bi6QPql/J/LkTDqv7R/cd3hPo4k2DG6Ptcz060Ez5I=
766764
k8s.io/klog/v2 v2.0.0/go.mod h1:PBfzABfn139FHAV07az/IF9Wp1bkk3vpT2XSJ76fSDE=
767765
k8s.io/klog/v2 v2.2.0/go.mod h1:Od+F08eJP+W3HUb4pSrPpgp9DGU4GzlpG/TmITuYh/Y=

pkg/monitors/uptimerobot/uptime-monitor_test.go

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -145,6 +145,9 @@ func TestUpdateMonitorInterval(t *testing.T) {
145145

146146
service := UpTimeMonitorService{}
147147
provider := util.GetProviderWithName(config, "UptimeRobot")
148+
if provider == nil {
149+
return
150+
}
148151
service.Setup(*provider)
149152

150153
configInterval := &endpointmonitorv1alpha1.UptimeRobotConfig{
@@ -307,6 +310,9 @@ func TestAddMonitorWithMonitorType(t *testing.T) {
307310

308311
service := UpTimeMonitorService{}
309312
provider := util.GetProviderWithName(config, "UptimeRobot")
313+
if provider == nil {
314+
return
315+
}
310316
service.Setup(*provider)
311317

312318
configKeyword := &endpointmonitorv1alpha1.UptimeRobotConfig{
@@ -353,6 +359,9 @@ func TestAddMonitorWithIncorrectValues(t *testing.T) {
353359

354360
service := UpTimeMonitorService{}
355361
provider := util.GetProviderWithName(config, "UptimeRobot")
362+
if provider == nil {
363+
return
364+
}
356365
provider.ApiKey = "dummy-api-key"
357366
service.Setup(*provider)
358367

@@ -375,6 +384,9 @@ func TestAddMonitorWithAlertContacts(t *testing.T) {
375384

376385
service := UpTimeMonitorService{}
377386
provider := util.GetProviderWithName(config, "UptimeRobot")
387+
if provider == nil {
388+
return
389+
}
378390
service.Setup(*provider)
379391

380392
configAlertContacts := &endpointmonitorv1alpha1.UptimeRobotConfig{

0 commit comments

Comments
 (0)