Skip to content
This repository has been archived by the owner on Feb 7, 2024. It is now read-only.

Commit

Permalink
Merge pull request #435 from crenshaw-dev/redirect-docs-release-1.2
Browse files Browse the repository at this point in the history
chore(docs): redirect docs pages to new docs
  • Loading branch information
crenshaw-dev committed Oct 12, 2023
2 parents 144a541 + 03ef368 commit 724704c
Show file tree
Hide file tree
Showing 30 changed files with 186 additions and 0 deletions.
5 changes: 5 additions & 0 deletions docs/bots/opsgenie-bot.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
<meta http-equiv="refresh" content="1; url='https://argo-cd.readthedocs.io/en/latest/operator-manual/notifications/'" />

!!! important "This page has moved"
This page has moved to [https://argo-cd.readthedocs.io/en/latest/operator-manual/notifications/](https://argo-cd.readthedocs.io/en/latest/operator-manual/notifications/). Redirecting to the new page.

# Opsgenie bot

!!! note "Do you need Opsgenie bot? Please consider contributing or create [feature request](https://github.com/argoproj-labs/argocd-notifications/issues/new)!"
Expand Down
5 changes: 5 additions & 0 deletions docs/bots/overview.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
<meta http-equiv="refresh" content="1; url='https://argo-cd.readthedocs.io/en/latest/operator-manual/notifications/'" />

!!! important "This page has moved"
This page has moved to [https://argo-cd.readthedocs.io/en/latest/operator-manual/notifications/](https://argo-cd.readthedocs.io/en/latest/operator-manual/notifications/). Redirecting to the new page.

The optional bot component simplifies managing subscriptions. The end users can use bot commands to manage subscriptions
even if they don't have access to the Kubernetes API and cannot modify annotations.

Expand Down
5 changes: 5 additions & 0 deletions docs/bots/slack-bot.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
<meta http-equiv="refresh" content="1; url='https://argo-cd.readthedocs.io/en/latest/operator-manual/notifications/'" />

!!! important "This page has moved"
This page has moved to [https://argo-cd.readthedocs.io/en/latest/operator-manual/notifications/](https://argo-cd.readthedocs.io/en/latest/operator-manual/notifications/). Redirecting to the new page.

# Slack bot

The Slack bot leverages [slash commands](https://api.slack.com/interactivity/slash-commands). The bot allows slack users
Expand Down
5 changes: 5 additions & 0 deletions docs/bots/telegram-bot.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
<meta http-equiv="refresh" content="1; url='https://argo-cd.readthedocs.io/en/latest/operator-manual/notifications/'" />

!!! important "This page has moved"
This page has moved to [https://argo-cd.readthedocs.io/en/latest/operator-manual/notifications/](https://argo-cd.readthedocs.io/en/latest/operator-manual/notifications/). Redirecting to the new page.

# Telegram bot

!!! note "Do you need Telegram bot? Please consider contributing or create [feature request](https://github.com/argoproj-labs/argocd-notifications/issues/new)!"
Expand Down
5 changes: 5 additions & 0 deletions docs/catalog.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
<meta http-equiv="refresh" content="1; url='https://argo-cd.readthedocs.io/en/latest/operator-manual/notifications/catalog/'" />

!!! important "This page has moved"
This page has moved to [https://argo-cd.readthedocs.io/en/latest/operator-manual/notifications/catalog//](https://argo-cd.readthedocs.io/en/latest/operator-manual/notifications/catalog//). Redirecting to the new page.

# Triggers and Templates Catalog
## Triggers
| NAME | DESCRIPTION | TEMPLATE |
Expand Down
5 changes: 5 additions & 0 deletions docs/functions.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
<meta http-equiv="refresh" content="1; url='https://argo-cd.readthedocs.io/en/latest/operator-manual/notifications/functions/'" />

!!! important "This page has moved"
This page has moved to [https://argo-cd.readthedocs.io/en/latest/operator-manual/notifications/functions//](https://argo-cd.readthedocs.io/en/latest/operator-manual/notifications/functions//). Redirecting to the new page.

### **time**
Time related functions.

Expand Down
5 changes: 5 additions & 0 deletions docs/index.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
<meta http-equiv="refresh" content="1; url='https://argo-cd.readthedocs.io/en/latest/operator-manual/notifications/'" />

!!! important "This page has moved"
This page has moved to [https://argo-cd.readthedocs.io/en/latest/operator-manual/notifications/](https://argo-cd.readthedocs.io/en/latest/operator-manual/notifications/). Redirecting to the new page.

# Overview

Argo CD Notifications continuously monitors Argo CD applications and provides a flexible way to notify
Expand Down
5 changes: 5 additions & 0 deletions docs/monitoring.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
<meta http-equiv="refresh" content="1; url='https://argo-cd.readthedocs.io/en/latest/operator-manual/notifications/monitoring/'" />

!!! important "This page has moved"
This page has moved to [https://argo-cd.readthedocs.io/en/latest/operator-manual/notifications/monitoring//](https://argo-cd.readthedocs.io/en/latest/operator-manual/notifications/monitoring//). Redirecting to the new page.

# Monitoring

The Argo CD Notification controller serves Prometheus metrics on port 9001.
Expand Down
5 changes: 5 additions & 0 deletions docs/services/alertmanager.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
<meta http-equiv="refresh" content="1; url='https://argo-cd.readthedocs.io/en/latest/operator-manual/notifications/services/alertmanager/'" />

!!! important "This page has moved"
This page has moved to [https://argo-cd.readthedocs.io/en/latest/operator-manual/notifications/services/alertmanager//](https://argo-cd.readthedocs.io/en/latest/operator-manual/notifications/services/alertmanager//). Redirecting to the new page.

# Alertmanager

## Parameters
Expand Down
5 changes: 5 additions & 0 deletions docs/services/email.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
<meta http-equiv="refresh" content="1; url='https://argo-cd.readthedocs.io/en/latest/operator-manual/notifications/services/email/'" />

!!! important "This page has moved"
This page has moved to [https://argo-cd.readthedocs.io/en/latest/operator-manual/notifications/services/email//](https://argo-cd.readthedocs.io/en/latest/operator-manual/notifications/services/email//). Redirecting to the new page.

# Email

## Parameters
Expand Down
5 changes: 5 additions & 0 deletions docs/services/github.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
<meta http-equiv="refresh" content="1; url='https://argo-cd.readthedocs.io/en/latest/operator-manual/notifications/services/github/'" />

!!! important "This page has moved"
This page has moved to [https://argo-cd.readthedocs.io/en/latest/operator-manual/notifications/services/github//](https://argo-cd.readthedocs.io/en/latest/operator-manual/notifications/services/github//). Redirecting to the new page.

# GitHub

## Parameters
Expand Down
5 changes: 5 additions & 0 deletions docs/services/googlechat.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
<meta http-equiv="refresh" content="1; url='https://argo-cd.readthedocs.io/en/latest/operator-manual/notifications/services/googlechat/'" />

!!! important "This page has moved"
This page has moved to [https://argo-cd.readthedocs.io/en/latest/operator-manual/notifications/services/googlechat//](https://argo-cd.readthedocs.io/en/latest/operator-manual/notifications/services/googlechat//). Redirecting to the new page.

# Google Chat

## Parameters
Expand Down
5 changes: 5 additions & 0 deletions docs/services/grafana.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
<meta http-equiv="refresh" content="1; url='https://argo-cd.readthedocs.io/en/latest/operator-manual/notifications/services/grafana/'" />

!!! important "This page has moved"
This page has moved to [https://argo-cd.readthedocs.io/en/latest/operator-manual/notifications/services/grafana//](https://argo-cd.readthedocs.io/en/latest/operator-manual/notifications/services/grafana//). Redirecting to the new page.

# Grafana

To be able to create Grafana annotation with argocd-notifications you have to create an [API Key](https://grafana.com/docs/grafana/latest/http_api/auth/#create-api-key) inside your [Grafana](https://grafana.com).
Expand Down
5 changes: 5 additions & 0 deletions docs/services/mattermost.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
<meta http-equiv="refresh" content="1; url='https://argo-cd.readthedocs.io/en/latest/operator-manual/notifications/services/mattermost/'" />

!!! important "This page has moved"
This page has moved to [https://argo-cd.readthedocs.io/en/latest/operator-manual/notifications/services/mattermost//](https://argo-cd.readthedocs.io/en/latest/operator-manual/notifications/services/mattermost//). Redirecting to the new page.

# Mattermost

## Parameters
Expand Down
5 changes: 5 additions & 0 deletions docs/services/opsgenie.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
<meta http-equiv="refresh" content="1; url='https://argo-cd.readthedocs.io/en/latest/operator-manual/notifications/services/opsgenie/'" />

!!! important "This page has moved"
This page has moved to [https://argo-cd.readthedocs.io/en/latest/operator-manual/notifications/services/opsgenie//](https://argo-cd.readthedocs.io/en/latest/operator-manual/notifications/services/opsgenie//). Redirecting to the new page.

# Opsgenie

To be able to send notifications with argocd-notifications you have to create an [API Integration](https://docs.opsgenie.com/docs/integrations-overview) inside your [Opsgenie Team](https://docs.opsgenie.com/docs/teams).
Expand Down
5 changes: 5 additions & 0 deletions docs/services/overview.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
<meta http-equiv="refresh" content="1; url='https://argo-cd.readthedocs.io/en/latest/operator-manual/notifications/services/overview/'" />

!!! important "This page has moved"
This page has moved to [https://argo-cd.readthedocs.io/en/latest/operator-manual/notifications/services/overview//](https://argo-cd.readthedocs.io/en/latest/operator-manual/notifications/services/overview//). Redirecting to the new page.

The notification services represent integration with services such as slack, email or custom webhook. Services are configured in `argocd-notifications-cm` ConfigMap
using `service.<type>.(<custom-name>)` keys and might reference sensitive data from `argocd-notifications-secret` Secret. Following example demonstrates slack
service configuration:
Expand Down
5 changes: 5 additions & 0 deletions docs/services/pushover.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
<meta http-equiv="refresh" content="1; url='https://argo-cd.readthedocs.io/en/latest/operator-manual/notifications/services/pushover/'" />

!!! important "This page has moved"
This page has moved to [https://argo-cd.readthedocs.io/en/latest/operator-manual/notifications/services/pushover//](https://argo-cd.readthedocs.io/en/latest/operator-manual/notifications/services/pushover//). Redirecting to the new page.

# Pushover

1. Create an app at [pushover.net](https://pushover.net/apps/build).
Expand Down
5 changes: 5 additions & 0 deletions docs/services/rocketchat.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
<meta http-equiv="refresh" content="1; url='https://argo-cd.readthedocs.io/en/latest/operator-manual/notifications/services/rocketchat/'" />

!!! important "This page has moved"
This page has moved to [https://argo-cd.readthedocs.io/en/latest/operator-manual/notifications/services/rocketchat//](https://argo-cd.readthedocs.io/en/latest/operator-manual/notifications/services/rocketchat//). Redirecting to the new page.

# Rocket.Chat

## Parameters
Expand Down
5 changes: 5 additions & 0 deletions docs/services/slack.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
<meta http-equiv="refresh" content="1; url='https://argo-cd.readthedocs.io/en/latest/operator-manual/notifications/services/slack/'" />

!!! important "This page has moved"
This page has moved to [https://argo-cd.readthedocs.io/en/latest/operator-manual/notifications/services/slack//](https://argo-cd.readthedocs.io/en/latest/operator-manual/notifications/services/slack//). Redirecting to the new page.

# Slack

If you want to send message using incoming webhook, you can use [webhook](./webhook.md#send-slack).
Expand Down
5 changes: 5 additions & 0 deletions docs/services/teams.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
<meta http-equiv="refresh" content="1; url='https://argo-cd.readthedocs.io/en/latest/operator-manual/notifications/services/teams/'" />

!!! important "This page has moved"
This page has moved to [https://argo-cd.readthedocs.io/en/latest/operator-manual/notifications/services/teams//](https://argo-cd.readthedocs.io/en/latest/operator-manual/notifications/services/teams//). Redirecting to the new page.

# Teams

## Parameters
Expand Down
5 changes: 5 additions & 0 deletions docs/services/telegram.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
<meta http-equiv="refresh" content="1; url='https://argo-cd.readthedocs.io/en/latest/operator-manual/notifications/services/telegram/'" />

!!! important "This page has moved"
This page has moved to [https://argo-cd.readthedocs.io/en/latest/operator-manual/notifications/services/telegram//](https://argo-cd.readthedocs.io/en/latest/operator-manual/notifications/services/telegram//). Redirecting to the new page.

# Telegram

1. Get an API token using [@Botfather](https://t.me/Botfather).
Expand Down
5 changes: 5 additions & 0 deletions docs/services/webhook.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
<meta http-equiv="refresh" content="1; url='https://argo-cd.readthedocs.io/en/latest/operator-manual/notifications/services/webhook/'" />

!!! important "This page has moved"
This page has moved to [https://argo-cd.readthedocs.io/en/latest/operator-manual/notifications/services/webhook//](https://argo-cd.readthedocs.io/en/latest/operator-manual/notifications/services/webhook//). Redirecting to the new page.

## Configuration

The webhook notification service allows sending a generic HTTP request using the templatized request body and URL.
Expand Down
5 changes: 5 additions & 0 deletions docs/subscriptions.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
<meta http-equiv="refresh" content="1; url='https://argo-cd.readthedocs.io/en/latest/operator-manual/notifications/subscriptions/'" />

!!! important "This page has moved"
This page has moved to [https://argo-cd.readthedocs.io/en/latest/operator-manual/notifications/subscriptions//](https://argo-cd.readthedocs.io/en/latest/operator-manual/notifications/subscriptions//). Redirecting to the new page.

The subscription to Argo CD application events can be defined using `notifications.argoproj.io/subscribe.<trigger>.<service>: <recipient>` annotation.
For example, the following annotation subscribes two Slack channels to notifications about every successful synchronization of the Argo CD application:

Expand Down
5 changes: 5 additions & 0 deletions docs/templates.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
<meta http-equiv="refresh" content="1; url='https://argo-cd.readthedocs.io/en/latest/operator-manual/notifications/templates/'" />

!!! important "This page has moved"
This page has moved to [https://argo-cd.readthedocs.io/en/latest/operator-manual/notifications/templates//](https://argo-cd.readthedocs.io/en/latest/operator-manual/notifications/templates//). Redirecting to the new page.

The notification template is used to generate the notification content and configured in `argocd-notifications-cm` ConfigMap. The template is leveraging
[html/template](https://golang.org/pkg/html/template/) golang package and allow to customize notification message.
Templates are meant to be reusable and can be referenced by multiple triggers.
Expand Down
5 changes: 5 additions & 0 deletions docs/triggers.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
<meta http-equiv="refresh" content="1; url='https://argo-cd.readthedocs.io/en/latest/operator-manual/notifications/triggers/'" />

!!! important "This page has moved"
This page has moved to [https://argo-cd.readthedocs.io/en/latest/operator-manual/notifications/triggers//](https://argo-cd.readthedocs.io/en/latest/operator-manual/notifications/triggers//). Redirecting to the new page.

The trigger defines the condition when the notification should be sent. The definition includes name, condition
and notification templates reference. The condition is a predicate expression that returns true if the notification
should be sent. The trigger condition evaluation is powered by [antonmedv/expr](https://github.com/antonmedv/expr).
Expand Down
5 changes: 5 additions & 0 deletions docs/troubleshooting-commands.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
<meta http-equiv="refresh" content="1; url='https://argo-cd.readthedocs.io/en/latest/operator-manual/notifications/troubleshooting-commands/'" />

!!! important "This page has moved"
This page has moved to [https://argo-cd.readthedocs.io/en/latest/operator-manual/notifications/troubleshooting-commands//](https://argo-cd.readthedocs.io/en/latest/operator-manual/notifications/troubleshooting-commands//). Redirecting to the new page.

## argocd-notifications template get

Prints information about configured templates
Expand Down
5 changes: 5 additions & 0 deletions docs/troubleshooting-errors.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
<meta http-equiv="refresh" content="1; url='https://argo-cd.readthedocs.io/en/latest/operator-manual/notifications/troubleshooting-errors/'" />

!!! important "This page has moved"
This page has moved to [https://argo-cd.readthedocs.io/en/latest/operator-manual/notifications/troubleshooting-errors//](https://argo-cd.readthedocs.io/en/latest/operator-manual/notifications/troubleshooting-errors//). Redirecting to the new page.

## Failed to parse new settings

### error converting YAML to JSON
Expand Down
5 changes: 5 additions & 0 deletions docs/troubleshooting.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
<meta http-equiv="refresh" content="1; url='https://argo-cd.readthedocs.io/en/latest/operator-manual/notifications/troubleshooting/'" />

!!! important "This page has moved"
This page has moved to [https://argo-cd.readthedocs.io/en/latest/operator-manual/notifications/troubleshooting//](https://argo-cd.readthedocs.io/en/latest/operator-manual/notifications/troubleshooting//). Redirecting to the new page.

## Troubleshooting

The `argocd-notifications` binary includes a set of CLI commands that helps to configure the controller
Expand Down
5 changes: 5 additions & 0 deletions docs/upgrading/0.x-1.0.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
<meta http-equiv="refresh" content="1; url='https://argo-cd.readthedocs.io/en/latest/operator-manual/notifications/'" />

!!! important "This page has moved"
This page has moved to [https://argo-cd.readthedocs.io/en/latest/operator-manual/notifications/](https://argo-cd.readthedocs.io/en/latest/operator-manual/notifications/). Redirecting to the new page.

# v0.x to v1.0

The v1.0 release introduces a lot of new features and changes the format of configuration settings to improve usability.
Expand Down
41 changes: 41 additions & 0 deletions hack/set-docs-redirects.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
#!/usr/bin/env bash

# Notifications docs now live at https://argo-cd.readthedocs.io/en/latest/operator-manual/notifications/
# This script adds redirects to the top of each Notifications doc to redirect to the new location.

set -e pipefail

new_docs_base_path="https://argo-cd.readthedocs.io/en/latest/operator-manual/notifications/"
new_docs_base_path_regex=$(echo "$new_docs_base_path" | sed 's/\//\\\//g')

# Loop over files in the docs directory recursively. For each file, use sed to add the following redirect to the top:
# <meta http-equiv="refresh" content="0; url='https://argo-cd.readthedocs.io/en/latest/operator-manual/notifications/{FILE PATH}'" />
# FILE_PATH should be the path to the file relative to the docs directory, stripped of the .md extension.

files=$(find docs -type f -name '*.md')
for file in $files; do
file_path=$(echo "$file" | sed 's/^docs\///' | sed 's/\.md$/\//')
echo "Adding redirect to $file_path"
# If a redirect is already present at the top of the file, remove it.
sed '1s/<meta http-equiv="refresh" content="0; url='\''https:\/\/argo-cd.readthedocs.io\/en\/latest\/operator-manual\/notifications\/.*'\'' \/>//' "$file" > "$file.tmp"
mv "$file.tmp" "$file"

# Add the new redirect.
# Default to an empty path.
file_path_plain=""
file_path_regex=""
if curl -s -o /dev/null -w "%{http_code}" "$new_docs_base_path$file_path" | grep -q 200; then
# If the destination path exists, use it.
file_path_plain="$file_path/"
file_path_regex=$(echo "$file_path" | sed 's/\//\\\//g')
else
echo "WARNING: $new_docs_base_path$file_path does not exist. Using empty path."
fi

notice="!!! important \"This page has moved\"\n This page has moved to [$new_docs_base_path$file_path_plain]($new_docs_base_path$file_path_plain). Redirecting to the new page.\n"

notice_regex=$(echo "$notice" | sed 's/\//\\\//g')

sed "1s/^/<meta http-equiv=\"refresh\" content=\"1; url='$new_docs_base_path_regex$file_path_regex'\" \/>\\n\\n$notice_regex\\n/" "$file" > "$file.tmp"
mv "$file.tmp" "$file"
done

0 comments on commit 724704c

Please sign in to comment.