Skip to content

Commit

Permalink
Update dependencies to v1.19.2
Browse files Browse the repository at this point in the history
Signed-off-by: Vince Prignano <vincepri@vmware.com>
  • Loading branch information
vincepri committed Dec 15, 2020
1 parent 895eccc commit 3e2063f
Show file tree
Hide file tree
Showing 16 changed files with 370 additions and 306 deletions.
26 changes: 20 additions & 6 deletions .run-controller-gen.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,25 @@
# it's the equivalent of `go run sigs.k8s.io/controller-tools/cmd/controller-gen`
# if you could somehow do that without modifying your go.mod.

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

readlink=$(command -v readlink)

cd $(dirname $(readlink -f ${BASH_SOURCE[0]}))
check_readlink() {
if ! ${readlink} -f &>/dev/null; then
if [[ "${OSTYPE}" == "darwin"* ]]; then
if command -v greadlink; then
readlink=$(command -v greadlink)
return
fi
fi
echo "you're probably on OSX. Please install gnu readlink -- otherwise you're missing the most useful readlink flag."
exit 1
fi
}
current_dir=$(pwd)
check_readlink
cd $(dirname $(${readlink} -f ${BASH_SOURCE[0]}))
go run -v -exec "./.run-in.sh ${current_dir} " ./cmd/controller-gen $@
22 changes: 11 additions & 11 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
module sigs.k8s.io/controller-tools

go 1.13
go 1.15

require (
github.com/fatih/color v1.7.0
github.com/fatih/color v1.9.0
github.com/gobuffalo/flect v0.2.2
github.com/google/go-cmp v0.3.0
github.com/mattn/go-colorable v0.1.2 // indirect
github.com/onsi/ginkgo v1.11.0
github.com/onsi/gomega v1.8.1
github.com/google/go-cmp v0.5.2
github.com/mattn/go-colorable v0.1.8 // indirect
github.com/onsi/ginkgo v1.14.1
github.com/onsi/gomega v1.10.2
github.com/spf13/cobra v1.0.0
github.com/spf13/pflag v1.0.5
golang.org/x/tools v0.0.0-20200616195046-dc31b401abb5
gopkg.in/yaml.v3 v3.0.0-20190905181640-827449938966
k8s.io/api v0.18.2
k8s.io/apiextensions-apiserver v0.18.2
k8s.io/apimachinery v0.18.2
golang.org/x/tools v0.0.0-20201007032633-0806396f153e
gopkg.in/yaml.v3 v3.0.0-20200615113413-eeeca48fe776
k8s.io/api v0.19.2
k8s.io/apiextensions-apiserver v0.19.2
k8s.io/apimachinery v0.19.2
sigs.k8s.io/yaml v1.2.0
)
340 changes: 218 additions & 122 deletions go.sum

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions pkg/crd/gen_integration_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ import (
"io/ioutil"
"os"

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

By("comparing the two")
Expect(out.buf.Bytes()).To(Equal(expectedFile))
Expect(out.buf.String()).To(Equal(string(expectedFile)), cmp.Diff(out.buf.String(), string(expectedFile)))

})

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

By("comparing the two")
Expect(out.buf.Bytes()).To(Equal(expectedFile))

Expect(out.buf.String()).To(Equal(string(expectedFile)), cmp.Diff(out.buf.String(), string(expectedFile)))
})
})

