public KubectlExecResult exec(String command) { KubectlExecSpec spec = new KubectlExecSpec(); spec.setCommandLine(command); return exec(spec); }
public KubectlExecResult exec(String command) { KubectlExecSpec spec = new KubectlExecSpec(); spec.setCommandLine(command); return exec(spec); }
private void exec(String command) { KubectlExtension extension = getExtension(); KubectlExecSpec spec = new KubectlExecSpec(); spec.setCommandLine(command); extension.exec(spec); }
private void exec(String command) { KubectlExtension extension = getExtension(); KubectlExecSpec spec = new KubectlExecSpec(); spec.setCommandLine(command); extension.exec(spec); }
public String getToken(String serviceAccount) { KubectlExecSpec spec = new KubectlExecSpec(); spec.setCommandLine(client.getBinName() + " describe serviceaccount " + serviceAccount); KubectlExecResult result = exec(spec); String tokenName = result.getProperty("tokens"); spec.setCommandLine(client.getBinName() + " describe secret " + tokenName); result = exec(spec); return result.getProperty("token"); }
public String getToken(String serviceAccount) { KubectlExecSpec spec = new KubectlExecSpec(); spec.setCommandLine(client.getBinName() + " describe serviceaccount " + serviceAccount); KubectlExecResult result = exec(spec); String tokenName = result.getProperty("tokens"); spec.setCommandLine(client.getBinName() + " describe secret " + tokenName); result = exec(spec); return result.getProperty("token"); }
leftSpec.setCommandLine(commandLine.subList(0, pipeIndex)); leftSpec.setOutputFormat(OutputFormat.TEXT); KubectlExecResult leftResult = exec(leftSpec); rightSpec.setCommandLine(commandLine.subList(pipeIndex + 1, commandLine.size())); rightSpec.setInput(leftResult.getText()); return exec(rightSpec);
leftSpec.setCommandLine(commandLine.subList(0, pipeIndex)); leftSpec.setOutputFormat(OutputFormat.TEXT); KubectlExecResult leftResult = exec(leftSpec); rightSpec.setCommandLine(commandLine.subList(pipeIndex + 1, commandLine.size())); rightSpec.setInput(leftResult.getText()); return exec(rightSpec);