[INFRA-19] | Piyush | Change kubectl command to use cluster context with each request
This commit is contained in:
@@ -87,8 +87,8 @@ public class KubernetesManifestService {
|
||||
private void applyManifest(Manifest manifest, String kManifestPath, String manifestObject) {
|
||||
String clusterName = fetchClusterName(manifest);
|
||||
String command = String
|
||||
.format("kubectl config use-context %s ; kubectl apply -f %s/*%s.json",
|
||||
clusterName, kManifestPath, manifestObject);
|
||||
.format("kubectl apply -f %s/*%s.json --context=%s", kManifestPath, manifestObject,
|
||||
clusterName);
|
||||
log.info("Executing command {}", command);
|
||||
|
||||
if (BashExecute.execute(command) > 0) {
|
||||
|
||||
Reference in New Issue
Block a user