receiver/v1: Remove deprecated .status.url field
Receiver .status.url was deprecated in v1beta2 API and replaced with .status.webhookPath. Remove it from v1 API and all references to it. Signed-off-by: Sunny <darkowlzz@protonmail.com>
This commit is contained in:
parent
4b32bfd8d3
commit
24509ce458
|
@ -85,12 +85,6 @@ type ReceiverStatus struct {
|
||||||
// +optional
|
// +optional
|
||||||
Conditions []metav1.Condition `json:"conditions,omitempty"`
|
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
|
// WebhookPath is the generated incoming webhook address in the format
|
||||||
// of '/hook/sha256sum(token+name+namespace)'.
|
// of '/hook/sha256sum(token+name+namespace)'.
|
||||||
// +optional
|
// +optional
|
||||||
|
|
|
@ -224,11 +224,6 @@ spec:
|
||||||
the Receiver object.
|
the Receiver object.
|
||||||
format: int64
|
format: int64
|
||||||
type: integer
|
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:
|
webhookPath:
|
||||||
description: WebhookPath is the generated incoming webhook address
|
description: WebhookPath is the generated incoming webhook address
|
||||||
in the format of '/hook/sha256sum(token+name+namespace)'.
|
in the format of '/hook/sha256sum(token+name+namespace)'.
|
||||||
|
|
|
@ -398,20 +398,6 @@ github.com/fluxcd/pkg/apis/meta.ReconcileRequestStatus
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>
|
<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 ‘/hook/sha256sum(token+name+namespace)’.
|
|
||||||
Deprecated: Replaced by WebhookPath.</p>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>
|
|
||||||
<code>webhookPath</code><br>
|
<code>webhookPath</code><br>
|
||||||
<em>
|
<em>
|
||||||
string
|
string
|
||||||
|
|
|
@ -156,7 +156,6 @@ func (r *ReceiverReconciler) reconcile(ctx context.Context, obj *apiv1.Receiver)
|
||||||
token, err := r.token(ctx, obj)
|
token, err := r.token(ctx, obj)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
conditions.MarkFalse(obj, meta.ReadyCondition, apiv1.TokenNotFoundReason, err.Error())
|
conditions.MarkFalse(obj, meta.ReadyCondition, apiv1.TokenNotFoundReason, err.Error())
|
||||||
obj.Status.URL = ""
|
|
||||||
obj.Status.WebhookPath = ""
|
obj.Status.WebhookPath = ""
|
||||||
return ctrl.Result{Requeue: true}, err
|
return ctrl.Result{Requeue: true}, err
|
||||||
}
|
}
|
||||||
|
@ -168,7 +167,6 @@ func (r *ReceiverReconciler) reconcile(ctx context.Context, obj *apiv1.Receiver)
|
||||||
conditions.MarkTrue(obj, meta.ReadyCondition, meta.SucceededReason, msg)
|
conditions.MarkTrue(obj, meta.ReadyCondition, meta.SucceededReason, msg)
|
||||||
|
|
||||||
if obj.Status.WebhookPath != webhookPath {
|
if obj.Status.WebhookPath != webhookPath {
|
||||||
obj.Status.URL = webhookPath
|
|
||||||
obj.Status.WebhookPath = webhookPath
|
obj.Status.WebhookPath = webhookPath
|
||||||
ctrl.LoggerFrom(ctx).Info(msg)
|
ctrl.LoggerFrom(ctx).Info(msg)
|
||||||
}
|
}
|
||||||
|
|
|
@ -277,7 +277,6 @@ func TestReceiverReconciler_EventHandler(t *testing.T) {
|
||||||
return conditions.IsReady(resultR)
|
return conditions.IsReady(resultR)
|
||||||
}, timeout, time.Second).Should(BeTrue())
|
}, timeout, time.Second).Should(BeTrue())
|
||||||
|
|
||||||
g.Expect(resultR.Status.URL).To(BeIdenticalTo(address))
|
|
||||||
g.Expect(resultR.Status.WebhookPath).To(BeIdenticalTo(address))
|
g.Expect(resultR.Status.WebhookPath).To(BeIdenticalTo(address))
|
||||||
g.Expect(conditions.GetMessage(resultR, meta.ReadyCondition)).To(ContainSubstring(address))
|
g.Expect(conditions.GetMessage(resultR, meta.ReadyCondition)).To(ContainSubstring(address))
|
||||||
})
|
})
|
||||||
|
@ -296,7 +295,6 @@ func TestReceiverReconciler_EventHandler(t *testing.T) {
|
||||||
}, timeout, time.Second).Should(BeTrue())
|
}, timeout, time.Second).Should(BeTrue())
|
||||||
|
|
||||||
g.Expect(conditions.IsReady(resultR))
|
g.Expect(conditions.IsReady(resultR))
|
||||||
g.Expect(resultR.Status.URL).To(BeIdenticalTo(address))
|
|
||||||
g.Expect(resultR.Status.WebhookPath).To(BeIdenticalTo(address))
|
g.Expect(resultR.Status.WebhookPath).To(BeIdenticalTo(address))
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue