Skip to content

feat: Add Flux CD provider for service topology and alert integration #4721

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 45 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
45 commits
Select commit Hold shift + click to select a range
fe1f41d
Add Flux CD provider with icon naming fix
Kunal-Darekar May 7, 2025
7a58015
Fix Flux CD icon filename
Kunal-Darekar May 7, 2025
a164b77
Merge branch 'main' into feature/fluxcd-provider
talboren May 7, 2025
a2e7333
Add .ruff.toml to exclude YAML and MDX files from linting and add Flu…
Kunal-Darekar May 7, 2025
bcb122e
Fix FluxCD provider code and documentation
Kunal-Darekar May 7, 2025
27badcf
Fix exception handling in FluxCD provider
Kunal-Darekar May 7, 2025
939a46d
Update FluxCD workflow example to match new schema format
Kunal-Darekar May 7, 2025
c06fc43
Fix .ruff.toml configuration format
Kunal-Darekar May 7, 2025
24fd643
Merge branch 'main' into feature/fluxcd-provider
Kunal-Darekar May 8, 2025
34358e7
Merge branch 'main' into feature/fluxcd-provider
Kunal-Darekar May 8, 2025
1f7de37
fix: Make Flux CD provider robust when no Kubernetes cluster is avail…
Kunal-Darekar May 8, 2025
51aa918
Merge remote changes and fix Flux CD provider
Kunal-Darekar May 8, 2025
9bc38c9
Fix FluxCD provider test name mangling issues
Kunal-Darekar May 8, 2025
92dea39
Fix FluxCD provider test name mangling issues
Kunal-Darekar May 8, 2025
80b6252
Fix FluxCD provider documentation and ruff configuration
Kunal-Darekar May 8, 2025
2662588
Fix FluxCD provider tags to use permitted values
Kunal-Darekar May 8, 2025
60e1b0b
Update BaseProvider to include 'incident' tag
Kunal-Darekar May 8, 2025
6e9d616
Fix FluxCD workflow example to match schema
Kunal-Darekar May 8, 2025
58443e0
Fix FluxCD workflow example to use vars instead of output
Kunal-Darekar May 8, 2025
c8dd8c8
Merge branch 'main' into feature/fluxcd-provider
Kunal-Darekar May 8, 2025
8679e88
Fix FluxCD provider documentation snippets and improve docs generatio…
Kunal-Darekar May 8, 2025
66ab527
Merge branch 'main' into feature/fluxcd-provider
Kunal-Darekar May 9, 2025
de7be9d
Merge branch 'main' into feature/fluxcd-provider
Kunal-Darekar May 10, 2025
54a42f2
Merge branch 'main' into feature/fluxcd-provider
Kunal-Darekar May 10, 2025
7fa10db
fix: Fix FluxCD provider tests and improve e2e test reliability
Kunal-Darekar May 10, 2025
80c9ad1
Merge remote changes into local branch
Kunal-Darekar May 10, 2025
64a571c
Fix FluxCD provider documentation
Kunal-Darekar May 10, 2025
940c53d
Fix FluxCD provider authentication configuration
Kunal-Darekar May 10, 2025
1b50a1c
Fix FluxCD provider initialization and documentation snippets
Kunal-Darekar May 10, 2025
9ee7d76
Fix path separators in documentation snippets
Kunal-Darekar May 11, 2025
74fed44
Resolve merge conflict in yaml.schema.ts
Kunal-Darekar May 11, 2025
47b150f
Update keep-ui/entities/workflows/model/yaml.schema.ts
Kunal-Darekar May 15, 2025
c881e89
Update keep-ui/entities/workflows/model/yaml.schema.ts
Kunal-Darekar May 15, 2025
bdb8dfc
Merge branch 'main' into feature/fluxcd-provider
Kunal-Darekar May 15, 2025
9bfbaa5
Merge branch 'main' into feature/fluxcd-provider
Kunal-Darekar May 15, 2025
7914506
Merge branch 'main' into feature/fluxcd-provider
Kunal-Darekar May 17, 2025
4ad6cfe
Merge branch 'main' into feature/fluxcd-provider
Kunal-Darekar May 17, 2025
581ff4f
Merge branch 'main' into feature/fluxcd-provider
Kunal-Darekar May 18, 2025
658379c
Merge branch 'main' into feature/fluxcd-provider
talboren May 19, 2025
b083486
Merge branch 'main' into feature/fluxcd-provider
Kunal-Darekar May 20, 2025
5f9a0e5
Remove redundant .ruff.toml file and add noqa comments to fluxcd_prov…
Kunal-Darekar May 20, 2025
6c41ff7
Remove redundant .ruff.toml file and add noqa comments
Kunal-Darekar May 20, 2025
f4e0616
Merge branch 'main' into feature/fluxcd-provider
Kunal-Darekar May 20, 2025
c9bd9d8
Fix: Add Icinga2 provider to docs/providers/overview.md
Kunal-Darekar May 20, 2025
3743d43
Merge branch 'main' into feature/fluxcd-provider
Kunal-Darekar May 20, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -706,6 +706,12 @@
ArgoCD
</a>
</td>
<td align="center" width="150">
<a href="https://docs.keephq.dev/providers/documentation/fluxcd-provider" target="_blank">
<img width="40" src="keep-ui/public/icons/fluxcd-icon.png" alt="Flux CD"/><br/>
Flux CD
</a>
</td>
<td align="center" width="150">
<a href="https://docs.keephq.dev/providers/documentation/gke-provider" target="_blank">
<img width="40" src="keep-ui/public/icons/gke-icon.png" alt="GKE"/><br/>
Expand Down
1 change: 1 addition & 0 deletions docs/mint.json
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,7 @@
"providers/documentation/eks-provider",
"providers/documentation/elastic-provider",
"providers/documentation/flashduty-provider",
"providers/documentation/fluxcd-provider",
"providers/documentation/gcpmonitoring-provider",
"providers/documentation/gemini-provider",
"providers/documentation/github-provider",
Expand Down
140 changes: 140 additions & 0 deletions docs/providers/documentation/fluxcd-provider.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,140 @@
---
title: "Flux CD"
sidebarTitle: "Flux CD Provider"
description: "Flux CD Provider enables integration with Flux CD for GitOps topology and alerts."
---
import AutoGeneratedSnippet from '/snippets/providers/fluxcd-snippet-autogenerated.mdx';

<AutoGeneratedSnippet />

## Overview

Flux CD is a GitOps tool for Kubernetes that provides continuous delivery through automated deployment, monitoring, and management of applications. This provider allows you to integrate Flux CD with Keep to get a single pane of glass for monitoring your GitOps deployments.

## Features

### Topology

The Flux CD provider pulls topology data from the following Flux CD resources:

- GitRepositories
- HelmRepositories
- HelmCharts
- OCI Repositories
- Buckets
- Kustomizations
- HelmReleases

The topology shows the relationships between these resources, allowing you to visualize the GitOps deployment process. Resources are categorized as:

- **Source**: GitRepositories, HelmRepositories, OCI Repositories, Buckets
- **Deployment**: Kustomizations, HelmReleases

### Alerts

The Flux CD provider gets alerts from two sources:

1. Kubernetes events related to Flux CD controllers
2. Status conditions of Flux CD resources (GitRepositories, Kustomizations, HelmReleases)

Alerts include:

- Failed GitRepository operations
- Failed Kustomization operations
- Failed HelmRelease operations
- Non-ready resources

Alert severity is determined based on:
- **Critical**: Events with "failed", "error", "timeout", "backoff", or "crash" in the reason
- **High**: Other warning events
- **Info**: Normal events

## Connecting with the Provider

The Flux CD provider supports multiple authentication methods:

