Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sync main #358

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions azure/ipa.tf
Original file line number Diff line number Diff line change
Expand Up @@ -790,6 +790,7 @@ spec:
prune: true
syncOptions:
- CreateNamespace=true
- ServerSideApply=true
source:
chart: cod-smoketests
repoURL: ${var.ipa_smoketest_repo}
Expand Down Expand Up @@ -866,6 +867,7 @@ spec:
prune: true
syncOptions:
- CreateNamespace=true
- ServerSideApply=true
retry:
limit: 8
backoff:
Expand Down Expand Up @@ -1028,6 +1030,7 @@ spec:
prune: true
syncOptions:
- CreateNamespace=${each.value.createNamespace}
- ServerSideApply=true
source:
chart: ${each.value.chart}
repoURL: ${each.value.repo}
Expand Down
11 changes: 7 additions & 4 deletions ipa.tf
Original file line number Diff line number Diff line change
Expand Up @@ -49,16 +49,16 @@ locals {
csi:
driver: fsx.csi.aws.com
volumeAttributes:
dnsname: ${module.fsx-storage[0].fsx-rwx.dns_name}
mountname: ${module.fsx-storage[0].fsx-rwx.mount_name}
volumeHandle: ${module.fsx-storage[0].fsx-rwx.id}
dnsname: ${module.fsx-storage[0].fsx_rwx_dns_name}
mountname: ${module.fsx-storage[0].fsx_rwx_mount_name}
volumeHandle: ${module.fsx-storage[0].fsx_rwx_id}
indicoStorageClass:
enabled: true
name: indico-sc
provisioner: fsx.csi.aws.com
parameters:
securityGroupIds: ${local.security_group_id}
subnetId: ${module.fsx-storage[0].fsx-rwx.subnet_ids[0]}
subnetId: ${module.fsx-storage[0].fsx_rwx_subnet_ids[0]}
EOF
] : []
storage_spec = var.include_fsx == true ? local.fsx_values : local.efs_values
Expand Down Expand Up @@ -1348,6 +1348,7 @@ spec:
prune: true
syncOptions:
- CreateNamespace=true
- ServerSideApply=true

