Skip to content

Commit

Permalink
Merge pull request #508 from fluxcd/remove-rec-url-v1
Browse files Browse the repository at this point in the history
receiver/v1: Remove deprecated `.status.url` field
  • Loading branch information
makkes authored Apr 24, 2023
2 parents 4b32bfd + 24509ce commit 18c49ad
Show file tree
Hide file tree
Showing 5 changed files with 0 additions and 29 deletions.
6 changes: 0 additions & 6 deletions api/v1/receiver_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -85,12 +85,6 @@ type ReceiverStatus struct {
// +optional
Conditions []metav1.Condition `json:"conditions,omitempty"`

// URL is the generated incoming webhook address in the format
// of '/hook/sha256sum(token+name+namespace)'.
// Deprecated: Replaced by WebhookPath.
// +optional
URL string `json:"url,omitempty"`

// WebhookPath is the generated incoming webhook address in the format
// of '/hook/sha256sum(token+name+namespace)'.
// +optional
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -224,11 +224,6 @@ spec:
the Receiver object.
format: int64
type: integer
url:
description: 'URL is the generated incoming webhook address in the
format of ''/hook/sha256sum(token+name+namespace)''. Deprecated:
Replaced by WebhookPath.'
type: string
webhookPath:
description: WebhookPath is the generated incoming webhook address
in the format of '/hook/sha256sum(token+name+namespace)'.
Expand Down
14 changes: 0 additions & 14 deletions docs/api/v1/notification.md
Original file line number Diff line number Diff line change
Expand Up @@ -398,20 +398,6 @@ github.com/fluxcd/pkg/apis/meta.ReconcileRequestStatus
</tr>
<tr>
<td>
<code>url</code><br>
<em>
string
</em>
</td>
<td>
<em>(Optional)</em>
<p>URL is the generated incoming webhook address in the format
of &lsquo;/hook/sha256sum(token+name+namespace)&rsquo;.
Deprecated: Replaced by WebhookPath.</p>
</td>
</tr>
<tr>
<td>
<code>webhookPath</code><br>
<em>
string
Expand Down
2 changes: 0 additions & 2 deletions internal/controllers/receiver_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,6 @@ func (r *ReceiverReconciler) reconcile(ctx context.Context, obj *apiv1.Receiver)
token, err := r.token(ctx, obj)
if err != nil {
conditions.MarkFalse(obj, meta.ReadyCondition, apiv1.TokenNotFoundReason, err.Error())
obj.Status.URL = ""
obj.Status.WebhookPath = ""
return ctrl.Result{Requeue: true}, err
}
Expand All @@ -168,7 +167,6 @@ func (r *ReceiverReconciler) reconcile(ctx context.Context, obj *apiv1.Receiver)
conditions.MarkTrue(obj, meta.ReadyCondition, meta.SucceededReason, msg)

if obj.Status.WebhookPath != webhookPath {
obj.Status.URL = webhookPath
obj.Status.WebhookPath = webhookPath
ctrl.LoggerFrom(ctx).Info(msg)
}
Expand Down
2 changes: 0 additions & 2 deletions internal/controllers/receiver_controller_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,6 @@ func TestReceiverReconciler_EventHandler(t *testing.T) {
return conditions.IsReady(resultR)
}, timeout, time.Second).Should(BeTrue())

g.Expect(resultR.Status.URL).To(BeIdenticalTo(address))
g.Expect(resultR.Status.WebhookPath).To(BeIdenticalTo(address))
g.Expect(conditions.GetMessage(resultR, meta.ReadyCondition)).To(ContainSubstring(address))
})
Expand All @@ -296,7 +295,6 @@ func TestReceiverReconciler_EventHandler(t *testing.T) {
}, timeout, time.Second).Should(BeTrue())

g.Expect(conditions.IsReady(resultR))
g.Expect(resultR.Status.URL).To(BeIdenticalTo(address))
g.Expect(resultR.Status.WebhookPath).To(BeIdenticalTo(address))
})

Expand Down

0 comments on commit 18c49ad

Please sign in to comment.