1. **Kubeconfig file content** (recommended for external access)
2. **API server URL and token**
3. **In-cluster configuration** (when running inside a Kubernetes cluster)
4. **Default kubeconfig file** (from ~/.kube/config)

### Using Kubeconfig

```yaml
apiVersion: keep.sh/v1
kind: Provider
metadata:
name: flux-cd
spec:
type: fluxcd
authentication:
kubeconfig: |
apiVersion: v1
kind: Config
clusters:
- name: my-cluster
cluster:
server: https://kubernetes.example.com
certificate-authority-data: BASE64_ENCODED_CA_CERT
users:
- name: my-user
user:
token: MY_TOKEN
contexts:
- name: my-context
context:
cluster: my-cluster
user: my-user
current-context: my-context
context: my-context
namespace: flux-system
```

### Using API Server and Token

```yaml
apiVersion: keep.sh/v1
kind: Provider
metadata:
name: flux-cd
spec:
type: fluxcd
authentication:
api-server: https://kubernetes.example.com
token: MY_TOKEN
namespace: flux-system
```

> Note: Both `api-server` and `api_server` formats are supported for backward compatibility.

### Using In-Cluster Configuration

```yaml
apiVersion: keep.sh/v1
kind: Provider
metadata:
name: flux-cd
spec:
type: fluxcd
authentication:
namespace: flux-system
```

## Comparison with ArgoCD Provider

Keep supports both Flux CD and ArgoCD for GitOps deployments. Here's a comparison of the two providers:

| Feature | Flux CD | ArgoCD |
|---------|---------|--------|
| Topology | ✅ | ✅ |
| Alerts | ✅ | ✅ |
| Resource Types | GitRepositories, HelmRepositories, Kustomizations, HelmReleases | Applications, Projects |
| Authentication | Kubeconfig, API Server, In-Cluster | Username/Password, Token |
| Deployment Model | Kubernetes Controllers | Server + Controllers |
| UI Integration | No (CLI only) | Yes (Web UI) |

## Related Resources

