dcl-ops-lib 6.1.1 → 6.1.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/createFargateTask.js +7 -4
- package/package.json +1 -1
package/createFargateTask.js
CHANGED
|
@@ -243,10 +243,13 @@ function createFargateTask(serviceName, dockerImage, dockerListeningPort, enviro
|
|
|
243
243
|
for (let extraALBMapping of extraALBMappings) {
|
|
244
244
|
const exposedExtra = yield (0, exposePublicService_1.exposePublicService)(`${serviceName}-${extraALBMapping.dockerListeningPort}-${version}`, extraALBMapping.domain, extraALBMapping.dockerListeningPort, extraALBMapping.healthCheck, vpc.id, extraALBMapping.extraExposedServiceOptions);
|
|
245
245
|
targetGroups.push(exposedExtra.targetGroup);
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
246
|
+
// we have to do this check because the port might have been added to the array before if it's included in ECS_PROMETHEUS_EXPORTER_PORT
|
|
247
|
+
if (!extraPortMappings.find((port) => port.hostPort === extraALBMapping.dockerListeningPort)) {
|
|
248
|
+
extraPortMappings.push({
|
|
249
|
+
containerPort: extraALBMapping.dockerListeningPort,
|
|
250
|
+
hostPort: extraALBMapping.dockerListeningPort,
|
|
251
|
+
});
|
|
252
|
+
}
|
|
250
253
|
}
|
|
251
254
|
const portMapping = { containerPort: dockerListeningPort, hostPort: dockerListeningPort };
|
|
252
255
|
// make the service accesible by the ALB
|