Commit Graph

874 Commits

Author SHA1 Message Date
Sascha Grunert
746ec78ebf
Stop unsetting the golang buildid
Golang fixed the issue with the non-reproducible buildid already in
v1.15.3:

c5f6920212
a3e965ce8a

This means we can now use the internal buildid instead of the unset one.

Signed-off-by: Sascha Grunert <sgrunert@redhat.com>
2021-04-23 10:21:00 +02:00
Katrina Verey
8ad6fd6ddb Add --chunk-size support to kubectl describe 2021-04-21 11:44:15 -07:00
Kubernetes Prow Robot
d62a9b2179
Merge pull request #99773 from saschagrunert/build-memory
Change KUBE_PARALLEL_BUILD_MEMORY to 20 GiB
2021-03-09 16:08:07 -08:00
Morten Torkildsen
21fba79d45 Promote PDBs to GA 2021-03-09 10:29:11 -05:00
Benjamin Elder
8f3cbc923a drop bazel logic from hack/lib/golang.sh 2021-03-07 13:11:29 -08:00
Benjamin Elder
03576473ce don't search bazel output paths for binaries 2021-03-07 12:47:00 -08:00
Kubernetes Prow Robot
90851a0fb5
Merge pull request #99905 from BenTheElder/shellchecked
update verify-shellcheck to v0.7.1, fix nits, multi-arch digest pinning, fix new lint errors
2021-03-06 22:17:53 -08:00
Benjamin Elder
a0cd54a7f1 fix trivial shell quoting issues surfaced by shellcheck v0.7.1 2021-03-06 13:19:17 -08:00
Swetha Repakula
a9891b4b9b Graduate EndpointSlice API to GA
* Removes discovery v1alpha1 API
  * Replaces per Endpoint Topology with a read only DeprecatedTopology
  in GA API
  * Adds per Endpoint Zone field in GA API
2021-03-05 12:02:41 -08:00
Kubernetes Prow Robot
2e39df89ac
Merge pull request #97743 from dims/support-m1-macbook-darwin/arm64-as-client
Support M1 MacBooks darwin/arm64 on the client-side
2021-03-04 04:18:09 -08:00
Sascha Grunert
abf85d70c2
Change KUBE_PARALLEL_BUILD_MEMORY to 20 GiB
A benchmark with go1.16 on amd64 resulted in an overall maximum memory
usage of 15GiB. This means we now lower the `KUBE_PARALLEL_BUILD_MEMORY`
to `20` to still have some room left.

The benchmark has been done with the following `Dockerfile`:

```dockerfile
FROM k8s.gcr.io/build-image/kube-cross:v1.16.0-1
RUN apt-get update && apt-get install -y time

WORKDIR /go/src/k8s.io/kubernetes
RUN git clone https://github.com/kubernetes/kubernetes
ENV KUBE_PARALLEL_BUILD_MEMORY=0
RUN /usr/bin/time -v make -C kubernetes cross-in-a-container
```

The value of interest from the output:

```
Maximum resident set size (kbytes): 1847108
```

The RSS is not the only value we have to consider. During the runtime I
measured the usage of the cached memory, which gets peaks up to 15GiB.

Test machine specs:
- CPU: 2 x Intel Scalable Gold 5120 28-Core Processor @ 2.2GHz
- RAM: 384GB
- Disk: 1 x 3.8TB NVME
- OS: Debian 10 (buster)

Signed-off-by: Sascha Grunert <sgrunert@redhat.com>
2021-03-04 12:11:20 +01:00
Kubernetes Prow Robot
9658145f8a
Merge pull request #99655 from liggitt/min-go-version
Update go version check to 1.16+
2021-03-03 20:13:59 -08:00
Davanum Srinivas
f719624654
Support M1 MacBooks darwin/arm64 on the client-side
testing using:
```
build/run.sh make generated_files && make quick-release-images
```

