Skip to content

Commit

Permalink
add named object ref
Browse files Browse the repository at this point in the history
  • Loading branch information
aupadhyay3 committed Nov 14, 2024
1 parent 5e1a2d7 commit 06aef11
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions api/common.go
Original file line number Diff line number Diff line change
Expand Up @@ -105,3 +105,12 @@ func (t TypedObjectRef) ToCoreV1ObjectReference() *corev1.ObjectReference {
func (t TypedObjectRef) String() string {
return fmt.Sprintf("%s: %s", t.GroupVersionKind(), t.ObjectKey())
}

// NamedObjectRef references an object by name and optionally by namespace.
type NamedObjectRef struct {
// Name of the object. Required.
Name string `json:"name"`

// Namespace of the object. Optional. Defaulting behavior is determined by the parent API.
Namespace string `json:"namespace,omitempty"`
}

0 comments on commit 06aef11

Please sign in to comment.