Skip to content

Commit 3e2063f

Browse files
committed
Update dependencies to v1.19.2
Signed-off-by: Vince Prignano <[email protected]>
1 parent 895eccc commit 3e2063f

16 files changed

+370
-306
lines changed

.run-controller-gen.sh

Lines changed: 20 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,25 @@
44
# it's the equivalent of `go run sigs.k8s.io/controller-tools/cmd/controller-gen`
55
# if you could somehow do that without modifying your go.mod.
66

7-
current_dir=$(pwd)
8-
if ! readlink -f . &>/dev/null; then
9-
echo "you're probably on OSX. Please install gnu readlink -- otherwise you're missing the most useful readlink flag."
10-
exit 1
11-
fi
7+
set -o errexit
8+
set -o nounset
9+
set -o pipefail
10+
11+
readlink=$(command -v readlink)
1212

13-
cd $(dirname $(readlink -f ${BASH_SOURCE[0]}))
13+
check_readlink() {
14+
if ! ${readlink} -f &>/dev/null; then
15+
if [[ "${OSTYPE}" == "darwin"* ]]; then
16+
if command -v greadlink; then
17+
readlink=$(command -v greadlink)
18+
return
19+
fi
20+
fi
21+
echo "you're probably on OSX. Please install gnu readlink -- otherwise you're missing the most useful readlink flag."
22+
exit 1
23+
fi
24+
}
25+
current_dir=$(pwd)
26+
check_readlink
27+
cd $(dirname $(${readlink} -f ${BASH_SOURCE[0]}))
1428
go run -v -exec "./.run-in.sh ${current_dir} " ./cmd/controller-gen $@

go.mod

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,20 @@
11
module sigs.k8s.io/controller-tools
22

3-
go 1.13
3+
go 1.15
44

55
require (
6-
github.com/fatih/color v1.7.0
6+
github.com/fatih/color v1.9.0
77
github.com/gobuffalo/flect v0.2.2
8-
github.com/google/go-cmp v0.3.0
9-
github.com/mattn/go-colorable v0.1.2 // indirect
10-
github.com/onsi/ginkgo v1.11.0
11-
github.com/onsi/gomega v1.8.1
8+
github.com/google/go-cmp v0.5.2
9+
github.com/mattn/go-colorable v0.1.8 // indirect
10+
github.com/onsi/ginkgo v1.14.1
11+
github.com/onsi/gomega v1.10.2
1212
github.com/spf13/cobra v1.0.0
1313
github.com/spf13/pflag v1.0.5
14-
golang.org/x/tools v0.0.0-20200616195046-dc31b401abb5
15-
gopkg.in/yaml.v3 v3.0.0-20190905181640-827449938966
16-
k8s.io/api v0.18.2
17-
k8s.io/apiextensions-apiserver v0.18.2
18-
k8s.io/apimachinery v0.18.2
14+
golang.org/x/tools v0.0.0-20201007032633-0806396f153e
15+
gopkg.in/yaml.v3 v3.0.0-20200615113413-eeeca48fe776
16+
k8s.io/api v0.19.2
17+
k8s.io/apiextensions-apiserver v0.19.2
18+
k8s.io/apimachinery v0.19.2
1919
sigs.k8s.io/yaml v1.2.0
2020
)

go.sum

Lines changed: 218 additions & 122 deletions
Large diffs are not rendered by default.

pkg/crd/gen_integration_test.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ import (
2222
"io/ioutil"
2323
"os"
2424

25+
"github.com/google/go-cmp/cmp"
2526
. "github.com/onsi/ginkgo"
2627
. "github.com/onsi/gomega"
2728
"sigs.k8s.io/controller-tools/pkg/crd"
@@ -72,7 +73,7 @@ var _ = Describe("CRD Generation proper defaulting", func() {
7273
Expect(err).NotTo(HaveOccurred())
7374

7475
By("comparing the two")
75-
Expect(out.buf.Bytes()).To(Equal(expectedFile))
76+
Expect(out.buf.String()).To(Equal(string(expectedFile)), cmp.Diff(out.buf.String(), string(expectedFile)))
7677

7778
})
7879

@@ -88,8 +89,7 @@ var _ = Describe("CRD Generation proper defaulting", func() {
8889
Expect(err).NotTo(HaveOccurred())
8990

9091
By("comparing the two")
91-
Expect(out.buf.Bytes()).To(Equal(expectedFile))
92-
92+
Expect(out.buf.String()).To(Equal(string(expectedFile)), cmp.Diff(out.buf.String(), string(expectedFile)))
9393
})
9494
})
9595

pkg/crd/testdata/gen/foo_crd_v1.yaml

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -21,23 +21,18 @@ spec:
2121
openAPIV3Schema:
2222
properties:
2323
apiVersion:
24-
description: 'APIVersion defines the versioned schema of this representation
25-
of an object. Servers should convert recognized schemas to the latest
26-
internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources'
24+
description: 'APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources'
2725
type: string
2826
kind:
29-
description: 'Kind is a string value representing the REST resource this
30-
object represents. Servers may infer this from the endpoint the client
31-
submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds'
27+
description: 'Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds'
3228
type: string
3329
metadata:
3430
type: object
3531
spec:
3632
properties:
3733
defaultedString:
3834
default: fooDefaultString
39-
description: This tests that defaulted fields are stripped for v1beta1,
40-
but not for v1
35+
description: This tests that defaulted fields are stripped for v1beta1, but not for v1
4136
type: string
4237
required:
4338
- defaultedString