Signed-off-by: Davanum Srinivas <davanum@gmail.com>
2021-03-02 20:50:00 -05:00
Kubernetes Prow Robot
28feb8e30d
Merge pull request #96882 from saschagrunert/parallel-build-configurable
Make parallel build memory threshold configurable
2021-03-02 16:51:19 -08:00
Jordan Liggitt
5e9189289e Update go version check to 1.16+ 2021-03-02 15:11:46 -05:00
Kubernetes Prow Robot
f79795d718
Merge pull request #99521 from dekkagaijin/build
Prevent CGO and STATIC_OVERRIDES from trampling themselves if evaluated multiple times
2021-03-02 01:23:31 -08:00
Benjamin Elder
56e092e382 hack/update-bazel.sh 2021-02-28 15:17:29 -08:00
Jake Sanders
a3cfb0f2ce Prevent CGO and STATIC_OVERRIDES from trampling themselves if sourced multiple times 2021-02-26 20:49:46 -08:00
Maciej Szulik
0a0c80c553
Add kubectl-convert to client-binaries 2021-02-22 17:01:34 +01:00
Maciej Szulik
3dab7462d1
Drop batch/v2alpha1 API 2021-02-12 17:51:12 +01:00
Benjamin Elder
7f1c6740f7 suggest homebrew when bash is too old on macOS 2021-02-09 22:40:01 -08:00
Tonis Tiigi
fd01467c0c avoid hardcoding amd64 specifics on cross compiling
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2021-02-07 21:08:00 -08:00
Kubernetes Prow Robot
2d9e9290e7
Merge pull request #98508 from tonistiigi/arm64-cross
enable cross-compile CC config for non-amd64
2021-02-02 18:00:28 -08:00
Kubernetes Prow Robot
081f68d685
Merge pull request #97999 from llhuii/hack-version-script-fix-err-to-stdout
hack/lib/version.sh: fix error log to stderr
2021-01-31 08:39:48 -08:00
llhuii
36aa8a24ce hack/lib/version.sh: fix error log to stderr
Since this invalid Semantic Version messages redirecting to stdout
will be captured by line 790 at hack/lib/golang.sh:
`goldflags="${GOLDFLAGS=-s -w -buildid=} $(kube::version::ldflags)"`

This happens when only no valid tag exists in repo
2021-01-31 00:40:53 +08:00
Tonis Tiigi
f19f22b43e enable cross-compile CC config for non-amd64
Currently target CC can only be set if the host platform
is linux/amd64 . If target is already set in the environment
it is always safe to use it and enable cgo.

Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2021-01-28 07:11:04 -08:00
Li Bo
bb150cdd4f change minimum bash version to 4.2 2021-01-26 20:12:58 +08:00
Davanum Srinivas
feecef7795
Ensure bash version at least 5.x
Co-authored-by: Stephen Augustus <justaugustus@users.noreply.github.com>
Signed-off-by: Davanum Srinivas <davanum@gmail.com>
2021-01-22 13:08:53 -05:00
Kubernetes Prow Robot
3722cef5e5
Merge pull request #97947 from Haleygo/fix/replace-cfssl-resource
fix:replace cfssl resources and upgrade them to 1.5.0
2021-01-12 21:10:37 -08:00
Haleygo
b2796cea93 fix:replace cfssl resources and upgrade them to 1.5.0
Signed-off-by: Haleygo <hui.wang@daocloud.io>
2021-01-12 14:05:20 +08:00
Sascha Grunert
9428ad78fd
Make parallel build memory threshold configurable
The amount of memory required to build binaries in parallel is right now
set to 40GiB. We now make this variable to be able to build artifacts in
parallel even with a lower amount of memory.

This enables SIG Release to speed-up the build time drastically in
Google Cloud Build (GCB).

