-
Notifications
You must be signed in to change notification settings - Fork 179
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add configuration to filter health checks (#3357)
* add configuration to filter health checks; fix local testing for external store health check * revert appsettings change * update to use comma seperated string so the value is parsable in k8s config * update to read only list
- Loading branch information
1 parent
90ea691
commit c72aa5c
Showing
6 changed files
with
61 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
25 changes: 25 additions & 0 deletions
25
src/Microsoft.Health.Dicom.Core/Configs/HealthCheckPublisherConfiguration.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
// ------------------------------------------------------------------------------------------------- | ||
// Copyright (c) Microsoft Corporation. All rights reserved. | ||
// Licensed under the MIT License (MIT). See LICENSE in the repo root for license information. | ||
// ------------------------------------------------------------------------------------------------- | ||
|
||
using System; | ||
using System.Collections.Generic; | ||
|
||
namespace Microsoft.Health.Dicom.Core.Configs; | ||
|
||
public class HealthCheckPublisherConfiguration | ||
{ | ||
public const string SectionName = "HealthCheckPublisher"; | ||
|
||
/// <summary> | ||
/// A comma separated list of health check names to exclude. | ||
/// Example: "DcmHealthCheck,MetadataHealthCheck" | ||
/// </summary> | ||
public string ExcludedHealthCheckNames { get; set; } | ||
|
||
public IReadOnlyList<string> GetListOfExcludedHealthCheckNames() | ||
{ | ||
return ExcludedHealthCheckNames?.Split(',') ?? Array.Empty<string>(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters