Prometheus operator AlertmanagerConfig unknown field "webhook_configs" Prometheus operator AlertmanagerConfig unknown field "webhook_configs" kubernetes kubernetes

Prometheus operator AlertmanagerConfig unknown field "webhook_configs"


The problem is that you are using the configuration reference for the actual AlertManager application and not the one for the Kubernetes Custom Resource provided by the Prometheus Operator.

The Prometheus Operator takes the configuration provided in the form of custom resources like AlertManagerConfig and converts them into actual AlertManager config and updates the configuration file the application uses. That is a part of the reason why you use an operator in the first place. It makes these things convenient for you.

So the actual configuration reference you should be using here is this.This part of the Prometheus Operator's github readme lists down the available custom resources you can use with it.


Taking this link as reference,

apiVersion: monitoring.coreos.com/v1alpha1kind: AlertmanagerConfigmetadata:  name: customspec:  receivers:    - name: custom      webhookConfigs:        - send_resolved: true          url: https://example.com

You can also check field using kubectl explain command

kubectl explain alertmanagerconfig.spec.receivers