From b28e19600efd29e583faafa77e96c69fade5c652 Mon Sep 17 00:00:00 2001 From: Anneli Date: Wed, 23 Aug 2023 15:55:32 +0200 Subject: [PATCH 1/2] wrapping errors from kubeutil --- pkg/apis/kube/secrets.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/pkg/apis/kube/secrets.go b/pkg/apis/kube/secrets.go index 76c60255c..143ae1b62 100644 --- a/pkg/apis/kube/secrets.go +++ b/pkg/apis/kube/secrets.go @@ -54,12 +54,12 @@ func (kubeutil *Kube) ApplySecret(namespace string, secret *corev1.Secret) (save savedSecret, err := kubeutil.kubeClient.CoreV1().Secrets(namespace).Create(context.TODO(), secret, metav1.CreateOptions{}) return savedSecret, err } else if err != nil { - return nil, fmt.Errorf("failed to get Secret object: %v", err) + return nil, fmt.Errorf("failed to get Secret object: %w", err) } oldSecretJSON, err := json.Marshal(oldSecret) if err != nil { - return nil, fmt.Errorf("failed to marshal old secret object: %v", err) + return nil, fmt.Errorf("failed to marshal old secret object: %w", err) } // Avoid unnecessary patching @@ -71,19 +71,19 @@ func (kubeutil *Kube) ApplySecret(namespace string, secret *corev1.Secret) (save newSecretJSON, err := json.Marshal(newSecret) if err != nil { - return nil, fmt.Errorf("failed to marshal new secret object: %v", err) + return nil, fmt.Errorf("failed to marshal new secret object: %w", err) } patchBytes, err := strategicpatch.CreateTwoWayMergePatch(oldSecretJSON, newSecretJSON, corev1.Secret{}) if err != nil { - return nil, fmt.Errorf("failed to create two way merge patch secret objects: %v", err) + return nil, fmt.Errorf("failed to create two way merge patch secret objects: %w", err) } if !IsEmptyPatch(patchBytes) { // Will perform update as patching not properly remove secret data entries patchedSecret, err := kubeutil.kubeClient.CoreV1().Secrets(namespace).Update(context.TODO(), newSecret, metav1.UpdateOptions{}) if err != nil { - return nil, fmt.Errorf("failed to update secret object: %v", err) + return nil, fmt.Errorf("failed to update secret object: %w", err) } log.Debugf("Updated secret: %s ", patchedSecret.Name) From b91b49fea0fbd49025ccd0511e7f328cd89291d9 Mon Sep 17 00:00:00 2001 From: Anneli Date: Wed, 23 Aug 2023 15:56:05 +0200 Subject: [PATCH 2/2] bumped versions --- charts/radix-operator/Chart.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/charts/radix-operator/Chart.yaml b/charts/radix-operator/Chart.yaml index f94f595f7..fd25e824a 100644 --- a/charts/radix-operator/Chart.yaml +++ b/charts/radix-operator/Chart.yaml @@ -1,7 +1,7 @@ apiVersion: v2 name: radix-operator -version: 1.20.7 -appVersion: 1.40.7 +version: 1.20.8 +appVersion: 1.40.8 kubeVersion: ">=1.24.0" description: Radix Operator keywords: