Skip to content

Commit

Permalink
Remove old/incorrect API version usage
Browse files Browse the repository at this point in the history
- Update README.md to point to v1beta3 spec docs.
- Remove provider testdata which had old API version and is no longer
  used in any test.
- Update Provider v1beta2 spec docs to use Alert v1beta2.
- Update Provider v1beta3 spec docs to use v1beta3 API in all the
  code snippets.

Signed-off-by: Sunny <[email protected]>
  • Loading branch information
darkowlzz committed Dec 19, 2023
1 parent 0b48a06 commit 5b152f5
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 40 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
[![release](https://img.shields.io/github/release/fluxcd/notification-controller/all.svg)](https://github.com/fluxcd/notification-controller/releases)

Event forwarder and notification dispatcher for the [GitOps Toolkit](https://fluxcd.io/flux/components/) controllers.
The notification-controller is an implementation of the [notification.toolkit.fluxcd.io](docs/spec/v1beta1/README.md)
The notification-controller is an implementation of the [notification.toolkit.fluxcd.io](docs/spec/v1beta3/README.md)
API based on the specifications described in the [RFC](docs/spec/README.md).

![overview](docs/diagrams/notification-controller-overview.png)
8 changes: 0 additions & 8 deletions config/testdata/provider.yaml

This file was deleted.

2 changes: 1 addition & 1 deletion docs/spec/v1beta2/providers.md
Original file line number Diff line number Diff line change
Expand Up @@ -447,7 +447,7 @@ metadata:
stringData:
token: <DataDog API Key>
---
apiVersion: notification.toolkit.fluxcd.io/v1beta1
apiVersion: notification.toolkit.fluxcd.io/v1beta2
kind: Alert
metadata:
name: datadog-info
Expand Down
60 changes: 30 additions & 30 deletions docs/spec/v1beta3/providers.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ install or upgrade [Flagger](https://github.com/fluxcd/flagger).

```yaml
---
apiVersion: notification.toolkit.fluxcd.io/v1beta2
apiVersion: notification.toolkit.fluxcd.io/v1beta3
kind: Provider
metadata:
name: slack-bot
Expand All @@ -23,7 +23,7 @@ spec:
secretRef:
name: slack-bot-token
---
apiVersion: notification.toolkit.fluxcd.io/v1beta2
apiVersion: notification.toolkit.fluxcd.io/v1beta3
kind: Alert
metadata:
name: slack
Expand Down Expand Up @@ -133,7 +133,7 @@ for example:
```json
{
"involvedObject": {
"apiVersion": "kustomize.toolkit.fluxcd.io/v1beta2",
"apiVersion": "kustomize.toolkit.fluxcd.io/v1",
"kind": "Kustomization",
"name": "webapp",
"namespace": "apps",
Expand Down Expand Up @@ -299,7 +299,7 @@ by adding the integration to each channel.

```yaml
---
apiVersion: notification.toolkit.fluxcd.io/v1beta2
apiVersion: notification.toolkit.fluxcd.io/v1beta3
kind: Provider
metadata:
name: slack
Expand Down Expand Up @@ -328,7 +328,7 @@ and a `slack` Provider with a [Secret reference](#address-example).

```yaml
---
apiVersion: notification.toolkit.fluxcd.io/v1beta2
apiVersion: notification.toolkit.fluxcd.io/v1beta3
kind: Provider
metadata:
name: slack
Expand Down Expand Up @@ -370,7 +370,7 @@ and a `msteams` Provider with a [Secret reference](#address-example).

```yaml
---
apiVersion: notification.toolkit.fluxcd.io/v1beta2
apiVersion: notification.toolkit.fluxcd.io/v1beta3
kind: Provider
metadata:
name: msteams
Expand Down Expand Up @@ -410,7 +410,7 @@ set to a [DataDog API key](https://docs.datadoghq.com/account_management/api-app

```yaml
---
apiVersion: notification.toolkit.fluxcd.io/v1beta2
apiVersion: notification.toolkit.fluxcd.io/v1beta3
kind: Provider
metadata:
name: datadog
Expand All @@ -429,7 +429,7 @@ metadata:
stringData:
token: <DataDog API Key>
---
apiVersion: notification.toolkit.fluxcd.io/v1beta1
apiVersion: notification.toolkit.fluxcd.io/v1beta3
kind: Alert
metadata:
name: datadog-info
Expand Down Expand Up @@ -466,7 +466,7 @@ and a `discord` Provider with a [Secret reference](#secret-reference).

```yaml
---
apiVersion: notification.toolkit.fluxcd.io/v1beta2
apiVersion: notification.toolkit.fluxcd.io/v1beta3
kind: Provider
metadata:
name: discord
Expand Down Expand Up @@ -512,7 +512,7 @@ and a `sentry` Provider with a [Secret reference](#secret-reference).

```yaml
---
apiVersion: notification.toolkit.fluxcd.io/v1beta2
apiVersion: notification.toolkit.fluxcd.io/v1beta3
kind: Provider
metadata:
name: sentry
Expand Down Expand Up @@ -560,7 +560,7 @@ and a `telegram` Provider with a [Secret reference](#secret-reference), and the

```yaml
---
apiVersion: notification.toolkit.fluxcd.io/v1beta2
apiVersion: notification.toolkit.fluxcd.io/v1beta3
kind: Provider
metadata:
name: telegram
Expand Down Expand Up @@ -595,7 +595,7 @@ obtained from [the Matrix endpoint](https://matrix.org/docs/guides/client-server
and a `matrix` Provider with a [Secret reference](#secret-reference).

```yaml
apiVersion: notification.toolkit.fluxcd.io/v1beta2
apiVersion: notification.toolkit.fluxcd.io/v1beta3
kind: Provider
metadata:
name: matrix
Expand Down Expand Up @@ -626,7 +626,7 @@ obtained from [adding a bot to a group](https://open.larksuite.com/document/uAjL
and a `lark` Provider with a [Secret reference](#secret-reference).

```yaml
apiVersion: notification.toolkit.fluxcd.io/v1beta2
apiVersion: notification.toolkit.fluxcd.io/v1beta3
kind: Provider
metadata:
name: lark
Expand Down Expand Up @@ -664,7 +664,7 @@ and a `rocket` Provider with a [Secret reference](#secret-reference).

```yaml
---
apiVersion: notification.toolkit.fluxcd.io/v1beta2
apiVersion: notification.toolkit.fluxcd.io/v1beta3
kind: Provider
metadata:
name: rocket
Expand Down Expand Up @@ -694,7 +694,7 @@ and a `googlechat` Provider with a [Secret reference](#secret-reference).

```yaml
---
apiVersion: notification.toolkit.fluxcd.io/v1beta2
apiVersion: notification.toolkit.fluxcd.io/v1beta3
kind: Provider
metadata:
name: google
Expand Down Expand Up @@ -748,7 +748,7 @@ YAML string-to-string dictionary, and a `googlepubsub` Provider with the associa

```yaml
---
apiVersion: notification.toolkit.fluxcd.io/v1beta2
apiVersion: notification.toolkit.fluxcd.io/v1beta3
kind: Provider
metadata:
name: googlepubsub-provider
Expand Down Expand Up @@ -793,7 +793,7 @@ and a `opsgenie` Provider with a [Secret reference](#secret-reference) and the

```yaml
---
apiVersion: notification.toolkit.fluxcd.io/v1beta2
apiVersion: notification.toolkit.fluxcd.io/v1beta3
kind: Provider
metadata:
name: opsgenie
Expand Down Expand Up @@ -842,7 +842,7 @@ When adding an integration for a service on PagerDuty, it is recommended to use

```yaml
---
apiVersion: notification.toolkit.fluxcd.io/v1beta2
apiVersion: notification.toolkit.fluxcd.io/v1beta3
kind: Provider
metadata:
name: pagerduty
Expand All @@ -857,7 +857,7 @@ only those sources you want to trigger an incident for that service. For example

```yaml
---
apiVersion: notification.toolkit.fluxcd.io/v1beta2
apiVersion: notification.toolkit.fluxcd.io/v1beta3
kind: Alert
metadata:
name: my-service-pagerduty
Expand Down Expand Up @@ -907,7 +907,7 @@ reference](#secret-reference).

```yaml
---
apiVersion: notification.toolkit.fluxcd.io/v1beta2
apiVersion: notification.toolkit.fluxcd.io/v1beta3
kind: Provider
metadata:
name: alertmanager
Expand Down Expand Up @@ -953,7 +953,7 @@ controller.

```yaml
---
apiVersion: notification.toolkit.fluxcd.io/v1beta2
apiVersion: notification.toolkit.fluxcd.io/v1beta3
kind: Provider
metadata:
name: webex
Expand Down Expand Up @@ -1131,7 +1131,7 @@ using a self-signed TLS certificate, set the `ca.crt` like so:

```yaml
---
apiVersion: notification.toolkit.fluxcd.io/v1beta2
apiVersion: notification.toolkit.fluxcd.io/v1beta3
kind: Provider
metadata:
name: my-webhook
Expand Down Expand Up @@ -1201,7 +1201,7 @@ kubectl create secret generic grafana-token \
Create a provider of type `grafana` and reference the `grafana-token` secret:

```yaml
apiVersion: notification.toolkit.fluxcd.io/v1beta2
apiVersion: notification.toolkit.fluxcd.io/v1beta3
kind: Provider
metadata:
name: grafana
Expand All @@ -1228,7 +1228,7 @@ The request includes the `event_type` and `client_payload` fields:

```yaml
---
apiVersion: notification.toolkit.fluxcd.io/v1beta2
apiVersion: notification.toolkit.fluxcd.io/v1beta3
kind: Provider
metadata:
name: github-dispatch
Expand Down Expand Up @@ -1293,7 +1293,7 @@ You can then create a flux kustomization resource for the app to have unique `ev
The kustomization manifest for app1/staging:

```yaml
apiVersion: kustomize.toolkit.fluxcd.io/v1beta2
apiVersion: kustomize.toolkit.fluxcd.io/v1beta3
kind: Kustomization
metadata:
name: app1
Expand All @@ -1306,7 +1306,7 @@ You would also like to know from the notification which cluster is being used fo
You can add the `spec.summary` field to the Flux alert configuration to mention the relevant cluster:

```yaml
apiVersion: notification.toolkit.fluxcd.io/v1beta2
apiVersion: notification.toolkit.fluxcd.io/v1beta3
kind: Alert
metadata:
name: github-dispatch
Expand Down Expand Up @@ -1354,7 +1354,7 @@ We perform the following translation to match we the data we need to communicate

```yaml
---
apiVersion: notification.toolkit.fluxcd.io/v1beta2
apiVersion: notification.toolkit.fluxcd.io/v1beta3
kind: Provider
metadata:
name: azure
Expand Down Expand Up @@ -1403,7 +1403,7 @@ When using SAS auth, we only use the `address` field in the secret.

```yaml
---
apiVersion: notification.toolkit.fluxcd.io/v1beta2
apiVersion: notification.toolkit.fluxcd.io/v1beta3
kind: Provider
metadata:
name: azure
Expand Down Expand Up @@ -1450,7 +1450,7 @@ The following is an example of how to update the Git commit status for the GitHu
Flux was bootstrapped with `flux bootstrap github --owner=my-gh-org --repository=my-gh-repo`.

```yaml
apiVersion: notification.toolkit.fluxcd.io/v1beta2
apiVersion: notification.toolkit.fluxcd.io/v1beta3
kind: Provider
metadata:
name: github-status
Expand All @@ -1461,7 +1461,7 @@ spec:
secretRef:
name: github-token
---
apiVersion: notification.toolkit.fluxcd.io/v1beta2
apiVersion: notification.toolkit.fluxcd.io/v1beta3
kind: Alert
metadata:
name: github-status
Expand Down

0 comments on commit 5b152f5

Please sign in to comment.