File tree Expand file tree Collapse file tree 4 files changed +10
-11
lines changed Expand file tree Collapse file tree 4 files changed +10
-11
lines changed Original file line number Diff line number Diff line change @@ -56,7 +56,7 @@ type ResourceConfig struct {
56
56
// very little consistency to the APIs that we can use to instruct the code
57
57
// generator :(
58
58
UpdateOperation * UpdateOperationConfig `json:"update_operation,omitempty"`
59
- // ReconcileConfig describes options for controlling the reconciliation
59
+ // Reconcile describes options for controlling the reconciliation
60
60
// logic for a particular resource.
61
61
Reconcile * ReconcileConfig `json:"reconcile,omitempty"`
62
62
// UpdateConditionsCustomMethodName provides the name of the custom method on the
Original file line number Diff line number Diff line change @@ -567,12 +567,11 @@ func (r *CRD) ReconcileRequeuOnSuccessSeconds() int {
567
567
return 0
568
568
}
569
569
reconcile := resGenConfig .Reconcile
570
- // handles the default case
571
- if reconcile == nil {
572
- return 0
573
- } else {
570
+ if reconcile != nil {
574
571
return reconcile .RequeueOnSuccessSeconds
575
572
}
573
+ // handles the default case
574
+ return 0
576
575
}
577
576
578
577
// CustomUpdateMethodName returns the name of the custom resourceManager method
Original file line number Diff line number Diff line change @@ -66,13 +66,13 @@ func (f *resourceManagerFactory) IsAdoptable() bool {
66
66
return {{ .CRD.IsAdoptable } }
67
67
}
68
68
69
- // GetRequeueOnSuccessSeconds returns true if the resource should be requeued after specified seconds
69
+ // RequeueOnSuccessSeconds returns true if the resource should be requeued after specified seconds
70
70
// Default is false which means resource will not be requeued after success.
71
- func (f *resourceManagerFactory) GetRequeueOnSuccessSeconds () ( int, bool) {
71
+ func (f *resourceManagerFactory) RequeueOnSuccessSeconds () int {
72
72
{{- if $reconcileRequeuOnSuccessSeconds := .CRD.ReconcileRequeuOnSuccessSeconds } }
73
- return { { $reconcileRequeuOnSuccessSeconds } }, true
73
+ return { { $reconcileRequeuOnSuccessSeconds } }
74
74
{ {- else } }
75
- return 0, false
75
+ return 0
76
76
{ {- end } }
77
77
}
78
78
Original file line number Diff line number Diff line change @@ -254,13 +254,13 @@ func (rm *resourceManager) updateConditions (
254
254
if syncCondition == nil && onSuccess {
255
255
syncCondition = &ackv1alpha1.Condition{
256
256
Type: ackv1alpha1.ConditionTypeResourceSynced,
257
+ Status: corev1.ConditionTrue,
257
258
}
258
- syncCondition.Status = corev1.ConditionTrue
259
259
ko.Status.Conditions = append(ko.Status.Conditions, syncCondition)
260
260
}
261
261
{ {- else } }
262
262
// Required to avoid the "declared but not used" error in the default case
263
- syncCondition = nil
263
+ _ = syncCondition
264
264
{ {- end } }
265
265
266
266
{ {- if $updateConditionsCustomMethodName := .CRD.UpdateConditionsCustomMethodName } }
You can’t perform that action at this time.
0 commit comments