UNPKG

@axway/axway-central-cli

Version:

Manage APIs, services and publish to the Amplify Marketplace

26 lines (25 loc) 2.24 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.helmInstallInfo = exports.helmImageSecretInfo = void 0; var _chalk = _interopRequireDefault(require("chalk")); function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; } const helmImageSecretInfo = async namespace => { let dockerSecretCmd = `kubectl create secret docker-registry <image-pull-secret-name> --namespace ${namespace} \\`; dockerSecretCmd += `\n --docker-server=docker.repository.axway.com \\`; dockerSecretCmd += `\n --docker-username=<client_id> \\`; dockerSecretCmd += `\n --docker-password=<client_secret>`; console.log('\nTo setup docker image secret for the pulling the agent docker images, run the following command:', _chalk.default.cyan(`\n${dockerSecretCmd}`), _chalk.default.cyan(`\n`), _chalk.default.white(`\n* client_id - service account id for your Amplify Platform organization`), _chalk.default.white(`\n* client_secret - service account secret for your Amplify Platform organization`), _chalk.default.white(`\n* image-pull-secret - Kubernetes secret name with docker config to pull images`)); }; exports.helmImageSecretInfo = helmImageSecretInfo; const helmInstallInfo = async (agentType, namespace, agentInfo) => { let helmInstallCmd = ""; agentInfo.forEach(function (entry) { helmInstallCmd += `helm upgrade --install --namespace ${namespace} ${entry.helmReleaseName} ${entry.helmChartName} \\`; helmInstallCmd += `\n -f ${entry.overrideFileName} \\`; helmInstallCmd += `\n ${entry.imageSecretOverrides}\n`; }); console.log(`\nTo complete the ${agentType} Agent installation run the following commands:`, _chalk.default.cyan('\nhelm repo add axway https://helm.repository.axway.com --username=<client_id> --password=<client_secret>'), _chalk.default.cyan(`\nhelm repo update\n${helmInstallCmd}`), _chalk.default.white(`\n* client_id - service account id for your Amplify Platform organization`), _chalk.default.white(`\n* client_secret - service account secret for your Amplify Platform organization`), _chalk.default.white(`\n* image-pull-secret - Kubernetes secret name with docker config to pull images`)); }; exports.helmInstallInfo = helmInstallInfo;