From 4121f99a9586f1dd610a53a89dc983331d250550 Mon Sep 17 00:00:00 2001 From: Oleksii Kurinnyi Date: Fri, 4 Oct 2024 18:36:25 +0300 Subject: [PATCH] Merge pull request #723 from eclipse-che/fix-declined-auth-startup fix: apply strategic merge to workspace-preferences-configmap --- .../scm/kubernetes/KubernetesAuthorisationRequestManager.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/infrastructures/infrastructure-factory/src/main/java/org/eclipse/che/api/factory/server/scm/kubernetes/KubernetesAuthorisationRequestManager.java b/infrastructures/infrastructure-factory/src/main/java/org/eclipse/che/api/factory/server/scm/kubernetes/KubernetesAuthorisationRequestManager.java index 8af694936e..085382c765 100644 --- a/infrastructures/infrastructure-factory/src/main/java/org/eclipse/che/api/factory/server/scm/kubernetes/KubernetesAuthorisationRequestManager.java +++ b/infrastructures/infrastructure-factory/src/main/java/org/eclipse/che/api/factory/server/scm/kubernetes/KubernetesAuthorisationRequestManager.java @@ -21,6 +21,8 @@ import com.google.gson.Gson; import io.fabric8.kubernetes.api.model.ConfigMap; import io.fabric8.kubernetes.client.KubernetesClient; +import io.fabric8.kubernetes.client.dsl.base.PatchContext; +import io.fabric8.kubernetes.client.dsl.base.PatchType; import jakarta.ws.rs.core.UriInfo; import java.net.URL; import java.util.HashSet; @@ -118,7 +120,7 @@ private void patchConfigMap(ConfigMap configMap) { .configMaps() .inNamespace(getFirstNamespace()) .withName(PREFERENCES_CONFIGMAP_NAME) - .patch(configMap); + .patch(PatchContext.of(PatchType.STRATEGIC_MERGE), configMap); } catch (UnsatisfiedScmPreconditionException | ScmConfigurationPersistenceException | InfrastructureException e) {