Skip to content

Commit fa543cf

Browse files
authored
docs: update examples with newer versions and centralized project (#1132)
* docs: update examples with newer versions and centralized project * refactor: change metrics-server module * fix: update examples with the Let's Encrypt e-mail variable * ci: fix typo on PR comment * feat: update modules to latest versions Release-As: v1.7.0
1 parent da3b727 commit fa543cf

20 files changed

Lines changed: 202 additions & 178 deletions

.github/workflows/modules-chart-update.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,6 @@ jobs:
113113
114114
## Description of the changes
115115
116-
This PR updates the dependencies of the **${{ matrix.chart-name }}** Helm chart. .
116+
This PR updates the dependencies of the **${{ matrix.chart-name }}** Helm chart.
117117
118118
:warning: This was a **major** update! Please check the changelog of the updated dependencies and **take notice of any breaking changes before merging**. :warning:

examples/eks/.terraform-version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
1.5.5
1+
1.6.4

examples/eks/apps.tf

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
11
module "helloworld_apps" {
2-
source = "git::https://github.com/camptocamp/devops-stack-module-applicationset.git?ref=v2.1.0"
2+
source = "git::https://github.com/camptocamp/devops-stack-module-applicationset.git?ref=v3.0.0"
33

44
dependency_ids = {
55
argocd = module.argocd.id
66
}
77

88
name = "helloworld-apps"
9-
argocd_namespace = module.argocd_bootstrap.argocd_namespace
109
project_dest_namespace = "*"
1110
project_source_repo = "https://github.com/camptocamp/devops-stack-helloworld-templates.git"
1211

examples/eks/csi_drivers.tf

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -35,11 +35,12 @@ resource "aws_efs_mount_target" "eks" {
3535
}
3636

3737
module "efs" {
38-
source = "git::https://github.com/camptocamp/devops-stack-module-efs-csi-driver.git?ref=v2.2.0"
38+
source = "git::https://github.com/camptocamp/devops-stack-module-efs-csi-driver.git?ref=v3.0.0"
3939

40-
cluster_name = local.cluster_name
41-
argocd_namespace = module.argocd_bootstrap.argocd_namespace
42-
app_autosync = local.app_autosync
40+
cluster_name = local.cluster_name
41+
argocd_project = module.eks.cluster_name
42+
43+
app_autosync = local.app_autosync
4344

4445
efs_file_system_id = resource.aws_efs_file_system.eks.id
4546
create_role = true
@@ -51,11 +52,12 @@ module "efs" {
5152
}
5253

5354
module "ebs" {
54-
source = "git::https://github.com/camptocamp/devops-stack-module-ebs-csi-driver.git?ref=v2.2.0"
55+
source = "git::https://github.com/camptocamp/devops-stack-module-ebs-csi-driver.git?ref=v3.0.0"
56+
57+
cluster_name = local.cluster_name
58+
argocd_project = module.eks.cluster_name
5559

56-
cluster_name = local.cluster_name
57-
argocd_namespace = module.argocd_bootstrap.argocd_namespace
58-
app_autosync = local.app_autosync
60+
app_autosync = local.app_autosync
5961

6062
create_role = true
6163
cluster_oidc_issuer_url = module.eks.cluster_oidc_issuer_url

examples/eks/locals.tf

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
locals {
2-
kubernetes_version = "1.27"
3-
cluster_name = "YOUR_CLUSTER_NAME" # Must be unique for each DevOps Stack deployment in a single AWS account.
4-
base_domain = "your.domain.here" # Must match a Route53 zone in the AWS account where you are deploying the DevOps Stack.
5-
cluster_issuer = "letsencrypt-staging"
6-
enable_service_monitor = false # Can be enabled after the first bootstrap.
7-
app_autosync = true ? { allow_empty = false, prune = true, self_heal = true } : {}
2+
kubernetes_version = "1.28"
3+
cluster_name = "YOUR_CLUSTER_NAME" # Must be unique for each DevOps Stack deployment in a single AWS account. Contains only alphanumeric and hyphens.
4+
base_domain = "your.domain.here" # Must match a Route 53 zone in the AWS account where you are deploying the DevOps Stack.
5+
cluster_issuer = module.cert-manager.cluster_issuers.staging
6+
letsencrypt_issuer_email = "YOUR_EMAIL_ADDRESS"
7+
enable_service_monitor = false # Can be enabled after the first bootstrap.
8+
app_autosync = true ? { allow_empty = false, prune = true, self_heal = true } : {}
89

910
# The VPC CIDR must be unique for each DevOps Stack deployment in a single AWS account.
1011
vpc_cidr = "10.56.0.0/16"

examples/eks/main.tf

Lines changed: 52 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ module "vpc" {
2424
}
2525

2626
module "eks" {
27-
source = "git::https://github.com/camptocamp/devops-stack-module-cluster-eks?ref=v3.0.0"
27+
source = "git::https://github.com/camptocamp/devops-stack-module-cluster-eks.git?ref=v3.0.1"
2828

2929
cluster_name = local.cluster_name
3030
kubernetes_version = local.kubernetes_version
@@ -38,18 +38,15 @@ module "eks" {
3838

3939
node_groups = {
4040
"${module.eks.cluster_name}-main" = {
41-
instance_types = ["m5a.large"]
41+
ami_type = "AL2_ARM_64"
42+
instance_types = ["m7g.xlarge"]
4243
min_size = 3
4344
max_size = 3
4445
desired_size = 3
4546
nlbs_attachment = true
46-
block_device_mappings = {
47-
"default" = {
48-
device_name = "/dev/xvda"
49-
ebs = {
50-
volume_size = 100
51-
}
52-
}
47+
disk_size = 100
48+
labels = {
49+
"devops-stack.io/nodepool" = "main"
5350
}
5451
},
5552
}
@@ -58,7 +55,7 @@ module "eks" {
5855
}
5956

6057
module "oidc" {
61-
source = "git::https://github.com/camptocamp/devops-stack-module-oidc-aws-cognito.git?ref=v1.0.0"
58+
source = "git::https://github.com/camptocamp/devops-stack-module-oidc-aws-cognito.git?ref=v1.0.1"
6259

6360
cluster_name = module.eks.cluster_name
6461
base_domain = module.eks.base_domain
@@ -76,17 +73,35 @@ module "oidc" {
7673
}
7774

7875
module "argocd_bootstrap" {
79-
source = "git::https://github.com/camptocamp/devops-stack-module-argocd.git//bootstrap?ref=v3.4.0"
76+
source = "git::https://github.com/camptocamp/devops-stack-module-argocd.git//bootstrap?ref=v4.0.0"
77+
78+
argocd_projects = {
79+
"${module.eks.cluster_name}" = {
80+
destination_cluster = "in-cluster"
81+
}
82+
}
8083

8184
depends_on = [module.eks]
8285
}
8386

87+
module "metrics-server" {
88+
source = "git::https://github.com/camptocamp/devops-stack-module-metrics-server.git?ref=v2.0.0"
89+
90+
argocd_project = module.eks.cluster_name
91+
92+
app_autosync = local.app_autosync
93+
94+
dependency_ids = {
95+
argocd = module.argocd_bootstrap.id
96+
}
97+
}
98+
8499
module "traefik" {
85-
source = "git::https://github.com/camptocamp/devops-stack-module-traefik.git//eks?ref=v3.0.0"
100+
source = "git::https://github.com/camptocamp/devops-stack-module-traefik.git//eks?ref=v5.0.0"
86101

87-
cluster_name = module.eks.cluster_name
88-
base_domain = module.eks.base_domain
89-
argocd_namespace = module.argocd_bootstrap.argocd_namespace
102+
cluster_name = module.eks.cluster_name
103+
base_domain = module.eks.base_domain
104+
argocd_project = module.eks.cluster_name
90105

91106
app_autosync = local.app_autosync
92107
enable_service_monitor = local.enable_service_monitor
@@ -97,11 +112,13 @@ module "traefik" {
97112
}
98113

99114
module "cert-manager" {
100-
source = "git::https://github.com/camptocamp/devops-stack-module-cert-manager.git//eks?ref=v5.2.1"
115+
source = "git::https://github.com/camptocamp/devops-stack-module-cert-manager.git//eks?ref=v8.0.0"
116+
117+
cluster_name = module.eks.cluster_name
118+
base_domain = module.eks.base_domain
119+
argocd_project = module.eks.cluster_name
101120

102-
cluster_name = module.eks.cluster_name
103-
base_domain = module.eks.base_domain
104-
argocd_namespace = module.argocd_bootstrap.argocd_namespace
121+
letsencrypt_issuer_email = local.letsencrypt_issuer_email
105122

106123
app_autosync = local.app_autosync
107124
enable_service_monitor = local.enable_service_monitor
@@ -114,14 +131,12 @@ module "cert-manager" {
114131
}
115132

116133
module "loki-stack" {
117-
source = "git::https://github.com/camptocamp/devops-stack-module-loki-stack//eks?ref=v5.0.0"
134+
source = "git::https://github.com/camptocamp/devops-stack-module-loki-stack.git//eks?ref=v7.0.0"
118135

119-
argocd_namespace = module.argocd_bootstrap.argocd_namespace
136+
argocd_project = module.eks.cluster_name
120137

121138
app_autosync = local.app_autosync
122139

123-
distributed_mode = true
124-
125140
logs_storage = {
126141
bucket_id = aws_s3_bucket.loki_logs_storage.id
127142
region = aws_s3_bucket.loki_logs_storage.region
@@ -135,12 +150,12 @@ module "loki-stack" {
135150
}
136151

137152
module "thanos" {
138-
source = "git::https://github.com/camptocamp/devops-stack-module-thanos.git//eks?ref=v2.5.0"
153+
source = "git::https://github.com/camptocamp/devops-stack-module-thanos.git//eks?ref=v3.0.0"
139154

140-
cluster_name = module.eks.cluster_name
141-
base_domain = module.eks.base_domain
142-
cluster_issuer = local.cluster_issuer
143-
argocd_namespace = module.argocd_bootstrap.argocd_namespace
155+
cluster_name = module.eks.cluster_name
156+
base_domain = module.eks.base_domain
157+
cluster_issuer = local.cluster_issuer
158+
argocd_project = module.eks.cluster_name
144159

145160
app_autosync = local.app_autosync
146161

@@ -149,6 +164,7 @@ module "thanos" {
149164
region = aws_s3_bucket.thanos_metrics_storage.region
150165
iam_role_arn = module.iam_assumable_role_thanos.iam_role_arn
151166
}
167+
152168
thanos = {
153169
oidc = module.oidc.oidc
154170
}
@@ -163,12 +179,12 @@ module "thanos" {
163179
}
164180

165181
module "kube-prometheus-stack" {
166-
source = "git::https://github.com/camptocamp/devops-stack-module-kube-prometheus-stack.git//eks?ref=v7.0.0"
182+
source = "git::https://github.com/camptocamp/devops-stack-module-kube-prometheus-stack.git//eks?ref=v9.0.0"
167183

168-
cluster_name = module.eks.cluster_name
169-
argocd_namespace = module.argocd_bootstrap.argocd_namespace
170-
base_domain = module.eks.base_domain
171-
cluster_issuer = local.cluster_issuer
184+
cluster_name = module.eks.cluster_name
185+
base_domain = module.eks.base_domain
186+
cluster_issuer = local.cluster_issuer
187+
argocd_project = module.eks.cluster_name
172188

173189
app_autosync = local.app_autosync
174190

@@ -202,11 +218,12 @@ module "kube-prometheus-stack" {
202218
}
203219

204220
module "argocd" {
205-
source = "git::https://github.com/camptocamp/devops-stack-module-argocd.git?ref=v3.4.0"
221+
source = "git::https://github.com/camptocamp/devops-stack-module-argocd.git?ref=v4.0.0"
206222

207223
cluster_name = module.eks.cluster_name
208224
base_domain = module.eks.base_domain
209225
cluster_issuer = local.cluster_issuer
226+
argocd_project = module.eks.cluster_name
210227

211228
accounts_pipeline_tokens = module.argocd_bootstrap.argocd_accounts_pipeline_tokens
212229
server_secretkey = module.argocd_bootstrap.argocd_server_secretkey
@@ -217,7 +234,7 @@ module "argocd" {
217234
exec_enabled = true
218235

219236
oidc = {
220-
name = "OIDC"
237+
name = "Cognito"
221238
issuer = module.oidc.oidc.issuer_url
222239
clientID = module.oidc.oidc.client_id
223240
clientSecret = module.oidc.oidc.client_secret
@@ -246,21 +263,3 @@ module "argocd" {
246263
kube-prometheus-stack = module.kube-prometheus-stack.id
247264
}
248265
}
249-
250-
module "metrics_server" {
251-
source = "git::https://github.com/camptocamp/devops-stack-module-application.git?ref=v2.1.0"
252-
253-
name = "metrics-server"
254-
argocd_namespace = module.argocd_bootstrap.argocd_namespace
255-
256-
app_autosync = local.app_autosync
257-
258-
source_repo = "https://github.com/kubernetes-sigs/metrics-server.git"
259-
source_repo_path = "charts/metrics-server"
260-
source_target_revision = "metrics-server-helm-chart-3.11.0"
261-
destination_namespace = "kube-system"
262-
263-
dependency_ids = {
264-
argocd = module.argocd.id
265-
}
266-
}

examples/eks/outputs.tf

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,9 @@ output "devops_admins" {
88
value = module.oidc.devops_stack_admins
99
sensitive = true
1010
}
11+
12+
output "cluster_issuers" {
13+
description = "Map containing the cluster issuers created by cert-manager."
14+
value = module.cert-manager.cluster_issuers
15+
}
16+

examples/eks/s3_thanos.tf

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@ module "iam_assumable_role_thanos" {
2323
"system:serviceaccount:thanos:thanos-bucketweb",
2424
"system:serviceaccount:thanos:thanos-storegateway",
2525
"system:serviceaccount:thanos:thanos-compactor",
26-
"system:serviceaccount:thanos:thanos-sidecar",
2726
"system:serviceaccount:kube-prometheus-stack:kube-prometheus-stack-prometheus"
2827
]
2928
}

examples/eks/terraform.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ terraform {
88
}
99

1010
required_providers {
11-
aws = { # Needed to store the state file in S3
11+
aws = {
1212
source = "hashicorp/aws"
1313
version = "~> 5"
1414
}

examples/kind/.terraform-version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
1.5.5
1+
1.6.4

0 commit comments

Comments
 (0)