Skip to content

make install fails with kustomize error due to patchesStrategicMerge #435

@GarupanOjisan

Description

@GarupanOjisan

What

When running make install, I encountered the following error related to kustomize:

Error: invalid Kustomization: json: cannot unmarshal object into Go struct field Kustomization.patchesStrategicMerge of type types.PatchStrategicMerge
error: no objects passed to apply
make: *** [install] Error 1

The issue seems to originate from this file:

patchesStrategicMerge:
# [WEBHOOK] To enable webhook, uncomment all the sections with [WEBHOOK] prefix.
# patches here are for enabling the conversion webhook for each CRD
- path: patches/webhook_in_tortoises.yaml
#- patches/webhook_in_tortoises.yaml
#+kubebuilder:scaffold:crdkustomizewebhookpatch
# [CERTMANAGER] To enable cert-manager, uncomment all the sections with [CERTMANAGER] prefix.
# patches here are for enabling the CA injection for each CRD
- path: patches/cainjection_in_tortoises.yaml
#- patches/cainjection_in_tortoises.yaml
#+kubebuilder:scaffold:crdkustomizecainjectionpatch

Possibly, the path: fields under each entry in patchesStrategicMerge are unnecessary, and also, these entries should likely be commented out by default.

Environment:

MacOS 15.3.1
Kustomize v5.4.3

Steps to Reproduce:

make install

Full output

mkdir -p /Users/user/dev/tortoise/bin
Downloading sigs.k8s.io/controller-tools/cmd/[email protected]
go: downloading sigs.k8s.io/controller-tools v0.16.1
go: downloading k8s.io/api v0.31.0
go: downloading k8s.io/apimachinery v0.31.0
go: downloading github.com/gobuffalo/flect v1.0.2
go: downloading k8s.io/apiextensions-apiserver v0.31.0
go: downloading k8s.io/utils v0.0.0-20240711033017-18e509b52bc8
go: downloading golang.org/x/sync v0.8.0
go: downloading golang.org/x/sys v0.23.0
go: downloading golang.org/x/net v0.28.0
go: downloading golang.org/x/text v0.17.0
/Users/user/dev/tortoise/bin/controller-gen rbac:roleName=manager-role crd webhook paths="./..." output:crd:artifacts:config=config/crd/bases
Downloading sigs.k8s.io/kustomize/kustomize/[email protected]
/Users/user/dev/tortoise/bin/kustomize build config/crd | kubectl apply -f -
Error: invalid Kustomization: json: cannot unmarshal object into Go struct field Kustomization.patchesStrategicMerge of type types.PatchStrategicMerge
error: no objects passed to apply
make: *** [install] Error 1

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions