This module creates an applicationSet in an ArgoCD instance.
Required fields:
values: |
# Here you can define the values for the chart
Optional fields:
namespace_overwrite: <namespace> # e.g. default (default: generated based on the project name + git folder name). Must be set if more than one environment is deployed in the same cluster.
chart:
repo: <chart_repo_url> # e.g. registry.hub.docker.com/tagesspiegel
name: <chart_name> # e.g. background
version: <chart_version> # e.g. 1.0.0
release_name: <chart_release_name> # e.g. background-develop
provider "argocd" {
server_addr = "argo.example.com"
auth_token = "my-token"
grpc_web = true
}
module "namespace-management" {
source = "tagesspiegel/application-set/argocd"
version = "1.0.0"
# insert the required variable here
}
From module version v1.4.0
we also support the usage of a values.yaml
file. By default, if you configured the git generator, we will look for a values.yaml
inside the values
folder next to the configured argocd application configuration. The values.yaml
file will be named after the Helm release name (dashes are replaced by underscores).
|--- argo
| |--- values
| | |--- argocd.yaml
| |--- argocd.yaml (chart.release_name: argocd)
The cluster selection is based on the ``
Name | Version |
---|---|
argocd | 6.2.0 |
Name | Version |
---|---|
argocd | 6.2.0 |
No modules.
Name | Type |
---|---|
argocd_application_set.this | resource |
Name | Description | Type | Default | Required |
---|---|---|---|---|
annotations | Annotations to apply to the application set | map(string) |
{} |
no |
application_name_suffix | Optional suffix to add to the application name. This is useful if you want to deploy the same application multiple times to the same cluster. The suffix is added to the application name after the cluster name. e.g. prometheus-staging-. ArgoCD based gotemplating is supported. e.g. {{ index .path.segments 2 }} | string |
null |
no |
env_context_annotations | A map of annotations that are rendered via go template. Available variables are cluster, resourceName and applicationName. You can access the variables using go templating. e.g. {{ $cluster }}, {{ $resourceName }}, {{ $applicationName }} | map(string) |
{} |
no |
generator | The generator configuration. Only one generator can be used at a time. | object({ |
n/a | yes |
generator_segment_index_overwrite | Optional generator setting to override the index path segment during path selection. This option should only be set if generator.git.directories is used. Otherwise it should be left empty as it may affect the behavior. If this option is set in combination with generator.git.directories and your repository contains the cluster folder name in its root directory, this option should be set to 0. In all other cases, this option should reflect the index segment level to the directory corresponding to the cluster name. | number |
null |
no |
ignore_difference | A list of object kinds to ignore during the diff process. This is useful if you want to ignore certain differences between the application set and the cluster. e.g. if you want to ignore differences in the namespace labels. | list(object({ |
null |
no |
labels | Labels to apply to the application set | map(string) |
{} |
no |
manifest_source | n/a | object({ |
n/a | yes |
name | The name of the application set | string |
n/a | yes |
namespace | The namespace the application set should be deployed to. | string |
"argo-system" |
no |
namespace_annotations | Annotations to apply to the namespace. Only used if create_namespace is set to true. | map(string) |
{} |
no |
namespace_labels | Labels to apply to the namespace. Only used if sync_options.* CreateNamespace=true is set. | map(string) |
{} |
no |
project_name | The name of the ArgoCD project to use for this application set. If not set, this application set is special. Special application sets are managed by the platform team and therefore the ArgoCD project reference is handled differently to normal application sets. A major difference is that the ArgoCD project is not statically defined as reference but dynamically via the config directory name. | string |
n/a | yes |
sync_options | The sync options to use | list(string) |
[ |
no |
sync_policy | ArgoCD sync policy configuration | object({ |
null |
no |
sync_retries | The retry configuration for the sync policy | object({ |
{ |
no |
target_namespace_overwrite | The target namespace to use. If not set, the namespace is derived from the application set and git folder name. | string |
"" |
no |
No outputs.