Skip to content

Commit 52e6818

Browse files
authored
Update the version of code generator and regenerate (#178)
Signed-off-by: Arjun Naik <[email protected]>
1 parent 62962e2 commit 52e6818

File tree

14 files changed

+342
-128
lines changed

14 files changed

+342
-128
lines changed

go.mod

+14-19
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,29 @@
11
module github.com/zalando-incubator/stackset-controller
22

3-
go 1.12
3+
go 1.13
44

55
require (
66
github.com/alecthomas/kingpin v2.2.6+incompatible
7-
github.com/ghodss/yaml v1.0.0 // indirect
8-
github.com/gogo/protobuf v1.2.1 // indirect
9-
github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b // indirect
7+
github.com/emicklei/go-restful v2.11.1+incompatible // indirect
8+
github.com/go-openapi/jsonreference v0.19.3 // indirect
9+
github.com/go-openapi/spec v0.19.4 // indirect
1010
github.com/golang/groupcache v0.0.0-20180513044358-24b0969c4cb7 // indirect
11-
github.com/google/btree v1.0.0 // indirect
1211
github.com/google/go-cmp v0.3.1
1312
github.com/googleapis/gnostic v0.2.0 // indirect
14-
github.com/gregjones/httpcache v0.0.0-20180305231024-9cad4c3443a7 // indirect
15-
github.com/hashicorp/golang-lru v0.5.0 // indirect
1613
github.com/imdario/mergo v0.3.6 // indirect
17-
github.com/onsi/ginkgo v1.8.0 // indirect
18-
github.com/onsi/gomega v1.5.0 // indirect
19-
github.com/peterbourgon/diskv v2.0.1+incompatible // indirect
14+
github.com/mailru/easyjson v0.7.0 // indirect
2015
github.com/prometheus/client_golang v1.2.1
2116
github.com/sirupsen/logrus v1.4.2
22-
github.com/spf13/pflag v1.0.2 // indirect
2317
github.com/stretchr/testify v1.4.0
24-
golang.org/x/oauth2 v0.0.0-20190402181905-9f3314589c9a // indirect
18+
golang.org/x/net v0.0.0-20191209160850-c0dbc17a3553 // indirect
2519
golang.org/x/sync v0.0.0-20190423024810-112230192c58
26-
golang.org/x/text v0.3.1-0.20181227161524-e6919f6577db // indirect
27-
golang.org/x/time v0.0.0-20180412165947-fbb02b2291d2 // indirect
20+
golang.org/x/tools v0.0.0-20191210221141-98df12377212 // indirect
21+
gonum.org/v1/gonum v0.6.1 // indirect
2822
gopkg.in/alecthomas/kingpin.v2 v2.2.6
29-
gopkg.in/inf.v0 v0.9.1 // indirect
30-
k8s.io/api v0.0.0-20181004124137-fd83cbc87e76
31-
k8s.io/apimachinery v0.0.0-20180913025736-6dd46049f395
32-
k8s.io/client-go v9.0.0+incompatible
33-
k8s.io/kube-openapi v0.0.0-20190228160746-b3a7cee44a30 // indirect
23+
gopkg.in/yaml.v2 v2.2.7 // indirect
24+
k8s.io/api v0.0.0-20191121175643-4ed536977f46
25+
k8s.io/apimachinery v0.0.0-20191121175448-79c2a76c473a
26+
k8s.io/client-go v0.0.0-20191202165906-e3970fe37d8a
27+
k8s.io/code-generator v0.0.0-20191004115455-8e001e5d1894
28+
k8s.io/gengo v0.0.0-20191120174120-e74f70b9b27e // indirect
3429
)

go.sum

+229-26
Large diffs are not rendered by default.

hack/tools.go

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
// +build tools
2+
3+
/*
4+
Copyright 2019 The Kubernetes Authors.
5+
Licensed under the Apache License, Version 2.0 (the "License");
6+
you may not use this file except in compliance with the License.
7+
You may obtain a copy of the License at
8+
http://www.apache.org/licenses/LICENSE-2.0
9+
Unless required by applicable law or agreed to in writing, software
10+
distributed under the License is distributed on an "AS IS" BASIS,
11+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
See the License for the specific language governing permissions and
13+
limitations under the License.
14+
*/
15+
16+
// This package imports things required by build scripts, to force `go mod` to see them as dependencies
17+
package tools
18+
19+
import _ "k8s.io/code-generator"

hack/update-codegen.sh

+5-26
Original file line numberDiff line numberDiff line change
@@ -23,38 +23,17 @@ GOPKG="$SRC/zalando-incubator/stackset-controller"
2323
CUSTOM_RESOURCE_NAME="zalando.org"
2424
CUSTOM_RESOURCE_VERSION="v1"
2525

26-
SCRIPT_ROOT="$(dirname ${BASH_SOURCE})/.."
27-
28-
# special setup for go modules
29-
CODE_GEN_K8S_VERSION="b1289fc74931d4b6b04bd1a259acfc88a2cb0a66" # 1.12.8 (https://github.com/kubernetes/code-generator/releases/tag/kubernetes-1.12.8)
30-
packages=(
31-
defaulter-gen
32-
client-gen
33-
lister-gen
34-
informer-gen
35-
deepcopy-gen
36-
)
37-
mkdir -p build
38-
for pkg in "${packages[@]}"; do
39-
go get "k8s.io/code-generator/cmd/${pkg}@${CODE_GEN_K8S_VERSION}"
40-
done
41-
# use vendor/ as a temporary stash for code-generator.
42-
rm -rf "${SCRIPT_ROOT}/vendor/k8s.io/code-generator"
43-
rm -rf "${SCRIPT_ROOT}/vendor/k8s.io/gengo"
44-
git clone --branch=release-1.12 https://github.com/kubernetes/code-generator.git "${SCRIPT_ROOT}/vendor/k8s.io/code-generator"
45-
git clone https://github.com/kubernetes/gengo.git "${SCRIPT_ROOT}/vendor/k8s.io/gengo"
26+
SCRIPT_ROOT="$(dirname ${BASH_SOURCE[0]})/.."
27+
CODEGEN_PKG=${CODEGEN_PKG:-$(cd "${SCRIPT_ROOT}"; ls -d -1 ./vendor/k8s.io/code-generator 2>/dev/null || echo ../code-generator)}
28+
OUTPUT_BASE="$(dirname ${BASH_SOURCE})/"
4629

47-
CODEGEN_PKG="${CODEGEN_PKG:-$(cd "${SCRIPT_ROOT}"; ls -d -1 ./vendor/k8s.io/code-generator 2>/dev/null || echo ../code-generator)}"
30+
go mod vendor
4831

4932
# generate the code with:
5033
# --output-base because this script should also be able to run inside the vendor dir of
5134
# k8s.io/kubernetes. The output-base is needed for the generators to output into the vendor dir
5235
# instead of the $GOPATH directly. For normal projects this can be dropped.
53-
54-
OUTPUT_BASE="$(dirname ${BASH_SOURCE})/"
55-
56-
cd "${SCRIPT_ROOT}"
57-
"${CODEGEN_PKG}/generate-groups.sh" all \
36+
bash "${CODEGEN_PKG}"/generate-groups.sh all \
5837
"${GOPKG}/pkg/client" "${GOPKG}/pkg/apis" \
5938
"${CUSTOM_RESOURCE_NAME}:${CUSTOM_RESOURCE_VERSION}" \
6039
--go-header-file hack/boilerplate.go.txt \

pkg/apis/zalando.org/v1/zz_generated.deepcopy.go

+2-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pkg/client/clientset/versioned/clientset.go

+7-8
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pkg/client/clientset/versioned/fake/clientset_generated.go

+6-6
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pkg/client/clientset/versioned/typed/zalando.org/v1/fake/fake_stack.go

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pkg/client/clientset/versioned/typed/zalando.org/v1/fake/fake_stackset.go

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pkg/client/clientset/versioned/typed/zalando.org/v1/stack.go

+17
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pkg/client/clientset/versioned/typed/zalando.org/v1/stackset.go

+17
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pkg/client/clientset/versioned/typed/zalando.org/v1/zalando.org_client.go

+1-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pkg/client/informers/externalversions/internalinterfaces/factory_interfaces.go

+2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)