You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is a hack folder for kubernetes codegen scripts. Oddly, a /hack/ folder seems to be standard kubernetes development practice ¯\_(ツ)\_/¯
4
+
5
+
The workflow is a WIP, however we are trying to leverage as many off-the-shelf patterns as possible.
6
+
7
+
For these scripts to work, your local GOROOT/src/grafana/grafana must point to this git checkout. For my setup this is:
8
+
9
+
```
10
+
❯ pwd
11
+
/Users/ryan/go/src/github.com/grafana
12
+
❯ ls -l
13
+
total 0
14
+
lrwxr-xr-x 1 ryan staff 37 Oct 5 09:34 grafana -> /Users/ryan/workspace/grafana/grafana
15
+
```
16
+
17
+
The current workflow (sorry!) is to:
18
+
19
+
1. update the script to point to the group+version you want
20
+
2. run the `update-codegen.sh` script. This will produce a bunch of new files
21
+
3. move `pkg/generated/openapi/zz_generated.openapi.go` to `pkg/apis/{group/version}/zz_generated.openapi.go`.
22
+
4. edit the package name so it is {version} and remove the boilerplate k8s kinds
23
+
5.`rm -rf pkg/generated` -- we are not yet using most of the generated client stuff
24
+
25
+
Once we are more comfortable with the outputs and process, we will build these steps into a more standard codegen pattern, but until then... happy hacking!
0 commit comments