Skip to content

Commit 8130492

Browse files
authored
Merge pull request #152 from digitalocean/CON-7651/update-dependencies
Upgrade kubernetes dependencies to 0.25.2
2 parents 60d0609 + 97dc160 commit 8130492

File tree

515 files changed

+24213
-7032
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

515 files changed

+24213
-7032
lines changed

.circleci/config.yml

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2,32 +2,25 @@ version: 2
22
jobs:
33
license:
44
docker:
5-
- image: golang:1.17
5+
- image: golang:1.19
66
steps:
77
- checkout
88
- run: ./script/check-licenses.sh
99
vet:
1010
docker:
11-
- image: golang:1.17
11+
- image: golang:1.19
1212
steps:
1313
- checkout
1414
- run: go vet ./...
15-
lint:
16-
docker:
17-
- image: golang:1.17
18-
steps:
19-
- checkout
20-
- run: go get golang.org/x/lint/golint
21-
- run: sh -c golint -set_exit_status $(go list ./...)
2215
test:
2316
docker:
24-
- image: golang:1.17
17+
- image: golang:1.19
2518
steps:
2619
- checkout
2720
- run: go test -race -cover ./...
2821
smoke-test:
2922
docker:
30-
- image: golang:1.17
23+
- image: golang:1.19
3124
steps:
3225
- checkout
3326
- run: go run ./cmd/clusterlint --version
@@ -37,6 +30,5 @@ workflows:
3730
jobs:
3831
- license
3932
- vet
40-
- lint
4133
- test
4234
- smoke-test

.github/workflows/release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717
- name: Install go
1818
uses: actions/setup-go@0caeaed6fd66a828038c2da3c0f662a42862658f
1919
with:
20-
go-version: ^1.17
20+
go-version: ^1.19
2121
- name: Check out code into the Go module directory
2222
uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f
2323
- name: Login to dockerhub to push the image

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Build the clusterlint binary
2-
FROM golang:1.17 as builder
2+
FROM golang:1.19 as builder
33
WORKDIR /workspace
44
# Copy the Go Modules manifests
55
COPY go.mod go.mod

checks.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ We do not recommend having a `concurrencyPolicy` of `Allow` for CronJob resource
8282

8383
```yaml
8484
# Not recommended: Having a concurrency policy of Allow
85-
apiVersion: batch/v1beta1
85+
apiVersion: batch/v1
8686
kind: CronJob
8787
metadata:
8888
name: mycron
@@ -94,7 +94,7 @@ spec:
9494

9595
```yaml
9696
# Recommended: Having a concurrency policy of Forbid or Replace
97-
apiVersion: batch/v1beta1
97+
apiVersion: batch/v1
9898
kind: CronJob
9999
metadata:
100100
name: mycron

checks/basic/cronjob_concurrency.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ package basic
1818

