replaced value of serviceAccount with serviceAccountName
Signed-off-by: xbaran4 <pbaran@redhat.com>pull/49/head
parent
cea7021d84
commit
8aee7d759e
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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())
|
||||
|
|
|
|||
Loading…
Reference in New Issue