Skip to content

feat: add support for watching pods across multiple namespaces #106

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

Closed
wants to merge 1 commit into from

Conversation

blink-so[bot]
Copy link

@blink-so blink-so bot commented Jun 2, 2025

This PR addresses issue #5 by adding support for watching pods across multiple namespaces or all namespaces.

Changes

Core Functionality

  • Multi-namespace support: When namespace is empty, the application now watches pods in all namespaces
  • Backward compatibility: When a specific namespace is provided, behavior remains unchanged (single namespace)
  • Conditional RBAC: Automatically uses ClusterRole/ClusterRoleBinding for all namespaces, Role/RoleBinding for single namespace

Implementation Details

  • Modified informer factory creation to conditionally include WithNamespace() option
  • Updated Helm chart to create appropriate RBAC resources based on namespace configuration
  • Enhanced logging to clearly indicate whether watching all namespaces or a specific one

Documentation

  • Updated README.md with multi-namespace usage examples
  • Enhanced values.yaml documentation explaining the new behavior
  • Added clear examples for both single and multi-namespace deployments

Use Cases

This enables several important deployment patterns:

  • Per-user namespaces: Single logstream deployment can monitor workspaces across user-specific namespaces
  • Multi-tenant environments: Better resource isolation while maintaining centralized log streaming
  • Flexible RBAC: Automatic permission scoping based on deployment configuration

Testing

  • Code compiles successfully
  • Maintains backward compatibility with existing single-namespace deployments
  • Helm chart generates correct RBAC resources for both scenarios

Breaking Changes

None - this is fully backward compatible. Existing deployments will continue to work exactly as before.

- When namespace is empty, watch all namespaces using ClusterRole/ClusterRoleBinding
- When namespace is specified, watch only that namespace using Role/RoleBinding
- Maintains backward compatibility with existing single-namespace deployments
- Updates Helm chart to conditionally create appropriate RBAC resources
- Updates documentation to explain multi-namespace support

Fixes #5
@matifali matifali requested review from kylecarbs and ericpaulsen June 3, 2025 11:47
@ericpaulsen
Copy link
Member

re-writing via updated Blink.

@ericpaulsen ericpaulsen closed this Jun 3, 2025
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