replaced value of serviceAccount with serviceAccountName

Signed-off-by: xbaran4 <pbaran@redhat.com>
pull/49/head
xbaran4 2021-07-27 10:47:25 +02:00
parent cea7021d84
commit 8aee7d759e
2 changed files with 4 additions and 4 deletions

View File

@ -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;

View File

@ -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())