- [Flux CD Documentation](https://fluxcd.io/docs/)
- [Flux CD GitHub Repository](https://github.com/fluxcd/flux2)
- [Keep Documentation](https://docs.keephq.dev)
131 changes: 131 additions & 0 deletions docs/providers/overview.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,131 @@
# Providers Overview

Providers are core components of Keep that allows Keep to either query data, send notifications, get alerts from or manage third-party tools.

These third-party tools include, among others, Datadog, Cloudwatch, and Sentry for data querying and/or alert management, and Slack, Resend, Twilio, and PagerDuty for notifications/incidents.

By leveraging Keep Providers, users are able to deeply integrate Keep with the tools they use and trust, providing them with a flexible and powerful way to manage these tools with ease and from a single pane.

## Available Providers

- [Airflow](/providers/documentation/airflow-provider)
- [Azure AKS](/providers/documentation/aks-provider)
- [AmazonSQS](/providers/documentation/amazonsqs-provider)
- [Anthropic](/providers/documentation/anthropic-provider)
- [AppDynamics](/providers/documentation/appdynamics-provider)
- [ArgoCD](/providers/documentation/argocd-provider)
- [Flux CD](/providers/documentation/fluxcd-provider)
- [Asana](/providers/documentation/asana-provider)
- [Auth0](/providers/documentation/auth0-provider)
- [Axiom](/providers/documentation/axiom-provider)
- [Azure Monitor](/providers/documentation/azuremonitoring-provider)
- [Bash](/providers/documentation/bash-provider)
- [BigQuery](/providers/documentation/bigquery-provider)
- [Centreon](/providers/documentation/centreon-provider)
- [Checkmk](/providers/documentation/checkmk-provider)
- [Checkly](/providers/documentation/checkly-provider)
- [Cilium](/providers/documentation/cilium-provider)
- [ClickHouse](/providers/documentation/clickhouse-provider)
- [CloudWatch](/providers/documentation/cloudwatch-provider)
- [Console](/providers/documentation/console-provider)
- [Coralogix](/providers/documentation/coralogix-provider)
- [Dash0](/providers/documentation/dash0-provider)
- [Datadog](/providers/documentation/datadog-provider)
- [Databend](/providers/documentation/databend-provider)
- [DeepSeek](/providers/documentation/deepseek-provider)
- [Discord](/providers/documentation/discord-provider)
- [Dynatrace](/providers/documentation/dynatrace-provider)
- [EKS](/providers/documentation/eks-provider)
- [Elastic](/providers/documentation/elastic-provider)
- [Flashduty](/providers/documentation/flashduty-provider)
- [GCP Monitoring](/providers/documentation/gcpmonitoring-provider)
- [Gemini](/providers/documentation/gemini-provider)
- [GitHub](/providers/documentation/github-provider)
- [Github Workflows](/providers/documentation/github_workflows_provider)
- [GitLab](/providers/documentation/gitlab-provider)
- [Gitlab Pipelines](/providers/documentation/gitlabpipelines-provider)
- [Google Kubernetes Engine](/providers/documentation/gke-provider)
- [Google Chat](/providers/documentation/google_chat-provider)
- [Grafana](/providers/documentation/grafana-provider)
- [Grafana Incident](/providers/documentation/grafana_incident-provider)
- [Grafana Loki](/providers/documentation/grafana_loki-provider)
- [Grafana OnCall](/providers/documentation/grafana_oncall-provider)
- [Graylog](/providers/documentation/graylog-provider)
- [Grok](/providers/documentation/grok-provider)
- [HTTP](/providers/documentation/http-provider)
- [Icinga2](/providers/documentation/icinga2-provider)
- [ilert](/providers/documentation/ilert-provider)
- [Incident.io](/providers/documentation/incidentio-provider)
- [Incident Manager](/providers/documentation/incidentmanager-provider)
- [Jira On-Prem](/providers/documentation/jira-on-prem-provider)
- [Jira Cloud](/providers/documentation/jira-provider)
- [Kafka](/providers/documentation/kafka-provider)
- [Keep](/providers/documentation/keep-provider)
- [Kibana](/providers/documentation/kibana-provider)
- [Kubernetes](/providers/documentation/kubernetes-provider)
- [LibreNMS](/providers/documentation/libre_nms-provider)
- [Linear](/providers/documentation/linear_provider)
- [LinearB](/providers/documentation/linearb-provider)
- [LiteLLM](/providers/documentation/litellm-provider)
- [Llama.cpp](/providers/documentation/llamacpp-provider)
- [Mailgun](/providers/documentation/mailgun-provider)
- [Mattermost](/providers/documentation/mattermost-provider)
- [Microsoft Planner](/providers/documentation/planner-provider)
- [Monday](/providers/documentation/monday-provider)
- [MongoDB](/providers/documentation/mongodb-provider)
- [MySQL](/providers/documentation/mysql-provider)
- [NetBox](/providers/documentation/netbox-provider)
- [Netdata](/providers/documentation/netdata-provider)
- [New Relic](/providers/documentation/new-relic-provider)
- [Ntfy.sh](/providers/documentation/ntfy-provider)
- [Ollama](/providers/documentation/ollama-provider)
- [OpenAI](/providers/documentation/openai-provider)
- [OpenObserve](/providers/documentation/openobserve-provider)
- [OpenSearch Serverless](/providers/documentation/opensearchserverless-provider)
- [Openshift](/providers/documentation/openshift-provider)
- [Opsgenie](/providers/documentation/opsgenie-provider)
- [Pagerduty](/providers/documentation/pagerduty-provider)
- [Pagertree](/providers/documentation/pagertree-provider)
- [Parseable](/providers/documentation/parseable-provider)
- [Pingdom](/providers/documentation/pingdom-provider)
- [PostgreSQL](/providers/documentation/postgresql-provider)
- [PostHog](/providers/documentation/posthog-provider)
- [Prometheus](/providers/documentation/prometheus-provider)
- [Pushover](/providers/documentation/pushover-provider)
- [Python](/providers/documentation/python-provider)
- [QuickChart](/providers/documentation/quickchart-provider)
- [Redmine](/providers/documentation/redmine-provider)
- [Resend](/providers/documentation/resend-provider)
- [Rollbar](/providers/documentation/rollbar-provider)
- [AWS S3](/providers/documentation/s3-provider)
- [SendGrid](/providers/documentation/sendgrid-provider)
- [Sentry](/providers/documentation/sentry-provider)
- [Service Now](/providers/documentation/service-now-provider)
- [SignalFX](/providers/documentation/signalfx-provider)
- [SIGNL4](/providers/documentation/signl4-provider)
- [Site24x7](/providers/documentation/site24x7-provider)
- [Slack](/providers/documentation/slack-provider)
- [SMTP](/providers/documentation/smtp-provider)
- [Snowflake](/providers/documentation/snowflake-provider)
- [Splunk](/providers/documentation/splunk-provider)
- [Squadcast](/providers/documentation/squadcast-provider)
- [SSH](/providers/documentation/ssh-provider)
- [StatusCake](/providers/documentation/statuscake-provider)
- [SumoLogic](/providers/documentation/sumologic-provider)
- [Microsoft Teams](/providers/documentation/teams-provider)
- [Telegram](/providers/documentation/telegram-provider)
- [Template](/providers/documentation/template)
- [ThousandEyes](/providers/documentation/thousandeyes-provider)
- [Trello](/providers/documentation/trello-provider)
- [Twilio](/providers/documentation/twilio-provider)
- [UptimeKuma](/providers/documentation/uptimekuma-provider)
- [VictoriaLogs](/providers/documentation/victorialogs-provider)
- [Victoriametrics](/providers/documentation/victoriametrics-provider)
- [vLLM](/providers/documentation/vllm-provider)
- [Wazuh](/providers/documentation/wazuh-provider)
- [Webhook](/providers/documentation/webhook-provider)
- [Websocket](/providers/documentation/websocket-provider)
- [YouTrack](/providers/documentation/youtrack-provider)
- [Zabbix](/providers/documentation/zabbix-provider)
- [Zenduty](/providers/documentation/zenduty-provider)
- [Zoom](/providers/documentation/zoom-provider)
8 changes: 8 additions & 0 deletions docs/providers/overview.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,14 @@ By leveraging Keep Providers, users are able to deeply integrate Keep with the t
}
></Card>

<Card
title="Flux CD"
href="/providers/documentation/fluxcd-provider"
icon={
<img src="https://img.logo.dev/fluxcd.io?token=pk_dfXfZBoKQMGDTIgqu7LvYg" />
}
></Card>

<Card
title="Asana"
href="/providers/documentation/asana-provider"
Expand Down
9 changes: 5 additions & 4 deletions docs/snippets/providers/console-snippet-autogenerated.mdx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{/* This snippet is automatically generated using scripts/docs_render_provider_snippets.py
{/* This snippet is automatically generated using scripts/docs_render_provider_snippets.py
Do not edit it manually, as it will be overwritten */}


Expand All @@ -14,9 +14,9 @@ steps:
provider: console
config: "{{ provider.my_provider_name }}"
with:
message: {value}
logger: {value}
severity: {value}
message: {value}
logger: {value}
severity: {value}
```


Expand All @@ -43,6 +43,7 @@ Check the following workflow examples:
- [consts_and_dict.yml](https://github.com/keephq/keep/blob/main/examples/workflows/consts_and_dict.yml)
- [eks_advanced.yml](https://github.com/keephq/keep/blob/main/examples/workflows/eks_advanced.yml)
- [eks_basic.yml](https://github.com/keephq/keep/blob/main/examples/workflows/eks_basic.yml)
- [fluxcd_example.yml](https://github.com/keephq/keep/blob/main/examples/workflows/fluxcd_example.yml)
- [gke.yml](https://github.com/keephq/keep/blob/main/examples/workflows/gke.yml)
- [ifelse.yml](https://github.com/keephq/keep/blob/main/examples/workflows/ifelse.yml)
- [incident-enrich.yaml](https://github.com/keephq/keep/blob/main/examples/workflows/incident-enrich.yaml)
Expand Down
49 changes: 49 additions & 0 deletions docs/snippets/providers/fluxcd-snippet-autogenerated.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
{/* This snippet is automatically generated using scripts/docs_render_provider_snippets.py
Do not edit it manually, as it will be overwritten */}

## Authentication
This provider requires authentication.
- **kubeconfig**: Kubeconfig file content (required: False, sensitive: True)
- **context**: Kubernetes context to use (required: False, sensitive: False)
- **namespace**: Namespace where Flux CD is installed (required: False, sensitive: False)
- **api_server**: Kubernetes API server URL (required: False, sensitive: False)
- **token**: Kubernetes API token (required: False, sensitive: True)
- **insecure**: Skip TLS verification (required: False, sensitive: False)

Certain scopes may be required to perform specific actions or queries via the provider. Below is a summary of relevant scopes and their use cases:
- **authenticated**: User is Authorized (mandatory)


## In workflows

This provider can be used in workflows.


As "step" to query data, example:
```yaml
steps:
- name: Query fluxcd
provider: fluxcd
config: "{{ provider.my_provider_name }}"
with:
**_: {value} # Additional arguments (ignored)
```





Check the following workflow example:
- [fluxcd_example.yml](https://github.com/keephq/keep/blob/main/examples/workflows/fluxcd_example.yml)


## Topology
This provider pulls [topology](/overview/servicetopology) to Keep. It could be used in [correlations](/overview/correlation-topology)
and [mapping](/overview/enrichment/mapping#mapping-with-topology-data), and as a context
for [alerts](/alerts/sidebar#7-alert-topology-view) and [incidents](/overview#17-incident-topology).

## Provider Methods
The provider exposes the following [Provider Methods](/providers/provider-methods#via-ai-assistant). They are available in the [AI Assistant](/overview/ai-incident-assistant).

- **get_fluxcd_resources** Get resources from Flux CD (, scopes: no additional scopes)

3 changes: 2 additions & 1 deletion docs/snippets/providers/keep-snippet-autogenerated.mdx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{/* This snippet is automatically generated using scripts/docs_render_provider_snippets.py
{/* This snippet is automatically generated using scripts/docs_render_provider_snippets.py
Do not edit it manually, as it will be overwritten */}


Expand Down Expand Up @@ -52,6 +52,7 @@ Check the following workflow examples:
- [create_alerts_from_elastic.yml](https://github.com/keephq/keep/blob/main/examples/workflows/create_alerts_from_elastic.yml)
- [create_alerts_from_mysql.yml](https://github.com/keephq/keep/blob/main/examples/workflows/create_alerts_from_mysql.yml)
- [create_multi_alert_from_vm_metric.yml](https://github.com/keephq/keep/blob/main/examples/workflows/create_multi_alert_from_vm_metric.yml)
- [fluxcd_example.yml](https://github.com/keephq/keep/blob/main/examples/workflows/fluxcd_example.yml)
- [resolve_old_alerts.yml](https://github.com/keephq/keep/blob/main/examples/workflows/resolve_old_alerts.yml)
- [retrieve_cloudwatch_logs.yaml](https://github.com/keephq/keep/blob/main/examples/workflows/retrieve_cloudwatch_logs.yaml)
- [update_service_now_tickets_status.yml](https://github.com/keephq/keep/blob/main/examples/workflows/update_service_now_tickets_status.yml)
Expand Down
Loading