Signed-off-by: Sascha Grunert <sgrunert@suse.com>
2021-01-11 11:59:57 +01:00
Jesus Herrera
d8bedb3980 Remove docker remote/docker-machine from build scripts 2020-12-30 12:37:51 -05:00
yue9944882
849be447f5 APF: graduate API and types to beta
Signed-off-by: Adhityaa Chandrasekar <adtac@google.com>
2020-11-13 23:20:39 +00:00
Sergey Kanzhelev
06da0e5e74 GA of RuntimeClass feature gate and API 2020-11-11 19:22:32 +00:00
knight42
00e4234cc9
fix: pass bearer token to curl using -H instead of --oauth2-bearer
The flag `--oauth2-bearer` might have no effect in some environment.

Signed-off-by: knight42 <anonymousknight96@gmail.com>
2020-11-05 01:15:19 +08:00
knight42
cfc2b330a7
refactor(apiserver): ignore the insecure flags
Leave the insecure flags intact but stop serving on insecure port.
2020-10-29 23:20:17 +08:00
Abhisek Banerjee
462326afba Support cross compilation only on amd64.
Based on a patch to Bottlerocket by Ben Cressey <bcressey@amazon.com>
41a72fe214/packages/kubernetes-1.17/0001-always-set-relevant-variables-for-cross-compiling.patch
2020-10-21 00:13:01 +00:00
bnrjee
6b672863c7 Always set relevant variables for cross compiling
Based on a patch to Bottlerocket by Ben Cressey <bcressey@amazon.com>
41a72fe214/packages/kubernetes-1.17/0001-always-set-relevant-variables-for-cross-compiling.patch
2020-10-21 00:13:01 +00:00
Kubernetes Prow Robot
aed5ffd195
Merge pull request #94449 from justaugustus/go115
[go1.15] Update to go1.15.2
2020-09-15 15:15:19 -07:00
David Eads
c7911a384c remove pod presets 2020-09-14 09:24:40 -04: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
Mike Danese
5a72bb001f hack/lib/util.sh: some bash cleanups
* switched one spot to use kube::logging
* make kube::util::find-binary return an error when it doesn't find
  anything so that hack scripts fail fast instead of with '' binary not
  found errors.
  * this required deleting some genfeddoc stuff. the binary no longer
    exists in k/k repo since we removed federation/, and I don't see it
    in https://github.com/kubernetes-sigs/kubefed/ either. I'm assuming
    that it's gone for good now.
2020-09-11 13:19:37 -07:00
Haowei Cai
b71252a0ab add internal.apiserver.k8s.io/v1alpha1 to known gvs 2020-09-08 14:34:55 -07:00
Kubernetes Prow Robot
b49724d5fc
Merge pull request #94287 from jingyih/update_etcd_server_3p4p13
Update default etcd server to 3.4.13
2020-09-01 15:35:20 -07:00
jingyih
c96b93fbd4 Update default etcd server to 3.4.13 2020-08-28 21:19:24 +08:00
Kubernetes Prow Robot
aa084d4919
Merge pull request #92491 from BenTheElder/fuzz-only-test
compile out gofuzz from prod binaries
2020-08-27 17:57:36 -07:00
Odin Ugedal
1524794231
Fix building with GOFLAGS=-v
With go1.15 running go version with "-v" fails, and we should support
it.
2020-08-15 17:44:07 +02:00
Jordan Liggitt
bdcffdced3 [go115] Require go1.15 in build helper scripts 2020-08-13 13:46:52 -04:00
Jordan Liggitt
4d1b34a582 Speed up update-swagger-docs
Only build genswaggertypedocs once per run instead of per-package

Speeds up the script from ~1:10 to ~0:18
2020-08-02 10:56:46 -04:00
Jordan Liggitt
d8b0f6fc50 Build code-generator tools directly 2020-08-02 10:56:46 -04:00
Jordan Liggitt
a8ae7aefd0 Lower default log verbosity 2020-08-02 01:22:59 -04:00
Kubernetes Prow Robot
5a4aa2026c
Merge pull request #92679 from RainbowMango/pr_etcd_debug_parameter
remove etcd deprecated parameters in scripts
2020-07-26 19:52:17 -07:00
Stephen Augustus
05ffc95347 [go1.15] Remove client support for darwin/386
Removed in go1.15 (GH/golang/go/issues/37610).

