Code development platform for open source projects from the European Union institutions

Skip to content
Snippets Groups Projects
Commit 33c71da6 authored by Vara Bonthu's avatar Vara Bonthu
Browse files

ArgoCD Addon added with docs

parent 7f2294f7
No related branches found
No related tags found
No related merge requests found
redis-ha:
enabled: true
controller:
enableStatefulSet: true
server:
autoscaling:
enabled: true
minReplicas: 2
repoServer:
autoscaling:
enabled: true
minReplicas: 2
......@@ -689,7 +689,22 @@ module "aws-eks-accelerator-for-terraform" {
timeout = "1200"
create_namespace = true
values = [templatefile("${path.module}/k8s_addons/spark-k8s-operator-values.yaml", {})]
}
#---------------------------------------
# ENABLE ARGOCD
#---------------------------------------
argocd_enable = true
# Optional Map value
argocd_helm_chart = {
name = "argo-cd"
chart = "argo-cd"
repository = "https://argoproj.github.io/argo-helm"
version = "3.26.3"
namespace = "argocd"
timeout = "1200"
create_namespace = true
values = [templatefile("${path.module}/k8s_addons/argocd-values.yaml", {})]
}
}
# ArgoCD
[ArgoCD](https://argo-cd.readthedocs.io/en/stable/) Argo CD is a declarative, GitOps continuous delivery tool for Kubernetes.
Application definitions, configurations, and environments should be declarative and version controlled. Application deployment and lifecycle management should be automated, auditable, and easy to understand.
## Usage
ArgoCD can be deployed by enabling the add-on via the following.
```hcl
#---------------------------------------
# ENABLE ARGOCD
#---------------------------------------
argocd_enable = true
# Optional Map value - Override values.yaml for Argo CD
argocd_helm_chart = {
name = "argo-cd"
chart = "argo-cd"
repository = "https://argoproj.github.io/argo-helm"
version = "3.26.3"
namespace = "argocd"
timeout = "1200"
create_namespace = true
values = [templatefile("${path.module}/argocd-values.yaml", {})]
}
```
......@@ -138,3 +138,11 @@ module "aws_opentelemetry_collector" {
depends_on = [module.aws_eks]
}
module "argocd" {
count = var.create_eks && var.argocd_enable ? 1 : 0
source = "./kubernetes-addons/argocd"
argocd_helm_chart = var.argocd_helm_chart
depends_on = [module.aws_eks]
}
# ArgoCD Deployment Guide
# Introduction
Argo CD is a declarative, GitOps continuous delivery tool for Kubernetes.
Application definitions, configurations, and environments should be declarative and version controlled. Application deployment and lifecycle management should be automated, auditable, and easy to understand.
<!-- BEGINNING OF PRE-COMMIT-TERRAFORM DOCS HOOK -->
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
SPDX-License-Identifier: MIT-0
Permission is hereby granted, free of charge, to any person obtaining a copy of this
software and associated documentation files (the "Software"), to deal in the Software
without restriction, including without limitation the rights to use, copy, modify,
merge, publish, distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
## Requirements
No requirements.
## Providers
| Name | Version |
|------|---------|
| <a name="provider_helm"></a> [helm](#provider\_helm) | n/a |
## Modules
No modules.
## Resources
| Name | Type |
|------|------|
| [helm_release.argocd](https://registry.terraform.io/providers/hashicorp/helm/latest/docs/resources/release) | resource |
## Inputs
| Name | Description | Type | Default | Required |
|------|-------------|------|---------|:--------:|
| <a name="input_argocd_helm_chart"></a> [argocd\_helm\_chart](#input\_argocd\_helm\_chart) | n/a | `any` | `{}` | no |
## Outputs
No outputs.
<!-- END OF PRE-COMMIT-TERRAFORM DOCS HOOK -->
redis-ha:
enabled: true
controller:
enableStatefulSet: true
server:
autoscaling:
enabled: true
minReplicas: 2
repoServer:
autoscaling:
enabled: true
minReplicas: 2
locals {
default_argocd_helm_app = {
name = "argo-cd"
chart = "argo-cd"
repository = "https://argoproj.github.io/argo-helm"
version = "3.26.3"
namespace = "argocd"
timeout = "1200"
create_namespace = true
values = local.default_argocd_helm_values
set = [{
name = "nodeSelector.kubernetes\\.io/os"
value = "linux"
}]
set_sensitive = null
lint = false
verify = false
keyring = ""
repository_key_file = ""
repository_cert_file = ""
repository_ca_file = ""
repository_username = ""
repository_password = ""
disable_webhooks = false
reuse_values = false
reset_values = false
force_update = false
recreate_pods = false
cleanup_on_fail = false
max_history = 0
atomic = false
skip_crds = false
render_subchart_notes = true
disable_openapi_validation = false
wait = true
wait_for_jobs = false
dependency_update = false
replace = false
description = "The argocd HelmChart Ingress Controller deployment configuration"
postrender = ""
}
argocd_helm_app = merge(
local.default_argocd_helm_app,
var.argocd_helm_chart
)
default_argocd_helm_values = [templatefile("${path.module}/argocd-values.yaml", {})]
}
/*
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: MIT-0
*
* Permission is hereby granted, free of charge, to any person obtaining a copy of this
* software and associated documentation files (the "Software"), to deal in the Software
* without restriction, including without limitation the rights to use, copy, modify,
* merge, publish, distribute, sublicense, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
* INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
* PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
* HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
* OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
resource "helm_release" "argocd" {
name = local.argocd_helm_app["name"]
repository = local.argocd_helm_app["repository"]
chart = local.argocd_helm_app["chart"]
version = local.argocd_helm_app["version"]
namespace = local.argocd_helm_app["namespace"]
timeout = local.argocd_helm_app["timeout"]
values = local.argocd_helm_app["values"]
create_namespace = local.argocd_helm_app["create_namespace"]
lint = local.argocd_helm_app["lint"]
description = local.argocd_helm_app["description"]
repository_key_file = local.argocd_helm_app["repository_key_file"]
repository_cert_file = local.argocd_helm_app["repository_cert_file"]
repository_ca_file = local.argocd_helm_app["repository_ca_file"]
repository_username = local.argocd_helm_app["repository_username"]
repository_password = local.argocd_helm_app["repository_password"]
verify = local.argocd_helm_app["verify"]
keyring = local.argocd_helm_app["keyring"]
disable_webhooks = local.argocd_helm_app["disable_webhooks"]
reuse_values = local.argocd_helm_app["reuse_values"]
reset_values = local.argocd_helm_app["reset_values"]
force_update = local.argocd_helm_app["force_update"]
recreate_pods = local.argocd_helm_app["recreate_pods"]
cleanup_on_fail = local.argocd_helm_app["cleanup_on_fail"]
max_history = local.argocd_helm_app["max_history"]
atomic = local.argocd_helm_app["atomic"]
skip_crds = local.argocd_helm_app["skip_crds"]
render_subchart_notes = local.argocd_helm_app["render_subchart_notes"]
disable_openapi_validation = local.argocd_helm_app["disable_openapi_validation"]
wait = local.argocd_helm_app["wait"]
wait_for_jobs = local.argocd_helm_app["wait_for_jobs"]
dependency_update = local.argocd_helm_app["dependency_update"]
replace = local.argocd_helm_app["replace"]
postrender {
binary_path = local.argocd_helm_app["postrender"]
}
dynamic "set" {
iterator = each_item
for_each = local.argocd_helm_app["set"] == null ? [] : local.argocd_helm_app["set"]
content {
name = each_item.value.name
value = each_item.value.value
}
}
dynamic "set_sensitive" {
iterator = each_item
for_each = local.argocd_helm_app["set_sensitive"] == null ? [] : local.argocd_helm_app["set_sensitive"]
content {
name = each_item.value.name
value = each_item.value.value
}
}
}
/*
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: MIT-0
*
* Permission is hereby granted, free of charge, to any person obtaining a copy of this
* software and associated documentation files (the "Software"), to deal in the Software
* without restriction, including without limitation the rights to use, copy, modify,
* merge, publish, distribute, sublicense, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
* INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
* PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
* HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
* OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
variable "argocd_helm_chart" {
type = any
default = {}
}
......@@ -94,12 +94,12 @@ variable "enable_irsa" {
variable "cluster_enabled_log_types" {
type = list(string)
default = ["api", "audit", "authenticator", "controllerManager", "scheduler"]
description = "A list of the desired control plane logging to enable. Possible values [`api`, `audit`, `authenticator`, `controllerManager`, `scheduler`]"
description = "A list of the desired control plane logging to enable"
}
variable "cluster_log_retention_period" {
type = number
default = 7
description = "Number of days to retain cluster logs. Requires `enabled_cluster_log_types` to be set. See https://docs.aws.amazon.com/en_us/eks/latest/userguide/control-plane-logs.html."
description = "Number of days to retain cluster logs"
}
#----------------------------------------------------------
# EKS MANAGED ADDONS
......@@ -359,12 +359,24 @@ variable "windows_vpc_controllers_helm_chart" {
}
#-----------AWS OPEN TELEMETRY ADDON-------------
variable "aws_open_telemetry_enable" {
type = bool
default = false
type = bool
default = false
description = "Enable AWS Open Telemetry Distro Addon "
}
variable "aws_open_telemetry_addon" {
type = any
default = {}
description = "AWS Open Telemetry Distro Addon Configuration"
}
#-----------ARGOCD ADDON-------------
variable "argocd_enable" {
type = bool
default = false
description = "Enable ARGO CD Kubernetes Addon"
}
variable "argocd_helm_chart" {
type = any
default = {}
description = "ARGO CD Kubernetes Addon Configuration"
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment