Commit Graph

400 Commits

Author SHA1 Message Date
Tim Hockin
876c9f0d8c Rename _examples to examples
The alternative to this would be to special-case code-generator.  Since
it legit wants codegen, it seems wrong to make it be _examples (which tools
should ignore).

Make examples an "internal module" so the main go.mod for
k8s.io/code-generator does not get too polluted.
2021-01-25 10:20:46 -08:00
Tim Hockin
1b04d05423 Makefile: add debug on generated files 2021-01-25 10:15:59 -08:00
Tim Hockin
8703dc6e1c Makefile: remove redundant line
This same dep is expressed a few lines later in the "real" recipe.
2021-01-25 10:15:58 -08:00
Tim Hockin
e46810bca5 Make: $(foo:-) is shell, not makefile syntax
Driving towards `make --warn-undefined-variables`.
2021-01-25 10:15:58 -08:00
Tim Hockin
ee170145b2 Make: prefix magic go-deps variables with GODEPS
This makes them easier to see and find.

Driving towards `make --warn-undefined-variables`.
2021-01-25 10:15:58 -08:00
Tim Hockin
371d602a05 Make: change $(eval) in a comment
Because this comment is in a `define` which is later evaluated, the
syntactical `$(eval)` is treated like a variable exapansion.  Just
change the comment.

Driving towards `make --warn-undefined-variables`.
2021-01-25 10:15:58 -08:00
Tim Hockin
83dc781d29 Make: init variables
Driving towards the goal of `make --warn-undefined-variables` working.
2021-01-25 10:15:58 -08:00
Jordan Liggitt
8bac4ef9ad Drop runs-per-test for unit tests 2021-01-21 13:58:00 -05:00
Mike Danese
b624868386 bump repo-infra to 0.2.0
Change-Id: Id4fa13ca3cf092867bb0973294605962a8e5019c
2021-01-07 13:51:03 -08:00
Mike Danese
7d7852d3ef bump bazel to 3.4.1
Change-Id: I7ae75acba5518782a99ede2d896a787238d7b744
2021-01-07 13:51:03 -08:00
Tim Hockin
6f0f7aad46 Fix Makfile cut-paste comment errors 2020-12-22 21:37:42 -08:00
Stephen Augustus
2407a70cc7 [go1.15] Update to go1.15.5
Signed-off-by: Stephen Augustus <saugustus@vmware.com>
2020-11-23 20:49:56 -05:00
Stephen Augustus
eeb31f1a3c [go1.15] build: Update to k/repo-infra@v0.1.3 (supports go1.15.5)
Signed-off-by: Stephen Augustus <saugustus@vmware.com>
2020-11-23 20:40:44 -05:00
Tim Hockin
54e2748e13 Pass all packages to conversion-gen
As per #96015 and other reports, conversion-gen does the wrong thing if
dependent packages are not ALSO being re-generated.  It creates new
versions of generated files that have missing conversions.

This change passes all packages as "extras" which will be parsed but not
regenerated (default already does exactly this).
2020-10-30 22:22:57 -07:00
Mike Danese
bdadb2a187 make kube::util::find-binary not dependent on bazel-out/ structure
Implement an aspect that outputs go_build_mode metadata for go binaries,
and use that during binary selection.
2020-09-11 13:19:38 -07:00
Stephen Augustus
bb1855bf11 bazel: Replace --features with Starlark build settings flag
All --features and --define flags
Deprecated in: 0.23.0
To be removed in: 0.25.0

ref: https://github.com/bazelbuild/rules_go/wiki/Deprecation-schedule

Signed-off-by: Stephen Augustus <saugustus@vmware.com>
2020-09-11 13:19:37 -07:00
Stephen Augustus
a4a98f440c [go1.15] Update to go1.15.2
Signed-off-by: Stephen Augustus <saugustus@vmware.com>
2020-09-11 13:15:12 -07:00
Stephen Augustus
ebd8ccc6bb [go1.15] build: Update to k/repo-infra@v0.1.1 (supports go1.15.2)
Signed-off-by: Stephen Augustus <saugustus@vmware.com>
2020-09-11 13:14:43 -07:00
Aaron Crickenberger
a69964e3a4 Run unit tests 2 instead of 3 times via bazel 2020-09-10 12:52:28 -07:00
Jordan Liggitt
b4189f4d94 Stop ignoring unit test flakes, require multiple successful passes 2020-09-03 22:43:19 -04:00
Mike Danese
54955f7fa7 remove --verbose_failures from .bazelrc 2020-09-02 12:19:15 -07:00
Sascha Grunert
975b8d352e
Use /usr/bin/env bash in Makefiles and scripts
This allows the execution of the Makefiles from distributions which do
have `bash` in a different path.

