Skip to content

feat: Add flexible PagerDuty configuration via values.yaml or Kubernetes secrets #1838

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from

Conversation

bhataprameya
Copy link

@bhataprameya bhataprameya commented Aug 10, 2025

Summary

This PR adds flexible PagerDuty configuration options to the Sentry Helm chart, allowing users to configure PagerDuty integration either directly through values.yaml or by referencing existing Kubernetes secrets.

Changes Made

1. Enhanced PagerDuty Configuration Options

  • Direct Configuration: Users can now set pagerduty.appId directly in values.yaml for simple deployments
  • Secret-based Configuration: Support for pagerduty.existingSecret to reference existing Kubernetes secrets containing PagerDuty credentials
  • Flexible Secret Key: Configurable secret key via pagerduty.existingSecretAppId (defaults to "app-id")

2. Template Updates

  • _helper-sentry.tpl: Added logic to handle both configuration methods
    • Direct appId configuration when no existing secret is specified
    • Environment variable reference when using existing secrets
  • _helper.tpl: Added environment variable injection for secret-based configuration

3. Configuration Examples

# Option 1: Direct configuration
pagerduty:
  appId: "your-pagerduty-app-id"

# Option 2: Secret-based configuration
pagerduty:
  existingSecret: "pagerduty-secret"
  existingSecretAppId: "app-id"  # optional, defaults to "app-id"

Benefits

  • Flexibility: Supports both simple and enterprise-grade deployment patterns
  • Security: Allows sensitive credentials to be managed through Kubernetes secrets
  • Backward Compatibility: Existing configurations continue to work unchanged
  • Best Practices: Follows Helm chart patterns for secret management

Documentation

Updated values.yaml with comprehensive examples and references to Sentry's PagerDuty integration documentation.

…tes secrets

## Summary
This PR adds flexible PagerDuty configuration options to the Sentry Helm chart, allowing users to configure PagerDuty integration either directly through values.yaml or by referencing existing Kubernetes secrets.

## Changes Made

### 1. Enhanced PagerDuty Configuration Options
- **Direct Configuration**: Users can now set `pagerduty.appId` directly in values.yaml for simple deployments
- **Secret-based Configuration**: Support for `pagerduty.existingSecret` to reference existing Kubernetes secrets containing PagerDuty credentials
- **Flexible Secret Key**: Configurable secret key via `pagerduty.existingSecretAppId` (defaults to "app-id")

### 2. Template Updates
- **`_helper-sentry.tpl`**: Added logic to handle both configuration methods
  - Direct appId configuration when no existing secret is specified
  - Environment variable reference when using existing secrets
- **`_helper.tpl`**: Added environment variable injection for secret-based configuration

### 3. Configuration Examples
```yaml
# Option 1: Direct configuration
pagerduty:
  appId: "your-pagerduty-app-id"

# Option 2: Secret-based configuration
pagerduty:
  existingSecret: "pagerduty-secret"
  existingSecretAppId: "app-id"  # optional, defaults to "app-id"
```

## Benefits
- **Flexibility**: Supports both simple and enterprise-grade deployment patterns
- **Security**: Allows sensitive credentials to be managed through Kubernetes secrets
- **Backward Compatibility**: Existing configurations continue to work unchanged
- **Best Practices**: Follows Helm chart patterns for secret management

## Documentation
Updated values.yaml with comprehensive examples and references to Sentry's PagerDuty integration documentation.
@bhataprameya bhataprameya changed the title feat: Add flexible PagerDuty configuration via values.yaml or Kuberne… feat: Add flexible PagerDuty configuration via values.yaml or Kubernetes secrets Aug 10, 2025
@bhataprameya
Copy link
Author

I don't think the failing test is related to changes in this PR

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.

1 participant