Skip to content

Commit 096e204

Browse files
authored
Merge pull request #398 from stakater/ingress-v1
feat: Support for k8s 1.23 and statuscake's updated api
2 parents 81e3747 + 508c1a5 commit 096e204

File tree

18 files changed

+744
-322
lines changed

18 files changed

+744
-322
lines changed

.github/workflows/pull_request.yml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name: Pull Request
33
on:
44
pull_request_target:
55
branches:
6-
- master
6+
- 'master'
77
paths-ignore:
88
- '*.md'
99
- 'docs/'
@@ -13,14 +13,14 @@ on:
1313
env:
1414
DOCKER_FILE_PATH: Dockerfile
1515
GOLANG_VERSION: 1.18
16-
KUBERNETES_VERSION: "1.20.2"
17-
KIND_VERSION: "0.11.1"
16+
KUBERNETES_VERSION: "1.23.5"
17+
KIND_VERSION: "0.16.0"
1818

1919
jobs:
2020
build:
21-
runs-on: ubuntu-latest
21+
runs-on: ubuntu-latest
2222
name: Build
23-
if: "! contains(toJSON(github.event.commits.*.message), '[skip-ci]')"
23+
if: "! contains(toJSON(github.event.commits.*.message), '[skip-ci]')"
2424
steps:
2525
- name: Check out code
2626
uses: actions/checkout@v2
@@ -67,7 +67,7 @@ jobs:
6767
make install
6868
mkdir -p .local
6969
echo "${{ secrets.SECRET_KUBERNETES_RESOURCES }}" | base64 --decode > .local/test-config.yaml
70-
70+
7171
- name: Test
7272
run: make test
7373

@@ -77,7 +77,7 @@ jobs:
7777
sha=${{ github.event.pull_request.head.sha }}
7878
tag="SNAPSHOT-PR-${{ github.event.pull_request.number }}-${sha:0:8}"
7979
echo "##[set-output name=GIT_TAG;]$(echo ${tag})"
80-
80+
8181
- name: Set up QEMU
8282
uses: docker/setup-qemu-action@v1
8383

.github/workflows/push.yml

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,10 @@ env:
1515
DOCKER_FILE_PATH: Dockerfile
1616
BUNDLE_DOCKER_FILE_PATH: bundle.Dockerfile
1717
GOLANG_VERSION: 1.18
18-
OPERATOR_SDK_VERSION: "1.6.2"
19-
KUSTOMIZE_VERSION: "3.5.4"
20-
KUBERNETES_VERSION: "1.20.2"
21-
KIND_VERSION: "0.11.1"
18+
OPERATOR_SDK_VERSION: "1.19"
19+
KUSTOMIZE_VERSION: "4.5.7"
20+
KUBERNETES_VERSION: "1.23"
21+
KIND_VERSION: "0.16.0"
2222
HELM_REGISTRY_URL: "https://stakater.github.io/stakater-charts"
2323

2424
jobs:
@@ -75,7 +75,7 @@ jobs:
7575
make install
7676
mkdir -p .local
7777
echo "${{ secrets.SECRET_KUBERNETES_RESOURCES }}" | base64 --decode > .local/test-config.yaml
78-
78+
7979
- name: Test
8080
run: make test
8181

@@ -153,8 +153,8 @@ jobs:
153153
env:
154154
VERSION: ${{ steps.generate_operator_tag.outputs.new_tag }}
155155
IMG: ${{ env.IMAGE_REPOSITORY }}:${{ steps.generate_tag.outputs.new_tag }}
156-
run: make bundle
157-
156+
run: make bundle
157+
158158
- name: Verify bundle
159159
run: operator-sdk bundle validate ./bundle --select-optional name=operatorhub
160160

@@ -181,7 +181,7 @@ jobs:
181181

