Repository navigation
v0.1.4
New Features
Token Management:
Added TokenGenerationTime to GrafanaStatus to track token creation.
Implemented a new needsRefreshedToken helper function to determine if a token requires regeneration.
Tokens are now refreshed automatically if expired or nearing expiration (15 minutes or less).
Tokens are forcefully refreshed and expiration time adjusted during initial reconciliation.
Dex Integration Enhancements:
Refactored ReconcileDex to support token refresh logic and conditional Dex resource cleanup when Dex is disabled.
Introduced helper functions for managing Dex resources:
reconcileDexConfigSecret for Dex configuration with token integration.
reconcileDexDeployment, reconcileDexService, and reconcileDexIngress for managing Dex components.
removeDexResources for cleaning up Dex-related resources when not needed.
Improvements
Status Conditions:
Expanded status conditions (typeDataSourcesReady, typeGrafanaReady, etc.) for better reconciliation tracking.
Updated overall status condition messaging for clarity.
Data Source Reconciliation:
Replaced token handling in data source reconciliation with a reusable token-based workflow.
Enhanced reconciliation for Prometheus, Loki, and Tempo data sources to use refreshed tokens.
Code Refactoring:
Introduced utility methods like extractTokenFromSecureJSONData for token extraction from secure JSON data.
Improved logic flow and error handling in the ReconcileDataSources and ReconcileDex methods.
Event Filtering:
Added predicate.ResourceVersionChangedPredicate to controller setup to refine event handling.
Bug Fixes
Corrected type definitions and comments in grafana_types.go for improved clarity and compliance with operator SDK annotations.
Miscellaneous
Added comprehensive cleanup logic for Dex-related resources when Dex is disabled.
Updated reconciliation logic to ensure consistency in handling conditions and resource updates.
This release focuses on improving token management, enhancing Dex integration, and cleaning up reconciliation logic for better reliability and maintainability.