Skip to content

feature: Add admission webhook for defaulting APIExport's path #5

@xmudrii

Description

@xmudrii

Feature Description

When referencing APIExport in FilteredAPIExportEndpointSlice, path should be optional. If it's not provided, it should default to the current workspace/logicalcluster. This needs to be done in an admission webhook that's registered in kcp.

Proposed Solution

Create an admission webhook that's registered in kcp to handle this.

Alternative Solutions

The initial idea was to use admission plugin in this Virtual Workspace. However, this can't work because FilteredAPIExportEndpointSlice are not created via the virtual workspace, they're created in kcp directly, so admission webhook needs to be on the kcp level. Such plugin was implemented, and it potentially can be take as a starting for building the webhook: https://gist.github.com/xmudrii/36c358478622ca077e8e30516024c7a6

Want to contribute?

  • I would like to work on this issue.

Additional Context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions