Skip to content

Commit

Permalink
Merge pull request #961 from equinor/fix-sync-conflict-error-for-radi…
Browse files Browse the repository at this point in the history
…xbatch

get radixbatch from k8s api in batch handler
  • Loading branch information
nilsgstrabo authored Oct 20, 2023
2 parents bc0664a + b1f6d04 commit 7a76ee7
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
4 changes: 2 additions & 2 deletions charts/radix-operator/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
apiVersion: v2
name: radix-operator
version: 1.23.11
appVersion: 1.43.11
version: 1.23.12
appVersion: 1.43.12
kubeVersion: ">=1.24.0"
description: Radix Operator
keywords:
Expand Down
4 changes: 3 additions & 1 deletion radix-operator/batch/handler.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package batch

import (
"context"
"fmt"

"github.com/equinor/radix-operator/pkg/apis/batch"
Expand All @@ -9,6 +10,7 @@ import (
"github.com/equinor/radix-operator/radix-operator/common"
corev1 "k8s.io/api/core/v1"
"k8s.io/apimachinery/pkg/api/errors"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
utilruntime "k8s.io/apimachinery/pkg/util/runtime"
"k8s.io/client-go/kubernetes"
"k8s.io/client-go/tools/record"
Expand Down Expand Up @@ -67,7 +69,7 @@ func NewHandler(
}

func (h *Handler) Sync(namespace, name string, eventRecorder record.EventRecorder) error {
radixBatch, err := h.kubeutil.GetRadixBatch(namespace, name)
radixBatch, err := h.radixclient.RadixV1().RadixBatches(namespace).Get(context.TODO(), name, v1.GetOptions{})
if err != nil {
// The resource may no longer exist, in which case we stop
// processing.
Expand Down

0 comments on commit 7a76ee7

Please sign in to comment.