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

Merged
merged 46 commits into from
May 22, 2025
Merged
Changes from 1 commit
Commits
Show all changes
46 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
9b137c9
Merge branch 'main' into feature/fluxcd-provider
Kunal-Darekar May 21, 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
Prev Previous commit
Next Next commit
Update FluxCD workflow example to match new schema format
  • Loading branch information
Kunal-Darekar committed May 7, 2025
commit 939a46d44ce16ecc7a70593f04625fc26c24f562
99 changes: 51 additions & 48 deletions examples/workflows/fluxcd_example.yml
Original file line number Diff line number Diff line change
@@ -1,51 +1,54 @@
id: fluxcd-example
description: "Example workflow that retrieves Flux CD resources and creates alerts for failed deployments"
trigger:
type: schedule
cron: "*/30 * * * *" # Run every 30 minutes
steps:
- name: get-fluxcd-resources
provider: fluxcd
method: get_topology
authentication:
kubeconfig: "{{ env.KUBECONFIG }}"
namespace: "flux-system"
output: fluxcd_resources
workflow:
id: fluxcd-example
name: "FluxCD Resource Monitor"
description: "Example workflow that retrieves Flux CD resources and creates alerts for failed deployments"
triggers:
- type: interval
value: 1800 # 30 minutes in seconds
steps:
- name: get-fluxcd-resources
provider:
type: fluxcd
with:
kubeconfig: "{{ env.KUBECONFIG }}"
namespace: "flux-system"
output: fluxcd_resources

- name: check-for-failed-deployments
provider: console
method: log
input: |
Found {{ fluxcd_resources.kustomizations | length }} Kustomizations and {{ fluxcd_resources.helm_releases | length }} HelmReleases
- name: check-for-failed-deployments
provider:
type: console
with:
message: |
Found {{ fluxcd_resources.kustomizations | length }} Kustomizations and {{ fluxcd_resources.helm_releases | length }} HelmReleases

- name: create-alerts-for-failed-kustomizations
provider: keep
method: create_alert
foreach: "{{ fluxcd_resources.kustomizations }}"
condition: "{{ item.status.conditions[0].status == 'False' }}"
input:
name: "FluxCD Kustomization {{ item.metadata.name }} failed"
description: "Kustomization {{ item.metadata.name }} in namespace {{ item.metadata.namespace }} failed with message: {{ item.status.conditions[0].message }}"
severity: "critical"
fingerprint: "fluxcd-kustomization-{{ item.metadata.name }}-{{ item.metadata.namespace }}"
source: "fluxcd"
labels:
namespace: "{{ item.metadata.namespace }}"
name: "{{ item.metadata.name }}"
type: "kustomization"
- name: create-alerts-for-failed-kustomizations
foreach: "{{ fluxcd_resources.kustomizations }}"
if: "{{ item.status.conditions[0].status == 'False' }}"
provider:
type: keep
with:
alert_name: "FluxCD Kustomization {{ item.metadata.name }} failed"
alert_description: "Kustomization {{ item.metadata.name }} in namespace {{ item.metadata.namespace }} failed with message: {{ item.status.conditions[0].message }}"
alert_severity: "critical"
alert_fingerprint: "fluxcd-kustomization-{{ item.metadata.name }}-{{ item.metadata.namespace }}"
alert_source: "fluxcd"
alert_labels:
namespace: "{{ item.metadata.namespace }}"
name: "{{ item.metadata.name }}"
type: "kustomization"

- name: create-alerts-for-failed-helmreleases
provider: keep
method: create_alert
foreach: "{{ fluxcd_resources.helm_releases }}"
condition: "{{ item.status.conditions[0].status == 'False' }}"
input:
name: "FluxCD HelmRelease {{ item.metadata.name }} failed"
description: "HelmRelease {{ item.metadata.name }} in namespace {{ item.metadata.namespace }} failed with message: {{ item.status.conditions[0].message }}"
severity: "critical"
fingerprint: "fluxcd-helmrelease-{{ item.metadata.name }}-{{ item.metadata.namespace }}"
source: "fluxcd"
labels:
namespace: "{{ item.metadata.namespace }}"
name: "{{ item.metadata.name }}"
type: "helmrelease"
- name: create-alerts-for-failed-helmreleases
foreach: "{{ fluxcd_resources.helm_releases }}"
if: "{{ item.status.conditions[0].status == 'False' }}"
provider:
type: keep
with:
alert_name: "FluxCD HelmRelease {{ item.metadata.name }} failed"
alert_description: "HelmRelease {{ item.metadata.name }} in namespace {{ item.metadata.namespace }} failed with message: {{ item.status.conditions[0].message }}"
alert_severity: "critical"
alert_fingerprint: "fluxcd-helmrelease-{{ item.metadata.name }}-{{ item.metadata.namespace }}"
alert_source: "fluxcd"
alert_labels:
namespace: "{{ item.metadata.namespace }}"
name: "{{ item.metadata.name }}"
type: "helmrelease"