Skip to content

v3.9.0 regression - panic in getNamespacesForRoleBinding #3340

@alexec

Description

@alexec

Our builds have just started running with kustomize v3.9.0 and are panicking. This can only be a regression.

https://github.com/argoproj/argo/pull/4618/checks?check_run_id=1533236396

panic: interface conversion: interface {} is string, not map[string]interface {}

goroutine 1 [running]:
sigs.k8s.io/kustomize/api/resmap.getNamespacesForRoleBinding(0xc0009774a0, 0x19)
	/go/pkg/mod/sigs.k8s.io/kustomize/[email protected]/resmap/reswrangler.go:417 +0x33f
sigs.k8s.io/kustomize/api/resmap.(*resWrangler).SubsetThatCouldBeReferencedByResource(0xc00044bd60, 0xc0009774a0, 0xb, 0xc0028a9501)
	/go/pkg/mod/sigs.k8s.io/kustomize/[email protected]/resmap/reswrangler.go:384 +0xca
sigs.k8s.io/kustomize/api/internal/accumulator.(*nameReferenceTransformer).Transform(0xc00243edc0, 0x1990300, 0xc00044bd60, 0xc00044bd60, 0x0)
	/go/pkg/mod/sigs.k8s.io/kustomize/[email protected]/internal/accumulator/namereferencetransformer.go:85 +0x515
sigs.k8s.io/kustomize/api/internal/accumulator.(*ResAccumulator).Transform(...)
	/go/pkg/mod/sigs.k8s.io/kustomize/[email protected]/internal/accumulator/resaccumulator.go:138
sigs.k8s.io/kustomize/api/internal/accumulator.(*ResAccumulator).FixBackReferences(0xc00044bd40, 0xc00044bd40, 0x0)
	/go/pkg/mod/sigs.k8s.io/kustomize/[email protected]/internal/accumulator/resaccumulator.go:164 +0xba
sigs.k8s.io/kustomize/api/internal/target.(*KustTarget).makeCustomizedResMap(0xc000206a80, 0x0, 0x0, 0x1986bc0, 0x25be0e8)
	/go/pkg/mod/sigs.k8s.io/kustomize/[email protected]/internal/target/kusttarget.go:125 +0x7b
sigs.k8s.io/kustomize/api/internal/target.(*KustTarget).MakeCustomizedResMap(...)
	/go/pkg/mod/sigs.k8s.io/kustomize/[email protected]/internal/target/kusttarget.go:106
sigs.k8s.io/kustomize/api/krusty.(*Kustomizer).Run(0xc000e77d20, 0x7ffd0447e18f, 0x19, 0x0, 0x0, 0x0, 0x0)
	/go/pkg/mod/sigs.k8s.io/kustomize/[email protected]/krusty/kustomizer.go:77 +0x294
sigs.k8s.io/kustomize/kustomize/v3/internal/commands/build.(*Options).RunBuild(0xc00015bb90, 0x192dde0, 0xc00000e018, 0x2, 0x0)
	/workspace/myClone/kustomize/internal/commands/build/build.go:148 +0xb5
sigs.k8s.io/kustomize/kustomize/v3/internal/commands/build.NewCmdBuild.func1(0xc000218580, 0xc00044aba0, 0x1, 0x2, 0x0, 0x0)
	/workspace/myClone/kustomize/internal/commands/build/build.go:70 +0xab
github.com/spf13/cobra.(*Command).execute(0xc000218580, 0xc00044ab80, 0x2, 0x2, 0xc000218580, 0xc00044ab80)
	/go/pkg/mod/github.com/spf13/[email protected]/command.go:842 +0x453
github.com/spf13/cobra.(*Command).ExecuteC(0xc0000bd8c0, 0x0, 0x14d5840, 0xc00007e058)
	/go/pkg/mod/github.com/spf13/[email protected]/command.go:950 +0x349
github.com/spf13/cobra.(*Command).Execute(...)
	/go/pkg/mod/github.com/spf13/[email protected]/command.go:887
main.main()
	/workspace/myClone/kustomize/main.go:19 +0x27
make: *** [manifests/install.yaml] Error 2

Files that can reproduce the issue

Expected output

Actual output

Kustomize version

Platform

Additional context

Metadata

Metadata

Assignees

Labels

kind/bugCategorizes issue or PR as related to a bug.triage/acceptedIndicates an issue or PR is ready to be actively worked on.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions