Skip to content
This repository has been archived by the owner on Oct 12, 2023. It is now read-only.

Commit

Permalink
chore(docs): redirect docs pages to new docs (#646)
Browse files Browse the repository at this point in the history
* chore(docs): redirect docs pages to new docs

Signed-off-by: CI <350466+crenshaw-dev@users.noreply.github.com>

* fixes

Signed-off-by: CI <350466+crenshaw-dev@users.noreply.github.com>

---------

Signed-off-by: CI <350466+crenshaw-dev@users.noreply.github.com>
  • Loading branch information
crenshaw-dev committed Oct 12, 2023
1 parent de10506 commit 5d1cf79
Show file tree
Hide file tree
Showing 23 changed files with 151 additions and 0 deletions.
5 changes: 5 additions & 0 deletions docs/Application-Deletion.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/applicationset/Application-Deletion/'" />

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

# Application Pruning & Resource Deletion

All `Application` resources created by the ApplicationSet controller (from an ApplicationSet) will contain:
Expand Down
5 changes: 5 additions & 0 deletions docs/Argo-CD-Integration.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/applicationset/Argo-CD-Integration/'" />

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

# How ApplicationSet controller interacts with Argo CD

When you create, update, or delete an `ApplicationSet` resource, the ApplicationSet controller responds by creating, updating, or deleting one or more corresponding Argo CD `Application` resources.
Expand Down
5 changes: 5 additions & 0 deletions docs/Controlling-Resource-Modification.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/applicationset/Controlling-Resource-Modification/'" />

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

# Controlling if/when the ApplicationSet controller modifies `Application` resources

The ApplicationSet controller supports a number of settings that limit the ability of the controller to make changes to generated Applications, for example, preventing the controller from deleting child Applications.
Expand Down
5 changes: 5 additions & 0 deletions docs/Development.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/applicationset/'" />

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

# Development

## Running the ApplicationSet controller as an image within Kubernetes
Expand Down
5 changes: 5 additions & 0 deletions docs/E2E-Tests.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/applicationset/'" />

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

# Running Application Set E2E tests

The E2E tests will run automatically on each PR/commit as part of a GitHub action. You may also run these tests locally to verify the functionality, as described below.
Expand Down
5 changes: 5 additions & 0 deletions docs/Generators-Cluster-Decision-Resource.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/applicationset/Generators-Cluster-Decision-Resource/'" />

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

# Cluster Decision Resource Generator

The cluster decision resource generates a list of Argo CD clusters. This is done using [duck-typing](https://pkg.go.dev/knative.dev/pkg/apis/duck), which does not require knowledge of the full shape of the referenced kubernetes resource. The following is an example of a cluster-decision-resource-based ApplicationSet generator:
Expand Down
5 changes: 5 additions & 0 deletions docs/Generators-Cluster.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/applicationset/Generators-Cluster/'" />

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

# Cluster Generator

In Argo CD, managed clusters [are stored within Secrets](https://argo-cd.readthedocs.io/en/stable/operator-manual/declarative-setup/#clusters) in the Argo CD namespace. The ApplicationSet controller uses those same Secrets to generate parameters to identify and target available clusters.
Expand Down
5 changes: 5 additions & 0 deletions docs/Generators-Git.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/applicationset/Generators-Git/'" />

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

# Git Generator

The Git generator contains two subtypes: the Git directory generator, and Git file generator.
Expand Down
5 changes: 5 additions & 0 deletions docs/Generators-List.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/applicationset/Generators-List/'" />

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

# List Generator

The List generator generates parameters based on an arbitrary list of key/value pairs (as long as the values are string values). In this example, we're targeting a local cluster named `engineering-dev`:
Expand Down
5 changes: 5 additions & 0 deletions docs/Generators-Matrix.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/applicationset/Generators-Matrix/'" />

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

# Matrix Generator

The Matrix generator combines the parameters generated by two child generators, iterating through every combination of each generator's generated parameters.
Expand Down
5 changes: 5 additions & 0 deletions docs/Generators-Merge.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/applicationset/Generators-Merge/'" />

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

# Merge Generator

The Merge generator combines parameters produced by the base (first) generator with matching parameter sets produced by subsequent generators. A _matching_ parameter set has the same values for the configured _merge keys_. _Non-matching_ parameter sets are discarded. Override precedence is bottom-to-top: the values from a matching parameter set produced by generator 3 will take precedence over the values from the corresponding parameter set produced by generator 2.
Expand Down
5 changes: 5 additions & 0 deletions docs/Generators-Pull-Request.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/applicationset/Generators-Pull-Request/'" />

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

# Pull Request Generator

The Pull Request generator uses the API of an SCMaaS provider (eg GitHub/GitLab) to automatically discover open pull requests within an repository. This fits well with the style of building a test environment when you create a pull request.
Expand Down
5 changes: 5 additions & 0 deletions docs/Generators-SCM-Provider.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/applicationset/Generators-SCM-Provider/'" />

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

# SCM Provider Generator

The SCM Provider generator uses the API of an SCMaaS provider (eg GitHub) to automatically discover repositories within an organization. This fits well with GitOps layout patterns that split microservices across many repositories.
Expand Down
5 changes: 5 additions & 0 deletions docs/Generators.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/applicationset/Generators/'" />

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

# Generators

Generators are responsible for generating *parameters*, which are then rendered into the `template:` fields of the ApplicationSet resource. See the [Introduction](index.md) for an example of how generators work with templates, to create Argo CD Applications.
Expand Down
5 changes: 5 additions & 0 deletions docs/Geting-Started.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/applicationset/'" />

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

# Getting Started

The Getting Started document has moved [here](Getting-Started.md).
5 changes: 5 additions & 0 deletions docs/Getting-Started.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/applicationset/Getting-Started/'" />

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

# Getting Started

This guide assumes you are familiar with Argo CD and its basic concepts. See the [Argo CD documentation](https://argo-cd.readthedocs.io/en/stable/core_concepts/) for more information.
Expand Down
5 changes: 5 additions & 0 deletions docs/Release-Checklist-Template.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/applicationset/'" />

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


# Release Checklist Template

Expand Down
5 changes: 5 additions & 0 deletions docs/Releasing.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/applicationset/'" />

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

# Releasing an ApplicationSet release

The ApplicationSet controller release process and scripts are based on the process/scripts used by the [Argo CD Image Updater](https://github.com/argoproj-labs/argocd-image-updater), a sibling project in the Argo organization.
Expand Down
5 changes: 5 additions & 0 deletions docs/Template.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/applicationset/Template/'" />

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

# Templates

The template fields of the ApplicationSet `spec` are used to generate Argo CD `Application` resources.
Expand Down
5 changes: 5 additions & 0 deletions docs/Use-Cases.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/applicationset/Use-Cases/'" />

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

# Use cases supported by the ApplicationSet controller

With the concept of generators, the ApplicationSet controller provides a powerful set of tools to automate the templating and modification of Argo CD Applications. Generators produce template parameter data from a variety of sources, including Argo CD clusters and Git repositories, supporting and enabling new use cases.
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/applicationset/'" />

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

# Introduction to ApplicationSet controller

## Introduction
Expand Down
5 changes: 5 additions & 0 deletions docs/upgrading/v0.2.0-to-v0.3.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/applicationset/'" />

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

# Upgrading from ApplicationSet controller v0.2.0 to v0.3.0.

When moving from ApplicationSet v0.2.0 to v0.3.0, there are a couple of behaviour changes to be aware of.
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

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

set -e pipefail

new_docs_base_path="https://argo-cd.readthedocs.io/en/latest/operator-manual/applicationset/"
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/applicationset/{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\/applicationset\/.*'\'' \/>//' "$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 5d1cf79

Please sign in to comment.