Skip to content

feature: dynamic rest mapper #3293

Open
@mjudeikis

Description

@mjudeikis

Feature Description

We need to create a dynamic rest mapper so we can resolve KindToResource and ResourceToKind:

TL:DR:

type DefaultRESTMapper struct {
	defaultGroupVersions []schema.GroupVersion

	resourceToKind       map[schema.GroupVersionResource]schema.GroupVersionKind
	kindToPluralResource map[schema.GroupVersionKind]schema.GroupVersionResource
	kindToScope          map[schema.GroupVersionKind]RESTScope
	singularToPlural     map[schema.GroupVersionResource]schema.GroupVersionResource
	pluralToSingular     map[schema.GroupVersionResource]schema.GroupVersionResource
}

and https://github.com/kubernetes/apimachinery/blob/master/pkg/api/meta/interfaces.go#L113

Make it globally accessible so any controller can use it.

Proposed Solution

n/a

Alternative Solutions

No response

Want to contribute?

  • I would like to work on this issue.

Additional Context

No response

Metadata

Metadata

Assignees

Labels

area/coreIssues or PRs related to core changesgood first issueDenotes an issue ready for a new contributor, according to the "help wanted" guidelines.kind/featureCategorizes issue or PR as related to a new feature.

Type

No type

Projects

Status

New

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions