From c414ec87532a28920417833ba9d7255a84ca4f01 Mon Sep 17 00:00:00 2001 From: Han Qiao Date: Wed, 11 Dec 2024 22:58:13 +0800 Subject: [PATCH] fix: copy image transform by value (#2969) --- pkg/config/storage.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pkg/config/storage.go b/pkg/config/storage.go index 3b5696738..b026d0cf6 100644 --- a/pkg/config/storage.go +++ b/pkg/config/storage.go @@ -62,6 +62,10 @@ func (s *storage) FromRemoteStorageConfig(remoteConfig v1API.StorageConfigRespon func (s *storage) DiffWithRemote(remoteConfig v1API.StorageConfigResponse) ([]byte, error) { copy := *s + if s.ImageTransformation != nil { + img := *s.ImageTransformation + copy.ImageTransformation = &img + } // Convert the config values into easily comparable remoteConfig values currentValue, err := ToTomlBytes(copy) if err != nil {