Skip to content

Commit

Permalink
fix: upgrade controller-gen to 0.14.0 to fix panic
Browse files Browse the repository at this point in the history
controller-gen panics on some of our repos now, specifically found this
in database-credential-operator.

```
go run sigs.k8s.io/controller-tools/cmd/[email protected] object paths=./api/k8s/database/v1
panic: runtime error: invalid memory address or nil pointer dereference [recovered]
        panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x2 addr=0x0 pc=0x103280e80]

```

kubernetes-sigs/controller-tools#888
  • Loading branch information
evadnoob committed Mar 27, 2024
1 parent 3b9500a commit f88ea1c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion templates/api/kubernetes/version.go.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
package {{ .version }}

//nolint:lll //Why: Long shell script
//go:generate /usr/bin/env bash -c "pushd ../../..{{if not (empty .package)}}/..{{end}} >/dev/null 2>&1 && ./scripts/shell-wrapper.sh gobin.sh sigs.k8s.io/controller-tools/cmd/controller-gen@v0.7.0 object paths=./api/k8s/{{ .package }}/{{ .version }} && popd >/dev/null 2>&1"
//go:generate /usr/bin/env bash -c "pushd ../../..{{if not (empty .package)}}/..{{end}} >/dev/null 2>&1 && ./scripts/shell-wrapper.sh gobin.sh sigs.k8s.io/controller-tools/cmd/controller-gen@v0.140 object paths=./api/k8s/{{ .package }}/{{ .version }} && popd >/dev/null 2>&1"
{{ end }}

{{- range $g := stencil.Arg "kubernetes.groups" }}
Expand Down

0 comments on commit f88ea1c

Please sign in to comment.