Signed-off-by: Stephen Augustus <saugustus@vmware.com>
2020-07-25 16:45:01 -04:00
Kubernetes Prow Robot
f9ad7db9a6
Merge pull request #92349 from jingyih/update_etcd_server_3p4p9
Update default etcd server to 3.4.9
2020-07-17 07:53:01 -07:00
Kubernetes Prow Robot
fe43b104ba
Merge pull request #91745 from Bisnode/gh-87369
Presence of bearer token should cancel exec action
2020-07-09 09:07:00 -07:00
jingyih
e9bf1c3c90 Update default etcd server to 3.4.9 2020-07-08 14:16:40 +08:00
Anders Eknert
b423216a3b Presence of bearer token should cancel exec action
If a bearer token is present in a request, the exec credential plugin should accept that as the chosen method of authentication. Judging by an [earlier comment in exec.go](c18bc7e9f7/staging/src/k8s.io/client-go/plugin/pkg/client/auth/exec/exec.go (L217)), this was already intended. This would however not work since UpdateTransportConfig would set the GetCert callback which would then get called by the transport, triggering the exec plugin action even with a token present in the request. See linked issue for further details.

See #87369 for further details.

Signed-off-by: Anders Eknert <anders.eknert@bisnode.com>
2020-07-02 12:12:32 +02:00
Chelsey Chen
75612c1746 Promote new Event API to v1 2020-07-01 10:50:28 -04:00
RainbowMango
23613a90aa remove etcd deprecated parameters 2020-07-01 11:48:27 +08:00
Benjamin Elder
42acb51e2c disable goffuzz in binaries 2020-06-30 20:30:59 -07:00
Jordan Liggitt
c82fe149a6 go1.14: update minimum required go version 2020-06-23 16:40:22 -04:00
Kubernetes Prow Robot
219c856ce2
Merge pull request #91555 from daixiang0/scr
*.sh: cleanup all white noise
2020-06-20 05:26:53 -07:00
bjrara
c8ac95321d Enhance kube-aggregator in standalone mode 2020-06-09 13:29:27 +08:00
Jordan Liggitt
e0f5cca410 Copy CSR v1beta1 to v1
* Remove prerelease tags
* Update copyright, package, imports to v1
* Remove signerName, usages, and condition status defaulting
2020-06-05 00:47:24 -04:00
Xiang Dai
e09bc312cb *.sh: cleanup all white noise
Signed-off-by: Xiang Dai <long0dai@foxmail.com>
2020-05-29 09:56:00 +08:00
David Eads
e857adbdfd remove-api 2020-05-27 16:58:05 -04:00
Tim Hockin
8d7adb7d94 Fix umask better
While the umask was previously set for builds (and in fact `docker run`
sets it to 0022 by default), the release pipeline `cp`'s files (with
`-a`) which respect the user's umask, and is outside of the build path.

This sets the umask in a common function called by all build tools,
which Stephen agreed was the simplest and most complete fix.  The
`verify-prereqs` function is already poorly named for what it does, and
this only makes it epsilon worse.
2020-05-11 13:23:54 -07:00
Tim Hockin
dff449ee9e Set umask 0022 when building
Some binaries now run as non-root (kube-scheduler).  When umask is 0027,
for example, the container image we build has the binary 0750, which is
not executable by the non-root UID.
2020-05-05 16:28:43 -07:00
Cecile Robert-Michon
7d6ba67da0
Update find-binary-for-platform to work with non-GNU versions of find 2020-05-01 16:19:00 -07:00
jingyih
394df132bd Update default etcd server to 3.4.7 2020-04-13 14:37:56 -07:00
Kubernetes Prow Robot
295b53f7b4
Merge pull request #89214 from jingyih/update_etcd_server_3p4p4
Update default etcd server to 3.4.4 in k8s v1.19
2020-03-26 01:14:24 -07:00
jingyih
f9e0e4c6b4 Update default etcd server to 3.4.4 2020-03-18 00:27:46 -07:00
Davanum Srinivas
d70d04f92b
zero out the build id for reproducible builds
We have been having issues with making builds reproducible, especially
with the `.note.go.buildid` ELF section. One tip from a golang issue was
to set `-ldflags=-buildid=` which seems to work well. You can confirm
that the buildid is set to empty by inspecting the binaries with the go
command example `go tool buildid _output/local/go/bin/kubectl`

