Commit Graph

30 Commits

Author SHA1 Message Date
Tim Hockin
04c80d0a23
Simplify verify-codegen to use worktrees 2023-01-21 11:16:15 -08: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
Jordan Liggitt
0b32e142d4 Drop k8s.io/node-api packages 2020-02-07 10:07:14 -05:00
Jin Hase
e1eabf8576 Add comments in several hack/verify-*.sh 2020-01-16 13:54:58 +09:00
SataQiu
2704abf844 fix shellcheck failures of hack/verify-boilerplate.sh verify-cli-conventions.sh verify-codegen.sh 2019-04-23 13:39:00 +08:00
Michelle Au
d2aa8178f2 Remove alpha CRD install 2019-04-02 10:59:11 -07:00
Tim Allclair
03fdecbde4 Add node-api code generators 2018-12-18 16:06:56 -08:00
Jan Safranek
5ceb26d224 Add new csi-api repo to staging 2018-08-31 03:49:50 -07:00
Matthias Bertschy
9b15af19b2 Update all script to use /usr/bin/env bash in shebang 2018-04-19 13:20:13 +02:00
James Munnelly
740afa0e65 Add sample CustomResourceDefinition controller
sample-controller: add API types

sample-controller: regenerate files

sample-controller: add implementation

sample-controller: update bazel

sample-controller: update make-rules and cache_go_dirs

sample-controller: Set noStatus tag. Remove openapi-gen tag.

sample-controller: add deletion tombstone handling logic

sample-controller: update README, remove use of reflect in UpdateFuncs

sample-controller: add OWNERS file

sample-controller: add LICENSE
2017-10-19 00:21:57 +01:00
Dr. Stefan Schimanski
e3a3d108fb Fixup after k8s.io/{kube-gen -> code-generator} rename 2017-08-17 17:55:12 +02:00
Dr. Stefan Schimanski
4b709e8485 kube-gen: unify update-codecgen.sh scripts 2017-08-04 08:03:15 +02:00
Dr. Stefan Schimanski
70947fa3a2 Make staging hack/update-codec.sh scripts relocatable and kube independent 2017-07-20 07:41:37 +02:00
Dr. Stefan Schimanski
edfbb9aa64 Fixup go2idl references 2017-07-20 07:41:37 +02:00
Dr. Stefan Schimanski
33e50da9f4 Rename {kube- ->}apiextensions-{-> api}server 2017-06-06 12:06:31 +02:00
Kubernetes Submit Queue
caead74171 Merge pull request #45184 from DirectXMan12/feature/metrics-client-gen-tweaks
Automatic merge from submit-queue (batch tested with PRs 46801, 45184, 45930, 46192, 45563)

Tweak client-gen to support metrics API

This PR adds support to client-gen for readonly APIs as well as for customizing the resource name used for a given type.

This is required to support the clients generated for `k8s.io/metrics/pkg/apis/metrics`.

cc @caesarxuchao 

Currently based on #45180

**Release note**:
```release-note
NONE
```
2017-06-02 18:05:50 -07:00
Tim St. Clair
6565f68cfa
Update generated files 2017-05-18 10:39:04 -07:00
Solly Ross
0b43fffa48 Enable client-gen for k8s.io/metrics
This commit turns on client-gen for k8s.io/metrics.  Clients are
generated for `k8s.io/metrics/pkg/apis/metrics` (both internal and
v1alpha1).  `k8s.io/metrics/pkg/apis/custom_metrics` uses a bespoke
client due to the unique nature of its paths.
2017-05-10 13:33:18 -04:00
deads2k
ed27887ad2 wire new staging repo 2017-05-02 08:43:31 -04:00
Jordan Liggitt
ad116026d9
Remove vestiges of defaulting from conversion path, switch to top-level default registration only 2017-04-12 13:36:15 -04:00
deads2k
1d40c3ff76 update scripts for new kube-aggregator location 2017-02-14 14:16:59 -05:00
deads2k
453651cbfc rename kubernetes-discovery to kube-aggregator 2017-01-10 12:27:42 -05:00
deads2k
0a6193fbe4 add apiregistration types 2016-12-06 13:45:10 -05:00
David McMahon
ef0c9f0c5b Remove "All rights reserved" from all the headers. 2016-06-29 17:47:36 -07:00
Tim Hockin
18e7a3eb24 Get rid of hack/after-build scripts
The build is now fast enough to not need them.
2016-05-08 20:32:06 -07:00
Tim Hockin
cbf886c7f4 Convert everything to use vendor/ 2016-05-08 20:30:37 -07:00
Wojciech Tyczynski
9ee8278e4a Fix remaining issues with conversion generator. 2016-03-29 09:49:27 +02:00
Wojciech Tyczynski
baf97c9c5e First use of new deep-copy generator. 2015-12-29 18:06:09 +01:00
Wojciech Tyczynski
9d912e843b Update/verify client generator in scripts 2015-12-28 14:24:43 +01:00
Daniel Smith
ad925dd2e8 Add verification to code gen 2015-12-02 14:14:49 -08:00