Commit Graph

951 Commits

Author SHA1 Message Date
Jordan Liggitt
a2bba333cc
Drop development dependencies from test targets 2023-03-22 10:38:42 -04:00
Davanum Srinivas
26313ed2b0
Move the arm deprecation notice in a different spot
Signed-off-by: Davanum Srinivas <davanum@gmail.com>
2023-03-17 10:28:32 -04:00
Taahir Ahmed
6a75e7c40c ClusterTrustBundles: Define types
This commit is the main API piece of KEP-3257 (ClusterTrustBundles).

This commit:

* Adds the certificates.k8s.io/v1alpha1 API group
* Adds the ClusterTrustBundle type.
* Registers the new type in kube-apiserver.
* Implements the type-specfic validation specified for
  ClusterTrustBundles:
  - spec.pemTrustAnchors must always be non-empty.
  - spec.signerName must be either empty or a valid signer name.
  - Changing spec.signerName is disallowed.
* Implements the "attest" admission check to restrict actions on
  ClusterTrustBundles that include a signer name.

Because it wasn't specified in the KEP, I chose to make attempts to
update the signer name be validation errors, rather than silently
ignored.

I have tested this out by launching these changes in kind and
manipulating ClusterTrustBundle objects in the resulting cluster using
kubectl.
2023-03-15 20:10:18 -07:00
Kubernetes Prow Robot
06619135e0
Merge pull request #114226 from saschagrunert/apiextensions-apiserver-static
Link `apiextensions-apiserver` binary statically
2023-03-14 08:36:16 -07:00
Patrick Ohly
29941b8d3e api: resource.k8s.io v1alpha1 -> v1alpha2
For Kubernetes 1.27, we intend to make some breaking API changes:
- rename PodScheduling -> PodSchedulingHints (https://github.com/kubernetes/kubernetes/issues/114283)
- extend ResourceClaimStatus (https://github.com/kubernetes/enhancements/pull/3802)

We need to switch from v1alpha1 to v1alpha2 for that.
2023-03-14 07:52:03 +01:00
Sascha Grunert
1c0a5aa84a
Link apiextensions-apiserver binary statically
The apiextensions-apiserver itself only depends on the following runtime
libraries when linking dynamically:

```
> ldd _output/bin/apiextensions-apiserver
        linux-vdso.so.1 (0x00007ffd1b39f000)
        libpthread.so.0 => /nix/store/4nlgxhb09sdr51nc9hdm8az5b08vzkgx-glibc-2.35-163/lib/libpthread.so.0 (0x00007fe836022000)
        libc.so.6 => /nix/store/4nlgxhb09sdr51nc9hdm8az5b08vzkgx-glibc-2.35-163/lib/libc.so.6 (0x00007fe835e00000)
        /nix/store/4nlgxhb09sdr51nc9hdm8az5b08vzkgx-glibc-2.35-163/lib/ld-linux-x86-64.so.2 => /nix/store/4nlgxhb09sdr51nc9hdm8az5b08vzkgx-glibc-2.35-163/lib64/ld-linux-x86-64.so.2 (0x00007fe836029000)
```

We now move the apiextensions-apiserver to become a static binary as
well to achieve maximum portability.

Signed-off-by: Sascha Grunert <sgrunert@redhat.com>
2023-03-13 09:00:36 +01:00
Davanum Srinivas
320cb6d9ef
Revert "Disable unified build and static init optimization for tests"
This reverts commit e20d77bb79.

Signed-off-by: Davanum Srinivas <davanum@gmail.com>
2023-03-11 14:09:16 -05:00
Kubernetes Prow Robot
bb6c6fad2c
Merge pull request #115742 from dims/drop-32-bit-platforms
Drop 32 bit linux/arm platform
2023-03-11 06:12:40 -08:00
Kubernetes Prow Robot
0804a86ce6
Merge pull request #116286 from thockin/logging_int_cmp
bash: compare numbers numerically, not lexically
2023-03-10 16:30:39 -08:00
Kubernetes Prow Robot
5452109c9d
Merge pull request #114227 from saschagrunert/kube-aggregator-static
Link `kube-aggregator` binary statically
2023-03-10 15:22:39 -08:00
Tim Hockin
fe96e5704f
bash: compare numbers numerically, not lexically
Thanks, bash, for supporting < and > and making them NOT mean the obvious thing.

[[ 2 < 10 ]] is false
(( 2 < 10 )) is true
2023-03-06 14:53:15 -08:00
Davanum Srinivas
5da6f786df
Drop linux/arm from regular builds
Signed-off-by: Davanum Srinivas <davanum@gmail.com>
2023-03-06 17:31:50 -05:00
Davanum Srinivas
4ecb4670cc
Remove unnecessary ETCD_UNSUPPORTED_ARCH for arm64
we should only use this env var for `arm`, since `arm64` is fully
supported by etcd folks, let us drop this!

(ex - https://github.com/etcd-io/etcd/releases/tag/v3.5.6)

ppc64le comment should be dropped as well

Signed-off-by: Davanum Srinivas <davanum@gmail.com>
2023-02-16 21:29:13 -05:00
cpanato
65230338ad
[go] Bump images, dependencies and versions to go 1.20.1
Signed-off-by: cpanato <ctadeu@gmail.com>
2023-02-16 13:38:32 +01:00
Kubernetes Prow Robot
e818649c10
Merge pull request #115690 from tzneal/fix-buildx-check
fix docker buildx check
2023-02-12 14:27:30 -08:00
Jordan Liggitt
e20d77bb79
Disable unified build and static init optimization for tests 2023-02-10 17:57:56 -05:00
Todd Neal
0c99212e78 fix docker buildx check
In testing, docker reports an exit code of zero if --help
is passed, regardless of the subcommand
2023-02-10 14:26:15 -06:00
cpanato
b9ddf07a75
[go] Bump images, dependencies and versions to go 1.20
Signed-off-by: cpanato <ctadeu@gmail.com>
2023-02-03 22:55:24 +01:00
Jordan Liggitt
fa66ec647d
Invoke gimme from kube::golang::verify_go_version
Defaults to ensuring .go-version is used
Override the go version by setting GO_VERSION=1.x
Force using the host go version with FORCE_HOST_GO=y
2023-02-01 17:03:30 -05:00
Mohamed Zaian
90570b7595 etcd: Update to version 3.5.7 2023-01-27 17:24:00 +01:00
Jordan Liggitt
028683efe6
Add missing proto path to kube::protoc::protoc invocation 2023-01-26 18:00:09 -05:00
Jordan Liggitt
d49d988467
Allow init.sh and protoc.sh to be sourced idempotently 2023-01-26 18:00:09 -05:00
Jordan Liggitt
3548e7febe
Add helper script to install protoc 2023-01-26 18:00:08 -05:00
Jordan Liggitt
238e0226db
Check protoc version strictly 2023-01-26 18:00:06 -05:00
Tim Hockin
ac2890df45
Make protobindings gen a bit safer 2023-01-21 15:17:47 -08:00
Tim Hockin
a057f35c90
Move update-generated-runtime into common script
Now update-generated-proto-bindings rules all the api.pb.go generation.

Running this shows no delta on the runtime.pb.go

This exposes an issue in how protoc is called for protos that specify
`go_package` which is fixed here.

Not all of our protos specify that option (even though it is
recommended), which will be fixed subsequently.
2023-01-21 15:17:14 -08:00
Tim Hockin
e0ecccff3f
Merge 5 fragile proto-bindings scripts into 1
Each of these scripts is basically identical, and all were too brittle.
Now they should be more resilient and easier to manage.  The script
still needs to be updated if we add new ones, which I do not love.

More cleanup to follow.
2023-01-21 15:17:13 -08:00
Tim Hockin
7c262b901f
Set GOCACHE and GOMODCACHE
If these are not set, set them.  This ensures that any subsequent
scripts we call (which may call setup_env again) use the same values.
2023-01-21 11:16:14 -08:00
Tim Hockin
77e41786a2
simplify group-version-to-pkg-path() 2022-12-27 10:34:44 -08:00
Tim Hockin
b5c5913db0
Make verify-generated-swagger-docs use worktree
Also move a function into these files that was only used in the one
place.
2022-12-26 17:17:33 -08:00
Sascha Grunert
8a96ed0d20
Link kubectl-convert binary statically
The kubectl-convert binary itself only depends on the following runtime
libraries when linking dynamically:

```
> ldd _output/bin/kubectl-convert
        linux-vdso.so.1 (0x00007ffef0786000)
        libpthread.so.0 => /nix/store/4nlgxhb09sdr51nc9hdm8az5b08vzkgx-glibc-2.35-163/lib/libpthread.so.0 (0x00007f5f4ac25000)
        libdl.so.2 => /nix/store/4nlgxhb09sdr51nc9hdm8az5b08vzkgx-glibc-2.35-163/lib/libdl.so.2 (0x00007f5f4ac20000)
        libc.so.6 => /nix/store/4nlgxhb09sdr51nc9hdm8az5b08vzkgx-glibc-2.35-163/lib/libc.so.6 (0x00007f5f4aa00000)
        /nix/store/4nlgxhb09sdr51nc9hdm8az5b08vzkgx-glibc-2.35-163/lib/ld-linux-x86-64.so.2 => /nix/store/4nlgxhb09sdr51nc9hdm8az5b08vzkgx-glibc-2.35-163/lib64/ld-linux-x86-64.so.2 (0x00007f5f4ac2c000)
```

We now move kubectl-convert to become a static binary as well to achieve
maximum portability.

Signed-off-by: Sascha Grunert <sgrunert@redhat.com>
2022-12-01 11:23:26 +01:00
Sascha Grunert
3698434d6b
Link kube-aggregator binary statically
The kube-aggregator itself only depends on the following runtime
libraries when linking dynamically:

```
> ldd _output/bin/kube-aggregator
        linux-vdso.so.1 (0x00007fff1616f000)
        libpthread.so.0 => /nix/store/4nlgxhb09sdr51nc9hdm8az5b08vzkgx-glibc-2.35-163/lib/libpthread.so.0 (0x00007fad9339a000)
        libc.so.6 => /nix/store/4nlgxhb09sdr51nc9hdm8az5b08vzkgx-glibc-2.35-163/lib/libc.so.6 (0x00007fad93000000)
        /nix/store/4nlgxhb09sdr51nc9hdm8az5b08vzkgx-glibc-2.35-163/lib/ld-linux-x86-64.so.2 => /nix/store/4nlgxhb09sdr51nc9hdm8az5b08vzkgx-glibc-2.35-163/lib64/ld-linux-x86-64.so.2 (0x00007fad933a1000)
```

We now move the kube-aggregator to become a static binary as well to
achieve maximum portability.

Signed-off-by: Sascha Grunert <sgrunert@redhat.com>
2022-12-01 11:20:24 +01:00
Paco Xu
75f89875f8 use etcd 3.5.6-0 after promotion 2022-11-24 09:45:56 +08:00
Kubernetes Prow Robot
29ddedae1d
Merge pull request #113541 from oscr/update-shellcheck-0.8.0
Update shellcheck version (0.7.2 -> 0.8.0) and fix findings
2022-11-12 02:23:57 -08:00
Patrick Ohly
5cca60f0b8 api: dynamic resource allocation API
This adds a new resource.k8s.io API group with v1alpha1 as version. It contains
four new types: resource.ResourceClaim, resource.ResourceClass, resource.ResourceClaimTemplate, and
resource.PodScheduling.
2022-11-10 20:08:24 +01:00
Oscar Utbult
61cd37b806 Update shellcheck version (0.7.2 -> 0.8.0) and fix findings 2022-11-08 11:53:57 +01:00
Cici Huang
0486e06261 Adding new api version of admissionregistration.k8s.io v1alpha1 for CEL in Admission Control 2022-11-07 20:51:51 +00:00
Kubernetes Prow Robot
98533290e9
Merge pull request #113229 from BenTheElder/more-shell-tidy
more shellcheck cleanups
2022-10-20 22:25:50 -07:00
Benjamin Elder
bf3df26efd disable SC2120 on functions with optional parameters
https://www.shellcheck.net/wiki/SC2120#exceptions
2022-10-20 16:22:11 -07:00
Davanum Srinivas
ec71e53adb
Ensure we are using GNU date for builds
Signed-off-by: Davanum Srinivas <davanum@gmail.com>
2022-10-20 10:12:23 -04:00
Kubernetes Prow Robot
687b001648
Merge pull request #113190 from BenTheElder/shell-fixups
assorted small shell script fixes
2022-10-20 03:34:57 -07:00
Benjamin Elder
94c0ec317b Don't assign DOCKER an array in hack/lib/util.sh
DOCKER is otherwise used to be the command name (perhaps podman), but we were conflating DOCKER_OPTS in kube::util::ensure_docker_daemon_connectivity.

Split out docker opts.

This fixes shellcheck warning that docker is assigned an array and then a string in some scripts.
2022-10-19 23:46:18 -07:00
Benjamin Elder
8f6c631772 fix readonly masks return value in test.sh 2022-10-19 21:53:45 -07:00
Jefftree
2e01fbb59a Add discovery types 2022-10-19 17:27:25 +00:00
Benjamin Elder
db9c760ee7 remove clearly unnecessary lingering BUILD file references 2022-10-04 16:47:25 -07:00
Tim Hockin
7afaf23b01
Copy make's codegen logic to update-codegen.sh
The `make` rules which auto-generate some of our API stuff are
incredibly baroque, and hard to maintain.  They were originally added on
the assumption that we would stop checking generated files into git.
Since then we have moved away from that goal, and the worst problems
with generated files have been resolved.

Reasons to kill this:
* It is slow on every build, as opposed to just being slow when running
  the generators.  It is even slow to calculate that there's nothing to
  update.
* Most development work doesn't involve changing APIs.
* It only covers about half (or less) of the generated code, and making
  it cover more would be even slower.
* Approximately 1 person knows how this all works.
* We have CI to make sure changes do not get merged without updating
  this code.
* We have corner cases where this does the WRONG thing and tracking
  those down is ugly and hard in perpetuity.

So this commit puts all the same logic that WAS in the
Makefile.generated_files into update-codegen.sh.

I do not love this script, especially WRT sub-packages, but I am trying
not to boil the ocean.  I hope to follow up with some more cleanups over
time.

I have tested this manually and with the scripts and it still seems to
catch errors properly.

This includes a change to kube::util::read-array to make it not unset
variables and not over-write non-array variables.
2022-10-04 08:48:39 -07:00
Kubernetes Prow Robot
9720af2ba3
Merge pull request #112306 from tkashem/v1beta3
add v1beta3 for Priority And Fairness
2022-10-03 10:06:14 -07:00
Kubernetes Prow Robot
dfa4143086
Merge pull request #112724 from dims/update-instructions-to-install-cfssl
Update instructions to install cfssl
2022-09-26 09:20:38 -07:00
Davanum Srinivas
5fd6b0a980
Update instructions to install cfssl
Use the newer "go install" variant as we are above go 1.18

Signed-off-by: Davanum Srinivas <davanum@gmail.com>
2022-09-25 15:53:02 -04:00
Davanum Srinivas
866ef3c46e
run hack/update-vendor.sh
Signed-off-by: Davanum Srinivas <davanum@gmail.com>
2022-09-24 13:27:13 -04:00