Notification controller not publishing Reconciliation Succeeded events #4563
-
Hi everyone, We've set up the following GCP Pub/Sub alert and provider. However, events like Reconciliation Succeeded are not being published to Pub/Sub. Only events whose message mentions that K8s resources have been changed are published. apiVersion: notification.toolkit.fluxcd.io/v1beta3
kind: Provider
metadata:
name: pubsub-alert
namespace: flux-system
spec:
address: GCP_PROJECT_ID
channel: GCP_PUBSUB_TOPIC_ID
secretRef:
name: pubsub-alert
type: googlepubsub
---
apiVersion: notification.toolkit.fluxcd.io/v1beta3
kind: Alert
metadata:
name: pubsub-alert
namespace: flux-system
spec:
eventMetadata:
Cluster: gke-cluster
Environment: sbx
eventSources:
- apiVersion: kustomize.toolkit.fluxcd.io/v1
kind: Kustomization
name: "*"
providerRef:
name: pubsub-alert
summary: Flux Kustomization Event Example of which event gets published:
Is there a way to publish Reconciliation Succeeded events as well? Some logs from the notification controller
|
Beta Was this translation helpful? Give feedback.
Answered by
stefanprodan
Jan 24, 2024
Replies: 1 comment 3 replies
-
This is the intended behaviour. |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The Alert API is meant to notify when the cluster state drifts from the desired state, the fact that the controller went over a reconcile loop that resulted in no operations is not subject to altering. If you need to capture these events, you could write your own HTTP receiver and use an Alert Provider that forwards all events in raw JSON format to that endpoint. Docs here: https://fluxcd.io/flux/components/notification/providers/#generic-webhook