1919
import (
2020
"fmt"
21+
batchv1 "k8s.io/api/batch/v1"
2122

2223
batchv1beta1 "k8s.io/api/batch/v1beta1"
2324

@@ -54,7 +55,7 @@ func (c *cronJobConcurrencyCheck) Run(objects *kube.Objects) ([]checks.Diagnosti
5455
var diagnostics []checks.Diagnostic
5556

5657
for _, cronjob := range objects.CronJobs.Items {
57-
if batchv1beta1.AllowConcurrent == cronjob.Spec.ConcurrencyPolicy {
58+
if batchv1.AllowConcurrent == cronjob.Spec.ConcurrencyPolicy {
5859
d := checks.Diagnostic{
5960
Severity: checks.Warning,
6061
Message: fmt.Sprintf("CronJob has a concurrency policy of `%s`. Prefer to use `%s` or `%s`", cronjob.Spec.ConcurrencyPolicy, batchv1beta1.ForbidConcurrent, batchv1beta1.ReplaceConcurrent),

checks/basic/cronjob_concurrency_test.go

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,10 @@ limitations under the License.
1717
package basic
1818

1919
import (
20+
batchv1 "k8s.io/api/batch/v1"
2021
"testing"
2122

2223
"github.com/stretchr/testify/assert"
23-
batchv1beta1 "k8s.io/api/batch/v1beta1"
2424
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
2525

2626
"github.com/digitalocean/clusterlint/checks"
@@ -50,17 +50,17 @@ func TestCronJobConcurrency(t *testing.T) {
5050
}{
5151
{
5252
name: "cronjob with 'Forbid' policy",
53-
objs: policy(batchv1beta1.ForbidConcurrent),
53+
objs: policy(batchv1.ForbidConcurrent),
5454
expected: nil,
5555
},
5656
{
5757
name: "cronjob with 'Replace' policy",
58-
objs: policy(batchv1beta1.ReplaceConcurrent),
58+
objs: policy(batchv1.ReplaceConcurrent),
5959
expected: nil,
6060
},
6161
{
6262
name: "cronjob with 'Allow' policy",
63-
objs: policy(batchv1beta1.AllowConcurrent),
63+
objs: policy(batchv1.AllowConcurrent),
6464
expected: []checks.Diagnostic{
6565
{
6666
Severity: checks.Warning,
@@ -82,20 +82,20 @@ func TestCronJobConcurrency(t *testing.T) {
8282
}
8383
}
8484

85-
func policy(policy batchv1beta1.ConcurrencyPolicy) *kube.Objects {
85+
func policy(policy batchv1.ConcurrencyPolicy) *kube.Objects {
8686
objs := initCronJob()
87-
objs.CronJobs.Items[0].Spec = batchv1beta1.CronJobSpec{
87+
objs.CronJobs.Items[0].Spec = batchv1.CronJobSpec{
8888
ConcurrencyPolicy: policy,
8989
}
9090
return objs
9191
}
9292

9393
func initCronJob() *kube.Objects {
9494
objs := &kube.Objects{
95-
CronJobs: &batchv1beta1.CronJobList{
96-
Items: []batchv1beta1.CronJob{
95+
CronJobs: &batchv1.CronJobList{
96+
Items: []batchv1.CronJob{
9797
{
98-
TypeMeta: metav1.TypeMeta{Kind: "CronJob", APIVersion: "batch/v1beta1"},
98+
TypeMeta: metav1.TypeMeta{Kind: "CronJob", APIVersion: "batch/v1"},
9999
ObjectMeta: metav1.ObjectMeta{Name: "cronjob_foo"},
100100
},
101101
},

go.mod

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
module github.com/digitalocean/clusterlint
22

3-
go 1.18
3+
go 1.19
44

55
require (
66
github.com/docker/distribution v2.7.1+incompatible
@@ -9,30 +9,30 @@ require (
99
github.com/stretchr/testify v1.7.0
1010
github.com/urfave/cli v1.19.1
1111
golang.org/x/sync v0.0.0-20210220032951-036812b2e83c
12-
k8s.io/api v0.24.3
13-
k8s.io/apimachinery v0.24.3
14-
k8s.io/client-go v0.24.3
12+
k8s.io/api v0.25.2
13+
k8s.io/apimachinery v0.25.2
14+
k8s.io/client-go v0.25.2
1515
)
1616

1717
require (
18-
cloud.google.com/go v0.81.0 // indirect
18+
cloud.google.com/go v0.97.0 // indirect
1919
github.com/Azure/go-autorest v14.2.0+incompatible // indirect
20-
github.com/Azure/go-autorest/autorest v0.11.18 // indirect
21-
github.com/Azure/go-autorest/autorest/adal v0.9.13 // indirect
20+
github.com/Azure/go-autorest/autorest v0.11.27 // indirect
21+
github.com/Azure/go-autorest/autorest/adal v0.9.20 // indirect
2222
github.com/Azure/go-autorest/autorest/date v0.3.0 // indirect
2323
github.com/Azure/go-autorest/logger v0.2.1 // indirect
2424
github.com/Azure/go-autorest/tracing v0.6.0 // indirect
2525
github.com/PuerkitoBio/purell v1.1.1 // indirect
2626
github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578 // indirect
2727
github.com/davecgh/go-spew v1.1.1 // indirect
28-
github.com/emicklei/go-restful v2.9.5+incompatible // indirect
28+
github.com/emicklei/go-restful/v3 v3.8.0 // indirect
2929
github.com/evanphx/json-patch v4.12.0+incompatible // indirect
30-
github.com/form3tech-oss/jwt-go v3.2.3+incompatible // indirect
31-
github.com/go-logr/logr v1.2.0 // indirect
30+
github.com/go-logr/logr v1.2.3 // indirect
3231
github.com/go-openapi/jsonpointer v0.19.5 // indirect
3332
github.com/go-openapi/jsonreference v0.19.5 // indirect
3433
github.com/go-openapi/swag v0.19.14 // indirect
3534
github.com/gogo/protobuf v1.3.2 // indirect
35+
github.com/golang-jwt/jwt/v4 v4.2.0 // indirect
3636
github.com/golang/protobuf v1.5.2 // indirect
3737
github.com/google/gnostic v0.5.7-v3refs // indirect
3838
github.com/google/gofuzz v1.1.0 // indirect
@@ -49,22 +49,22 @@ require (
4949
github.com/pkg/errors v0.9.1 // indirect
5050
github.com/pmezard/go-difflib v1.0.0 // indirect
5151
github.com/spf13/pflag v1.0.5 // indirect
52-
golang.org/x/crypto v0.0.0-20220214200702-86341886e292 // indirect
53-
golang.org/x/net v0.0.0-20220127200216-cd36cc0744dd // indirect
52+
golang.org/x/crypto v0.0.0-20220315160706-3147a52a75dd // indirect
53+
golang.org/x/net v0.0.0-20220722155237-a158d28d115b // indirect
5454
golang.org/x/oauth2 v0.0.0-20211104180415-d3ed0bb246c8 // indirect
55-
golang.org/x/sys v0.0.0-20220209214540-3681064d5158 // indirect
55+
golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f // indirect
5656
golang.org/x/term v0.0.0-20210927222741-03fcf44c2211 // indirect
5757
golang.org/x/text v0.3.7 // indirect
5858
golang.org/x/time v0.0.0-20220210224613-90d013bbcef8 // indirect
5959
google.golang.org/appengine v1.6.7 // indirect
60-
google.golang.org/protobuf v1.27.1 // indirect
60+
google.golang.org/protobuf v1.28.0 // indirect
6161
gopkg.in/inf.v0 v0.9.1 // indirect
6262
gopkg.in/yaml.v2 v2.4.0 // indirect
63-
gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b // indirect
64-
k8s.io/klog/v2 v2.60.1 // indirect
65-
k8s.io/kube-openapi v0.0.0-20220328201542-3ee0da9b0b42 // indirect
66-
k8s.io/utils v0.0.0-20220210201930-3a6ce19ff2f9 // indirect
67-
sigs.k8s.io/json v0.0.0-20211208200746-9f7c6b3444d2 // indirect
68-
sigs.k8s.io/structured-merge-diff/v4 v4.2.1 // indirect
63+
gopkg.in/yaml.v3 v3.0.1 // indirect
64+
k8s.io/klog/v2 v2.70.1 // indirect
65+
k8s.io/kube-openapi v0.0.0-20220803162953-67bda5d908f1 // indirect
66+
k8s.io/utils v0.0.0-20220728103510-ee6ede2d64ed // indirect
67+
sigs.k8s.io/json v0.0.0-20220713155537-f223a00ba0e2 // indirect
68+
sigs.k8s.io/structured-merge-diff/v4 v4.2.3 // indirect
6969
sigs.k8s.io/yaml v1.2.0 // indirect
7070
)

0 commit comments

Comments
 (0)