Add repository sync interval to API
This commit is contained in:
parent
2fadfbd6fc
commit
f740d434dc
|
@ -25,7 +25,10 @@ type GitRepositorySpec struct {
|
|||
// +kubebuilder:validation:MinLength=4
|
||||
|
||||
// The repository address
|
||||
Url string `json:"url,omitempty"`
|
||||
Url string `json:"url"`
|
||||
|
||||
// The interval at which to check for repository updates
|
||||
Interval metav1.Duration `json:"interval"`
|
||||
}
|
||||
|
||||
// GitRepositoryStatus defines the observed state of GitRepository
|
||||
|
|
|
@ -25,7 +25,10 @@ type HelmRepositorySpec struct {
|
|||
// +kubebuilder:validation:MinLength=4
|
||||
|
||||
// The repository address
|
||||
Url string `json:"url,omitempty"`
|
||||
Url string `json:"url"`
|
||||
|
||||
// The interval at which to check for repository updates
|
||||
Interval metav1.Duration `json:"interval"`
|
||||
}
|
||||
|
||||
// HelmRepositoryStatus defines the observed state of HelmRepository
|
||||
|
|
|
@ -86,6 +86,7 @@ func (in *GitRepositoryList) DeepCopyObject() runtime.Object {
|
|||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *GitRepositorySpec) DeepCopyInto(out *GitRepositorySpec) {
|
||||
*out = *in
|
||||
out.Interval = in.Interval
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GitRepositorySpec.
|
||||
|
@ -182,6 +183,7 @@ func (in *HelmRepositoryList) DeepCopyObject() runtime.Object {
|
|||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *HelmRepositorySpec) DeepCopyInto(out *HelmRepositorySpec) {
|
||||
*out = *in
|
||||
out.Interval = in.Interval
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HelmRepositorySpec.
|
||||
|
|
|
@ -49,10 +49,16 @@ spec:
|
|||
spec:
|
||||
description: GitRepositorySpec defines the desired state of GitRepository
|
||||
properties:
|
||||
interval:
|
||||
description: The interval at which to check for repository updates
|
||||
type: string
|
||||
url:
|
||||
description: The repository address
|
||||
minLength: 4
|
||||
type: string
|
||||
required:
|
||||
- interval
|
||||
- url
|
||||
type: object
|
||||
status:
|
||||
description: GitRepositoryStatus defines the observed state of GitRepository
|
||||
|
|
|
@ -49,10 +49,16 @@ spec:
|
|||
spec:
|
||||
description: HelmRepositorySpec defines the desired state of HelmRepository
|
||||
properties:
|
||||
interval:
|
||||
description: The interval at which to check for repository updates
|
||||
type: string
|
||||
url:
|
||||
description: The repository address
|
||||
minLength: 4
|
||||
type: string
|
||||
required:
|
||||
- interval
|
||||
- url
|
||||
type: object
|
||||
status:
|
||||
description: HelmRepositoryStatus defines the observed state of HelmRepository
|
||||
|
|
|
@ -101,7 +101,7 @@ func (r *HelmRepositoryReconciler) Reconcile(req ctrl.Request) (ctrl.Result, err
|
|||
return ctrl.Result{}, err
|
||||
}
|
||||
|
||||
return ctrl.Result{RequeueAfter: time.Minute}, nil
|
||||
return ctrl.Result{RequeueAfter: repo.Spec.Interval.Duration}, nil
|
||||
}
|
||||
|
||||
func (r *HelmRepositoryReconciler) SetupWithManager(mgr ctrl.Manager) error {
|
||||
|
|
Loading…
Reference in New Issue