Skip to content

Commit

Permalink
Included gettimg started page, added relative lookup from application…
Browse files Browse the repository at this point in the history
…set to argocd,removed unused file

Signed-off-by: rishabh625 <rishabhmishra625@gmail.com>
  • Loading branch information
rishabh625 committed Apr 1, 2022
1 parent 072d4a0 commit dcff73e
Show file tree
Hide file tree
Showing 9 changed files with 28 additions and 24 deletions.
10 changes: 0 additions & 10 deletions docs/assets/applicationset/broken-link-ignore-list.txt

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ The end result is that when an ApplicationSet is deleted, the following occurs (
- The `ApplicationSet` resource itself is deleted
- Any `Application` resources that were created from this `ApplicationSet` (as identified by owner reference)
- Any deployed resources (`Deployments`, `Services`, `ConfigMaps`, etc) on the managed cluster, that were created from that `Application` resource (by Argo CD), will be deleted.
- Argo CD is responsible for handling this deletion, via [the deletion finalizer](https://argo-cd.readthedocs.io/en/stable/user-guide/app_deletion/#about-the-deletion-finalizer).
- Argo CD is responsible for handling this deletion, via [the deletion finalizer](../../../user-guide/app_deletion/#about-the-deletion-finalizer).
- To preserve deployed resources, set `.syncPolicy.preserveResourcesOnDeletion` to true in the ApplicationSet.

Thus the lifecycle of the `ApplicationSet`, the `Application`, and the `Application`'s resources, are equivalent.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ More information on the specific behaviour of `preserveResourcesOnDeletion`, and

Changes made to the ApplicationSet will propagate to the Applications managed by the ApplicationSet, and then Argo CD will propagate the Application changes to the underlying cluster resources (as per [Argo CD Integration](Argo-CD-Integration.md)).

The propagation of Application changes to the cluster is managed by the [automated sync settings](https://argo-cd.readthedocs.io/en/stable/user-guide/auto_sync/), which are referenced in the ApplicationSet `template` field:
The propagation of Application changes to the cluster is managed by the [automated sync settings](../../user-guide/auto_sync.md), which are referenced in the ApplicationSet `template` field:

- `spec.template.syncPolicy.automated`: If enabled, changes to Applications will automatically propagate to the cluster resources of the cluster.
- Unset this within the ApplicationSet template to 'pause' updates to cluster resources managed by the `Application` resource.
Expand Down
8 changes: 4 additions & 4 deletions docs/operator-manual/applicationset/Generators-Cluster.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# 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.
In Argo CD, managed clusters [are stored within Secrets](../../declarative-setup/#clusters) in the Argo CD namespace. The ApplicationSet controller uses those same Secrets to generate parameters to identify and target available clusters.

For each cluster registered with Argo CD, the Cluster generator produces parameters based on the list of items found within the cluster secret.

Expand All @@ -16,7 +16,7 @@ It automatically provides the following parameter values to the Application temp
Use the `nameNormalized` parameter if your cluster name contains characters (such as underscores) that are not valid for Kubernetes resource names. This prevents rendering invalid Kubernetes resources with names like `my_cluster-app1`, and instead would convert them to `my-cluster-app1`.


Within [Argo CD cluster Secrets](https://argo-cd.readthedocs.io/en/stable/operator-manual/declarative-setup/#clusters) are data fields describing the cluster:
Within [Argo CD cluster Secrets](../../declarative-setup/#clusters) are data fields describing the cluster:
```yaml
kind: Secret
data:
Expand Down Expand Up @@ -92,7 +92,7 @@ The cluster selector also supports set-based requirements, as used by [several c

### Deploying to the local cluster

In Argo CD, the 'local cluster' is the cluster upon which Argo CD (and the ApplicationSet controller) is installed. This is to distinguish it from 'remote clusters', which are those that are added to Argo CD [declaratively](https://argo-cd.readthedocs.io/en/stable/operator-manual/declarative-setup/#clusters) or via the [Argo CD CLI](https://argo-cd.readthedocs.io/en/stable/getting_started/#5-register-a-cluster-to-deploy-apps-to-optional).
In Argo CD, the 'local cluster' is the cluster upon which Argo CD (and the ApplicationSet controller) is installed. This is to distinguish it from 'remote clusters', which are those that are added to Argo CD [declaratively](../../declarative-setup/#clusters) or via the [Argo CD CLI](../../getting_started.md/#5-register-a-cluster-to-deploy-apps-to-optional).

The cluster generator will automatically target both local and non-local clusters, for every cluster that matches the cluster selector.

Expand All @@ -116,7 +116,7 @@ However, if you do wish to target both local and non-local clusters, while also
4. Leave all other fields unchanged.
5. Click *Save*.

These steps might seem counterintuitive, but the act of changing one of the default values for the local cluster causes the Argo CD Web UI to create a new secret for this cluster. In the Argo CD namespace, you should now see a Secret resource named `cluster-(cluster suffix)` with label `argocd.argoproj.io/secret-type": "cluster"`. You may also create a local [cluster secret declaratively](https://argo-cd.readthedocs.io/en/stable/operator-manual/declarative-setup/#clusters), or with the CLI using `argocd cluster add "(context name)" --in-cluster`, rather than through the Web UI.
These steps might seem counterintuitive, but the act of changing one of the default values for the local cluster causes the Argo CD Web UI to create a new secret for this cluster. In the Argo CD namespace, you should now see a Secret resource named `cluster-(cluster suffix)` with label `argocd.argoproj.io/secret-type": "cluster"`. You may also create a local [cluster secret declaratively](../../declarative-setup/#clusters), or with the CLI using `argocd cluster add "(context name)" --in-cluster`, rather than through the Web UI.

### Pass additional key-value pairs via `values` field

Expand Down
17 changes: 15 additions & 2 deletions docs/operator-manual/applicationset/Getting-Started.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# 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.
This guide assumes you are familiar with Argo CD and its basic concepts. See the [Argo CD documentation](../../core_concepts.md) for more information.

## Requirements

Expand All @@ -16,7 +16,7 @@ There are a few options for installing the ApplicationSet controller.

Starting with Argo CD v2.3, the ApplicationSet controller is bundled with Argo CD. It is no longer necessary to install the ApplicationSet controller separately from Argo CD.

Follow the [Argo CD Getting Started](https://argo-cd.readthedocs.io/en/stable/getting_started/) instructions for more information.
Follow the [Argo CD Getting Started](../../getting_started.md) instructions for more information.



Expand Down Expand Up @@ -72,7 +72,20 @@ There are no manual upgrade steps required between any release of ApplicationSet
### Behaviour changes in ApplicationSet controller v0.3.0
There are no breaking changes, however, a couple of behaviours have changed from v0.2.0 to v0.3.0. See the [v0.3.0 upgrade page](upgrading/v0.2.0-to-v0.3.0.md) for details. -->
## Enabling high availability mode

To enable high availability, you have to set the command ``` --enable-leader-election=true ``` in argocd-applicationset-controller container and increase the replicas.

do following changes in manifests/install.yaml

```bash
spec:
containers:
- command:
- entrypoint.sh
- argocd-applicationset-controller
- --enable-leader-election=true
```

### Optional: Additional Post-Upgrade Safeguards

Expand Down
4 changes: 2 additions & 2 deletions docs/operator-manual/applicationset/Template.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@ Here is the template subfield from a Cluster generator:
namespace: guestbook
```

The template subfields correspond directly to [the spec of an Argo CD `Application` resource](https://argo-cd.readthedocs.io/en/stable/operator-manual/declarative-setup/#applications):
The template subfields correspond directly to [the spec of an Argo CD `Application` resource](../../declarative-setup/#applications):

- `project` refers to the [Argo CD Project](https://argo-cd.readthedocs.io/en/stable/user-guide/projects/) in use (`default` may be used here to utilize the default Argo CD Project)
- `project` refers to the [Argo CD Project](../../user-guide/projects.md) in use (`default` may be used here to utilize the default Argo CD Project)
- `source` defines from which Git repostory to extract the desired Application manifests
- **repoURL**: URL of the repository (eg `https://github.com/argoproj/argocd-example-apps.git`)
- **targetRevision**: Revision (tag/branch/commit) of the repository (eg `HEAD`)
Expand Down
4 changes: 2 additions & 2 deletions docs/operator-manual/applicationset/Use-Cases.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ In this use case, we may use either the List, Cluster, or Git generators of the
- *List generator*: Administrators maintain two `ApplicationSet` resources, one for each application (Workflows and Prometheus), and include the list of clusters they wish to target within the List generator elements of each.
- With this generator, adding/removing clusters requires manually updating the `ApplicationSet` resource's list elements.
- *Cluster generator*: Administrators maintain two `ApplicationSet` resources, one for each application (Workflows and Prometheus), and ensure that all new cluster are defined within Argo CD.
- Since the Cluster generator automatically detects and targets the clusters defined within Argo CD, [adding/remove a cluster from Argo CD](https://argo-cd.readthedocs.io/en/stable/operator-manual/declarative-setup/#clusters) will automatically cause Argo CD Application resources (for each application) to be created by the ApplicationSet controller.
- Since the Cluster generator automatically detects and targets the clusters defined within Argo CD, [adding/remove a cluster from Argo CD](../../declarative-setup/#clusters) will automatically cause Argo CD Application resources (for each application) to be created by the ApplicationSet controller.
- *Git generator*: The Git generator is the most flexible/powerful of the generators, and thus there are a number of different ways to tackle this use case. Here are a couple:
- Using the Git generator `files` field: A list of clusters is kept as a JSON file within a Git repository. Updates to the JSON file, through Git commits, cause new clusters to be added/removed.
- Using the Git generator `directories` field: For each target cluster, a corresponding directory of that name exists in a Git repository. Adding/modifying a directory, through Git commits, would trigger an update for the cluster that has shares the directory name.
Expand Down Expand Up @@ -60,7 +60,7 @@ The *self-service use case* seeks to allow developers (as the end users of a mul
- Deploy to multiple clusters, in an automated fashion, using Argo CD
- But, in both cases, to empower those developers to be able to do so without needing to involve a cluster administrator (to create the necessarily Argo CD Applications/AppProject resources on their behalf)

One potential solution to this use case is for development teams to define Argo CD `Application` resources within a Git repository (containing the manifests they wish to deploy), in an [app-of-apps pattern](https://argo-cd.readthedocs.io/en/stable/operator-manual/cluster-bootstrapping/#app-of-apps-pattern), and for cluster administrators to then review/accept changes to this repository via merge requests.
One potential solution to this use case is for development teams to define Argo CD `Application` resources within a Git repository (containing the manifests they wish to deploy), in an [app-of-apps pattern](../../cluster-bootstrapping/#app-of-apps-pattern), and for cluster administrators to then review/accept changes to this repository via merge requests.

While this might sound like an effective solution, a major disadvantage is that a high degree of trust/scrutiny is needed to accept commits containing Argo CD `Application` spec changes. This is because there are many sensitive fields contained within the `Application` spec, including `project`, `cluster`, and `namespace`. An inadvertent merge might allow applications to access namespaces/clusters where they did not belong.

Expand Down
4 changes: 2 additions & 2 deletions docs/operator-manual/applicationset/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

## Introduction

The ApplicationSet controller is a [Kubernetes controller](https://kubernetes.io/docs/concepts/architecture/controller/) that adds support for an `ApplicationSet` [CustomResourceDefinition](https://kubernetes.io/docs/tasks/extend-kubernetes/custom-resources/custom-resource-definitions/) (CRD). This controller/CRD enables both automation and greater flexibility managing [Argo CD](https://argo-cd.readthedocs.io/en/stable/) Applications across a large number of clusters and within monorepos, plus it makes self-service usage possible on multitenant Kubernetes clusters.
The ApplicationSet controller is a [Kubernetes controller](https://kubernetes.io/docs/concepts/architecture/controller/) that adds support for an `ApplicationSet` [CustomResourceDefinition](https://kubernetes.io/docs/tasks/extend-kubernetes/custom-resources/custom-resource-definitions/) (CRD). This controller/CRD enables both automation and greater flexibility managing [Argo CD](../../index.md) Applications across a large number of clusters and within monorepos, plus it makes self-service usage possible on multitenant Kubernetes clusters.

The ApplicationSet controller works alongside an existing [Argo CD installation](https://argo-cd.readthedocs.io/en/stable/getting_started/). Argo CD is a declarative, GitOps continuous delivery tool, which allows developers to define and control deployment of Kubernetes application resources from within their existing Git workflow.
The ApplicationSet controller works alongside an existing [Argo CD installation](../../index.md). Argo CD is a declarative, GitOps continuous delivery tool, which allows developers to define and control deployment of Kubernetes application resources from within their existing Git workflow.

Starting with Argo CD v2.3, the ApplicationSet controller is bundled with Argo CD.

Expand Down
1 change: 1 addition & 0 deletions mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ nav:
- operator-manual/troubleshooting.md
- ApplicationSet:
- Introduction: operator-manual/applicationset/index.md
- Installations: operator-manual/applicationset/Getting-Started.md
- Use Cases: operator-manual/applicationset/Use-Cases.md
- How ApplicationSet controller interacts with Argo CD: operator-manual/applicationset/Argo-CD-Integration.md
- Generators:
Expand Down

0 comments on commit dcff73e

Please sign in to comment.