Skip to content

Commit be90322

Browse files
Implement changes from review
Signed-off-by: Frederic Kayser <frederic@frederic-kayser.de>
1 parent ae1648f commit be90322

File tree

1 file changed

+2
-6
lines changed
  • infra/feast-operator/internal/controller/services

1 file changed

+2
-6
lines changed

infra/feast-operator/internal/controller/services/cronjob.go

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -55,13 +55,9 @@ func (feast *FeastServices) setCronJob(cronJob *batchv1.CronJob) error {
5555
appliedCronJob := feast.Handler.FeatureStore.Status.Applied.CronJob
5656
cronJob.Labels = feast.getFeastTypeLabels(CronJobFeastType)
5757
if appliedCronJob.Annotations != nil {
58-
if cronJob.Annotations == nil {
59-
cronJob.Annotations = make(map[string]string)
60-
}
58+
cronJob.Annotations = make(map[string]string, len(appliedCronJob.Annotations))
6159
for k, v := range appliedCronJob.Annotations {
62-
if _, exists := cronJob.Annotations[k]; !exists {
63-
cronJob.Annotations[k] = v
64-
}
60+
cronJob.Annotations[k] = v
6561
}
6662
}
6763
cronJob.Spec = batchv1.CronJobSpec{

0 commit comments

Comments
 (0)