@axway/axway-central-cli 2.12.0 → 2.12.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/commands/install/agents.js +1 -1
- package/dist/commands/install/helpers/templates/istioTemplates.js +94 -83
- package/dist/commands/install/istioAgents.js +46 -74
- package/dist/commands/install/platform.js +3 -5
- package/dist/common/resultsRenderers.js +2 -0
- package/dist/common/types.js +8 -3
- package/package.json +1 -1
|
@@ -179,7 +179,7 @@ const agents = {
|
|
|
179
179
|
} // create backup
|
|
180
180
|
|
|
181
181
|
|
|
182
|
-
createConfigBackup(agentInstallFlow.ConfigFiles, agentInstallFlow.GatewayDisplay); // run any install preprocess steps
|
|
182
|
+
await createConfigBackup(agentInstallFlow.ConfigFiles, agentInstallFlow.GatewayDisplay); // run any install preprocess steps
|
|
183
183
|
|
|
184
184
|
if (agentInstallFlow.InstallPreprocess) installConfig = await agentInstallFlow.InstallPreprocess(installConfig); // finalize Platform setup
|
|
185
185
|
|
|
@@ -38,89 +38,100 @@ exports.IstioValues = IstioValues;
|
|
|
38
38
|
|
|
39
39
|
const istioAgentsTemplate = () => {
|
|
40
40
|
return `---
|
|
41
|
-
global:
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
#
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
41
|
+
global:
|
|
42
|
+
# Amplify Central config
|
|
43
|
+
central:
|
|
44
|
+
url: {{centralConfig.scheme}}://{{centralConfig.host}}:443
|
|
45
|
+
clientTimeout: 10s
|
|
46
|
+
envID: {{centralConfig.environmentId}}
|
|
47
|
+
envName: "{{centralConfig.environment}}"
|
|
48
|
+
tenantID: "{{centralConfig.orgId}}"
|
|
49
|
+
grpcEnabled: "true"
|
|
50
|
+
marketplaceProvisioningEnabled: "true"
|
|
51
|
+
auth:
|
|
52
|
+
baseUrl: "{{centralConfig.authUrl}}"
|
|
53
|
+
clientTimeout: 10s
|
|
54
|
+
|
|
55
|
+
# Config for creating the K8S Secret that holds the Amplify Platform service account details as part of the helm chart deployment
|
|
56
|
+
secret:
|
|
57
|
+
# Set to true, and provide the following values to enable the creation of the K8S Secret
|
|
58
|
+
create: false
|
|
59
|
+
name: ""
|
|
60
|
+
password: ""
|
|
61
|
+
publicKey: ""
|
|
62
|
+
privateKey: ""
|
|
63
|
+
|
|
64
|
+
# Traceability agent config
|
|
65
|
+
als:
|
|
66
|
+
enabled: {{istioAgentValues.alsEnabled}}
|
|
67
|
+
# Header publishing mode. Set to default or verbose.
|
|
68
|
+
mode: {{istioAgentValues.alsMode}}
|
|
69
|
+
# Name of the k8scluster
|
|
70
|
+
clusterName: {{istioAgentValues.clusterName}}
|
|
71
|
+
# Name of the traceability agent resource
|
|
72
|
+
agentName: {{centralConfig.taAgentName}}
|
|
73
|
+
# Amplify Central Deployment (prod, prod-eu)
|
|
74
|
+
apicDeployment: {{centralConfig.deployment}}
|
|
75
|
+
# Amplify Platform service account client ID
|
|
76
|
+
clientID: {{centralConfig.dosaAccount.clientId}}
|
|
77
|
+
# Amplify ingestion service endpoint
|
|
78
|
+
condorUrl: {{traceabilityConfig.host}}
|
|
79
|
+
condorSslVerification: full
|
|
80
|
+
# Sampling config
|
|
81
|
+
sampling:
|
|
82
|
+
percentage: {{traceabilityConfig.samplingPercentage}}
|
|
83
|
+
per_api: true
|
|
84
|
+
reportAllErrors: {{traceabilityConfig.samplingReportAllErrors}}
|
|
85
|
+
# Name of the secret containing the public & private keys used by the provided service account client ID
|
|
86
|
+
keysSecretName: {{istioAgentValues.keysSecretName}}
|
|
87
|
+
publishHeaders: true
|
|
88
|
+
# List of namespaces where the ALS Envoy filters should be applied
|
|
89
|
+
envoyFilterNamespaces:
|
|
90
|
+
- {{istioAgentValues.envoyFilterNamespace}}
|
|
91
|
+
|
|
92
|
+
# Discovery agent config
|
|
93
|
+
da:
|
|
94
|
+
enabled: {{istioAgentValues.discoveryEnabled}}
|
|
95
|
+
# Name of the discovery agent resource
|
|
96
|
+
agentName: {{centralConfig.daAgentName}}
|
|
97
|
+
# Amplify Platform service account client ID
|
|
98
|
+
clientID: {{centralConfig.dosaAccount.clientId}}
|
|
99
|
+
# Name of the secret containing the public & private keys used by the provided service account client ID
|
|
100
|
+
keysSecretName: {{istioAgentValues.keysSecretName}}
|
|
101
|
+
# Name of the K8SCluster the agent is connected to
|
|
102
|
+
clusterName: {{istioAgentValues.clusterName}}
|
|
103
|
+
# Polling interval for K8S events
|
|
104
|
+
pollInterval: "60s"
|
|
105
|
+
# Resource discovery config
|
|
106
|
+
discovery:
|
|
107
|
+
# List of http endpoints to discover api specs from
|
|
108
|
+
specEndpoints:
|
|
109
|
+
- /apidoc/swagger.json
|
|
110
|
+
- /swagger.json
|
|
111
|
+
- /api/v1/docs
|
|
112
|
+
- /apis/docs
|
|
113
|
+
virtualService:
|
|
114
|
+
# List of namespaces that will be used by agent to discover VirtualService resources
|
|
115
|
+
namespaces:
|
|
116
|
+
{{#each istioAgentValues.discoveryNamespaces}}
|
|
117
|
+
- {{this}}
|
|
118
|
+
{{/each}}
|
|
119
|
+
# List of labels that will be used by agent to filter VirtualService resources
|
|
120
|
+
labels: []
|
|
121
|
+
requestAuth:
|
|
122
|
+
# List of namespaces that will be used by agent to discover RequestAuthentication resources
|
|
123
|
+
namespaces:
|
|
124
|
+
{{#each istioAgentValues.discoveryNamespaces}}
|
|
125
|
+
- {{this}}
|
|
126
|
+
{{/each}}
|
|
127
|
+
# List of labels that will be used by agent to filter RequestAuthentication resources
|
|
128
|
+
labels: []
|
|
129
|
+
# IDP Provider config
|
|
130
|
+
idpProviders:
|
|
131
|
+
|
|
132
|
+
# Deploy the chart with an optional demo service
|
|
133
|
+
list:
|
|
134
|
+
enabled: {{istioAgentValues.demoSvcEnabled}}`;
|
|
124
135
|
};
|
|
125
136
|
/**
|
|
126
137
|
* @description Generates the override file to install Istio with settings to connect to the Istio Traceability Agent.
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.testables = exports.setupKubernetes = exports.setupIstio = exports.istioSystemNs = exports.istioPrompts = exports.installPreprocess = exports.getCondorHost = exports.
|
|
6
|
+
exports.testables = exports.setupKubernetes = exports.setupIstio = exports.istioSystemNs = exports.istioPrompts = exports.installPreprocess = exports.getCondorHost = exports.gatewayConnectivity = exports.gatewayCertSecret = exports.defaultLogFiles = exports.createIstioOverride = exports.createIstioGatewayCert = exports.createHybridOverride = exports.createEnvResources = exports.completeInstall = exports.askIstioSecret = exports.askConfigType = exports.askBundleType = exports.amplifyAgentsNs = exports.amplifyAgentsCredsSecret = exports.ampcDemoNs = exports.IstioInstallMethods = exports.ConfigFiles = exports.AlsMode = void 0;
|
|
7
7
|
|
|
8
8
|
var _chalk = _interopRequireDefault(require("chalk"));
|
|
9
9
|
|
|
@@ -68,14 +68,15 @@ const istioPrompts = {
|
|
|
68
68
|
enterIstioSecret: 'Enter the name of the secret to store the Istio gateway certificate',
|
|
69
69
|
generateCertPrompt: 'Would you like to generate a self signed certificate, or provide your own?',
|
|
70
70
|
enterDomainName: 'Enter the public domain name for your cluster (FQDN), if available. (leave blank to skip)',
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
//
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
71
|
+
enterCertPath: 'Enter the file path to the certificate',
|
|
72
|
+
existingIstio: 'Use existing Istio installation?',
|
|
73
|
+
askEnvoyFilterNamespace: 'Select the namespace where you would like the ALS Envoy Filters to be applied',
|
|
74
|
+
istioProfile: 'Select the Istio profile to use',
|
|
75
|
+
// agents
|
|
76
|
+
meshAgentNamespace: 'Enter the namespace to use for the Amplify Istio Agents',
|
|
77
|
+
vsNamespaces: 'Select the namespace where the agent should discover Virtual Service resources',
|
|
78
|
+
alsMode: 'Select Traceability Agent HTTP header publishing mode',
|
|
79
|
+
demoService: 'Do you want to deploy the optional demo application?'
|
|
79
80
|
};
|
|
80
81
|
exports.istioPrompts = istioPrompts;
|
|
81
82
|
|
|
@@ -117,7 +118,7 @@ https://docs.axway.com/bundle/amplify-central/page/docs/connect_manage_environ/m
|
|
|
117
118
|
istioValues.istioAgentValues.alsEnabled = installConfig.switches.isTaEnabled;
|
|
118
119
|
istioValues.istioAgentValues.discoveryEnabled = installConfig.switches.isDaEnabled;
|
|
119
120
|
const hybridOverrides = await setupKubernetes(istioValues, apiServerClient, defsManager);
|
|
120
|
-
hybridOverrides.envoyFilterNamespace = istioOverrides.
|
|
121
|
+
hybridOverrides.envoyFilterNamespace = istioOverrides.envoyFilterNamespace;
|
|
121
122
|
istioOverrides.alsNamespace = hybridOverrides.namespace.name;
|
|
122
123
|
istioOverrides.enableAls = hybridOverrides.alsMode === AlsMode.Verbose;
|
|
123
124
|
istioOverrides.enableTracing = hybridOverrides.alsEnabled;
|
|
@@ -128,12 +129,12 @@ https://docs.axway.com/bundle/amplify-central/page/docs/connect_manage_environ/m
|
|
|
128
129
|
exports.gatewayConnectivity = gatewayConnectivity;
|
|
129
130
|
|
|
130
131
|
const askUseExistingIstio = async () => (0, _basicPrompts.askList)({
|
|
131
|
-
msg: istioPrompts.
|
|
132
|
+
msg: istioPrompts.existingIstio,
|
|
132
133
|
choices: _types.YesNoChoices
|
|
133
134
|
});
|
|
134
135
|
|
|
135
|
-
const
|
|
136
|
-
msg: istioPrompts.
|
|
136
|
+
const askEnvoyFilterNamespace = async namespaces => (0, _basicPrompts.askList)({
|
|
137
|
+
msg: istioPrompts.askEnvoyFilterNamespace,
|
|
137
138
|
choices: namespaces.data
|
|
138
139
|
});
|
|
139
140
|
|
|
@@ -172,7 +173,7 @@ const askCertificateOption = async () => (0, _basicPrompts.askList)({
|
|
|
172
173
|
});
|
|
173
174
|
|
|
174
175
|
const askIstioProfile = async () => (0, _basicPrompts.askList)({
|
|
175
|
-
msg: istioPrompts.
|
|
176
|
+
msg: istioPrompts.istioProfile,
|
|
176
177
|
choices: _types.IstioProfileChoices
|
|
177
178
|
}); //Setup Overrides
|
|
178
179
|
|
|
@@ -185,8 +186,8 @@ const setupIstio = async istioValues => {
|
|
|
185
186
|
if (useExistingIstio === _types.YesNo.Yes) {
|
|
186
187
|
const namespaces = await _Kubectl.kubectl.get('namespaces');
|
|
187
188
|
if (namespaces.error) throw new Error(namespaces.error);
|
|
188
|
-
const
|
|
189
|
-
istioInstallValues.
|
|
189
|
+
const filterNamespace = await askEnvoyFilterNamespace(namespaces);
|
|
190
|
+
istioInstallValues.envoyFilterNamespace = filterNamespace;
|
|
190
191
|
istioInstallValues.isNewInstall = false;
|
|
191
192
|
return istioInstallValues;
|
|
192
193
|
}
|
|
@@ -226,7 +227,7 @@ const completeIstio = async istioOverrides => {
|
|
|
226
227
|
await _Kubectl.kubectl.create('ns', istioSystemNs);
|
|
227
228
|
}
|
|
228
229
|
|
|
229
|
-
await createIstioGatewayCert(istioOverrides.
|
|
230
|
+
await createIstioGatewayCert(istioOverrides.envoyFilterNamespace, istioOverrides);
|
|
230
231
|
}
|
|
231
232
|
}; // Above this line is Istio. Below is Kubernetes
|
|
232
233
|
// Questions for the kubernetes configuration
|
|
@@ -234,7 +235,7 @@ const completeIstio = async istioOverrides => {
|
|
|
234
235
|
|
|
235
236
|
const askALSMode = async () => {
|
|
236
237
|
return (0, _basicPrompts.askList)({
|
|
237
|
-
msg: istioPrompts.
|
|
238
|
+
msg: istioPrompts.alsMode,
|
|
238
239
|
choices: [{
|
|
239
240
|
name: AlsMode.Default.charAt(0).toUpperCase() + AlsMode.Default.slice(1),
|
|
240
241
|
value: AlsMode.Default
|
|
@@ -245,9 +246,18 @@ const askALSMode = async () => {
|
|
|
245
246
|
});
|
|
246
247
|
};
|
|
247
248
|
|
|
249
|
+
const askVsNamespacePrompt = async () => {
|
|
250
|
+
const namespaces = await _Kubectl.kubectl.get('ns');
|
|
251
|
+
if (namespaces.error) throw Error(namespaces.error);
|
|
252
|
+
return await (0, _basicPrompts.askList)({
|
|
253
|
+
msg: istioPrompts.vsNamespaces,
|
|
254
|
+
choices: namespaces.data
|
|
255
|
+
});
|
|
256
|
+
};
|
|
257
|
+
|
|
248
258
|
const askEnableDemoSvc = async () => {
|
|
249
259
|
const res = (0, _basicPrompts.askList)({
|
|
250
|
-
msg: istioPrompts.
|
|
260
|
+
msg: istioPrompts.demoService,
|
|
251
261
|
choices: _types.YesNoChoices
|
|
252
262
|
});
|
|
253
263
|
return (await res) === _types.YesNo.Yes ? true : false;
|
|
@@ -263,8 +273,18 @@ const setupKubernetes = async (istioValues, apiServerClient, defsManager) => {
|
|
|
263
273
|
istioAgentValues.alsMode = await askALSMode();
|
|
264
274
|
}
|
|
265
275
|
|
|
266
|
-
|
|
267
|
-
|
|
276
|
+
if (istioAgentValues.discoveryEnabled) {
|
|
277
|
+
const ns = await askVsNamespacePrompt();
|
|
278
|
+
istioAgentValues.discoveryNamespaces = [ns];
|
|
279
|
+
}
|
|
280
|
+
|
|
281
|
+
istioAgentValues.namespace = await (0, _inputs.askNamespace)(istioPrompts.meshAgentNamespace, amplifyAgentsNs);
|
|
282
|
+
istioAgentValues.demoSvcEnabled = await askEnableDemoSvc();
|
|
283
|
+
|
|
284
|
+
if (istioAgentValues.discoveryEnabled && istioAgentValues.demoSvcEnabled && !istioAgentValues.discoveryNamespaces.includes(ampcDemoNs)) {
|
|
285
|
+
istioAgentValues.discoveryNamespaces.push(ampcDemoNs);
|
|
286
|
+
} // set keySecretName
|
|
287
|
+
|
|
268
288
|
|
|
269
289
|
istioAgentValues.keysSecretName = helpers.amplifyAgentsKeysSecret;
|
|
270
290
|
istioAgentValues.clusterName = await (0, helpers.askK8sClusterName)(apiServerClient, defsManager);
|
|
@@ -288,7 +308,7 @@ const createIstioGatewayCert = async (namespace, istioOverrides) => {
|
|
|
288
308
|
msg: helpers.enterPublicKeyPath
|
|
289
309
|
});
|
|
290
310
|
cert = await (0, _basicPrompts.askInput)({
|
|
291
|
-
msg: istioPrompts.
|
|
311
|
+
msg: istioPrompts.enterCertPath
|
|
292
312
|
});
|
|
293
313
|
}
|
|
294
314
|
|
|
@@ -344,60 +364,13 @@ const createIstioOverride = overrides => {
|
|
|
344
364
|
|
|
345
365
|
exports.createIstioOverride = createIstioOverride;
|
|
346
366
|
|
|
347
|
-
const createEnvResources = async (client, defs,
|
|
348
|
-
// Create the
|
|
349
|
-
|
|
350
|
-
await helpers.createByResourceType(client, defs, meshName, 'Mesh', 'mesh', {}, ''); // Create the mesh K8SCluster resource
|
|
351
|
-
|
|
352
|
-
await helpers.createByResourceType(client, defs, clusterName, 'K8SCluster', 'k8sc', {
|
|
353
|
-
mesh: meshName
|
|
354
|
-
}, ''); // Create the mesh MeshDiscovery resource
|
|
355
|
-
|
|
356
|
-
const meshDiscoveryName = `meshd.${clusterName}`;
|
|
357
|
-
await helpers.createByResourceType(client, defs, meshDiscoveryName, 'MeshDiscovery', 'meshd', {
|
|
358
|
-
environmentRef: envRef
|
|
359
|
-
}, meshName);
|
|
367
|
+
const createEnvResources = async (client, defs, clusterName) => {
|
|
368
|
+
// Create the mesh K8SCluster resource
|
|
369
|
+
await helpers.createByResourceType(client, defs, clusterName, 'K8SCluster', 'k8sc', {}, '');
|
|
360
370
|
};
|
|
361
371
|
|
|
362
372
|
exports.createEnvResources = createEnvResources;
|
|
363
373
|
|
|
364
|
-
const createDiscoveryResources = async (client, defs, scopeName) => {
|
|
365
|
-
await helpers.createByResourceType(client, defs, `specdisc.${scopeName}`, 'SpecDiscovery', 'specdisc', generateK8SResourceSpec(ampcDemoNs), scopeName);
|
|
366
|
-
const resdiscPod = `pod.${scopeName}`;
|
|
367
|
-
await helpers.createByResourceType(client, defs, resdiscPod, 'ResourceDiscovery', 'resdisc', generateSpecDiscoverySpec(ampcDemoNs, 'Pod'), scopeName);
|
|
368
|
-
const resdiscService = `service.${scopeName}`;
|
|
369
|
-
await helpers.createByResourceType(client, defs, resdiscService, 'ResourceDiscovery', 'resdisc', generateSpecDiscoverySpec(ampcDemoNs, 'Service'), scopeName);
|
|
370
|
-
};
|
|
371
|
-
|
|
372
|
-
exports.createDiscoveryResources = createDiscoveryResources;
|
|
373
|
-
|
|
374
|
-
const generateK8SResourceSpec = namespace => ({
|
|
375
|
-
namespaceFilter: {
|
|
376
|
-
names: [namespace]
|
|
377
|
-
},
|
|
378
|
-
targets: {
|
|
379
|
-
exactPaths: [{
|
|
380
|
-
path: '/apidoc/swagger.json',
|
|
381
|
-
headers: {
|
|
382
|
-
'Content-Type': 'application/json'
|
|
383
|
-
}
|
|
384
|
-
}]
|
|
385
|
-
}
|
|
386
|
-
});
|
|
387
|
-
|
|
388
|
-
exports.generateK8SResourceSpec = generateK8SResourceSpec;
|
|
389
|
-
|
|
390
|
-
const generateSpecDiscoverySpec = (namespace, kind) => ({
|
|
391
|
-
kind: kind,
|
|
392
|
-
group: '',
|
|
393
|
-
version: 'v1',
|
|
394
|
-
namespaceFilter: {
|
|
395
|
-
names: [namespace]
|
|
396
|
-
}
|
|
397
|
-
});
|
|
398
|
-
|
|
399
|
-
exports.generateSpecDiscoverySpec = generateSpecDiscoverySpec;
|
|
400
|
-
|
|
401
374
|
const createHybridOverride = overrides => {
|
|
402
375
|
const overrideFileName = ConfigFiles.HybridOverrideFile;
|
|
403
376
|
(0, _utils.writeTemplates)(overrideFileName, overrides, helpers.istioAgentsTemplate);
|
|
@@ -442,8 +415,7 @@ const completeInstall = async (installConfig, apiServerClient, defsManager) => {
|
|
|
442
415
|
});
|
|
443
416
|
|
|
444
417
|
if (installConfig.switches.isDaEnabled) {
|
|
445
|
-
await createEnvResources(apiServerClient, defsManager, istioValues.
|
|
446
|
-
await createDiscoveryResources(apiServerClient, defsManager, istioValues.istioAgentValues.clusterName);
|
|
418
|
+
await createEnvResources(apiServerClient, defsManager, istioValues.istioAgentValues.clusterName);
|
|
447
419
|
}
|
|
448
420
|
|
|
449
421
|
console.log('Generating the configuration file(s)...');
|
|
@@ -115,7 +115,7 @@ const getCentralConfig = async (apiServerClient, platformClient, defsManager, ap
|
|
|
115
115
|
|
|
116
116
|
centralConfig.daAgentName = ''; // Istio will not prompt for agent name. Remove when that ability exists
|
|
117
117
|
|
|
118
|
-
if (installConfig.switches.isDaEnabled
|
|
118
|
+
if (installConfig.switches.isDaEnabled) {
|
|
119
119
|
centralConfig.daAgentName = await helpers.askAgentName(apiServerClient, defsManager, _types.AgentTypes.da, centralConfig.ampcEnvInfo.name);
|
|
120
120
|
} // Get the TA Agent name
|
|
121
121
|
|
|
@@ -150,10 +150,8 @@ const finalizeCentralInstall = async (apiServerClient, platformClient, defsManag
|
|
|
150
150
|
production: installConfig.centralConfig.production
|
|
151
151
|
}) : installConfig.centralConfig.ampcEnvInfo.name; // Create DiscoveryAgent Resource unless gateway type is Istio. This can be removed when this is available for Istio
|
|
152
152
|
|
|
153
|
-
if (installConfig.
|
|
154
|
-
|
|
155
|
-
installConfig.centralConfig.daAgentName = await helpers.createNewAgentResource(apiServerClient, defsManager, installConfig.centralConfig.environment, _types.GatewayTypeToDataPlane[installConfig.gatewayType], _types.AgentResourceKind.da, _types.AgentTypes.da, installConfig.centralConfig.ampcTeamName, installConfig.centralConfig.daAgentName);
|
|
156
|
-
}
|
|
153
|
+
if (installConfig.centralConfig.daAgentName != '') {
|
|
154
|
+
installConfig.centralConfig.daAgentName = await helpers.createNewAgentResource(apiServerClient, defsManager, installConfig.centralConfig.environment, _types.GatewayTypeToDataPlane[installConfig.gatewayType], _types.AgentResourceKind.da, _types.AgentTypes.da, installConfig.centralConfig.ampcTeamName, installConfig.centralConfig.daAgentName);
|
|
157
155
|
} // Create TraceabilityAgent Resource
|
|
158
156
|
|
|
159
157
|
|
|
@@ -79,6 +79,8 @@ const parseAsTable = (response, columns) => {
|
|
|
79
79
|
value = (0, _dayjs.default)(value).fromNow();
|
|
80
80
|
} else if (col.type === 'teamGuid' && !value) {
|
|
81
81
|
value = _chalk.default.gray('---');
|
|
82
|
+
} else if (value && value.length > _types.MAX_TABLE_STRING_LENGTH + 3) {
|
|
83
|
+
value = value.substring(0, _types.MAX_TABLE_STRING_LENGTH / 2) + '...' + value.substring(value.length - _types.MAX_TABLE_STRING_LENGTH / 2);
|
|
82
84
|
}
|
|
83
85
|
|
|
84
86
|
t.cell(col.name.toUpperCase(), value);
|
package/dist/common/types.js
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.docsUrl = exports.commonCmdArgsDescription = exports.cliVersionHeader = exports.YesNoChoices = exports.YesNo = exports.WAIT_TIMEOUT = exports.TrueFalseChoices = exports.TrueFalse = exports.TraceabilityConfig = exports.SingleEntryPointUrls = exports.Regions = exports.PublicRepoUrl = exports.PublicDockerRepoBaseUrl = exports.Protocol = exports.ProdBaseUrls = exports.Platforms = exports.OutputTypes = exports.MAX_FILE_SIZE = exports.MAX_CACHE_FILE_SIZE = exports.LoggingSource = exports.KindTypes = exports.Kind = exports.IstioProfileChoices = exports.IstioInstallValues = exports.IstioAgentValues = exports.IngestionProtocolToHosts = exports.IngestionProtocol = exports.IngestionHostsHTTP = exports.IngestionHosts = exports.IngestionHTTPHosts = exports.GatewayTypes = exports.GatewayTypeToDataPlane = exports.GatewayMode = exports.EnvironmentConfigInfo = exports.DosaAccount = exports.DataPlaneNames = exports.DOSAConfigInfo = exports.ConfigTypes = exports.CloudFormationConfig = exports.Certificate = exports.CentralAgentConfig = exports.CACHE_FILE_TTL_MILLISECONDS = exports.BundleType = exports.BasePaths = exports.AuthUrls = exports.AgentTypes = exports.AgentResourceKind = exports.AgentNames = exports.AgentInstallSwitches = exports.AgentInstallConfig = exports.AgentConfigTypes = exports.APICDeployments = exports.ABORT_TIMEOUT = void 0;
|
|
6
|
+
exports.docsUrl = exports.commonCmdArgsDescription = exports.cliVersionHeader = exports.YesNoChoices = exports.YesNo = exports.WAIT_TIMEOUT = exports.TrueFalseChoices = exports.TrueFalse = exports.TraceabilityConfig = exports.SingleEntryPointUrls = exports.Regions = exports.PublicRepoUrl = exports.PublicDockerRepoBaseUrl = exports.Protocol = exports.ProdBaseUrls = exports.Platforms = exports.OutputTypes = exports.MAX_TABLE_STRING_LENGTH = exports.MAX_FILE_SIZE = exports.MAX_CACHE_FILE_SIZE = exports.LoggingSource = exports.KindTypes = exports.Kind = exports.IstioProfileChoices = exports.IstioInstallValues = exports.IstioAgentValues = exports.IngestionProtocolToHosts = exports.IngestionProtocol = exports.IngestionHostsHTTP = exports.IngestionHosts = exports.IngestionHTTPHosts = exports.GatewayTypes = exports.GatewayTypeToDataPlane = exports.GatewayMode = exports.EnvironmentConfigInfo = exports.DosaAccount = exports.DataPlaneNames = exports.DOSAConfigInfo = exports.ConfigTypes = exports.CloudFormationConfig = exports.Certificate = exports.CentralAgentConfig = exports.CACHE_FILE_TTL_MILLISECONDS = exports.BundleType = exports.BasePaths = exports.AuthUrls = exports.AgentTypes = exports.AgentResourceKind = exports.AgentNames = exports.AgentInstallSwitches = exports.AgentInstallConfig = exports.AgentConfigTypes = exports.APICDeployments = exports.ABORT_TIMEOUT = void 0;
|
|
7
7
|
|
|
8
8
|
var _dataService = require("./dataService");
|
|
9
9
|
|
|
@@ -15,6 +15,8 @@ const docsUrl = 'https://docs.axway.com/bundle/amplify-central/page/docs/index.h
|
|
|
15
15
|
exports.docsUrl = docsUrl;
|
|
16
16
|
const ABORT_TIMEOUT = process.env.NODE_ENV === 'test' ? 1e3 : process.env.DEBUG || process.env.SNOOPLOGG ? 1e9 : 30e3;
|
|
17
17
|
exports.ABORT_TIMEOUT = ABORT_TIMEOUT;
|
|
18
|
+
const MAX_TABLE_STRING_LENGTH = 50;
|
|
19
|
+
exports.MAX_TABLE_STRING_LENGTH = MAX_TABLE_STRING_LENGTH;
|
|
18
20
|
const MAX_FILE_SIZE = process.env.NODE_ENV === 'test' ? 1e5 : 20 * 1024 * 1024;
|
|
19
21
|
exports.MAX_FILE_SIZE = MAX_FILE_SIZE;
|
|
20
22
|
const MAX_CACHE_FILE_SIZE = 5 * 1024 * 1024; // 12 hours
|
|
@@ -698,6 +700,8 @@ class IstioAgentValues {
|
|
|
698
700
|
|
|
699
701
|
_defineProperty(this, "namespace", void 0);
|
|
700
702
|
|
|
703
|
+
_defineProperty(this, "discoveryNamespaces", void 0);
|
|
704
|
+
|
|
701
705
|
_defineProperty(this, "demoSvcEnabled", void 0);
|
|
702
706
|
|
|
703
707
|
this.alsEnabled = false;
|
|
@@ -713,6 +717,7 @@ class IstioAgentValues {
|
|
|
713
717
|
isNew: false
|
|
714
718
|
};
|
|
715
719
|
this.demoSvcEnabled = false;
|
|
720
|
+
this.discoveryNamespaces = [];
|
|
716
721
|
}
|
|
717
722
|
|
|
718
723
|
}
|
|
@@ -730,7 +735,7 @@ class IstioInstallValues {
|
|
|
730
735
|
|
|
731
736
|
_defineProperty(this, "enableTracing", void 0);
|
|
732
737
|
|
|
733
|
-
_defineProperty(this, "
|
|
738
|
+
_defineProperty(this, "envoyFilterNamespace", void 0);
|
|
734
739
|
|
|
735
740
|
_defineProperty(this, "host", void 0);
|
|
736
741
|
|
|
@@ -750,7 +755,7 @@ class IstioInstallValues {
|
|
|
750
755
|
this.certificateOption = '';
|
|
751
756
|
this.enableAls = false;
|
|
752
757
|
this.enableTracing = false;
|
|
753
|
-
this.
|
|
758
|
+
this.envoyFilterNamespace = 'istio-system';
|
|
754
759
|
this.host = '';
|
|
755
760
|
this.isNewInstall = true;
|
|
756
761
|
this.port = 8080;
|