Signed-off-by: Davanum Srinivas <davanum@gmail.com>
2020-03-15 20:43:19 -04:00
Kubernetes Prow Robot
1799706bdd
Merge pull request #88399 from chendave/arm_etcd
Fix etcd issues on ARM
2020-02-27 00:15:33 -08:00
Dave Chen
2543598628 Fix etcd issues on ARM
- On unstable arch like ARM, etcd needs the "ETCD_UNSUPPORTED_ARCH" to be set
  `# etcd --version
   etcd on unsupported platform without ETCD_UNSUPPORTED_ARCH=arm64 set`

- `tail -n +1 | head -n 1` is unnecessary, `head -n 1` is enough.
2020-02-27 12:55:53 +08:00
Claudiu Belu
6d3a18b0be test images: Image Promoter sed fix
The image used by the Image Promoter (gcr.io/k8s-testimages/gcb-docker-gcloud:v20190906-745fed4)
is based on busybox, and thus, the sed binary is actually busybox. image-util.sh calls
kube::util::ensure-gnu-sed several times, which ensures that a GNU sed binary exists
(it checks by greping GNU in its --help output). Obviously, it won't match the busybox sed
binary. But the sed usage in image-util.sh is fairly simple, and the busybox sed is sufficient.

This was previously fixed in: #87188, but it was reverted by #87653 as it was failing
on Mac (sed does not exist). This commit fixes that issue as well.
2020-02-18 19:58:35 -08:00
Kubernetes Prow Robot
db1ee8add7
Merge pull request #87653 from JieJhih/shell/util
fix command variable exited with status 1
2020-02-07 05:56:50 -08:00
Davanum Srinivas
dfd8e4e467
Enable selinux tags in make targets
In 24d105995d, a fix was made in bazel
based builds to ensure that we add `selinux` tag when we build all
binaries especially the `kubelet`. We need to do the same for in our
hack scripts so things like `make release` will work properly as well.

