Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add NamedObjectRef resource to common API #2

Merged
merged 1 commit into from
Nov 19, 2024
Merged

Conversation

aupadhyay3
Copy link
Contributor

@aupadhyay3 aupadhyay3 commented Nov 18, 2024

💸 TL;DR

This creates a resource that is referenced by name and optionally by namespace. If a namespace field isn't explicitly specified, a parent API is likely injecting the field into the resource and also handles the defaulting behavior of the field. This addresses the use case where a user-facing custom resource does not need to explicitly set a namespace and instead imports that field from a parent API. Previously, the user would have to still create a namespace field and set it to empty due to the namespace field being required by all existing common API resources. This object is comparable to the existing ObjectRef resource except for the fact that namespace is optional.

✅ Checks

  • CI tests (if present) are passing
  • Adheres to code style for repo
  • Contributor License Agreement (CLA) completed if not a Reddit employee

@aupadhyay3 aupadhyay3 marked this pull request as ready for review November 18, 2024 20:41
@aupadhyay3 aupadhyay3 requested a review from a team as a code owner November 18, 2024 20:41
@harveyxia harveyxia merged commit 630889c into main Nov 19, 2024
1 check passed
@harveyxia harveyxia deleted the named-obj-ref branch November 19, 2024 14:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

4 participants