integration-tests/src/test/java/oracle/kubernetes/operator/utils/TestUtils.java
public static ExecResult kubectlexecNoCheck(String podName, String namespace, String scriptPath)
      throws Exception {

    StringBuffer cmdKubectlSh = new StringBuffer("kubectl -n ");
    cmdKubectlSh
        .append(namespace)
        .append(" exec -it ")
        .append(podName)
        .append(" ")
        .append(scriptPath);

    // ExecResult result = ExecCommand.exec("kubectl get pods -n " + namespace);
    // LoggerHelper.getLocal().log(Level.INFO, "get pods before killing the server " + result.stdout() + "\n " +
    // result.stderr());
    LoggerHelper.getLocal().log(Level.INFO, "Command to call kubectl sh file " + cmdKubectlSh);
    return ExecCommand.exec(cmdKubectlSh.toString());
  }
/**
   * kubectl exec with no validation.
   * @param podName pod name
   * @param namespace namespace
   * @param scriptPath script path
   * @return executor
   * @throws Exception on failure
   */
kubectl exec with no validation.
kubectl exec with no validation .
public static ExecResult kubectlexecNoCheck(String podName, String namespace, String scriptPath)
      throws Exception {
    StringBuffer cmdKubectlSh = new StringBuffer("kubectl -n ");
    cmdKubectlSh
        .append(namespace)
        .append(" exec -it ")
        .append(podName)
        .append(" ")
        .append(scriptPath);
    LoggerHelper.getLocal().log(Level.INFO, "Command to call kubectl sh file " + cmdKubectlSh);
    return ExecCommand.exec(cmdKubectlSh.toString());
  }
public static ExecResult kubectlexecNoCheck ( String podName , String namespace , String scriptPath ) throws Exception { StringBuffer cmdKubectlSh = new StringBuffer ( "kubectl -n " ) ; cmdKubectlSh . append ( namespace ) . append ( " exec -it " ) . append ( podName ) . append ( " " ) . append ( scriptPath ) ; LoggerHelper . getLocal ( ) . log ( Level . INFO , "Command to call kubectl sh file " + cmdKubectlSh ) ; return ExecCommand . exec ( cmdKubectlSh . toString ( ) ) ; }
kubectl exec with no validation.
kubectl exec with no validation .
// ExecResult result = ExecCommand.exec("kubectl get pods -n " + namespace); // LoggerHelper.getLocal().log(Level.INFO, "get pods before killing the server " + result.stdout() + "\n " + // result.stderr());