Skip to content

Commit

Permalink
Merge pull request #358 from AmpersandTarski/bug/354-set-imagepullpol…
Browse files Browse the repository at this point in the history
…icy-to-always-in-the-student-prototype-template-yaml

Bug/354 set imagepullpolicy to always in the student prototype template yaml
  • Loading branch information
FranSlot committed Feb 15, 2024
2 parents 580adf0 + 785b324 commit 1c7a82f
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions RAP4/customizations/bootstrap/files/ExecEngineFunctions.php
Original file line number Diff line number Diff line change
Expand Up @@ -360,12 +360,22 @@
*/

$namespace=getenv('RAP_KUBERNETES_NAMESPACE');
$containerImage=getenv('RAP_STUDENT_PROTO_IMAGE');
$suffix=substr($namespace, 3);

$getImageCommand = new Command(
"kubectl get deployment/student-prototype{$suffix} -n {$namespace}",
[ "-o=jsonpath='{\$.spec.template.spec.containers[0].image}'"
],
$ee->getLogger()
);

$getImageCommand->execute();

$containerImage=$getImageCommand->getResponse();

$hostname=getenv('RAP_HOST_NAME');
$hostname="{$userName}.{$hostname}";

$suffix=substr($namespace, 3);

$dbName="rap-db{$suffix}";

Expand Down

0 comments on commit 1c7a82f

Please sign in to comment.