Skip to content

Bug: istiov1beta1.AddToScheme called twice in main.goΒ #472

Description

@mdryaaan

πŸ“œ Description

main.go lines 85–88:

utilruntime.Must(istiov1beta1.AddToScheme(scheme))
utilruntime.Must(kubeslicev1beta1.AddToScheme(scheme))
utilruntime.Must(istiov1beta1.AddToScheme(scheme))  // duplicate

istiov1beta1.AddToScheme is registered twice. While controller-runtime deduplicates scheme registrations, the duplicate call is dead code that misleads readers and could mask a bug where the intended second registration (e.g., a different API group) was accidentally omitted.

πŸ‘Ÿ Reproduction steps

Read main.go lines 83–89.

πŸ‘ Expected behavior

Each scheme is registered exactly once.

πŸ‘Ž Actual Behavior

istiov1beta1.AddToScheme appears twice; one call is a no-op.

🐚 Relevant log output

Version

No response

πŸ–₯️ What operating system are you seeing the problem on?

No response

βœ… Proposed Solution

Remove the second utilruntime.Must(istiov1beta1.AddToScheme(scheme)) call.

πŸ‘€ Have you spent some time to check if this issue has been raised before?

  • I checked and didn't find any similar issue

Code of Conduct

  • I agree to follow this project's Code of Conduct

Metadata

Metadata

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions