Add .spec.interval in v1beta3 Provider
For backwards compatibility with v1beta2 Provider, add .spec.interval with deprecation marker. Interval was an optional field in v1beta2 with internal default. Only the users who had explicitly set intervals would have encountered this incompatibility error after upgrade. Signed-off-by: Sunny <darkowlzz@protonmail.com>
This commit is contained in:
parent
73e1965419
commit
7f5eea0a2e
|
@ -61,6 +61,15 @@ type ProviderSpec struct {
|
|||
// +required
|
||||
Type string `json:"type"`
|
||||
|
||||
// Interval at which to reconcile the Provider with its Secret references.
|
||||
// Deprecated and not used in v1beta3.
|
||||
//
|
||||
// +kubebuilder:validation:Type=string
|
||||
// +kubebuilder:validation:Pattern="^([0-9]+(\\.[0-9]+)?(ms|s|m|h))+$"
|
||||
// +optional
|
||||
// +deprecated
|
||||
Interval *metav1.Duration `json:"interval,omitempty"`
|
||||
|
||||
// Channel specifies the destination channel where events should be posted.
|
||||
// +kubebuilder:validation:MaxLength:=2048
|
||||
// +optional
|
||||
|
|
|
@ -187,6 +187,11 @@ func (in *ProviderList) DeepCopyObject() runtime.Object {
|
|||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *ProviderSpec) DeepCopyInto(out *ProviderSpec) {
|
||||
*out = *in
|
||||
if in.Interval != nil {
|
||||
in, out := &in.Interval, &out.Interval
|
||||
*out = new(metav1.Duration)
|
||||
**out = **in
|
||||
}
|
||||
if in.Timeout != nil {
|
||||
in, out := &in.Timeout, &out.Timeout
|
||||
*out = new(metav1.Duration)
|
||||
|
|
|
@ -457,6 +457,11 @@ spec:
|
|||
should be posted.
|
||||
maxLength: 2048
|
||||
type: string
|
||||
interval:
|
||||
description: Interval at which to reconcile the Provider with its
|
||||
Secret references. Deprecated and not used in v1beta3.
|
||||
pattern: ^([0-9]+(\.[0-9]+)?(ms|s|m|h))+$
|
||||
type: string
|
||||
proxy:
|
||||
description: Proxy the HTTP/S address of the proxy server.
|
||||
maxLength: 2048
|
||||
|
|
|
@ -254,6 +254,21 @@ string
|
|||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<code>interval</code><br>
|
||||
<em>
|
||||
<a href="https://pkg.go.dev/k8s.io/apimachinery/pkg/apis/meta/v1#Duration">
|
||||
Kubernetes meta/v1.Duration
|
||||
</a>
|
||||
</em>
|
||||
</td>
|
||||
<td>
|
||||
<em>(Optional)</em>
|
||||
<p>Interval at which to reconcile the Provider with its Secret references.
|
||||
Deprecated and not used in v1beta3.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<code>channel</code><br>
|
||||
<em>
|
||||
string
|
||||
|
@ -527,6 +542,21 @@ string
|
|||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<code>interval</code><br>
|
||||
<em>
|
||||
<a href="https://pkg.go.dev/k8s.io/apimachinery/pkg/apis/meta/v1#Duration">
|
||||
Kubernetes meta/v1.Duration
|
||||
</a>
|
||||
</em>
|
||||
</td>
|
||||
<td>
|
||||
<em>(Optional)</em>
|
||||
<p>Interval at which to reconcile the Provider with its Secret references.
|
||||
Deprecated and not used in v1beta3.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<code>channel</code><br>
|
||||
<em>
|
||||
string
|
||||
|
|
Loading…
Reference in New Issue