From 8aee7d759ea87f4720437e3e290509a97fc8ed1e Mon Sep 17 00:00:00 2001 From: xbaran4 Date: Tue, 27 Jul 2021 10:47:25 +0200 Subject: [PATCH] replaced value of serviceAccount with serviceAccountName Signed-off-by: xbaran4 --- .../kubernetes/namespace/KubernetesDeployments.java | 4 ++-- .../kubernetes/namespace/KubernetesDeploymentsTest.java | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/infrastructures/kubernetes/src/main/java/org/eclipse/che/workspace/infrastructure/kubernetes/namespace/KubernetesDeployments.java b/infrastructures/kubernetes/src/main/java/org/eclipse/che/workspace/infrastructure/kubernetes/namespace/KubernetesDeployments.java index 22376e6d76..be999e8bf6 100644 --- a/infrastructures/kubernetes/src/main/java/org/eclipse/che/workspace/infrastructure/kubernetes/namespace/KubernetesDeployments.java +++ b/infrastructures/kubernetes/src/main/java/org/eclipse/che/workspace/infrastructure/kubernetes/namespace/KubernetesDeployments.java @@ -1175,7 +1175,7 @@ public class KubernetesDeployments { @VisibleForTesting void addPullSecretsOfSA(Deployment deployment) throws InfrastructureException { final PodSpec podSpec = deployment.getSpec().getTemplate().getSpec(); - final String podServiceAccountName = podSpec.getServiceAccount(); + final String podServiceAccountName = podSpec.getServiceAccountName(); if (podServiceAccountName == null) { return; } @@ -1184,7 +1184,7 @@ public class KubernetesDeployments { .create(workspaceId) .serviceAccounts() .inNamespace(namespace) - .withName(podSpec.getServiceAccount()) + .withName(podServiceAccountName) .get(); if (deploymentServiceAccount == null) { return; diff --git a/infrastructures/kubernetes/src/test/java/org/eclipse/che/workspace/infrastructure/kubernetes/namespace/KubernetesDeploymentsTest.java b/infrastructures/kubernetes/src/test/java/org/eclipse/che/workspace/infrastructure/kubernetes/namespace/KubernetesDeploymentsTest.java index b393fee53f..ccbeda409e 100644 --- a/infrastructures/kubernetes/src/test/java/org/eclipse/che/workspace/infrastructure/kubernetes/namespace/KubernetesDeploymentsTest.java +++ b/infrastructures/kubernetes/src/test/java/org/eclipse/che/workspace/infrastructure/kubernetes/namespace/KubernetesDeploymentsTest.java @@ -728,7 +728,7 @@ public class KubernetesDeploymentsTest { .withMetadata(objectMeta) .withNewSpec() .withImagePullSecrets(imagePullSecrets) - .withServiceAccount(serviceAccountName) + .withServiceAccountName(serviceAccountName) .endSpec() .endTemplate() .build()) @@ -767,7 +767,7 @@ public class KubernetesDeploymentsTest { .withMetadata(objectMeta) .withNewSpec() .withImagePullSecrets(pullSecretOfPod) - .withServiceAccount("nonexistent-sa") + .withServiceAccountName("nonexistent-sa") .endSpec() .endTemplate() .build())