Skip to content

Commit 12636ec

Browse files
authored
Merge pull request #200 from jetstack/version-checker-dg
Add Version Checker datagatherer
2 parents 96427da + 75a168c commit 12636ec

File tree

12 files changed

+833
-3
lines changed

12 files changed

+833
-3
lines changed

go.mod

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,36 +8,40 @@ require (
88
github.com/Azure/go-autorest/autorest v0.11.8 // indirect
99
github.com/Azure/go-autorest/autorest/to v0.4.0 // indirect
1010
github.com/Azure/go-autorest/autorest/validation v0.3.0 // indirect
11-
github.com/aws/aws-sdk-go v1.25.30
11+
github.com/aws/aws-sdk-go v1.34.10
1212
github.com/cenkalti/backoff v2.0.0+incompatible
13-
github.com/d4l3k/messagediff v1.2.1 // indirect
13+
github.com/d4l3k/messagediff v1.2.1
1414
github.com/go-logr/logr v0.2.1 // indirect
1515
github.com/go-playground/universal-translator v0.17.0 // indirect
1616
github.com/google/gofuzz v1.2.0 // indirect
1717
github.com/google/uuid v1.1.2 // indirect
1818
github.com/googleapis/gnostic v0.5.1 // indirect
1919
github.com/hashicorp/go-multierror v1.0.0
2020
github.com/imdario/mergo v0.3.11 // indirect
21+
github.com/jetstack/version-checker v0.2.1
2122
github.com/juju/errors v0.0.0-20190930114154-d42613fe1ab9
2223
github.com/juju/loggo v0.0.0-20190526231331-6e530bcce5d8 // indirect
2324
github.com/juju/testing v0.0.0-20191001232224-ce9dec17d28b // indirect
2425
github.com/kylelemons/godebug v1.1.0
2526
github.com/leodido/go-urn v1.2.0 // indirect
2627
github.com/pkg/errors v0.9.1
27-
github.com/sirupsen/logrus v1.7.0 // indirect
28+
github.com/sirupsen/logrus v1.7.0
2829
github.com/spf13/cobra v1.0.0
2930
github.com/spf13/pflag v1.0.5
3031
golang.org/x/crypto v0.0.0-20201002170205-7f63de1d35b0 // indirect
3132
golang.org/x/net v0.0.0-20201002202402-0a1ea396d57c // indirect
3233
golang.org/x/oauth2 v0.0.0-20200902213428-5d25da1a8d43
3334
golang.org/x/sync v0.0.0-20200930132711-30421366ff76 // indirect
3435
golang.org/x/sys v0.0.0-20201005172224-997123666555 // indirect
36+
golang.org/x/text v0.3.3
3537
golang.org/x/time v0.0.0-20200630173020-3af7569d3a1e // indirect
3638
google.golang.org/api v0.30.0
39+
google.golang.org/appengine v1.6.6
3740
gopkg.in/d4l3k/messagediff.v1 v1.2.1
3841
gopkg.in/go-playground/validator.v9 v9.31.0 // indirect
3942
gopkg.in/mgo.v2 v2.0.0-20180705113604-9856a29383ce // indirect
4043
gopkg.in/yaml.v2 v2.3.0
44+
k8s.io/api v0.19.2
4145
k8s.io/apimachinery v0.19.2
4246
k8s.io/client-go v11.0.0+incompatible
4347
k8s.io/klog/v2 v2.3.0 // indirect

go.sum

Lines changed: 68 additions & 0 deletions
Large diffs are not rendered by default.

pkg/agent/config.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ import (
1111
"github.com/jetstack/preflight/pkg/datagatherer/gke"
1212
"github.com/jetstack/preflight/pkg/datagatherer/k8s"
1313
"github.com/jetstack/preflight/pkg/datagatherer/local"
14+
"github.com/jetstack/preflight/pkg/datagatherer/versionchecker"
1415
"github.com/pkg/errors"
1516
"gopkg.in/yaml.v2"
1617
)
@@ -95,6 +96,8 @@ func (dg *dataGatherer) UnmarshalYAML(unmarshal func(interface{}) error) error {
9596
cfg = &k8s.ConfigDiscovery{}
9697
case "local":
9798
cfg = &local.Config{}
99+
case "version-checker":
100+
cfg = &versionchecker.Config{}
98101
// dummy dataGatherer is just used for testing
99102
case "dummy":
100103
cfg = &dummyConfig{}
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
http://example.com
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
http://example.net
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
pa55w0rd
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"schemaVersion": 1,
3+
"name": "jetstack/example",
4+
"tag": "v1.0.0"
5+
}
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"schemaVersion": 1,
3+
"name": "jetstack/example",
4+
"tag": "v1.0.1"
5+
}
Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
{
2+
"apiVersion": "v1",
3+
"kind": "List",
4+
"metadata": {
5+
"resourceVersion": "",
6+
"selfLink": ""
7+
},
8+
"items": [
9+
{
10+
"apiVersion": "v1",
11+
"kind": "Pod",
12+
"metadata": {
13+
"annotations": {},
14+
"labels": {
15+
"app": "example"
16+
},
17+
"name": "example-6d94489854-zpzhr",
18+
"namespace": "example",
19+
"ownerReferences": [
20+
{
21+
"apiVersion": "apps/v1",
22+
"blockOwnerDeletion": true,
23+
"controller": true,
24+
"kind": "ReplicaSet",
25+
"name": "example-6d94489854",
26+
"uid": "bb6c0f31-0e28-4c28-a81d-91b8d7bfed33"
27+
}
28+
],
29+
"resourceVersion": "32023849",
30+
"selfLink": "/api/v1/namespaces/example/pods/example-6d94489854-zpzhr",
31+
"uid": "efff9dae-28ca-42c3-be70-970731c44f67"
32+
},
33+
"spec": {
34+
"containers": [
35+
{
36+
"name": "example",
37+
"command": [
38+
"sh",
39+
"-c"
40+
],
41+
"image": "{{ .URL }}/jetstack/example:v1.0.0"
42+
}
43+
]
44+
},
45+
"status": {
46+
"containerStatuses": [
47+
{
48+
"name": "example",
49+
"imageID": "is set"
50+
}
51+
]
52+
}
53+
}
54+
]
55+
}
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"name": "jetstack/cert-manager-controller",
3+
"tags": [
4+
"v1.0.0",
5+
"v1.0.1"
6+
]
7+
}

0 commit comments

Comments
 (0)