Some scripts use `GOFLAGS=-tags=providerless` for example, So we should
support the tags to be specified in GOFLAGS as well. We parse out the
tags from there and ensure selinux is added to the list of tags we used
for building the binaries. Note that we add our own `-tags` with the
full set of tags and since we specify our parameter at the end, ours
full list takes precendence
2020-01-31 15:48:44 -05:00
JieJhih Jhang
8bd9c994ca fix command variable exited with status 1 2020-01-30 12:52:09 +08:00
Claudiu Belu
4c51eb9063 test images: Image Promoter fixes
Prior to the Image Centralization part 4 (https://github.com/kubernetes/kubernetes/pull/81170),
a PR merged that enables the Image Promoter to run on the k/k test images.

The Image Promoter currently only builds the Conformance-related images, but the
Image Centralization part 4 centralized some of those images into agnhost, so they
need to be removed from the conformance_images list.

Additionally, https://github.com/kubernetes/kubernetes/pull/81226 proposes mounttest-user
image to be removed, and RunAsUser to be used in tests instead.

The image used by the Image Promoter (gcr.io/k8s-testimages/gcb-docker-gcloud:v20190906-745fed4)
is based on busybox, and thus, the sed binary is actually busybox. image-util.sh calls
kube::util::ensure-gnu-sed several times, which ensures that a GNU sed binary exists
(it checks by greping GNU in its --help output). Obviously, it won't match the busybox sed
binary. But the sed usage in image-util.sh is fairly simple, and the busybox sed is sufficient.

Bumps image versions for: jessie-dnsutils, nonewprivs, resource-consumer, sample-apiserver. These
images are included in the conformance_images that are being built by the Image Promoter, so
we're bumping them just to make sure we're not breaking anything and cause all the CIs to fall.
We're going to bump the image versions used in tests in a subsequent PR. The image version was not
bumped for: agnhost, kitten, nautilus, as they were already bumped by the Image Centralization part 4
PR.
2020-01-06 09:08:51 -08:00
Howard Zhang
09d4d65b1b fix etcd version check error on ARM
"etcd -version" command output an additional line on ARM platform:
"running etcd on unsupported architecture "arm64" since
ETCD_UNSUPPORTED_ARCH is set"
Currently etcd version filtering code can not get correct version
number.

Signed-off-by: Howard Zhang <howard.zhang@arm.com>
2019-11-25 20:02:37 +08:00
Rob Scott
a7e589a8c6
Promoting EndpointSlices to beta 2019-11-13 14:20:19 -08:00
Kubernetes Prow Robot
e445d4d779
Merge pull request #84871 from liggitt/cmd-test
Make test-cmd effective again
2019-11-07 13:28:21 -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
1678f42970 Fix run_kubectl_sort_by_tests 2019-11-07 02:26:45 -05:00
Jordan Liggitt
59dfac587f Fix assert methods 2019-11-07 02:26:45 -05:00
Jordan Liggitt
e3ff39ffa0 Update build to go1.13.4 2019-11-06 17:39:05 -05:00
Jordan Liggitt
8618c09369 opt out of module mode for builds 2019-11-06 17:39:05 -05:00
Kubernetes Prow Robot
7b6369c803
Merge pull request #84249 from odinuge/bump-shellcheck
Bump shellcheck to v0.7.0
2019-11-04 06:19:40 -08:00
Benjamin Elder
83c56a0373
remove hack/e2e.go 2019-11-03 19:36:59 -05:00
Kubernetes Prow Robot
510fb38f27
Merge pull request #83671 from yue9944882/flow-control-api-model
Apiserver flowcontrol api models
2019-11-01 22:49:40 -07:00
Jingyi Hu
ccf4caf30f Update etcd.sh to use v3 endpoint 2019-10-29 13:10:29 -07:00
yue9944882
7c28a4b70e non-generated api models misc
rule list

rule

rule 2
2019-10-29 12:26:12 +08:00
Jingyi Hu
706cde51c5 Update default etcd server to 3.4.3 2019-10-28 18:29:37 -07:00
Odin Ugedal
cce1f32ea5
Fix shellcheck failures SC2034 2019-10-23 22:47:46 +02:00
Kubernetes Prow Robot
c634276498
Merge pull request #83497 from pivotal-k8s/allow-custom-tags
Allow users to use custom tags
2019-10-20 22:17:37 -07:00
Kubernetes Prow Robot
cb3b715de2
Merge pull request #83804 from jpbetz/etcd-3_3_17_server
Upgrade to etcd server 3.3.17
2019-10-15 12:50:09 -07:00
Joe Betz
c92bd5e7b5 Upgrade to etcd server 3.3.17 2019-10-13 17:17:15 -07:00
Kubernetes Prow Robot
457fa6b40d
Merge pull request #82413 from zhlhahaha/kube-proxy-error
local-up-cluster kube-proxy terminated error
2019-10-12 07:48:37 -07:00
Jonathan Tomer
d34f49b913 Up minimum go version to 1.12.4
https://github.com/kubernetes/kubernetes/pull/77222 removed a workaround for a
Go standard library bug (https://github.com/golang/go/issues/31125) that was
not fixed until that version, so we need to require it.
2019-10-07 15:55:33 -07:00