planetscale / planetscale/vitess-operator

make generate-operator-yaml is broken: wrong kustomize module path and kustomize v2.0.3 no longer compiles

Open
#835 0 comments 0 reactions 1 assignee View on GitHub

@mattlord is already working on this.

Since Sep 19, 2026.

bug
Dominant language
Go
Stars
372
Forks
102
Avg merge
3d 5h
Merged PRs (30d)
15

Description

make generate-operator-yaml has not worked for a long time, for two independent reasons:

  1. Wrong module path in the Makefile. The target runs go run github.com/kubernetes-sigs/kustomize build ./deploy, but the module in go.mod is sigs.k8s.io/kustomize, so go run fails immediately:

    no required module provides package github.com/kubernetes-sigs/kustomize; to add it:
    	go get github.com/kubernetes-sigs/kustomize
    

    That line has been unchanged since 44f9afd (October 2020).

  2. The pinned kustomize no longer compiles. With the path corrected, sigs.k8s.io/kustomize v2.0.3+incompatible (from 2019) fails to build against the current k8s.io/kube-openapi on main:

    # sigs.k8s.io/kustomize/pkg/transformers/config
    sigs.k8s.io/kustomize@v2.0.3+incompatible/pkg/transformers/config/factorycrd.go:71:25: cannot use api.Schema.SchemaProps.Properties (variable of type map[string]"k8s.io/kube-openapi/pkg/validation/spec".Schema) as myProperties value in argument to looksLikeAk8sType
    

As a result the only way to rebuild build/_output/operator.yaml (and the bundle in test/endtoend/operator/operator-latest.yaml that the end-to-end tests and quickstart docs use) is with an out-of-tree kustomize.

Proposed fix
  • Replace the sigs.k8s.io/kustomize v2 tool dependency in tools/tools.go and go.mod with the current CLI module, sigs.k8s.io/kustomize/kustomize/v5, following the existing go run tool convention used for controller-gen and gen-crd-api-reference-docs.
  • Point the Makefile target at that module and create build/_output if needed.
  • Verify the output matches test/endtoend/operator/operator-latest.yaml apart from the PR image override.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.