Skip to content

Commit ea66fe4

Browse files
Merge pull request #736 from tremes/COO-1515
COO-1515: add the cluster-health-analyzer feature
2 parents 368ea66 + 9ce32d0 commit ea66fe4

File tree

3 files changed

+12
-4
lines changed

3 files changed

+12
-4
lines changed

pkg/plugin_handler.go

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,14 @@ func patchManifest(baseManifestData []byte, cfg *Config) []byte {
4444
patchedManifest = performPatch(baseManifestData, filepath.Join(cfg.ConfigPath, "clear-extensions.patch.json"))
4545
}
4646

47+
if cfg.Features[Incidents] || cfg.Features[ClusterHealthAnalyzer] {
48+
patchedManifest = performPatch(patchedManifest, filepath.Join(cfg.ConfigPath, "cluster-health-analyzer.patch.json"))
49+
}
50+
4751
for feature := range cfg.Features {
52+
if feature == ClusterHealthAnalyzer || feature == Incidents {
53+
continue
54+
}
4855
patchedManifest = performPatch(patchedManifest, filepath.Join(cfg.ConfigPath, fmt.Sprintf("%s.patch.json", feature)))
4956
}
5057

pkg/server.go

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -56,10 +56,11 @@ type PluginConfig struct {
5656
type Feature string
5757

5858
const (
59-
AcmAlerting Feature = "acm-alerting"
60-
Incidents Feature = "incidents"
61-
DevConfig Feature = "dev-config"
62-
PersesDashboards Feature = "perses-dashboards"
59+
AcmAlerting Feature = "acm-alerting"
60+
Incidents Feature = "incidents"
61+
DevConfig Feature = "dev-config"
62+
PersesDashboards Feature = "perses-dashboards"
63+
ClusterHealthAnalyzer Feature = "cluster-health-analyzer"
6364
)
6465

6566
func (pluginConfig *PluginConfig) MarshalJSON() ([]byte, error) {

0 commit comments

Comments
 (0)