Skip to content

Add NamedObjectRef resource to common API#2

Merged
harveyxia merged 1 commit intomainfrom
named-obj-ref
Nov 19, 2024
Merged

Add NamedObjectRef resource to common API#2
harveyxia merged 1 commit intomainfrom
named-obj-ref

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
@aupadhyay3 aupadhyay3 requested a review from kdorosh November 18, 2024 20:41
@harveyxia harveyxia merged commit 630889c into main Nov 19, 2024
@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