Signed-off-by: Sascha Grunert <sgrunert@suse.com>
2020-08-16 21:13:18 +02:00
Benjamin Elder
be6c81597b upgrade rules_docker 2020-08-13 16:03:10 -07:00
Stephen Augustus
aa2bb18a2b [go1.15] Update to go1.15
Signed-off-by: Stephen Augustus <saugustus@vmware.com>
2020-08-12 14:19:59 -04:00
Stephen Augustus
eaa2bc29b8 [go1.15] build: Update to k/repo-infra@v0.0.12 (supports go1.15.0)
Signed-off-by: Stephen Augustus <saugustus@vmware.com>
2020-08-12 14:19:59 -04:00
Kubernetes Prow Robot
854ef3012f
Merge pull request #93827 from justaugustus/go115
[go1.15] Update to go1.15rc2
2020-08-09 10:22:19 -07:00
Odin Ugedal
6dfdf05eaa
Add timeout config for node_e2e tests
Some test suits use more than the default 45m, resulting in the test to
crash.
2020-08-09 15:45:56 +02:00
Kubernetes Prow Robot
7db8a431da
Merge pull request #93308 from bart0sh/PR0093-update-e2e-node-help
Makefile: update test-e2e-node help
2020-08-09 06:22:19 -07:00
Stephen Augustus
ffcef48b83 [go1.15] Update to go1.15rc2
Signed-off-by: Stephen Augustus <saugustus@vmware.com>
2020-08-09 02:53:53 -04:00
Stephen Augustus
07c7c9a55b [go1.15] build: Update to k/repo-infra@v0.0.11 (supports go1.15rc2)
Signed-off-by: Stephen Augustus <saugustus@vmware.com>
2020-08-09 02:21:41 -04:00
Stephen Augustus
479249b3a3 [go1.15] dependencies.yaml: Update to go1.15rc1
Signed-off-by: Stephen Augustus <saugustus@vmware.com>
2020-07-25 16:45:02 -04:00
Stephen Augustus
0aca24df0f [go1.15] build: Update to k/repo-infra@v0.0.10 (supports go1.15rc1)
Signed-off-by: Stephen Augustus <saugustus@vmware.com>
2020-07-25 16:45:01 -04:00
Ed Bartosh
667461ace8 Makefile: update test-e2e-node help 2020-07-22 01:51:06 +03:00
Kubernetes Prow Robot
98814409ba
Merge pull request #93224 from knabben/make-node-e2e
Documenting TEST_ARGS on Node E2E helper
2020-07-21 15:00:37 -07:00
Amim Knabben
1044840f6e Documenting TEST_ARGS on Node E2E helper 2020-07-19 14:37:28 -04:00
Stephen Augustus
3bbcba9b84 Update Golang to v1.14.6
Signed-off-by: Stephen Augustus <saugustus@vmware.com>
2020-07-17 14:47:21 -04:00
Stephen Augustus
bddd52046d Update repo-infra to v0.0.8 (to support go1.14.6 and go1.13.14)
Includes:
- bazelbuild/bazel-toolchains@3.4.0
- bazelbuild/rules_go@v0.22.8

Signed-off-by: Stephen Augustus <saugustus@vmware.com>
2020-07-17 14:30:02 -04:00
Stephen Augustus
99c29de8fc Update repo-infra to 0.0.7 (to support go1.14.5 and go1.13.13)
Includes:
- bazelbuild/bazel-toolchains@3.3.2
- bazelbuild/rules_go@v0.22.7

