-
Notifications
You must be signed in to change notification settings - Fork 260
Feature/azureblob-output #451
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
Merged
Merged
Changes from 5 commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
18bbd06
added azure blob export functionality + teams channel alert
mlhv 42fa2a9
added feature documentation to README
mlhv 686b12f
fix
mlhv bd47ccb
added image to readme
mlhv 34955f6
fixed readme
mlhv 8412c31
fixed raised exception
mlhv d07da4f
Merge branch 'main' into feature/AzureBlobExport
mlhv File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -81,7 +81,7 @@ _View Instructions for: [Prometheus](#prometheus-victoria-metrics-and-thanos-aut | |
|
|
||
| [](#integrations) | ||
|
|
||
| _View instructions for: [Seeing recommendations in a UI](#free-ui-for-krr-recommendations), [Sending recommendations to Slack](#slack-notification), [Setting up KRR as a k9s plugin](#k9s-plugin)_ | ||
| _View instructions for: [Seeing recommendations in a UI](#free-ui-for-krr-recommendations), [Sending recommendations to Slack](#slack-notification), [Setting up KRR as a k9s plugin](#k9s-plugin), [Azure Blob Storage Export with Teams Notification](#azure-blob-teams-integration)_ | ||
|
|
||
| ### Features | ||
|
|
||
|
|
@@ -682,6 +682,84 @@ customPlaybooks: | |
| Installation instructions: [k9s docs](https://k9scli.io/topics/plugins/) | ||
| </details> | ||
|
|
||
| <details id="azure-blob-teams-integration"> | ||
| <summary>Azure Blob Storage Export with Microsoft Teams Notifications</summary> | ||
|
|
||
| Export KRR reports directly to Azure Blob Storage and get notified in Microsoft Teams when reports are generated. | ||
|
|
||
| ![Teams Notification Screenshot][teams-screenshot] | ||
|
|
||
| ### Prerequisites | ||
|
|
||
| - An Azure Storage Account with a container for storing reports | ||
| - A Microsoft Teams channel with an incoming webhook configured | ||
| - Azure SAS URL with write permissions to your storage container | ||
|
|
||
| ### Setup | ||
|
|
||
| 1. **Create Azure Storage Container**: Set up a container in your Azure Storage Account (e.g., `fileuploads`) | ||
|
|
||
| 2. **Generate SAS URL**: Create a SAS URL for your container with write permissions: | ||
| ```bash | ||
| # Example SAS URL format (replace with your actual values) | ||
| https://yourstorageaccount.blob.core.windows.net/fileuploads?sv=2024-11-04&ss=bf&srt=o&sp=wactfx&se=2026-07-21T21:12:48Z&st=2025-07-21T12:57:48Z&spr=https&sig=... | ||
| ``` | ||
|
|
||
| 3. **Configure Teams Webhook**: Set up an incoming webhook in your Microsoft Teams channel (located in the Workflows tab) | ||
|
|
||
| 4. **Run KRR with Azure Integration**: | ||
| ```bash | ||
| krr simple -f html \ | ||
| --azurebloboutput "https://yourstorageaccount.blob.core.windows.net/fileuploads?sv=..." \ | ||
| --teams-webhook "https://your-teams-webhook-url" \ | ||
| --azure-subscription-id "your-subscription-id" \ | ||
| --azure-resource-group "your-resource-group" | ||
| ``` | ||
|
|
||
| ### Features | ||
|
|
||
| - **Automatic File Upload**: Reports are automatically uploaded to Azure Blob Storage with timestamped filenames | ||
| - **Teams Notifications**: Rich adaptive cards are sent to Teams when reports are generated | ||
| - **Direct Links**: Teams notifications include direct links to view files in Azure Portal | ||
| - **Multiple Formats**: Supports all KRR output formats (JSON, CSV, HTML, YAML, etc.) | ||
| - **Secure**: Uses SAS URLs for secure, time-limited access to your storage | ||
|
|
||
| ### Command Options | ||
|
|
||
| | Flag | Description | | ||
| |------|-------------| | ||
| | `--azurebloboutput` | Azure Blob Storage SAS URL base path (make sure you include the container name; filename will be auto-appended) | | ||
| | `--teams-webhook` | Microsoft Teams webhook URL for notifications | | ||
| | `--azure-subscription-id` | Azure Subscription ID (for Azure Portal links in Teams) | | ||
| | `--azure-resource-group` | Azure Resource Group name (for Azure Portal links in Teams) | | ||
|
|
||
| ### Example Usage | ||
|
|
||
| ```bash | ||
| # Basic Azure Blob export | ||
| krr simple -f json --azurebloboutput "https://mystorageaccount.blob.core.windows.net/reports?sv=..." | ||
|
|
||
| # With Teams notifications | ||
| krr simple -f html \ | ||
| --azurebloboutput "https://mystorageaccount.blob.core.windows.net/reports?sv=..." \ | ||
| --teams-webhook "https://outlook.office.com/webhook/..." \ | ||
| --azure-subscription-id "12345678-1234-1234-1234-123456789012" \ | ||
| --azure-resource-group "my-resource-group" | ||
| ``` | ||
|
|
||
| ### Teams Notification Features | ||
|
|
||
| The Teams adaptive card includes: | ||
| - 📊 Report generation announcement | ||
| - Namespace and format details | ||
| - Generation timestamp | ||
| - Storage account and container information | ||
| - Direct "View in Azure Storage" button linking to Azure Portal | ||
|
|
||
| <p align="right">(<a href="#readme-top">back to top</a>)</p> | ||
|
|
||
| </details> | ||
|
|
||
| ## Creating a Custom Strategy/Formatter | ||
|
|
||
| Look into the [examples](https://github.com/robusta-dev/krr/tree/main/examples) directory for examples on how to create a custom strategy/formatter. | ||
|
|
@@ -768,3 +846,4 @@ If you have any questions, feel free to contact **[email protected]** or messa | |
| [product-screenshot]: images/screenshot.jpeg | ||
| [slack-screenshot]: images/krr_slack_example.png | ||
| [ui-screenshot]: images/ui_video.gif | ||
| [teams-screenshot]: images/krr_teams_example.png | ||
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.