Skip to content

Commit 99ceb79

Browse files
committed
CCM-12616: Remove mesh cert expiry metric from MESH Download
1 parent 44f3682 commit 99ceb79

3 files changed

Lines changed: 7 additions & 10 deletions

File tree

infrastructure/terraform/components/dl/module_lambda_mesh_download.tf

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,6 @@ module "mesh_download" {
3737
log_subscription_role_arn = local.acct.log_subscription_role_arn
3838

3939
lambda_env_vars = {
40-
CERTIFICATE_EXPIRY_METRIC_NAME = "mesh-download-client-certificate-near-expiry"
41-
CERTIFICATE_EXPIRY_METRIC_NAMESPACE = "dl-mesh-download"
4240
DOWNLOAD_METRIC_NAME = "mesh-download-successful-downloads"
4341
DOWNLOAD_METRIC_NAMESPACE = "dl-mesh-download"
4442
ENVIRONMENT = var.environment

lambdas/mesh-download/mesh_download/config.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,6 @@
99
"ssm_senders_prefix": "SSM_SENDERS_PREFIX",
1010
"ssm_mesh_prefix": "SSM_MESH_PREFIX",
1111
"environment": "ENVIRONMENT",
12-
"certificate_expiry_metric_name": "CERTIFICATE_EXPIRY_METRIC_NAME",
13-
"certificate_expiry_metric_namespace": "CERTIFICATE_EXPIRY_METRIC_NAMESPACE",
1412
"download_metric_name": "DOWNLOAD_METRIC_NAME",
1513
"download_metric_namespace": "DOWNLOAD_METRIC_NAMESPACE",
1614
"event_publisher_event_bus_arn": "EVENT_PUBLISHER_EVENT_BUS_ARN",

utils/event-publisher-py/event_publisher/mesh_config.py

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -169,12 +169,13 @@ def build_mesh_client(self):
169169
)
170170

171171
# Use real MESH client
172-
report_expiry_time(
173-
self.client_cert,
174-
self.certificate_expiry_metric_name,
175-
self.certificate_expiry_metric_namespace,
176-
self.environment
177-
)
172+
if self.certificate_expiry_metric_name and self.certificate_expiry_metric_namespace:
173+
report_expiry_time(
174+
self.client_cert,
175+
self.certificate_expiry_metric_name,
176+
self.certificate_expiry_metric_namespace,
177+
self.environment
178+
)
178179

179180
return mesh_client.MeshClient(
180181
self.lookup_endpoint(self.mesh_endpoint),

0 commit comments

Comments
 (0)