Signed-off-by: Stephen Augustus <saugustus@vmware.com>
2020-07-15 00:14:32 -04:00
Stephen Augustus
c4b6678757 Update Golang to v1.14.5
Signed-off-by: Stephen Augustus <saugustus@vmware.com>
2020-07-15 00:10:05 -04:00
Kubernetes Prow Robot
9859793a8b
Merge pull request #92362 from brianpursley/kubernetes-90739
Add bazel_skylib_workspace to fix make bazel-test 'no matching toolchains found' error
2020-06-25 17:51:30 -07:00
Stephen Augustus
236ef23f46 deps: Update Golang to v1.14.4
Signed-off-by: Stephen Augustus <saugustus@vmware.com>
2020-06-22 18:46:51 -04:00
Stephen Augustus
f7dce58176 Update repo-infra to 0.0.6 to support go1.14.4 and go1.13.12
Signed-off-by: Stephen Augustus <saugustus@vmware.com>
2020-06-22 18:46:50 -04:00
Brian Pursley
02742e3450 Add bazel_skylib_workspace to fix make bazel-test 'no matching toolchains found' error 2020-06-21 16:12:15 -04:00
bjrara
5e0bd8a44c Add openapi generation for the kube-aggregator 2020-06-05 11:10:08 +08:00
Stephen Augustus
1a5d9ffac3 build: Update to repo-infra@v0.0.5 to support go1.14.3 and go1.13.11
Signed-off-by: Stephen Augustus <saugustus@vmware.com>
2020-05-20 18:22:44 -04:00
Tim Hockin
325ea6e3c2 Restructure licenses again (revert cd4474a)
This moves licenses of vendored code from one monolith file into a tree
of individual files for easier reviews.  This fixes both the bash and
bazel paths.
2020-05-07 21:48:59 -07:00
Kubernetes Prow Robot
3e6161883f
Merge pull request #90347 from fejta/own
Update to repo-infra v0.0.4
2020-05-01 18:40:25 -07:00
David Eads
d32fc4e479 fix bug in api lifecycle generator file detection 2020-04-24 09:52:40 -04:00
Erick Fejta
fb0d3124b5 Update to repo-infra v0.0.4
And use repo-infra to configure rules_go and rbe
2020-04-21 15:25:46 -07:00
Davanum Srinivas
12146cb4df
Do not include bazel related deps in root go.mod
- add ./hack/tools/go.mod, this makes ./hack/tools a distinct module
- hack/tools/tools.go undescore imports bazel related tools, over time we
can add others.
- hack/*.sh scripts will cd to hack/tools and go install tools from there

Signed-off-by: Davanum Srinivas <davanum@gmail.com>
2020-04-19 22:01:50 -04:00
David Eads
1c6210a319 update makefile for prerelease-lifecycle 2020-04-14 16:16:58 -04:00
Mike Danese
59e2a09549 Update bazel to 2.2.0 2020-03-24 13:04:39 -07:00
Stephen Augustus
b6179ac7b9 deps: Update to Golang 1.13.9
Signed-off-by: Stephen Augustus <saugustus@vmware.com>
Co-authored-by: Jeff Grafton <jgrafton@google.com>
2020-03-23 17:10:03 -04:00
Kubernetes Prow Robot
22a4c2cda1
Merge pull request #85804 from weibaohui/patch-1
correction of executable path doc
2020-03-17 22:26:47 -07:00
ialidzhikov
e26fff5cbc Update to golang@1.13.8
Signed-off-by: ialidzhikov <i.alidjikov@gmail.com>
2020-02-27 09:27:48 +02:00
Davanum Srinivas
598c279ecc
tolerate when bazel shutdown errors out
pull-kubernetes-e2e-gce-rbe are still failing with the following:
```
INFO: Waited 10 seconds for server process (pid=72) to terminate.
FATAL: Attempted to kill stale server process (pid=72) using SIGKILL, but it did not die in a timely fashion.
make: *** [Makefile:626: bazel-release] Error 36
make: Leaving directory '/home/prow/go/src/k8s.io/kubernetes'
```

we have added a pkill just after the line for bazel shutdown, so let's
continue to give the pkill a chance to run.
2020-02-08 21:47:12 -05:00
Davanum Srinivas
36785bedfc
Ensure bazel is really brought down 2020-02-07 13:14:44 -05:00
Kubernetes Prow Robot
7edb849f70
Merge pull request #87585 from justaugustus/rm-specs
build: Remove deb and rpm build definitions/specs
2020-02-07 00:07:43 -08:00
Stephen Augustus
ac9983f43d build: Remove references to debs/rpms in BUILD/dependency files
Signed-off-by: Stephen Augustus <saugustus@vmware.com>
2020-02-06 15:08:52 -08:00
Davanum Srinivas
fc719c13f5
Explicitly shutdown bazel after the target finishes 2020-02-05 18:16:34 -05:00
ialidzhikov
e1f7b16fa6 Update to golang@1.13.6
Signed-off-by: ialidzhikov <i.alidjikov@gmail.com>
2020-01-12 02:17:40 +02:00
ialidzhikov
f438def93d Update to golang@1.13.5
Signed-off-by: ialidzhikov <i.alidjikov@gmail.com>
2019-12-30 13:17:17 +02:00
Christian Simon
24d105995d Fix broken SELinux detection
The upgrade of dependencies in #78187 introduced a regression in
detecting if SELinux is enabled or not. As the library requires
the golang build tag `selinux` to be enabled after that version update.

Fixes bug report #83679
2019-12-07 16:54:29 +00:00
weibaohui
661699a301
fix executable path
fix executable path by remove `/go`
2019-12-02 23:23:54 +08:00
notpad
dcf80e31ac Migrate Kubemark to distroless 2019-11-16 17:49:26 +08:00
Kubernetes Prow Robot
7a1eaa112e
Merge pull request #84696 from dims/BenTheElder-byebyehacke2e
Remove hack/e2e.go
2019-11-07 09:05:04 -08:00
Jordan Liggitt
e3ff39ffa0 Update build to go1.13.4 2019-11-06 17:39:05 -05:00
Benjamin Elder
83c56a0373
remove hack/e2e.go 2019-11-03 19:36:59 -05:00
Matt Matejczyk
686245b876 Fix base image discrepancy when building kubemark.
There are two ways of building kubemark: 1) via Dockerfile and 2) via
bazel.

In CI/CD tests we use the 1) way and use debian:jessie as the base
image.

But if you build kubemark via bazel it will use the discouraged busybox
base image.

This PR fixes that by using debian:jessie everywehre and pinning exact
sha version to make the kubemark image hermetic.
2019-10-24 10:50:10 +02:00
Christoph Blecker
45bc9a77a6
Use --stamp flag in bazel builds 2019-10-18 13:38:55 -07:00
Christoph Blecker
e570e3e88d
Update to use go1.12.12 2019-10-18 10:37:34 -07:00
Davanum Srinivas
138571b23f
Remove hyperkube from release artifacts
Change-Id: Ie09248d6fc688ffffbeb0271824817a5129346a0
2019-10-03 13:33:17 -04:00
Christoph Blecker
15bba1feed
Update to use go1.12.10 2019-09-25 17:13:43 -07:00
Kubernetes Prow Robot
3a55875465
Merge pull request #81512 from odinuge/preemptible-node-tests
Add support for preemptible instances in node-e2e
2019-09-20 22:55:24 -07:00
Kubernetes Prow Robot
0a8509d121
Merge pull request #82700 from praseodym/add-bazelversion
Add .bazelversion file
2019-09-19 09:17:02 -07:00
Mark Janssen
c9d10d1fef Add .bazelversion file
This will allow developers to use Bazelisk to build Kubernetes with a
known-good Bazel version.
2019-09-19 08:57:12 +02:00
Hongxu Jia
2ab47f95eb fix compiling failure: execvp: /bin/bash: Argument list too long
Use GNU Make 4.2.1(such as fedora-29) to build k8s in a long directory,
it failed with `execvp: /bin/bash: Argument list too long'
[snip]
$ cd /buildarea1/hjia/wrlinux-1019/I_/suspect_/that_/if_/you_/create_/your_/project_/in_/a_/very_/deep_/directory/build_master-wr_qemux86-64_faw_2019090509/build/tmp-glibc/work/core2-64-wrs-linux/kubernetes/v1.16.0-alpha+git7054e3ead7e1a00ca6ac3ec47ea355b76061a35a-r0/kubernetes-v1.16.0-alpha+git7054e3ead7e1a00ca6ac3ec47ea355b76061a35a/src/import
$ make cross KUBE_BUILD_PLATFORMS=linux/amd64 GOLDFLAGS=""
|+++ [0804 16:38:32] Building go targets for linux/amd64:
|    ./vendor/k8s.io/code-generator/cmd/deepcopy-gen
|make[1]: execvp: /bin/bash: Argument list too long
|make[1]: *** [Makefile.generated_files:184: pkg/kubectl/cmd/testing/zz_generated.deepcopy.go] Error 127
|make: *** [Makefile:557: generated_files] Error 2
...
[snip]

From make manual [1]
$?
  The names of all the prerequisites that are newer than the target, with spaces between them.

While two `$?' was passed to bash in a line, it caused above failure,
drop a duplicated one could workaround the issue.

[1] https://www.gnu.org/software/make/manual/html_node/Automatic-Variables.html

Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
2019-09-17 14:56:40 +08:00
Kubernetes Prow Robot
de4590e949
Merge pull request #81168 from anthonyrisinger/patch-1
Add gen_openapi target to top-level Makefile.
2019-08-29 05:29:55 -07:00
Odin Ugedal
e20c2b1f32
Add support for preemptible instances in node-e2e
Preemptible instances are cheaper, and the small chanse of a vm being
killed doesn't matter when running during development. This is a
tradeoff the user should be able to decide on.

More info here:
https://cloud.google.com/compute/docs/instances/preemptible

The default setting is false, so unless setting
PREEMPTIBLE_INSTANCES=true, everything will behave as before.

Signed-off-by: Odin Ugedal <odin@ugedal.com>
2019-08-17 13:09:45 +02:00
Benjamin Elder
54c6744f8c update go to 1.12.9 2019-08-15 17:37:06 -07:00
Christoph Blecker
f2a4522be1
Update to go 1.12.8 2019-08-13 20:20:45 -07:00
C Anthony Risinger
dd90405b26
Add gen_openapi target to top-level Makefile.
Could be further expanded with `gen_deepcopy`, `gen_defaulter`, `gen_conversion`, and `gen_bindata` targets, if useful.
2019-08-08 09:36:04 -07:00
Jan Safranek
cba7337a5c Update WORKSPACE to fix symlink permissions
Updating to get https://github.com/kubernetes/repo-infra/pull/124
2019-08-07 16:54:08 +02:00
Benjamin Elder
9ed53eb8bf upgrade repo infra to f85734f673056977d8ba04b0386394b684ca2acb 2019-07-30 11:40:09 -07:00
hui luo
97087c66f7 Allow customize registry name of base and release images
default behavior does not change, it uses k8s.gcr.io by default
added two vars: KUBE_DOCKER_REGISTRY, KUBE_BASE_IMAGE_REGISTRY.
KUBE_BASE_IMAGE_REGISTRY is for base image registry of server binaries
KUBE_DOCKER_REGISTRY is for released images registry

user can interact with them by:
`KUBE_DOCKER_REGISTRY=### KUBE_BASE_IMAGE_REGISTRY=### make quick-release`

Signed-off-by: Hui Luo <luoh@vmware.com>
2019-07-25 17:43:01 -07:00
Dr. Stefan Schimanski
e920d9bc14 Makefile.generated_files: build code-generator+sample-apiserver OpenAPI schemas 2019-07-12 20:52:21 +02:00
Jintao Zhang
dfa46f8d47 Update to go 1.12.7
Signed-off-by: Jintao Zhang <zhangjintao9020@gmail.com>
2019-07-12 07:16:25 +08:00
Davanum Srinivas
3b949f2a43
Add comments as to why we force python2 2019-07-09 16:33:46 -04:00
Davanum Srinivas
c7137aeda6
build_defs/pkg/make_deb.py needs python2
Force us to use python2 especially for scenarios where both python2 and
3 are both installed as `make bazel-release` fails currently.

Change-Id: I70bc45909ca87e5cf7ccdbddf60740a8a3e7e58b
2019-07-04 12:22:04 -04:00
Davanum Srinivas
df3f9f1047
updating github.com/go-bindata/go-bindata to v3.1.1
Change-Id: I66c047a4e5e72632042f43a9f4b33ab9f5bf7ef1
2019-06-20 11:30:30 -04:00
Jintao Zhang
37f091eadf update to go 1.12.6
Signed-off-by: Jintao Zhang <zhangjintao9020@gmail.com>
2019-06-13 10:49:57 +08:00
Erick Fejta
747545c14b Create tars locally 2019-05-28 10:55:08 -07:00
Erick Fejta
bf09f4ba4f Update bazel-toolschains for bazel <= 0.25.1 rbe support 2019-05-14 13:22:41 -07:00
Kubernetes Prow Robot
bb8204ef79
Merge pull request #77596 from YoubingLi/bugfix
Fixes 77527 - The usage about build unstripped binaries
2019-05-13 10:26:14 -07:00
Youbing Li
359d0e31ea Fixes 77527 - Update Makefile about the usage of building unstripped binaries 2019-05-08 22:51:11 -04:00
Christoph Blecker
31ffa88a14
Update to go 1.12.5 2019-05-08 15:43:01 -07:00
Erick Fejta
ffaaa90cc6 Add --config=ci for bazel 2019-04-29 14:03:37 -07:00
Erick Fejta
1ae0d95ff6 Use gcr.io/k8s-testimages/bazel-krte during remote execution 2019-04-27 22:15:20 -07:00
Erick Fejta
35683d7342 Use suggested canonical form 2019-04-26 17:27:34 -07:00
Erick Fejta
f33e903885 Run in privileged remote containers 2019-04-24 21:07:52 -07:00