Feat: Implement payload in Alertmanager Webhook Config CR#8507
Conversation
add payload support
|
Will continue after #8505 is merged. |
to return error if using the unsupported version
add payload conversion
to cover payload
ab4fc6f to
39dca58
Compare
| // It requires Alertmanager >= v0.32.0. | ||
| // +listType=atomic | ||
| // +optional | ||
| Payload []KeyValue `json:"payload,omitempty"` |
There was a problem hiding this comment.
I would probably use a plain string type which offers flexibility to the users (the JSON payload can be a string, a map or a list) while preserving a strongly typed API.
There was a problem hiding this comment.
@simonpasquier Is it okay if I just pass a string into the Alertmanager config secret without parsing into a map or a list?
for flexibility Signed-off-by: Nattapong Ekudomsuk <[email protected]>
change to nil check instead Signed-off-by: Nattapong Ekudomsuk <[email protected]>
ensure no nil pointer dereference
to match the new type
simonpasquier
left a comment
There was a problem hiding this comment.
LGTM but I'll test locally too.
remove the test message
to fix compile error
to check error case for unsupported version
|
Hi @simonpasquier and @nutmos ! This feature looks like exactly what we needed. Any idea when it might be available? |
|
@DWonMtl Please let @simonpasquier test it first. :) I am happy to update when he figures out any issues. |
|
@DWonMtl it should be available in the next release of the operator planned for this week 🤞 |
…r to v0.92.1 (#1765) ##### [\`v0.92.1\`](https://github.com/prometheus-operator/prometheus-operator/releases/tag/v0.92.1) - \[BUGFIX] Fix "namespace not found" errors when the operator watches monitoring and workload resources in different resources. [#8658](prometheus-operator/prometheus-operator#8658) --- ##### [\`v0.92.0\`](https://github.com/prometheus-operator/prometheus-operator/releases/tag/v0.92.0) > \[!NOTE] > The `PrometheusTopologySharding` and `PrometheusShardRetentionPolicy` feature gates have been promoted to **Beta** in this release and are now enabled by default. See the [sharding documentation](https://prometheus-operator.dev/docs/platform/sharding/) for details. - \[CHANGE] Add URL validation for the `tokenUrl` field in OAuth2 configuration across all CRDs. [#8579](prometheus-operator/prometheus-operator#8579) - \[CHANGE] Add URL validation for the `url` field in `RemoteReadSpec` in `Prometheus` CRD. [#8596](prometheus-operator/prometheus-operator#8596) - \[FEATURE] Migrate retention options from CLI flags to the config file for `Prometheus` CRD (Prometheus >= v3 uses the config file; older versions continue to use CLI flags). [#8547](prometheus-operator/prometheus-operator#8547) - \[FEATURE] Add `staleSeriesCompactionThreshold` field to `TSDBSpec` in `Prometheus` and `PrometheusAgent` CRDs. [#8563](prometheus-operator/prometheus-operator#8563) - \[FEATURE] Add `labelNameUnderscoreSanitization` and `labelNamePreserveMultipleUnderscores` fields to `OTLPConfig` in `Prometheus` and `PrometheusAgent` CRDs. [#8562](prometheus-operator/prometheus-operator#8562) - \[FEATURE] Add `payload` field to Webhook receiver in `AlertmanagerConfig` CRD. [#8507](prometheus-operator/prometheus-operator#8507) - \[ENHANCEMENT] Use pod topology labels for zone sharding on Kubernetes >= 1.35 when the `PrometheusTopologySharding` feature gate is enabled (removes the need for `attachMetadata.node=true`). [#8564](prometheus-operator/prometheus-operator#8564) - \[ENHANCEMENT] Add validation for the Slack `update_message` field in Alertmanager configuration Secret. [#8556](prometheus-operator/prometheus-operator#8556) - \[BUGFIX] Validate target labels in `Probe` static configuration to prevent invalid Prometheus scrape configs. [#7901](prometheus-operator/prometheus-operator#7901) - \[BUGFIX] Fix goroutine leak and data race in `pollBasedListerWatcher`. [#8593](prometheus-operator/prometheus-operator#8593) - \[BUGFIX] Validate `ProxyConfig` in OAuth2 configuration. [#8610](prometheus-operator/prometheus-operator#8610) - \[BUGFIX] Fix SMTP smarthost format error handling in Alertmanager configuration. [#8586](prometheus-operator/prometheus-operator#8586) - \[BUGFIX] Fix missing `return` in admission webhook after marshal failure. [#8582](prometheus-operator/prometheus-operator#8582) - \[BUGFIX] Fix `FindOwner` to return `nil` on `meta.Accessor` error. [#8585](prometheus-operator/prometheus-operator#8585) - \[BUGFIX] Fix dropped gzip `Close` errors in `GzipConfig` and `GunzipConfig`. [#8573](prometheus-operator/prometheus-operator#8573) - \[BUGFIX] Fix panic on malformed key=value flag input (e.g. `--labels "key"`). [#8560](prometheus-operator/prometheus-operator#8560) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
…ron#231) * scripts: replace license check shell script with Go implementation Replace scripts/check_license.sh with a Go-based license checker under scripts/check-license/ that supports both checking (-check) and auto-fixing (-fix) license headers. The fix mode adds missing headers and removes years from dated copyright lines to match the .header template. Update Makefile to use fix-license in the format target so CI auto-fixes and relies on git diff to catch changes. Signed-off-by: Jayapriya Pai <[email protected]> * chore: fix license header in files Signed-off-by: Jayapriya Pai <[email protected]> * chore: fix lint Signed-off-by: Jayapriya Pai <[email protected]> * build(deps): bump github.com/antchfx/xpath in /scripts Bumps [github.com/antchfx/xpath](https://github.com/antchfx/xpath) from 1.1.10 to 1.3.6. - [Release notes](https://github.com/antchfx/xpath/releases) - [Commits](https://github.com/antchfx/xpath/compare/v1.1.10...v1.3.6) --- updated-dependencies: - dependency-name: github.com/antchfx/xpath dependency-version: 1.3.6 dependency-type: indirect ... Signed-off-by: dependabot[bot] <[email protected]> * reloader: watch the config file's parent directory to speed up config reloads. Without this, reloads are gated on the reloader's defaultWatchInterval (every ~3 minutes). By watching the directory, reloads are instead driven by kubelet's config sync frequency only. Note: watching the directory rather than the file directly is also the fsnotify recommended approach, as atomic file writes (used by kubelet) can silently break file watchers: https://github.com/fsnotify/fsnotify/blob/a9bc2e01792f868516acf80817f7d7d7b3315409/README.md?plain=1#L128 For example, atomic file updates will render the initial file watcher obsolete. That watcher will only receive the first DELETE and then stop sending any events, causing the reloader to fall back to defaultWatchInterval (3 minutes). kubelet updates the ConfigMap/Secret mounted files atomically using https://pkg.go.dev/k8s.io/kubernetes/pkg/volume/util#AtomicWriter Because the operator is responsible for defining config file mounting, I suppose no other files exist in the parent directory that might trigger unneeded events. Also, watching the config file's parent directory will catch events corresponding to kubelet's AtomicWriter manipulations on symlinks and modifications to the timestamped directories which contain the various actual config file versions. Given that, watching the entire parent directory may result in multiple events at once, but the reloader is able to smooth them out. Maybe we should also think about whether to want/can teach the reloader to handle this on its side. fixes prometheus-operator#5408 Signed-off-by: machine424 <[email protected]> * chore: pin GitHub Actions to exact release versions/commit SHA Signed-off-by: Jayapriya Pai <[email protected]> * Fix typo in error messages for endpointslice * Merge pull request #8427 from davidquan1/issue8241 fix: #8421 Operator hardcode the Prometheus probe type to HTTPS when https and web.config enabled * build(deps): bump actions/setup-go from 6.3.0 to 6.4.0 Bumps [actions/setup-go](https://github.com/actions/setup-go) from 6.3.0 to 6.4.0. - [Release notes](https://github.com/actions/setup-go/releases) - [Commits](https://github.com/actions/setup-go/compare/v6.3.0...v6.4.0) --- updated-dependencies: - dependency-name: actions/setup-go dependency-version: 6.4.0 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <[email protected]> * build(deps): bump dependabot/fetch-metadata from 2.2.0 to 3.0.0 Bumps [dependabot/fetch-metadata](https://github.com/dependabot/fetch-metadata) from 2.2.0 to 3.0.0. - [Release notes](https://github.com/dependabot/fetch-metadata/releases) - [Commits](https://github.com/dependabot/fetch-metadata/compare/v2.2.0...v3.0.0) --- updated-dependencies: - dependency-name: dependabot/fetch-metadata dependency-version: 3.0.0 dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <[email protected]> * fix(scrapeconfig): add missing MinLength validations and fix documentation Related-to: #8420 Signed-off-by: Jayapriya Pai <[email protected]> * change(scrapeconfig): enforce mutual exclusion of auth methods Add a CEL XValidation rule on ScrapeConfigSpec ensuring at most one of basicAuth, authorization, or oauth2 can be configured. This is enforced by the API server at admission time, rejecting invalid resources before they reach the operator. Related-to: #8420 Signed-off-by: Jayapriya Pai <[email protected]> * feat: implement shardingStrategy Signed-off-by: Simon Pasquier <[email protected]> * feat: add CEL validations This commit adds validations to reject: * topology configuration when strategy != Topology. * sharding configuration when PrometheusAgent runs in DaemonSet mode. * number of shards being less than the number of topology values. Signed-off-by: Simon Pasquier <[email protected]> * test: add e2e tests for CEL validation Signed-off-by: Simon Pasquier <[email protected]> * test(sc e2e): add missing e2e CRD validation tests for K8S SD Closes #8481 Signed-off-by: Jayapriya Pai <[email protected]> * chore: refactor metadata merging Signed-off-by: Simon Pasquier <[email protected]> * feat: implement shard retention Signed-off-by: Simon Pasquier <[email protected]> * Don't copy operator.prometheus.io metadata from source Signed-off-by: Simon Pasquier <[email protected]> * Extend existing e2e test Signed-off-by: Simon Pasquier <[email protected]> * Update CHANGELOG.md Signed-off-by: Simon Pasquier <[email protected]> * feat: implement node selector for topology sharding mode This commit extends the Prometheus/PrometheusAgent controllers to modify the pod node selector so that each pod lands in the assigned topology zone of the shard. Signed-off-by: Simon Pasquier <[email protected]> * test: add e2e test This commit adds an end-to-end test validating that the pods are scheduled in the correct zones when sharding strategy mode is set to Topology. Signed-off-by: Simon Pasquier <[email protected]> * build(deps): bump docker/login-action from 4.0.0 to 4.1.0 Bumps [docker/login-action](https://github.com/docker/login-action) from 4.0.0 to 4.1.0. - [Release notes](https://github.com/docker/login-action/releases) - [Commits](https://github.com/docker/login-action/compare/b45d80f862d83dbcd57f89517bcf500b2ab88fb2...4907a6ddec9925e35a0a9e82d7399ccc52663121) --- updated-dependencies: - dependency-name: docker/login-action dependency-version: 4.1.0 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <[email protected]> * build(deps): bump streetsidesoftware/cspell-action from 8.3.0 to 8.4.0 Bumps [streetsidesoftware/cspell-action](https://github.com/streetsidesoftware/cspell-action) from 8.3.0 to 8.4.0. - [Release notes](https://github.com/streetsidesoftware/cspell-action/releases) - [Changelog](https://github.com/streetsidesoftware/cspell-action/blob/main/CHANGELOG.md) - [Commits](https://github.com/streetsidesoftware/cspell-action/compare/9cd41bb518a24fefdafd9880cbab8f0ceba04d28...de2a73e963e7443969755b648a1008f77033c5b2) --- updated-dependencies: - dependency-name: streetsidesoftware/cspell-action dependency-version: 8.4.0 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <[email protected]> * build(deps): bump github.com/prometheus/exporter-toolkit Bumps [github.com/prometheus/exporter-toolkit](https://github.com/prometheus/exporter-toolkit) from 0.15.1 to 0.16.0. - [Release notes](https://github.com/prometheus/exporter-toolkit/releases) - [Commits](https://github.com/prometheus/exporter-toolkit/compare/v0.15.1...v0.16.0) --- updated-dependencies: - dependency-name: github.com/prometheus/exporter-toolkit dependency-version: 0.16.0 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <[email protected]> * build(deps): bump go.opentelemetry.io/otel/sdk from 1.42.0 to 1.43.0 Bumps [go.opentelemetry.io/otel/sdk](https://github.com/open-telemetry/opentelemetry-go) from 1.42.0 to 1.43.0. - [Release notes](https://github.com/open-telemetry/opentelemetry-go/releases) - [Changelog](https://github.com/open-telemetry/opentelemetry-go/blob/main/CHANGELOG.md) - [Commits](https://github.com/open-telemetry/opentelemetry-go/compare/v1.42.0...v1.43.0) --- updated-dependencies: - dependency-name: go.opentelemetry.io/otel/sdk dependency-version: 1.43.0 dependency-type: indirect ... Signed-off-by: dependabot[bot] <[email protected]> * Go 1.25 now natively handles container CPU quotas. (#8495) Signed-off-by: dongjiang <[email protected]> * feat: bump alertmanager to latest Signed-off-by: Hélia Barroso <[email protected]> * chore: bump prometheus to 3.11.1 (#8492) * chore: bump prometheus to 3.11.0 Signed-off-by: Hélia Barroso <[email protected]> * feat: update minor Signed-off-by: Hélia Barroso <[email protected]> --------- Signed-off-by: Hélia Barroso <[email protected]> * docs: update AlertmanagerConfig API docs to include MatcherStrategyType (#7990) Signed-off-by: Timon Engelke <[email protected]> * build(deps): bump golang.org/x/net from 0.52.0 to 0.53.0 Bumps [golang.org/x/net](https://github.com/golang/net) from 0.52.0 to 0.53.0. - [Commits](https://github.com/golang/net/compare/v0.52.0...v0.53.0) --- updated-dependencies: - dependency-name: golang.org/x/net dependency-version: 0.53.0 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <[email protected]> * update golangci linter version (#8510) Signed-off-by: dongjiang <[email protected]> * build(deps): bump actions/upload-artifact from 7.0.0 to 7.0.1 Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 7.0.0 to 7.0.1. - [Release notes](https://github.com/actions/upload-artifact/releases) - [Commits](https://github.com/actions/upload-artifact/compare/v7.0.0...v7.0.1) --- updated-dependencies: - dependency-name: actions/upload-artifact dependency-version: 7.0.1 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <[email protected]> * Feat: Add support for Mattermost global webhook URL in Alertmanager Secret Config (#8501) * alertmanager: update global variables in alertmanager secret config to support mattermost webhook url * alertmanager: add test cases to test the function of mattermost webhook url files * alertmanager: update test cases change the parameter * trigger ci * alertmanager: update sanitize function exclude check for AM >= 0.32.0 for webhook url * alertmanager: add test cases to check empty webhook_url for version below 32 and 32 onwards * Feat: Implement the payload field in Webhook in Alertmanager secret config (#8505) * alertmanager: add test cases to test update_message add/drop Signed-off-by: Nattapong Ekudomsuk <[email protected]> * alertmanager: update webhook config fields to support payload introduced in 0.32.0 * alertmanager: remove non-relevant test cases to clean up the file * alertmanager: remove unused file clean up the directory * alertmanager: update test case adjust version --------- Signed-off-by: Nattapong Ekudomsuk <[email protected]> * Merge pull request #8514 from nutmos/fix/change-url-type Fix: update type of Mattermost Webhook URL * build(deps): bump the k8s-libs group with 5 updates Bumps the k8s-libs group with 5 updates: | Package | From | To | | --- | --- | --- | | [k8s.io/api](https://github.com/kubernetes/api) | `0.35.3` | `0.35.4` | | [k8s.io/apiextensions-apiserver](https://github.com/kubernetes/apiextensions-apiserver) | `0.35.3` | `0.35.4` | | [k8s.io/apimachinery](https://github.com/kubernetes/apimachinery) | `0.35.3` | `0.35.4` | | [k8s.io/client-go](https://github.com/kubernetes/client-go) | `0.35.3` | `0.35.4` | | [k8s.io/component-base](https://github.com/kubernetes/component-base) | `0.35.3` | `0.35.4` | Updates `k8s.io/api` from 0.35.3 to 0.35.4 - [Commits](https://github.com/kubernetes/api/compare/v0.35.3...v0.35.4) Updates `k8s.io/apiextensions-apiserver` from 0.35.3 to 0.35.4 - [Release notes](https://github.com/kubernetes/apiextensions-apiserver/releases) - [Commits](https://github.com/kubernetes/apiextensions-apiserver/compare/v0.35.3...v0.35.4) Updates `k8s.io/apimachinery` from 0.35.3 to 0.35.4 - [Commits](https://github.com/kubernetes/apimachinery/compare/v0.35.3...v0.35.4) Updates `k8s.io/client-go` from 0.35.3 to 0.35.4 - [Changelog](https://github.com/kubernetes/client-go/blob/master/CHANGELOG.md) - [Commits](https://github.com/kubernetes/client-go/compare/v0.35.3...v0.35.4) Updates `k8s.io/component-base` from 0.35.3 to 0.35.4 - [Commits](https://github.com/kubernetes/component-base/compare/v0.35.3...v0.35.4) --- updated-dependencies: - dependency-name: k8s.io/api dependency-version: 0.35.4 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: k8s-libs - dependency-name: k8s.io/apiextensions-apiserver dependency-version: 0.35.4 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: k8s-libs - dependency-name: k8s.io/apimachinery dependency-version: 0.35.4 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: k8s-libs - dependency-name: k8s.io/client-go dependency-version: 0.35.4 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: k8s-libs - dependency-name: k8s.io/component-base dependency-version: 0.35.4 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: k8s-libs ... Signed-off-by: dependabot[bot] <[email protected]> * test: move retention test to dedicated file Signed-off-by: Simon Pasquier <[email protected]> * test: add e2e test on resharding This commit adds the `PrometheusTargetDistributionOnResharding` test which verifies that scrape targets are properly redistributed when Prometheus shards are scaled up and down with the Retain sharding policy. Signed-off-by: Simon Pasquier <[email protected]> * test: update e2e sharding test with __tmp_disable_sharding Signed-off-by: Simon Pasquier <[email protected]> * fix: drop targets for inactive shards This commit updates the generated Prometheus configuration to drop any shard which isn't within the range of active shards (only when the shard retention feature gate is enabled to avoid unexpected side effects). Signed-off-by: Simon Pasquier <[email protected]> * Update RELEASE.md * build(deps): bump dependabot/fetch-metadata from 3.0.0 to 3.1.0 Bumps [dependabot/fetch-metadata](https://github.com/dependabot/fetch-metadata) from 3.0.0 to 3.1.0. - [Release notes](https://github.com/dependabot/fetch-metadata/releases) - [Commits](https://github.com/dependabot/fetch-metadata/compare/v3.0.0...v3.1.0) --- updated-dependencies: - dependency-name: dependabot/fetch-metadata dependency-version: 3.1.0 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <[email protected]> * feat: support TLS cipher for Thanos gRPC servers Signed-off-by: Simon Pasquier <[email protected]> * feat: implement custom shard retention Closes #7437 Signed-off-by: Simon Pasquier <[email protected]> * update prometheus version Signed-off-by: dongjiang <[email protected]> * Merge pull request #8493 from heliapb/fix/bump_tools_prom fix: update prometheus | alertmanager version * test: add test cases for URL validation * Prometheus: Update AzureSD Workload Identity Authentication Method (#8489) * prometheus: updat azure sd authentication method support workload identity method introduced in prom 3.11.0 * prometheus: add test cases for workload identity prometheus: add test cases for workload identity * prometheus: add workload identity test case provisioning config to cover the new auth type * prometheus: update test case change type of auth Signed-off-by: Nattapong Ekudomsuk <[email protected]> --------- Signed-off-by: Nattapong Ekudomsuk <[email protected]> * Feat: Implement the attachment fields in Mattermost top-level config in Alertmanager secret config (#8508) * alertmanager: refactor mattermost config move attachment parameters to the top level fields * alertmanager: update value name to have the correct meaning * alertmanager: update top-level attachment config test cases to test the field reset * trigger ci * Feat: Add support for update_message field for Slack in Alertmanager secret config (#8502) * alertmanager: update field support add support for update_message field * alertmanager: add test cases to test on add/drop of config Signed-off-by: Nattapong Ekudomsuk <[email protected]> * alertmanager: update order of config check to avoid check being ignored --------- Signed-off-by: Nattapong Ekudomsuk <[email protected]> * Feat: Add threading config for email receiver in Alertmanager Config CR (#8400) * api: add threading config to cover threading * alertmanager: add conversion of threading config to cover the conversion from CR to the native field * alertmanager: add threading config test case to cover the new field * alertmanager: add version check for threading config to reject the configuration when using alertmanager below 0.30.0 * alertmanager: add test case for threading version check to cover version check unit testing * api: update autogenerated file * api: update autogenerated file * alertmanager: update the variable to have more strict validation * alertmanager: update conversion of thread by date to ensure the parameter is added to am properly * alertmanager: remove enabled as this field is not needed * alertmanager: update config converter to remove enabled field * alertmanager: update test cases to reflect the value change * alertmanager: remove unused enabled out of the generated files to ensure the correct file generation * alertmanager: update generated files * alertmanager: add logic (#8534) check empty string * feat: add topology zone as an external label (#8519) * feat: add topology zone as an external label Signed-off-by: Simon Pasquier <[email protected]> * refactor: move NodeSelectorWithTopologyZone to ConfigGenerator Signed-off-by: Simon Pasquier <[email protected]> * refactor: move TopologyZoneForShard to ConfigGenerator Signed-off-by: Simon Pasquier <[email protected]> * refactor: fix statefulset unit tests on config reloader * docs: update CHANGELOG.md * test: update golden files --------- Signed-off-by: Simon Pasquier <[email protected]> * Feat: add Mattermost support in Alertmanager Global Config CR (#8503) * alertmanager: add test cases to test update_message add/drop Signed-off-by: Nattapong Ekudomsuk <[email protected]> * alertmanager: update global config CR add support for mattermost webhook url * doc: update doc add supported version * alertmanager: remove test case unrelevant test cases * doc: update description fix the description * alertmanager: update api fix typo * alertmanager: update config check add mattermost config check * alertmanager: add global mattermost config validation to validate url * alertmanager: update conversion add mattermost webhook url conversion * alertmanager: update conversion add mattermost webhook url conversion * alertmanager: add test cases to test mattermost global config * alertmanager: update validation fix var typo * alertmanager: update config check remove unused parameters * alertmanager: fix function call too many arguments * alertmanager: update test case add golden file Signed-off-by: Nattapong Ekudomsuk <[email protected]> * alertmanager: remove files unrelated test files * alertmanager: update url type change from string to secret * alertmanager: update validation method to support secret type --------- Signed-off-by: Nattapong Ekudomsuk <[email protected]> * alertmanager: fix lib name * alertmanager: fix wrong lib name to fix compile issue * trigger ci * feat: implement target distribution with topology sharding This commit implements the logic in the Prometheus configuration generator to filter scrape targets by topology zone and distribute targets within a zone to the available shards. Closes #7225 * chore: move tests around * test: add DeployBasicAuthApp method * build(deps): bump github.com/prometheus/prometheus Bumps [github.com/prometheus/prometheus](https://github.com/prometheus/prometheus) from 0.311.2 to 0.311.3. - [Release notes](https://github.com/prometheus/prometheus/releases) - [Changelog](https://github.com/prometheus/prometheus/blob/main/CHANGELOG.md) - [Commits](https://github.com/prometheus/prometheus/compare/v0.311.2...v0.311.3) --- updated-dependencies: - dependency-name: github.com/prometheus/prometheus dependency-version: 0.311.3 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <[email protected]> * test: update testPrometheusTopologySharding() Signed-off-by: Simon Pasquier <[email protected]> * build(deps): bump go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp Bumps [go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp](https://github.com/open-telemetry/opentelemetry-go) from 1.42.0 to 1.43.0. - [Release notes](https://github.com/open-telemetry/opentelemetry-go/releases) - [Changelog](https://github.com/open-telemetry/opentelemetry-go/blob/main/CHANGELOG.md) - [Commits](https://github.com/open-telemetry/opentelemetry-go/compare/v1.42.0...v1.43.0) --- updated-dependencies: - dependency-name: go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp dependency-version: 1.43.0 dependency-type: indirect ... Signed-off-by: dependabot[bot] <[email protected]> * feat: support TLS curves for Thanos gRPC servers * feat: add promql-options CLI arguments to admission webhook Signed-off-by: Simon Pasquier <[email protected]> * test: refactor sharding e2e tests * Merge pull request #8494 from kubeservice-stack/update-sigv4 feat: Add AWS external_id support in sigv4 configuration for Prometheus/Alertmanager/Thanos CRD * feat: validate PrometheusRule based on PromQL enabled features This commit modifies the Prometheus controller to validate PromQL expressions in the `PrometheusRule` resources based on the PromQL features enabled for the Prometheus resource. It allows to deploy rules experimental PromQL functions for instance. Closes #7099 Signed-off-by: Simon Pasquier <[email protected]> * build(deps): bump github.com/prometheus/alertmanager Bumps [github.com/prometheus/alertmanager](https://github.com/prometheus/alertmanager) from 0.32.0 to 0.32.1. - [Release notes](https://github.com/prometheus/alertmanager/releases) - [Changelog](https://github.com/prometheus/alertmanager/blob/main/CHANGELOG.md) - [Commits](https://github.com/prometheus/alertmanager/compare/v0.32.0...v0.32.1) --- updated-dependencies: - dependency-name: github.com/prometheus/alertmanager dependency-version: 0.32.1 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <[email protected]> * feat: add healthFilter field to ConsulSDConfig in prometheus CRD (#8529) * add health filter for promtheus crd Signed-off-by: dongjiang <[email protected]> * make gen Signed-off-by: dongjiang <[email protected]> * update alertmanger and prometheus package verison Signed-off-by: dongjiang <[email protected]> * fix go mod tidy Signed-off-by: dongjiang <[email protected]> --------- Signed-off-by: dongjiang <[email protected]> * *: cut v0.91.0 * chore: bump k8s dependencies Signed-off-by: Simon Pasquier <[email protected]> * update golangci-linter version Signed-off-by: dongjiang <[email protected]> * *: modernize Go code * build(deps): bump sigs.k8s.io/controller-runtime from 0.23.3 to 0.24.0 Bumps [sigs.k8s.io/controller-runtime](https://github.com/kubernetes-sigs/controller-runtime) from 0.23.3 to 0.24.0. - [Release notes](https://github.com/kubernetes-sigs/controller-runtime/releases) - [Changelog](https://github.com/kubernetes-sigs/controller-runtime/blob/main/RELEASE.md) - [Commits](https://github.com/kubernetes-sigs/controller-runtime/compare/v0.23.3...v0.24.0) --- updated-dependencies: - dependency-name: sigs.k8s.io/controller-runtime dependency-version: 0.24.0 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <[email protected]> * Merge pull request #8554 from kubeservice-stack/update-controller-runtime-v0.24 build(deps): update controller-runtime to v0.24.0 and bump to golangci-linter config to go 1.26 * fix golangci lint in main (#8555) Signed-off-by: dongjiang <[email protected]> * test: extend tests for topology sharding Signed-off-by: Simon Pasquier <[email protected]> * build(deps): bump sigstore/cosign-installer from 4.1.1 to 4.1.2 Bumps [sigstore/cosign-installer](https://github.com/sigstore/cosign-installer) from 4.1.1 to 4.1.2. - [Release notes](https://github.com/sigstore/cosign-installer/releases) - [Commits](https://github.com/sigstore/cosign-installer/compare/cad07c2e89fa2edd6e2d7bab4c1aa38e53f76003...6f9f17788090df1f26f669e9d70d6ae9567deba6) --- updated-dependencies: - dependency-name: sigstore/cosign-installer dependency-version: 4.1.2 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <[email protected]> * operator: return error for malformed key=value flag input Map.Set() panics with an index-out-of-range error when a flag value does not contain "=" (e.g. --annotations "key"). Replace strings.Split with strings.Cut to validate the format and return a clear error instead of crashing. strings.Cut also correctly preserves values containing "=" which the previous code silently truncated. Signed-off-by: Sebastien Tardif <[email protected]> * operator: use read lock for read-only ReconciliationTracker methods HasRefTo and getStatus only read from maps but acquire an exclusive write lock (Lock), serializing with all other operations including informer event filtering and metrics collection. Use RLock instead to allow concurrent reads, consistent with the Collect method which already uses RLock on the same mutex. Signed-off-by: Sebastien Tardif <[email protected]> * alertmanager: update with new test cases to catch up with the latest change in main * update dependabot.yml Signed-off-by: dongjiang <[email protected]> * build(deps): bump golang.org/x/net from 0.53.0 to 0.54.0 Bumps [golang.org/x/net](https://github.com/golang/net) from 0.53.0 to 0.54.0. - [Commits](https://github.com/golang/net/compare/v0.53.0...v0.54.0) --- updated-dependencies: - dependency-name: golang.org/x/net dependency-version: 0.54.0 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <[email protected]> * build(deps): bump sigs.k8s.io/controller-runtime from 0.24.0 to 0.24.1 Bumps [sigs.k8s.io/controller-runtime](https://github.com/kubernetes-sigs/controller-runtime) from 0.24.0 to 0.24.1. - [Release notes](https://github.com/kubernetes-sigs/controller-runtime/releases) - [Changelog](https://github.com/kubernetes-sigs/controller-runtime/blob/main/RELEASE.md) - [Commits](https://github.com/kubernetes-sigs/controller-runtime/compare/v0.24.0...v0.24.1) --- updated-dependencies: - dependency-name: sigs.k8s.io/controller-runtime dependency-version: 0.24.1 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <[email protected]> * add option in tsdbconfig Signed-off-by: dongjiang <[email protected]> * build(deps): bump the k8s-libs group with 5 updates Bumps the k8s-libs group with 5 updates: | Package | From | To | | --- | --- | --- | | [k8s.io/api](https://github.com/kubernetes/api) | `0.36.0` | `0.36.1` | | [k8s.io/apiextensions-apiserver](https://github.com/kubernetes/apiextensions-apiserver) | `0.36.0` | `0.36.1` | | [k8s.io/apimachinery](https://github.com/kubernetes/apimachinery) | `0.36.0` | `0.36.1` | | [k8s.io/client-go](https://github.com/kubernetes/client-go) | `0.36.0` | `0.36.1` | | [k8s.io/component-base](https://github.com/kubernetes/component-base) | `0.36.0` | `0.36.1` | Updates `k8s.io/api` from 0.36.0 to 0.36.1 - [Commits](https://github.com/kubernetes/api/compare/v0.36.0...v0.36.1) Updates `k8s.io/apiextensions-apiserver` from 0.36.0 to 0.36.1 - [Release notes](https://github.com/kubernetes/apiextensions-apiserver/releases) - [Commits](https://github.com/kubernetes/apiextensions-apiserver/compare/v0.36.0...v0.36.1) Updates `k8s.io/apimachinery` from 0.36.0 to 0.36.1 - [Commits](https://github.com/kubernetes/apimachinery/compare/v0.36.0...v0.36.1) Updates `k8s.io/client-go` from 0.36.0 to 0.36.1 - [Changelog](https://github.com/kubernetes/client-go/blob/master/CHANGELOG.md) - [Commits](https://github.com/kubernetes/client-go/compare/v0.36.0...v0.36.1) Updates `k8s.io/component-base` from 0.36.0 to 0.36.1 - [Commits](https://github.com/kubernetes/component-base/compare/v0.36.0...v0.36.1) --- updated-dependencies: - dependency-name: k8s.io/api dependency-version: 0.36.1 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: k8s-libs - dependency-name: k8s.io/apiextensions-apiserver dependency-version: 0.36.1 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: k8s-libs - dependency-name: k8s.io/apimachinery dependency-version: 0.36.1 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: k8s-libs - dependency-name: k8s.io/client-go dependency-version: 0.36.1 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: k8s-libs - dependency-name: k8s.io/component-base dependency-version: 0.36.1 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: k8s-libs ... Signed-off-by: dependabot[bot] <[email protected]> * operator: fix dropped gzip Close errors in GzipConfig and GunzipConfig GzipConfig uses defer to close the gzip.Writer, which silently discards the error from Close(). Since Close() flushes buffered data and writes the mandatory gzip footer (CRC32 checksum and uncompressed size), a failure here produces corrupted output that the caller cannot detect. Both Prometheus and Alertmanager config compression paths rely on this function. Fix by returning buf.Close() directly instead of deferring it. GunzipConfig never calls gzip.Reader.Close(). The Go standard library documentation states that callers must call Close when finished reading to verify data integrity. Add the missing Close call and propagate its error. Signed-off-by: Sebastien Tardif <[email protected]> * ci: retrigger E2E after flaky ThanosRulerStateless timeout Signed-off-by: Sebastien Tardif <[email protected]> * update controller-runtime version (#8574) Signed-off-by: dongjiang <[email protected]> * test: add unit test for Alertmanager This commit adds a unit test for Alertmanager when `matcherStrategy` is `None` and multiple AlertmanagerConfig resources are provided. Signed-off-by: Simon Pasquier <[email protected]> * test: verify recreation of statefulsets This commit extends `testPromStorageUpdate` to verify that the statefulset is recreated when the storage spec is updated. Signed-off-by: Simon Pasquier <[email protected]> * Merge pull request #8562 from kubeservice-stack/update-otlpconfig feat: add `label_name_underscore_sanitization` and `label_name_preserve_multiple_underscores` to OTLPConfig * test: fix retention policy flakiness (#8548) This commit addresses the flakiness in the retention policy test. After scaling down to 1 shard the inactive shard statefulset doesn't disappear immeditaley. The previous `require.Len` assertion ran the instant `ScalePrometheusAndWaitUntilReady` returned causing race condition Addresses #8543 Signed-off-by: vprashar2929 <[email protected]> * build(deps): bump actions/stale in the github-actions-deps group Bumps the github-actions-deps group with 1 update: [actions/stale](https://github.com/actions/stale). Updates `actions/stale` from 10.2.0 to 10.3.0 - [Release notes](https://github.com/actions/stale/releases) - [Changelog](https://github.com/actions/stale/blob/main/CHANGELOG.md) - [Commits](https://github.com/actions/stale/compare/v10.2.0...v10.3.0) --- updated-dependencies: - dependency-name: actions/stale dependency-version: 10.3.0 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: github-actions-deps ... Signed-off-by: dependabot[bot] <[email protected]> * admission: add missing return after http.Error on marshal failure When json.Marshal fails in serveAdmission, the handler calls http.Error but does not return, causing execution to fall through to w.Write with nil bytes on an already-committed response. Add return after the http.Error call and move the debug log after the error check so it doesn't log nil response bytes on failure. Signed-off-by: Sebastien Tardif <[email protected]> * build(deps): bump golang.org/x/net from 0.54.0 to 0.55.0 Bumps [golang.org/x/net](https://github.com/golang/net) from 0.54.0 to 0.55.0. - [Commits](https://github.com/golang/net/compare/v0.54.0...v0.55.0) --- updated-dependencies: - dependency-name: golang.org/x/net dependency-version: 0.55.0 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <[email protected]> * build(deps): bump docker/login-action in the github-actions-deps group Bumps the github-actions-deps group with 1 update: [docker/login-action](https://github.com/docker/login-action). Updates `docker/login-action` from 4.1.0 to 4.2.0 - [Release notes](https://github.com/docker/login-action/releases) - [Commits](https://github.com/docker/login-action/compare/4907a6ddec9925e35a0a9e82d7399ccc52663121...650006c6eb7dba73a995cc03b0b2d7f5ca915bee) --- updated-dependencies: - dependency-name: docker/login-action dependency-version: 4.2.0 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: github-actions-deps ... Signed-off-by: dependabot[bot] <[email protected]> * operator: add missing return after meta.Accessor error in FindOwner When meta.Accessor(owner) fails, the error is logged but execution falls through to return the potentially nil or invalid accessor value. Every other error path in FindOwner returns nil explicitly. The bug was introduced in #6938 (2024-09-17). Signed-off-by: Sebastien Tardif <[email protected]> * alertmanager: return error on invalid SMTP smarthost format net.SplitHostPort error is silently discarded when converting email receiver configuration. If validation is bypassed or incomplete, the host and port fields are set to empty strings, producing a broken SMTP configuration that fails silently at send time. The original pattern predates validation added in #8270. Signed-off-by: Sebastien Tardif <[email protected]> * chore: update cspell configuration * Merge pull request #8579 from kubeservice-stack/change-url-crd refactor(crd): change OAuth2 TokenURL type from string to URL * refactor(crd): refactoring `resource.Quantity` validate (#8569) * refactoring resource.Quantity validate Signed-off-by: dongjiang <[email protected]> * fix codereview bug Signed-off-by: dongjiang <[email protected]> * Update pkg/apis/monitoring/v1/types.go Co-authored-by: Simon Pasquier <[email protected]> --------- Signed-off-by: dongjiang <[email protected]> Co-authored-by: Simon Pasquier <[email protected]> * chore(api): enable notimestamp KAL linter Enable the notimestamp kube-api-linter rule for monitoring API types. Existing legacy Timestamp field names remain allowed via nolint comments. Fixes #8127 * update .golangci-kal.yml Signed-off-by: dongjiang <[email protected]> * Merge pull request #8273 from nutmos/feat/add-missing-e2e-am-receivers Feat: Add E2E test case to cover new receivers and AM Config and Global Config * test: fix testThanosRulerStateless duplicate ALERTS Apply RuleSelector=nil before creating Prometheus so it does not evaluate rules alongside Thanos Ruler remote-write. * pkg/prometheus: validate Probe static target labels Reject invalid label names in Probe static target labels based on the Prometheus version. Also validate static target labels in a deterministic order. Signed-off-by: Lohit Kolluri <[email protected]> * changet url string to URL type (#8596) Signed-off-by: dongjiang <[email protected]> * docs: clarify attachMetadata.node label behavior Clarify in the API docs that attachMetadata.node only exposes node labels at discovery time (as __meta_kubernetes_node_label_*), and that relabeling is required to copy selected labels onto scraped metrics. Regenerate CRDs, bundle, and API reference docs. Fixes #7166 Signed-off-by: Lohit Kolluri <[email protected]> * chore: document usage of WithInlineTLSConfig() * chore: add slashpai as release shepherd for v0.92 Signed-off-by: Jayapriya Pai <[email protected]> * chore: add simonpasquier as release shepherd for v0.93 Signed-off-by: Jayapriya Pai <[email protected]> * feat: migrate retention options to config file This commit migrates retention options from CLI flags to config file as per Prometheus v3 release which deprecates the `storage.tsdb.retention` flags (prometheus/prometheus#18200) With this change the operator writes the retention options to the config file. For older Prometheus versions the CLI flags continue to be used Addresses #8522 Written with the help of Claude Code Signed-off-by: vprashar2929 <[email protected]> * Merge pull request #8564 from Sanchit2662/zone-aware-sharding-downward-api prometheus: use pod topology labels for zone sharding on K8s >= 1.35 * chore: simplify TLS configuration validation * chore: update Prometheus to v3.12.0 * build(deps): bump github.com/prometheus/common from 0.67.5 to 0.68.0 Bumps [github.com/prometheus/common](https://github.com/prometheus/common) from 0.67.5 to 0.68.0. - [Release notes](https://github.com/prometheus/common/releases) - [Changelog](https://github.com/prometheus/common/blob/main/CHANGELOG.md) - [Commits](https://github.com/prometheus/common/compare/v0.67.5...v0.68.0) --- updated-dependencies: - dependency-name: github.com/prometheus/common dependency-version: 0.68.0 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <[email protected]> * build(deps): bump imjasonh/setup-crane in the github-actions-deps group Bumps the github-actions-deps group with 1 update: [imjasonh/setup-crane](https://github.com/imjasonh/setup-crane). Updates `imjasonh/setup-crane` from 0.5 to 0.6 - [Release notes](https://github.com/imjasonh/setup-crane/releases) - [Commits](https://github.com/imjasonh/setup-crane/compare/6da1ae018866400525525ce74ff892880c099987...59c71e96a00b28651f10369ba3359a6d730740a0) --- updated-dependencies: - dependency-name: imjasonh/setup-crane dependency-version: '0.6' dependency-type: direct:production update-type: version-update:semver-minor dependency-group: github-actions-deps ... Signed-off-by: dependabot[bot] <[email protected]> * chore: update Kind and Kubernetes (v1.36.1) * build(deps): bump actions/checkout in the github-actions-deps group Bumps the github-actions-deps group with 1 update: [actions/checkout](https://github.com/actions/checkout). Updates `actions/checkout` from 6.0.2 to 6.0.3 - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](https://github.com/actions/checkout/compare/v6.0.2...v6.0.3) --- updated-dependencies: - dependency-name: actions/checkout dependency-version: 6.0.3 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: github-actions-deps ... Signed-off-by: dependabot[bot] <[email protected]> * build(deps): bump github.com/prometheus/common from 0.68.0 to 0.68.1 Bumps [github.com/prometheus/common](https://github.com/prometheus/common) from 0.68.0 to 0.68.1. - [Release notes](https://github.com/prometheus/common/releases) - [Changelog](https://github.com/prometheus/common/blob/main/CHANGELOG.md) - [Commits](https://github.com/prometheus/common/compare/v0.68.0...v0.68.1) --- updated-dependencies: - dependency-name: github.com/prometheus/common dependency-version: 0.68.1 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <[email protected]> * docs: clarify ServiceMonitor port vs targetPort (#8587) * docs: clarify ServiceMonitor port vs targetPort Clarify ServiceMonitor endpoint port vs targetPort semantics in docs and API comments. - port refers to the Service port name (.spec.ports[].name) - targetPort refers to the selected Pod container port name/number Signed-off-by: Lohit Kolluri <[email protected]> * docs: address review on ServiceMonitor port vs targetPort - Condense Endpoint.Port godoc to a single `.spec.ports[].name` reference - Document targetPort against `.spec.containers[].ports[].name` and `.containerPort`; drop redundant Service port disclaimer - Revert unrelated proposal typo fix (already on main) - Regenerate CRDs, bundle, and applyconfiguration Signed-off-by: Lohit Kolluri <[email protected]> * docs: revert user guide changes per review on #8587 Drop Documentation/user-guides/running-exporters.md updates; API godoc and regenerated CRDs remain. Also drop unrelated cspell.json changes. Signed-off-by: Lohit Kolluri <[email protected]> --------- Signed-off-by: Lohit Kolluri <[email protected]> * docs: rewrite sharding documentation Signed-off-by: Simon Pasquier <[email protected]> * validate ProxyConfig in OAuth2 validation (#8610) Signed-off-by: dongjiang <[email protected]> * build(deps): bump golang.org/x/sync from 0.20.0 to 0.21.0 Bumps [golang.org/x/sync](https://github.com/golang/sync) from 0.20.0 to 0.21.0. - [Commits](https://github.com/golang/sync/compare/v0.20.0...v0.21.0) --- updated-dependencies: - dependency-name: golang.org/x/sync dependency-version: 0.21.0 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <[email protected]> * build(deps): bump github.com/prometheus/alertmanager Bumps [github.com/prometheus/alertmanager](https://github.com/prometheus/alertmanager) from 0.32.1 to 0.32.2. - [Release notes](https://github.com/prometheus/alertmanager/releases) - [Changelog](https://github.com/prometheus/alertmanager/blob/main/CHANGELOG.md) - [Commits](https://github.com/prometheus/alertmanager/compare/v0.32.1...v0.32.2) --- updated-dependencies: - dependency-name: github.com/prometheus/alertmanager dependency-version: 0.32.2 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <[email protected]> * Merge pull request #8593 from SebTardif/fix/poll-lister-watcher-goroutine-leak pkg/listwatch: fix goroutine leak and data race in pollBasedListerWatcher * Feat: Implement payload in Alertmanager Webhook Config CR (#8507) * alertmanager: update webhook receiver CR add payload support * alertmanager: add version check to return error if using the unsupported version * alertmanager: update conversion method add payload conversion * alertmanager: add test cases to cover payload * add alert info * alertmanager: update type to any and CR type to string for flexibility Signed-off-by: Nattapong Ekudomsuk <[email protected]> * alertmanager: move check method change to nil check instead Signed-off-by: Nattapong Ekudomsuk <[email protected]> * trigger ci * alertmanager: update payload conversion method ensure no nil pointer dereference * alertmanager: update test case to match the new type * alertmanager: update error message remove the test message * alertmanager: update lib name to fix compile error * alertmanager: add test case to check error case for unsupported version * trigger ci --------- Signed-off-by: Nattapong Ekudomsuk <[email protected]> * update controller-tools version Signed-off-by: dongjiang <[email protected]> * chore: switch sharding features to beta This commit enables the following feature gates to beta, meaning that they are now enabled by default (it's still possible to disable them if needed): * `PrometheusTopologySharding` * `PrometheusShardRetentionPolicy` Signed-off-by: Simon Pasquier <[email protected]> * Merge pull request #8556 from nutmos/feat/slack-update-message-validation-am-config Feat: Add validation for Slack update_message in AM Secret Config * docs: update sharding example Signed-off-by: Simon Pasquier <[email protected]> * prometheus: update test files add tsdb config * alertmanager: update test file update indent * build(deps): bump golang.org/x/net from 0.55.0 to 0.56.0 Bumps [golang.org/x/net](https://github.com/golang/net) from 0.55.0 to 0.56.0. - [Commits](https://github.com/golang/net/compare/v0.55.0...v0.56.0) --- updated-dependencies: - dependency-name: golang.org/x/net dependency-version: 0.56.0 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <[email protected]> * build(deps): bump github.com/prometheus/alertmanager Bumps [github.com/prometheus/alertmanager](https://github.com/prometheus/alertmanager) from 0.32.2 to 0.33.0. - [Release notes](https://github.com/prometheus/alertmanager/releases) - [Changelog](https://github.com/prometheus/alertmanager/blob/main/CHANGELOG.md) - [Commits](https://github.com/prometheus/alertmanager/commits) --- updated-dependencies: - dependency-name: github.com/prometheus/alertmanager dependency-version: 0.33.0 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <[email protected]> * Merge pull request #8269 from nutmos/feat/refactor-error-logs-for-validations Feat: Refactor Error Messages for Alertmanager Receiver Validations * chore: update default Alertmanager version to v0.33.0 * chore: bump go dependencies before v0.92.0 Signed-off-by: Jayapriya Pai <[email protected]> * chore: add myself to maitainers (#8627) * chore: add myself to maitainers * chore: add myself to the maintainers * chore: add myself to triage list * chore: add myself to triage list * chore: add my name in the cspell dictionary * build(deps): bump github.com/prometheus/common from 0.68.1 to 0.69.0 Bumps [github.com/prometheus/common](https://github.com/prometheus/common) from 0.68.1 to 0.69.0. - [Release notes](https://github.com/prometheus/common/releases) - [Changelog](https://github.com/prometheus/common/blob/main/CHANGELOG.md) - [Commits](https://github.com/prometheus/common/compare/v0.68.1...v0.69.0) --- updated-dependencies: - dependency-name: github.com/prometheus/common dependency-version: 0.69.0 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <[email protected]> * docs: fix broken link to BasicAuth API reference The basic auth user guide linked to ../api.md, but the API reference actually lives at Documentation/api-reference/api.md, so the link returned a 404. Point it at ../api-reference/api.md, matching how the rest of the docs reference the API. Signed-off-by: s3onghyun <[email protected]> * chore: cut v0.92.0 Signed-off-by: Jayapriya Pai <[email protected]> * docs: fix duplicated word in troubleshooting guide The controller-id behavior table header read "started with with the --controller-id flag". Drop the repeated "with" to match the surrounding text, which already says "started with the --controller-id flag", and reflow the table columns so it stays mdox-formatted. Signed-off-by: s3onghyun <[email protected]> * fix: avoid "namespace not found" errors This commit ensures that the Prometheus and Alertmanager controllers look up namespaces in the relevant caches when they watch workload and configuration resources in different namespace sets. Signed-off-by: Simon Pasquier <[email protected]> * *: cut v0.92.1 Signed-off-by: Simon Pasquier <[email protected]> * Update Containerfile.operator * Update Containerfile.operator --------- Signed-off-by: dongjiang <[email protected]> Signed-off-by: Jayapriya Pai <[email protected]> Signed-off-by: dependabot[bot] <[email protected]> Signed-off-by: machine424 <[email protected]> Signed-off-by: Simon Pasquier <[email protected]> Signed-off-by: Hélia Barroso <[email protected]> Signed-off-by: Timon Engelke <[email protected]> Signed-off-by: Nattapong Ekudomsuk <[email protected]> Signed-off-by: Sebastien Tardif <[email protected]> Signed-off-by: vprashar2929 <[email protected]> Signed-off-by: Lohit Kolluri <[email protected]> Signed-off-by: s3onghyun <[email protected]> Co-authored-by: Simon Pasquier <[email protected]> Co-authored-by: Jayapriya Pai <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: machine424 <[email protected]> Co-authored-by: Nuga <[email protected]> Co-authored-by: David Quan <[email protected]> Co-authored-by: Simon Pasquier <[email protected]> Co-authored-by: dongjiang <[email protected]> Co-authored-by: Hélia Barroso <[email protected]> Co-authored-by: Hélia Barroso <[email protected]> Co-authored-by: Timon Engelke <[email protected]> Co-authored-by: Nutmos <[email protected]> Co-authored-by: Nattapong Ekudomsuk <[email protected]> Co-authored-by: dongjiang <[email protected]> Co-authored-by: Sebastien Tardif <[email protected]> Co-authored-by: Vibhu Prashar <[email protected]> Co-authored-by: Lohit Kolluri <[email protected]> Co-authored-by: SANCHIT KUMAR <[email protected]> Co-authored-by: s3onghyun <[email protected]> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Coleen Iona Quadros <[email protected]>
Description
This PR implements a new payload field in Alertmanager Config CR under the Webhook receiver.
The new feature is introduced in AM 0.32.0.
Type of change
What type of changes does your code introduce to the Prometheus operator? Put an
xin the box that apply.CHANGE(fix or feature that would cause existing functionality to not work as expected)FEATURE(non-breaking change which adds functionality)BUGFIX(non-breaking change which fixes an issue)ENHANCEMENT(non-breaking change which improves existing functionality)NONE(if none of the other choices apply. Example, tooling, build system, CI, docs, etc.)Verification
Unit Testing
Changelog entry
Please put a one-line changelog entry below. This will be copied to the changelog file during the release process.