pkg/crd/testdata/gen/foo_crd_v1beta1.yaml

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -19,22 +19,17 @@ spec:
1919
openAPIV3Schema:
2020
properties:
2121
apiVersion:
22-
description: 'APIVersion defines the versioned schema of this representation
23-
of an object. Servers should convert recognized schemas to the latest
24-
internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources'
22+
description: 'APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources'
2523
type: string
2624
kind:
27-
description: 'Kind is a string value representing the REST resource this
28-
object represents. Servers may infer this from the endpoint the client
29-
submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds'
25+
description: 'Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds'
3026
type: string
3127
metadata:
3228
type: object
3329
spec:
3430
properties:
3531
defaultedString:
36-
description: This tests that defaulted fields are stripped for v1beta1,
37-
but not for v1
32+
description: This tests that defaulted fields are stripped for v1beta1, but not for v1
3833
type: string
3934
required:
4035
- defaultedString

pkg/schemapatcher/testdata/expected/kubebuilder-example-crd.v1.yaml

Lines changed: 28 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -11,35 +11,31 @@ spec:
1111
plural: examples
1212
listKind: ExampleList
1313
versions:
14-
- name: v1
15-
schema:
16-
openAPIV3Schema:
17-
description: Example is a kind with schema changes.
18-
type: object
19-
required:
20-
- spec
21-
properties:
22-
apiVersion:
23-
description: 'APIVersion defines the versioned schema of this representation
24-
of an object. Servers should convert recognized schemas to the latest
25-
internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
26-
type: string
27-
kind:
28-
description: 'Kind is a string value representing the REST resource this
29-
object represents. Servers may infer this from the endpoint the client
30-
submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
31-
type: string
32-
metadata:
33-
type: object
34-
spec:
35-
type: object
36-
required:
37-
- bar
38-
- foo
39-
properties:
40-
bar:
41-
description: foo contains foo.
42-
type: string
43-
foo:
44-
description: foo contains foo.
45-
type: string
14+
- name: v1
15+
schema:
16+
openAPIV3Schema:
17+
description: Example is a kind with schema changes.
18+
type: object
19+
required:
20+
- spec
21+
properties:
22+
apiVersion:
23+
description: 'APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
24+
type: string
25+
kind:
26+
description: 'Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
27+
type: string
28+
metadata:
29+
type: object
30+
spec:
31+
type: object
32+
required:
33+
- bar
34+
- foo
35+
properties:
36+
bar:
37+
description: foo contains foo.
38+
type: string
39+
foo:
40+
description: foo contains foo.
41+
type: string

pkg/schemapatcher/testdata/expected/kubebuilder-example-crd.yaml

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -16,25 +16,21 @@ spec:
1616
description: Example is a kind with schema changes.
1717
type: object
1818
required:
19-
- spec
19+
- spec
2020
properties:
2121
apiVersion:
22-
description: 'APIVersion defines the versioned schema of this representation
23-
of an object. Servers should convert recognized schemas to the latest
24-
internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
22+
description: 'APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
2523
type: string
2624
kind:
27-
description: 'Kind is a string value representing the REST resource this
28-
object represents. Servers may infer this from the endpoint the client
29-
submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
25+
description: 'Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
3026
type: string
3127
metadata:
3228
type: object
3329
spec:
3430
type: object
3531
required:
36-
- bar
37-
- foo
32+
- bar
33+
- foo
3834
properties:
3935
bar:
4036
description: foo contains foo.

pkg/schemapatcher/testdata/expected/kubebuilder-unchanged-crd.v1beta1.yaml

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -16,25 +16,21 @@ spec:
1616
description: Unchanged is a kind without schema changes.
1717
type: object
1818
required:
19-
- spec
19+
- spec
2020
properties:
2121
apiVersion:
22-
description: 'APIVersion defines the versioned schema of this representation
23-
of an object. Servers should convert recognized schemas to the latest
24-
internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
22+
description: 'APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
2523
type: string
2624
kind:
27-
description: 'Kind is a string value representing the REST resource this
28-
object represents. Servers may infer this from the endpoint the client
29-
submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
25+
description: 'Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
3026
type: string
3127
metadata:
3228
type: object
3329
spec:
3430
type: object
3531
required:
36-
- bar
37-
- foo
32+
- bar
33+
- foo
3834
properties:
3935
bar:
4036
description: foo contains foo.

pkg/schemapatcher/testdata/expected/kubebuilder-unchanged-crd.yaml

Lines changed: 28 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -11,35 +11,31 @@ spec:
1111
plural: unchangeds
1212
listKind: UnchangedList
1313
versions:
14-
- name: v1
15-
schema:
16-
openAPIV3Schema:
17-
description: Unchanged is a kind without schema changes.
18-
type: object
19-
required:
20-
- spec
21-
properties:
22-
apiVersion:
23-
description: 'APIVersion defines the versioned schema of this representation
24-
of an object. Servers should convert recognized schemas to the latest
25-
internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
26-
type: string
27-
kind:
28-
description: 'Kind is a string value representing the REST resource this
29-
object represents. Servers may infer this from the endpoint the client
30-
submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
31-
type: string
32-
metadata:
33-
type: object
34-
spec:
35-
type: object
36-
required:
37-
- bar
38-
- foo
39-
properties:
40-
bar:
41-
description: foo contains foo.
42-
type: string
43-
foo:
44-
description: foo contains foo.
45-
type: string
14+
- name: v1
15+
schema:
16+
openAPIV3Schema:
17+
description: Unchanged is a kind without schema changes.
18+
type: object
19+
required:
20+
- spec
21+
properties:
22+
apiVersion:
23+
description: 'APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
24+
type: string
25+
kind:
26+
description: 'Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
27+
type: string
28+
metadata:
29+
type: object
30+
spec:
31+
type: object
32+
required:
33+
- bar
34+
- foo
35+
properties:
36+
bar:
37+
description: foo contains foo.
38+
type: string
39+
foo:
40+
description: foo contains foo.
41+
type: string

0 commit comments

Comments
 (0)