182182
- name: Update Chart CRDs
183183
run: make generate-crds
184-
184+
185185
# Publish helm chart
186186
- name: Publish Helm chart
187187
uses: stefanprodan/helm-gh-pages@master
@@ -202,10 +202,10 @@ jobs:
202202
run: |
203203
git config --local user.email "[email protected]"
204204
git config --local user.name "stakater-user"
205-
git status
205+
git status
206206
git add .
207207
git commit -m "[skip-ci] Update artifacts" -a
208-
208+
209209
- name: Push changes
210210
uses: ad-m/github-push-action@master
211211
with:

config/manager/kustomization.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,5 +12,5 @@ apiVersion: kustomize.config.k8s.io/v1beta1
1212
kind: Kustomization
1313
images:
1414
- name: controller
15-
newName: stakater/ingressmonitorcontroller
16-
newTag: v2.1.19
15+
newName: controller
16+
newTag: latest
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
providers:
22
- name: StatusCake
33
apiKey: API_KEY
4-
apiURL: https://app.statuscake.com/API/
4+
apiURL: https://api.statuscake.com/v1/uptime
55
username: USERNAME
6-
enableMonitorDeletion: true
6+
enableMonitorDeletion: true
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
apiVersion: endpointmonitor.stakater.com/v1alpha1
2+
kind: EndpointMonitor
3+
metadata:
4+
name: test
5+
spec:
6+
forceHttps: true
7+
statusCakeConfig:
8+
port: 123
9+
basicAuthUser: my-service-username
10+
checkRate: 300
11+
realBrowser: true
12+
testTags: 'abc,def'
13+
testType: HTTP
14+
followRedirect: false
15+
paused: false
16+
enableSslAlert: true
17+
statusCodes: '202,200'
18+
confirmation: 1
19+
triggerRate: 1
20+
pingUrl: 'https://stakater2.com/'
21+
contactGroup: '123456,654321'
22+
url: 'https://stakater1.com/'

go.mod

Lines changed: 52 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -3,94 +3,92 @@ module github.com/stakater/IngressMonitorController/v2
33
go 1.18
44

55
require (
6-
cloud.google.com/go v0.54.0
6+
cloud.google.com/go v0.81.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/StatusCakeDev/statuscake-go v1.1.0
910
github.com/antoineaugusti/updown v0.0.0-20190412074625-d590ab97f115
10-
github.com/go-logr/logr v0.3.0
11+
github.com/go-logr/logr v1.2.0
1112
github.com/kelseyhightower/envconfig v1.4.0
1213
github.com/openshift/api v0.0.0-20200526144822-34f54f12813a
1314
github.com/patrickmn/go-cache v2.1.0+incompatible
1415
github.com/russellcardullo/go-pingdom v1.3.0
1516
github.com/stakater/operator-utils v0.1.13
16-
github.com/stretchr/testify v1.6.1
17-
google.golang.org/api v0.20.0
18-
google.golang.org/genproto v0.0.0-20201110150050-8816d57aaa9a
19-
gopkg.in/yaml.v2 v2.3.0
17+
github.com/stretchr/testify v1.7.0
18+
google.golang.org/api v0.44.0
19+
google.golang.org/genproto v0.0.0-20210831024726-fe130286e0e2
20+
gopkg.in/yaml.v2 v2.4.0
2021
gotest.tools v2.2.0+incompatible
21-
k8s.io/api v0.20.2
22-
k8s.io/apimachinery v0.20.2
23-
k8s.io/client-go v0.20.2
24-
sigs.k8s.io/controller-runtime v0.8.3
22+
k8s.io/api v0.23.5
23+
k8s.io/apimachinery v0.23.5
24+
k8s.io/client-go v0.23.5
25+
sigs.k8s.io/controller-runtime v0.11.2
2526
)
2627

