Skip to content

Conversation

rajagopalanand
Copy link

@rajagopalanand rajagopalanand commented Jun 11, 2025

This is for receivers:

  • Uses a pattern similar to service discovery
  • This will be used in Cortex as follows in ApplyConfig(..) in alertmanager.go - Will submit a separate cherry-pick PR for that. There are more changes than shown below
	am.secretsProviderRegistry = secrets.NewSecretsProviderRegistry(util_log.GoKitLogToSlog(log.With(am.logger, "component", "secrets_provider")), am.registry)
	// currently only one secrets provider is supported
	am.secretsProviderRegistry.Register(providers.AMPAWSSecretsManagerSecretProviderDiscoveryConfig{
		UserID: userID,
	})
	am.secretsProviderRegistry.Init() //initialize the registry
  • There is one SecretsProviderRegistry per tenant
  • Each SecretsProviderRegistry has 1..n SecretProviders but only 1 provider of each type. AWSSecretsManagerProvider, InlineProvider are examples of provider. A registry can contain many providers but only one AWSSecretsManagerProvider and one InlineProvider (and one each of other types in the future)
  • Each SecretProvider is free to implement however but in this implementation AWSSecretsManagerProvider maintains 1 SecretsFetcher per SecretARN. I chose to do it this way because each SecretARN's lifecycle can be different and the AWSSecretsManagerProvider manages the lifecycle of all the fetchers. For example, if the same ARN is registered twice, AWSSecretsManagerProvider will only create 1 SecretsFetcher

*Corresponding Cortex Changes https://github.com/aws-observability/cortex-dev/commit/0278ebb20a6cf30090988e5d1a39dcff3a59f56d

@rajagopalanand rajagopalanand force-pushed the receivers-2025-6-11 branch 3 times, most recently from 55648f3 to 3daa15c Compare June 22, 2025 22:11
return sec
}

func (n *Notifier) notifyV1(

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I haven't tested the V1 integration end to end, wondering if we need to consider this in our canaries/tests.

Signed-off-by: Anand Rajagopal <anrajag@amazon.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants