Skip to content

Commit

Permalink
fix(k8s): Apply replacements for parameters before doing the scaffold
Browse files Browse the repository at this point in the history
  • Loading branch information
stmh committed Apr 3, 2022
1 parent db50280 commit 468317f
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/Method/K8sMethod.php
Expand Up @@ -152,7 +152,7 @@ public function alterConfig(ConfigurationService $configuration_service, Node $d
'host' => $data->asArray(),
]);

$data->expandReplacements($replacements, ['podSelector', 'deployments']);
$data->expandReplacements($replacements, ['podSelector', 'deployments', 'parameters']);

$data['kubectlOptionsCombined'] = trim(implode(
' ',
Expand All @@ -165,6 +165,8 @@ public function alterConfig(ConfigurationService $configuration_service, Node $d
*
* @param HostConfig $config
* @param string $arg
* @param array $exclude
*
* @return string
*/
protected function expandCmd(HostConfig $config, $arg = '', $exclude = [])
Expand Down Expand Up @@ -352,11 +354,13 @@ protected function scaffold(HostConfig $host_config, TaskContextInterface $conte
escapeshellarg($projectFolder),
escapeshellarg($projectFolder . "/*")
));

$parameters = $this->expandReplacements($host_config, $context, $kube_config['parameters']);
$scaffolder->scaffold(
$scaffold_url,
$projectFolder,
$context,
$kube_config['parameters'],
$parameters,
$options
);
}
Expand Down

0 comments on commit 468317f

Please sign in to comment.