Expand Down
11 changes: 3 additions & 8 deletions pkg/crd/testdata/gen/foo_crd_v1.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,23 +21,18 @@ spec:
openAPIV3Schema:
properties:
apiVersion:
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'
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'
type: string
kind:
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'
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'
type: string
metadata:
type: object
spec:
properties:
defaultedString:
default: fooDefaultString
description: This tests that defaulted fields are stripped for v1beta1,
but not for v1
description: This tests that defaulted fields are stripped for v1beta1, but not for v1
type: string
required:
- defaultedString
Expand Down
11 changes: 3 additions & 8 deletions pkg/crd/testdata/gen/foo_crd_v1beta1.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,22 +19,17 @@ spec:
openAPIV3Schema:
properties:
apiVersion:
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'
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'
type: string
kind:
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'
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'
type: string
metadata:
type: object
spec:
properties:
defaultedString:
description: This tests that defaulted fields are stripped for v1beta1,
but not for v1
description: This tests that defaulted fields are stripped for v1beta1, but not for v1
type: string
required:
- defaultedString
Expand Down
60 changes: 28 additions & 32 deletions pkg/schemapatcher/testdata/expected/kubebuilder-example-crd.v1.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,35 +11,31 @@ spec:
plural: examples
listKind: ExampleList
versions:
- name: v1
schema:
openAPIV3Schema:
description: Example is a kind with schema changes.
type: object
required:
- spec
properties:
apiVersion:
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'
type: string
kind:
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'
type: string
metadata:
type: object
spec:
type: object
required:
- bar
- foo
properties:
bar:
description: foo contains foo.
type: string
foo:
description: foo contains foo.
type: string
- name: v1
schema:
openAPIV3Schema:
description: Example is a kind with schema changes.
type: object
required:
- spec
properties:
apiVersion:
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'
type: string
kind:
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'
type: string
metadata:
type: object
spec:
type: object
required:
- bar
- foo
properties:
bar:
description: foo contains foo.
type: string
foo:
description: foo contains foo.
type: string
14 changes: 5 additions & 9 deletions pkg/schemapatcher/testdata/expected/kubebuilder-example-crd.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,25 +16,21 @@ spec:
description: Example is a kind with schema changes.
type: object
required:
- spec
- spec
properties:
apiVersion:
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'
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'
type: string
kind:
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'
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'
type: string
metadata:
type: object
spec:
type: object
required:
- bar
- foo
- bar
- foo
properties:
bar:
description: foo contains foo.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,25 +16,21 @@ spec:
description: Unchanged is a kind without schema changes.
type: object
required:
- spec
- spec
properties:
apiVersion:
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'
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'
type: string
kind:
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'
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'
type: string
metadata:
type: object
spec:
type: object
required:
- bar
- foo
- bar
- foo
properties:
bar:
description: foo contains foo.
Expand Down
60 changes: 28 additions & 32 deletions pkg/schemapatcher/testdata/expected/kubebuilder-unchanged-crd.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,35 +11,31 @@ spec:
plural: unchangeds
listKind: UnchangedList
versions:
- name: v1
schema:
openAPIV3Schema:
description: Unchanged is a kind without schema changes.
type: object
required:
- spec
properties:
apiVersion:
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'
type: string
kind:
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'
type: string
metadata:
type: object
spec:
type: object
required:
- bar
- foo
properties:
bar:
description: foo contains foo.
type: string
foo:
description: foo contains foo.
type: string
- name: v1
schema:
openAPIV3Schema:
description: Unchanged is a kind without schema changes.
type: object
required:
- spec
properties:
apiVersion:
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'
type: string
kind:
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'
type: string
metadata:
type: object
spec:
type: object
required:
- bar
- foo
properties:
bar:
description: foo contains foo.
type: string
foo:
description: foo contains foo.
type: string
14 changes: 5 additions & 9 deletions pkg/schemapatcher/testdata/expected/legacy-example-crd.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,25 +20,21 @@ spec:
description: Example is a kind with schema changes.
type: object
required:
- spec
- spec
properties:
apiVersion:
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'
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'
type: string
kind:
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'
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'
type: string
metadata:
type: object
spec:
type: object
required:
- bar
- foo
- bar
- foo
properties:
bar:
description: foo contains foo.
Expand Down
14 changes: 5 additions & 9 deletions pkg/schemapatcher/testdata/expected/legacy-unchanged-crd.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,25 +21,21 @@ spec:
description: Unchanged is a kind without schema changes.
type: object
required:
- spec
- spec
properties:
apiVersion:
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'
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'
type: string
kind:
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'
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'
type: string
metadata:
type: object
spec:
type: object
required:
- bar
- foo
- bar
- foo
properties:
bar:
description: foo contains foo.
Expand Down
Loading

0 comments on commit 3e2063f

Please sign in to comment.