2728
require (
2829
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
30+
github.com/Azure/go-autorest/autorest v0.11.18 // indirect
31+
github.com/Azure/go-autorest/autorest/adal v0.9.13 // indirect
3132
github.com/Azure/go-autorest/autorest/azure/cli v0.4.0 // indirect
3233
github.com/Azure/go-autorest/autorest/date v0.3.0 // indirect
3334
github.com/Azure/go-autorest/autorest/to v0.4.0 // indirect
3435
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/logger v0.2.1 // indirect
3637
github.com/Azure/go-autorest/tracing v0.6.0 // indirect
3738
github.com/beorn7/perks v1.0.1 // indirect
3839
github.com/cespare/xxhash/v2 v2.1.1 // indirect
3940
github.com/davecgh/go-spew v1.1.1 // indirect
4041
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
42+
github.com/evanphx/json-patch v4.12.0+incompatible // indirect
43+
github.com/form3tech-oss/jwt-go v3.2.3+incompatible // indirect
44+
github.com/fsnotify/fsnotify v1.5.1 // indirect
45+
github.com/go-logr/zapr v1.2.0 // indirect
46+
github.com/gogo/protobuf v1.3.2 // indirect
47+
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect
48+
github.com/golang/protobuf v1.5.2 // indirect
4849
github.com/google/go-cmp v0.5.5 // indirect
4950
github.com/google/gofuzz v1.1.0 // indirect
5051
github.com/google/uuid v1.1.2 // indirect
5152
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
53+
github.com/googleapis/gnostic v0.5.5 // indirect
54+
github.com/imdario/mergo v0.3.12 // indirect
55+
github.com/json-iterator/go v1.1.12 // indirect
5656
github.com/matttproud/golang_protobuf_extensions v1.0.2-0.20181231171920-c182affec369 // indirect
5757
github.com/mitchellh/go-homedir v1.1.0 // indirect
5858
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
59+
github.com/modern-go/reflect2 v1.0.2 // indirect
6260
github.com/pkg/errors v0.9.1 // indirect
6361
github.com/pmezard/go-difflib v1.0.0 // indirect
64-
github.com/prometheus/client_golang v1.7.1 // indirect
62+
github.com/prometheus/client_golang v1.11.0 // indirect
6563
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
64+
github.com/prometheus/common v0.28.0 // indirect
65+
github.com/prometheus/procfs v0.6.0 // indirect
6866
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
67+
go.opencensus.io v0.23.0 // indirect
68+
go.uber.org/atomic v1.7.0 // indirect
69+
go.uber.org/multierr v1.6.0 // indirect
70+
go.uber.org/zap v1.19.1 // indirect
71+
golang.org/x/crypto v0.0.0-20210817164053-32db794688a5 // indirect
72+
golang.org/x/net v0.0.0-20211209124913-491a49abca63 // indirect
73+
golang.org/x/oauth2 v0.0.0-20210819190943-2bc19b11175f // indirect
74+
golang.org/x/sys v0.0.0-20211029165221-6e7872819dc8 // indirect
75+
golang.org/x/term v0.0.0-20210615171337-6886f2dfbf5b // indirect
76+
golang.org/x/text v0.3.7 // indirect
77+
golang.org/x/time v0.0.0-20210723032227-1f47c861a9ac // indirect
78+
gomodules.xyz/jsonpatch/v2 v2.2.0 // indirect
79+
google.golang.org/appengine v1.6.7 // indirect
80+
google.golang.org/grpc v1.40.0 // indirect
81+
google.golang.org/protobuf v1.27.1 // indirect
8582
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
83+
gopkg.in/yaml.v3 v3.0.1 // indirect
84+
k8s.io/apiextensions-apiserver v0.23.5 // indirect
85+
k8s.io/component-base v0.23.5 // indirect
86+
k8s.io/klog/v2 v2.30.0 // indirect
87+
k8s.io/kube-openapi v0.0.0-20211115234752-e816edb12b65 // indirect
88+
k8s.io/utils v0.0.0-20211116205334-6203023598ed // indirect
89+
sigs.k8s.io/json v0.0.0-20211020170558-c049b76a60c6 // indirect
90+
sigs.k8s.io/structured-merge-diff/v4 v4.2.1 // indirect
91+
sigs.k8s.io/yaml v1.3.0 // indirect
9492
)
9593

9694
replace github.com/stakater/IngressMonitorController => ./github.com/stakater/IngressMonitorController

0 commit comments

Comments
 (0)