Skip to content

Commit

Permalink
docs: update api docs
Browse files Browse the repository at this point in the history
Signed-off-by: Raffael Sahli <[email protected]>
  • Loading branch information
raffis committed Mar 16, 2023
1 parent 470a02c commit 1ae0f47
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
2 changes: 2 additions & 0 deletions api/v1beta2/reference_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ type CrossNamespaceObjectReference struct {
Kind string `json:"kind,omitempty"`

// Name of the referent.
// If multiple resources are targeted `*` may be set.
// +kubebuilder:validation:MinLength=1
// +kubebuilder:validation:MaxLength=53
// +required
Expand All @@ -44,6 +45,7 @@ type CrossNamespaceObjectReference struct {
// MatchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels
// map is equivalent to an element of matchExpressions, whose key field is "key", the
// operator is "In", and the values array contains only "value". The requirements are ANDed.
// MatchLabels requires the name to be set to `*`.
// +optional
MatchLabels map[string]string `json:"matchLabels,omitempty"`
}
6 changes: 4 additions & 2 deletions docs/api/notification.md
Original file line number Diff line number Diff line change
Expand Up @@ -741,7 +741,8 @@ string
</em>
</td>
<td>
<p>Name of the referent.</p>
<p>Name of the referent.
If multiple resources are targeted <code>*</code> may be set.</p>
</td>
</tr>
<tr>
Expand All @@ -767,7 +768,8 @@ map[string]string
<em>(Optional)</em>
<p>MatchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels
map is equivalent to an element of matchExpressions, whose key field is &ldquo;key&rdquo;, the
operator is &ldquo;In&rdquo;, and the values array contains only &ldquo;value&rdquo;. The requirements are ANDed.</p>
operator is &ldquo;In&rdquo;, and the values array contains only &ldquo;value&rdquo;. The requirements are ANDed.
MatchLabels requires the name to be set to <code>*</code>.</p>
</td>
</tr>
</tbody>
Expand Down
2 changes: 1 addition & 1 deletion internal/server/receiver_handlers.go
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ func (s *ReceiverServer) handlePayload() func(w http.ResponseWriter, r *http.Req
}

for _, resource := range receiver.Spec.Resources {
if err := s.annotateCrossNamespaceReferences(ctx, logger, resource, receiver.Namespace); err != nil {
if err := s.requestReconciliation(ctx, logger, resource, receiver.Namespace); err != nil {
logger.Error(err, "unable to process resource")
withErrors = true
}
Expand Down

0 comments on commit 1ae0f47

Please sign in to comment.