changed spn method to service-principal
This commit is contained in:
@ -21,8 +21,8 @@ function getArcKubeconfig() {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
try {
|
||||
let method = core.getInput('method');
|
||||
if (method != 'service-account' && method != 'SPN') {
|
||||
throw Error("Supported methods for arc cluster are 'service-account' and 'SPN'.");
|
||||
if (method != 'service-account' && method != 'service-principal') {
|
||||
throw Error("Supported methods for arc cluster are 'service-account' and 'service-principal'.");
|
||||
}
|
||||
let resourceGroupName = core.getInput('resource-group');
|
||||
let clusterName = core.getInput('cluster-name');
|
||||
@ -49,7 +49,7 @@ function getArcKubeconfig() {
|
||||
if (!saToken) {
|
||||
throw Error("'saToken' is not passed for 'service-account' method.");
|
||||
}
|
||||
console.log('using service account method for authenticating to arc cluster.');
|
||||
console.log("using 'service-account' method for authenticating to arc cluster.");
|
||||
const proc = child_process_1.spawn(azPath, ['connectedk8s', 'proxy', '-n', clusterName, '-g', resourceGroupName, '-f', kubeconfigPath, '--token', saToken], {
|
||||
detached: true,
|
||||
stdio: 'ignore'
|
||||
@ -57,7 +57,7 @@ function getArcKubeconfig() {
|
||||
proc.unref();
|
||||
}
|
||||
else {
|
||||
console.log('using spn method for authenticating to arc cluster.');
|
||||
console.log("using 'service-principal' method for authenticating to arc cluster.");
|
||||
const proc = child_process_1.spawn(azPath, ['connectedk8s', 'proxy', '-n', clusterName, '-g', resourceGroupName, '-f', kubeconfigPath], {
|
||||
detached: true,
|
||||
stdio: 'ignore'
|
||||
|
Reference in New Issue
Block a user