grafana/hack
dependabot[bot] 8dd63baf50
deps(go): bump the k8s-io group across 2 directories with 2 updates (#115464)
* deps(go): bump the k8s-io group across 2 directories with 2 updates

Bumps the k8s-io group with 1 update in the / directory: [k8s.io/kube-aggregator](https://github.com/kubernetes/kube-aggregator).
Bumps the k8s-io group with 1 update in the /hack directory: [k8s.io/code-generator](https://github.com/kubernetes/code-generator).


Updates `k8s.io/kube-aggregator` from 0.34.2 to 0.34.3
- [Commits](https://github.com/kubernetes/kube-aggregator/compare/v0.34.2...v0.34.3)

Updates `k8s.io/code-generator` from 0.34.2 to 0.34.3
- [Commits](https://github.com/kubernetes/code-generator/compare/v0.34.2...v0.34.3)

---
updated-dependencies:
- dependency-name: k8s.io/kube-aggregator
  dependency-version: 0.34.3
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: k8s-io
- dependency-name: k8s.io/code-generator
  dependency-version: 0.34.3
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: k8s-io
...

Signed-off-by: dependabot[bot] <support@github.com>

* update all

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
2025-12-17 07:08:40 +00:00
..
boilerplate.go.txt K8s: fix standalone command and add hack scripts (#79052) 2023-12-05 14:31:49 -08:00
externalTools.go K8s: Fix hack/update-codegen (#91867) 2024-08-14 08:17:05 +03:00
go.mod deps(go): bump the k8s-io group across 2 directories with 2 updates (#115464) 2025-12-17 07:08:40 +00:00
go.sum deps(go): bump the k8s-io group across 2 directories with 2 updates (#115464) 2025-12-17 07:08:40 +00:00
make-aggregator-pki.sh feat: add mt development scripts (#110890) 2025-09-10 16:39:55 +00:00
openapi-codegen.sh K8s: Add k8s codegen PR check (#91903) 2024-08-14 11:06:37 -04:00
README.md Alerting: Time Intervals API (#88201) 2024-06-20 16:52:03 -04:00
update-codegen.sh deps(go): bump the k8s-io group across 2 directories with 2 updates (#115464) 2025-12-17 07:08:40 +00:00

Kubernetes HACK Alert

This is a hack folder for kubernetes codegen scripts. Oddly, a /hack/ folder seems to be standard kubernetes development practice ¯_(ツ)_/¯

The workflow is a WIP, however we are trying to leverage as many off-the-shelf patterns as possible.

For these scripts to work, your local GOROOT/src/grafana/grafana must point to this git checkout. For my setup this is:

 pwd
/Users/ryan/go/src/github.com/grafana
 ls -l
total 0
lrwxr-xr-x  1 ryan  staff  37 Oct  5 09:34 grafana -> /Users/ryan/workspace/grafana/grafana

The current workflow is to run the following:

# ensure k8s.io/code-generator pkg is up to date
go mod download

# the happy path
./hack/update-codegen.sh

Note that the script deletes existing openapi go code and regenerates in place so that you will temporarily see deleted files in your git status. After a successful run, you should see them restored.

If resource client is not generated for your resource make sure that it follows the k8s guidelines for structuring the resource definition

  • the directory is named after resource version, i.e. <resource_name>/v<version> (e.g. service/v0alpha1)
  • the resource directory contains file types.go that includes resource definitions
  • the resource definitions are annotated with comment // +genclient