source:
chart: cod-smoketests
Expand Down Expand Up @@ -1444,6 +1445,7 @@ spec:
prune: true
syncOptions:
- CreateNamespace=true
- ServerSideApply=true
source:
chart: ipa
repoURL: ${var.ipa_repo}
Expand Down Expand Up @@ -1628,6 +1630,7 @@ spec:
prune: true
syncOptions:
- CreateNamespace=${each.value.createNamespace}
- ServerSideApply=true
source:
chart: ${each.value.chart}
repoURL: ${each.value.repo}
Expand Down
16 changes: 13 additions & 3 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,7 @@ module "efs-storage-local-registry" {
module "fsx-storage" {
count = var.include_fsx == true ? 1 : 0
source = "app.terraform.io/indico/indico-aws-fsx/mod"
version = "1.4.2"
version = "2.0.0"
label = var.label
additional_tags = var.additional_tags
region = var.region
Expand All @@ -297,7 +297,17 @@ module "fsx-storage" {
api_models_bucket = module.s3-storage.api_models_s3_bucket_name
kms_key = module.kms_key.key
per_unit_storage_throughput = var.per_unit_storage_throughput
deployment_type = var.fsx_deployment_type
include_rox = var.include_rox
fsx_type = var.fsx_type
fsx_rwx_id = var.fsx_rwx_id
fsx_rwx_subnet_ids = var.fsx_rwx_subnet_ids
fsx_rwx_security_group_ids = var.fsx_rwx_security_group_ids
fsx_rwx_dns_name = var.fsx_rwx_dns_name
fsx_rwx_mount_name = var.fsx_rwx_mount_name
fsx_rwx_arn = var.fsx_rwx_arn
fsx_rox_id = var.fsx_rox_id
fsx_rox_arn = var.fsx_rox_arn
}

module "cluster" {
Expand All @@ -319,7 +329,7 @@ module "cluster" {
cluster_node_policies = var.cluster_node_policies
eks_cluster_iam_role = var.eks_cluster_iam_role
eks_cluster_nodes_iam_role = "${var.label}-${var.region}-node-role"
fsx_arns = [var.include_rox ? module.fsx-storage[0].fsx-rox.arn : "", var.include_fsx == true ? module.fsx-storage[0].fsx-rwx.arn : ""]
fsx_arns = [var.include_rox ? module.fsx-storage[0].fsx_rox_arn : "", var.include_fsx == true ? module.fsx-storage[0].fsx_rwx_arn : ""]
kms_key_arn = module.kms_key.key_arn
az_count = var.az_count
key_pair = aws_key_pair.kp.key_name
Expand Down Expand Up @@ -468,7 +478,7 @@ module "argo-registration" {
}

locals {
security_group_id = var.include_fsx == true ? tolist(module.fsx-storage[0].fsx-rwx.security_group_ids)[0] : ""
security_group_id = var.include_fsx == true ? tolist(module.fsx-storage[0].fsx_rwx_security_group_ids)[0] : ""
cluster_name = var.label
dns_zone_name = var.dns_zone_name == "" ? lower("${var.aws_account}.${var.domain_suffix}") : var.dns_zone_name
dns_name = var.domain_host == "" ? lower("${var.label}.${var.region}.${local.dns_zone_name}") : var.domain_host
Expand Down
16 changes: 8 additions & 8 deletions outputs.tf
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,14 @@ output "efs_filesystem_id" {
description = "ID of the EFS filesystem"
value = var.include_efs == true ? module.efs-storage[0].efs_filesystem_id : ""
}
output "fsx-rwx" {
output "fsx_rwx_id" {
description = "Read write filesystem"
value = var.include_fsx == true ? module.fsx-storage[0].fsx-rwx : null
value = var.include_fsx == true ? module.fsx-storage[0].fsx_rwx_id : null
}

output "fsx-rox" {
output "fsx_rox_id" {
description = "Read only filesystem"
value = var.include_rox ? module.fsx-storage[0].fsx-rox : ""
value = var.include_rox ? module.fsx-storage[0].fsx_rox_id : ""
}

output "key_pem" {
Expand All @@ -36,19 +36,19 @@ output "key_pem" {
}

output "fsx_storage_fsx_rwx_dns_name" {
value = var.include_fsx == true ? module.fsx-storage[0].fsx-rwx.dns_name : ""
value = var.include_fsx == true ? module.fsx-storage[0].fsx_rwx_dns_name : ""
}

output "fsx_storage_fsx_rwx_mount_name" {
value = var.include_fsx == true ? module.fsx-storage[0].fsx-rwx.mount_name : ""
value = var.include_fsx == true ? module.fsx-storage[0].fsx_rwx_mount_name : ""
}

output "fsx_storage_fsx_rwx_volume_handle" {
value = var.include_fsx == true ? module.fsx-storage[0].fsx-rwx.id : ""
value = var.include_fsx == true ? module.fsx-storage[0].fsx_rwx_id : ""
}

output "fsx_storage_fsx_rwx_subnet_id" {
value = var.include_fsx == true ? module.fsx-storage[0].fsx-rwx.subnet_ids[0] : ""
value = var.include_fsx == true ? module.fsx-storage[0].fsx_rwx_subnet_ids[0] : ""
}

output "cluster_name" {
Expand Down
63 changes: 63 additions & 0 deletions variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -1051,3 +1051,66 @@ variable "instance_volume_type" {
default = "gp2"
description = "The type of EBS volume to attach to the cluster nodes"
}

variable "fsx_deployment_type" {
type = string
default = "PERSISTENT_1"
description = "The deployment type to launch"
}

variable "fsx_type" {
type = string
default = "create"
validation {
condition = var.fsx_type == "create" || var.fsx_type == "load"
error_message = "${var.fsx_type} not valid. Type must be either create or load"
}
}

variable "fsx_rwx_id" {
description = "ID of the existing FSx Lustre file system for RWX"
type = string
default = null
}

variable "fsx_rwx_subnet_ids" {
description = "Subnet IDs for the RWX FSx Lustre file system"
type = list(string)
default = []
}

variable "fsx_rwx_security_group_ids" {
description = "Security group IDs for the RWX FSx Lustre file system"
type = list(string)
default = []
}

variable "fsx_rwx_dns_name" {
description = "DNS name for the RWX FSx Lustre file system"
type = string
default = null
}

variable "fsx_rwx_mount_name" {
description = "Mount name for the RWX FSx Lustre file system"
type = string
default = null
}

variable "fsx_rwx_arn" {
description = "ARN of the RWX FSx Lustre file system"
type = string
default = null
}

variable "fsx_rox_id" {
description = "ID of the existing FSx Lustre file system for ROX"
type = string
default = null
}

variable "fsx_rox_arn" {
description = "ARN of the ROX FSx Lustre file system"
type = string
default = null
}