Closed avijitsarkar123 closed 1 month ago
Hi @avijitsarkar123,
Thank you for bringing up this issue. As I understand independent of the NotificationChannel
resource, you could not create the AlertPolicy
resource successfully.
As I see, you are using an old version of the monolithic provider. I could not reproduce the bug with the latest version. Could you please try with v1.0.2
and let us know?
And please take note: The monolithic package is deprecated in favor of the family resource packages and will no longer be maintained after 12 June 2024
This provider repo does not have enough maintainers to address every issue. Since there has been no activity in the last 90 days it is now marked as stale
. It will be closed in 14 days if no further activity occurs. Leaving a comment starting with /fresh
will mark this issue as not stale.
This issue is being closed since there has been no activity for 14 days since marking it as stale
. If you still need help, feel free to comment or reopen the issue!
@turkenf I can reproduce the same error with upbound/provider-gcp-monitoring:v1.8.0
and xpkg.upbound.io/upbound/provider-family-gcp:v1.8.0
.
Could you suggest how to reference the notification channel from alert policy?
apiVersion: monitoring.gcp.upbound.io/v1beta1
kind: AlertPolicy
metadata:
annotations:
meta.upbound.io/example-id: monitoring/v1beta1/alertpolicy
labels:
testing.upbound.io/example-name: example_alert_policy
name: example-alert-policy
spec:
forProvider:
combiner: OR
conditions:
- conditionThreshold:
- aggregations:
- alignmentPeriod: 60s
perSeriesAligner: ALIGN_RATE
comparison: COMPARISON_GT
duration: 60s
filter: metric.type="compute.googleapis.com/instance/disk/write_bytes_count" AND
resource.type="gce_instance"
displayName: test condition
displayName: My Alert Policy
notificationChannels:
- example-notification-channel
userLabels:
foo: bar
---
apiVersion: monitoring.gcp.upbound.io/v1beta1
kind: NotificationChannel
metadata:
annotations:
meta.upbound.io/example-id: monitoring/v1beta1/notificationchannel
labels:
testing.upbound.io/example-name: example_notification_channel
name: example-notification-channel
spec:
forProvider:
displayName: Test Notification Channel
labels:
email_address: fake_email@blahblah.com
type: email
Is there an existing issue for this?
Affected Resource(s)
Resource MRs required to reproduce the bug
NotificationChannel Manifest:
AlertPolicy Manifest
Steps to Reproduce
Create a GCP notificationChannel and then try to add it to the AlertPolicy
What happened?
The AlertPolicy is erroring out
Relevant Error Output Snippet