Skip to content

[BUG] Export gets segmentation violation if access to cluster resources is forbidden #150

@dmartinol

Description

@dmartinol

What version of crane are you running, and what are your clutsters+platform
Commit #149
Running export with the new option --cluster-scoped-rbac on cluster where the configured user has no admin role

What did you expect to happen?
To export only the accessible resources

What actually happened?
segmentation violation happened

Please include any relevant logs or errors

INFO[0043] Filtering for kind ClusterRole (1008 found)  
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0xe0 pc=0x10110cfe1]

goroutine 1 [running]:
github.com/konveyor/crane/cmd/export.(*ClusterScopedRbacHandler).acceptClusterRole(0xc000565968, {0xc000ee0ba0})

Metadata

Metadata

Assignees

Labels

kind/bugCategorizes issue or PR as related to a bug.needs-priorityneeds-triageIndicates an issue or PR lacks a `triage/foo` label and requires one.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions