dcl-ops-lib 6.1.1 → 6.2.0

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.
@@ -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
- extraPortMappings.push({
247
- containerPort: extraALBMapping.dockerListeningPort,
248
- hostPort: extraALBMapping.dockerListeningPort,
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
@@ -286,8 +289,8 @@ function createFargateTask(serviceName, dockerImage, dockerListeningPort, enviro
286
289
  }
287
290
  exports.createFargateTask = createFargateTask;
288
291
  function createInternalService(config) {
289
- var _a, _b;
290
292
  return __awaiter(this, void 0, void 0, function* () {
293
+ var _a, _b;
291
294
  let { serviceName, cluster, securityGroups, ignoreServiceDiscovery, serviceDiscoveryPort, desiredCount, executionRole, taskRole, containerInfo, assignPublicIp, dependsOn, volumes, team, targetGroups, runtimePlatform } = config;
292
295
  if (!desiredCount)
293
296
  desiredCount = 1;
@@ -330,7 +333,7 @@ function createInternalService(config) {
330
333
  }, { dependsOn: [logGroup] });
331
334
  return new aws.ecs.Service((0, stack_1.getStackScopedName)(serviceName), {
332
335
  cluster: yield getClusterInstance(cluster),
333
- tags: { ServiceName: serviceName, StackId: (0, stack_1.getStackId)() },
336
+ tags: { ServiceName: serviceName, StackId: (0, stack_1.getStackId)(), Team: team },
334
337
  networkConfiguration: {
335
338
  subnets: yield (0, network_1.getPrivateSubnetIds)(),
336
339
  securityGroups: securityGroups,
@@ -38,8 +38,8 @@ function isUnProxiedDomain(v) {
38
38
  * @param domain
39
39
  * @param port
40
40
  */
41
- function exposePublicService(name, domain, port, healthCheck = {}, vpcId, extraOptions, deregistrationDelay) {
42
- return __awaiter(this, void 0, void 0, function* () {
41
+ function exposePublicService(name_1, domain_2, port_1) {
42
+ return __awaiter(this, arguments, void 0, function* (name, domain, port, healthCheck = {}, vpcId, extraOptions, deregistrationDelay) {
43
43
  const { alb, listener } = yield (0, alb_1.getAlb)();
44
44
  const healthCheckValue = Object.assign({}, DEFAULT_HEALTHCHECK_VALUES, healthCheck);
45
45
  const isProxied = isProxiedDomain(extraOptions);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dcl-ops-lib",
3
- "version": "6.1.1",
3
+ "version": "6.2.0",
4
4
  "scripts": {
5
5
  "build": "tsc && cp bin/* . && node test.js",
6
6
  "clean": "rm *.d.ts *.js *.js.map"