Skip to content

Commit

Permalink
Adding changes to support latest swoop-config.yaml and conductor call…
Browse files Browse the repository at this point in the history
…back functionality (#51)
  • Loading branch information
hectormachin authored Sep 15, 2023
1 parent 9cb00d0 commit 78674ed
Show file tree
Hide file tree
Showing 7 changed files with 118 additions and 4 deletions.
2 changes: 1 addition & 1 deletion inputs.tf
Original file line number Diff line number Diff line change
Expand Up @@ -465,7 +465,7 @@ variable custom_swoop_input_map {
"swoop.conductor.argo.enabled" = false
"swoop.conductor.argo.crdsInstall" = false
"swoop.conductor.argo.objectCounts" = 5
"swoop.conductor.instanceName" = "instance-a"
"swoop.conductor.instanceName" = "main"
"swoop.bundle.serviceAccount" = "swoop-bundle"
}
}
Expand Down
50 changes: 49 additions & 1 deletion modules/swoop/inputs.tf
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ variable custom_swoop_input_map {
"swoop.conductor.argo.enabled" = false
"swoop.conductor.argo.crdsInstall" = false
"swoop.conductor.argo.objectCounts" = 5
"swoop.conductor.instanceName" = "instance-a"
"swoop.conductor.instanceName" = "main"
"swoop.bundle.serviceAccount" = "swoop-bundle"
}
}
Expand Down Expand Up @@ -209,3 +209,51 @@ variable swoop_sa_iam_role {
default = ""
sensitive = true
}

variable custom_stac_fastapi_input_map {
type = map
description = "Input values for STAC-FastAPI Helm Chart"
default = {
"local-path-provisioner.enabled" = true
"local-path-provisioner.singleNamespace" = false
"local-path-provisioner.storageClass.provisionerName" = "filmdrop.io/local-pgstac-path-provisioner"
"local-path-provisioner.storageClass.name" = "local-path-class-pgstac"
"local-path-provisioner.configmap.name" = "local-path-config-pgstac"
"pgStac.container.port" = 5432
"pgStac.deployment.name" = "pgstac"
"pgStac.image.repository" = "quay.io/element84/pgstac"
"pgStac.image.tag" = "latest"
"pgStac.enabled" = true
"pgStac.replicaCount" = 1
"pgStac.service.type" = "ClusterIP"
"pgStac.service.port" = 5439
"pgStac.service.targetPort" = 5432
"pgStac.service.name" = "pgstac"
"pgStac.dbName" = "postgis"
"pgStac.dbHost" = ""
"pgStac.dbUser" = ""
"pgStac.dbPassword" = ""
"pgStac.createPgStacSecret" = false
"pgStac.storage.size" = "256M"
"pgStac.storage.volumeBindingMode" = "WaitForFirstConsumer"
"pgStac.storage.provisioner" = "filmdrop.io/local-pgstac-path-provisioner"
"pgStac.storage.retainPersistentVolume" = true
"pgStac.storage.storageClassName" = "pgstac-retain"
"stacFastApi.container.port" = 8080
"stacFastApi.deployment.name" = "stac-fastapi-pgstac"
"stacFastApi.image.repository" = "ghcr.io/stac-utils/stac-fastapi-pgstac"
"stacFastApi.image.tag" = "main"
"stacFastApi.replicaCount" = 1
"stacFastApi.service.type" = "ClusterIP"
"stacFastApi.service.port" = 8080
"stacFastApi.service.targetPort" = 8080
"stacFastApi.service.name" = "stac-fastapi-pgstac"
"stacFastApi.service.serviceserviceAccount" = "stac-fastapi-pgstac"
}
}

variable stac_namespace {
type = string
description = "Namespace for STAC-FastAPI"
default = "stac"
}
2 changes: 2 additions & 0 deletions modules/swoop/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,8 @@ module "swoop_bundle" {
custom_swoop_caboose_service_input_map = var.custom_swoop_caboose_service_input_map
custom_swoop_conductor_service_input_map = var.custom_swoop_conductor_service_input_map
swoop_sa_iam_role = var.swoop_sa_iam_role
custom_stac_fastapi_input_map = var.custom_stac_fastapi_input_map
stac_namespace = var.stac_namespace

depends_on = [
module.swoop_namespace,
Expand Down
50 changes: 49 additions & 1 deletion modules/swoop/swoop-bundle/inputs.tf
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ variable custom_swoop_input_map {
"swoop.conductor.argo.enabled" = false
"swoop.conductor.argo.crdsInstall" = false
"swoop.conductor.argo.objectCounts" = 5
"swoop.conductor.instanceName" = "instance-a"
"swoop.conductor.instanceName" = "main"
"swoop.bundle.serviceAccount" = "swoop-bundle"
}
}
Expand Down Expand Up @@ -198,3 +198,51 @@ variable swoop_sa_iam_role {
default = ""
sensitive = true
}

variable custom_stac_fastapi_input_map {
type = map
description = "Input values for STAC-FastAPI Helm Chart"
default = {
"local-path-provisioner.enabled" = true
"local-path-provisioner.singleNamespace" = false
"local-path-provisioner.storageClass.provisionerName" = "filmdrop.io/local-pgstac-path-provisioner"
"local-path-provisioner.storageClass.name" = "local-path-class-pgstac"
"local-path-provisioner.configmap.name" = "local-path-config-pgstac"
"pgStac.container.port" = 5432
"pgStac.deployment.name" = "pgstac"
"pgStac.image.repository" = "quay.io/element84/pgstac"
"pgStac.image.tag" = "latest"
"pgStac.enabled" = true
"pgStac.replicaCount" = 1
"pgStac.service.type" = "ClusterIP"
"pgStac.service.port" = 5439
"pgStac.service.targetPort" = 5432
"pgStac.service.name" = "pgstac"
"pgStac.dbName" = "postgis"
"pgStac.dbHost" = ""
"pgStac.dbUser" = ""
"pgStac.dbPassword" = ""
"pgStac.createPgStacSecret" = false
"pgStac.storage.size" = "256M"
"pgStac.storage.volumeBindingMode" = "WaitForFirstConsumer"
"pgStac.storage.provisioner" = "filmdrop.io/local-pgstac-path-provisioner"
"pgStac.storage.retainPersistentVolume" = true
"pgStac.storage.storageClassName" = "pgstac-retain"
"stacFastApi.container.port" = 8080
"stacFastApi.deployment.name" = "stac-fastapi-pgstac"
"stacFastApi.image.repository" = "ghcr.io/stac-utils/stac-fastapi-pgstac"
"stacFastApi.image.tag" = "main"
"stacFastApi.replicaCount" = 1
"stacFastApi.service.type" = "ClusterIP"
"stacFastApi.service.port" = 8080
"stacFastApi.service.targetPort" = 8080
"stacFastApi.service.name" = "stac-fastapi-pgstac"
"stacFastApi.service.serviceserviceAccount" = "stac-fastapi-pgstac"
}
}

variable stac_namespace {
type = string
description = "Namespace for STAC-FastAPI"
default = "stac"
}
14 changes: 14 additions & 0 deletions modules/swoop/swoop-bundle/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,10 @@ resource "helm_release" "swoop_bundle" {
value = "${var.namespace}-${var.minio_secret}"
}

set {
name = "global.stac.endpoint"
value = "http://${var.custom_stac_fastapi_input_map["stacFastApi.service.name"]}.${var.stac_namespace}:${var.custom_stac_fastapi_input_map["stacFastApi.service.port"]}"
}

dynamic "set" {
for_each = var.custom_swoop_input_map
Expand Down Expand Up @@ -191,6 +195,11 @@ resource "helm_release" "swoop_bundle" {
}
}

set {
name = "swoop-caboose.service.stacApiEndpoint"
value = "http://${var.custom_stac_fastapi_input_map["stacFastApi.service.name"]}.${var.stac_namespace}:${var.custom_stac_fastapi_input_map["stacFastApi.service.port"]}"
}

set {
name = "swoop-conductor.enabled"
value = var.deploy_swoop_conductor
Expand Down Expand Up @@ -229,6 +238,11 @@ resource "helm_release" "swoop_bundle" {
}
}

set {
name = "swoop-conductor.service.stacApiEndpoint"
value = "http://${var.custom_stac_fastapi_input_map["stacFastApi.service.name"]}.${var.stac_namespace}:${var.custom_stac_fastapi_input_map["stacFastApi.service.port"]}"
}

values = concat(
[var.custom_swoop_api_values_yaml == "" ? file("${path.module}/values.yaml") : file(var.custom_swoop_api_values_yaml)],
length(var.swoop_api_additional_configuration_values) == 0 ? [] : var.swoop_api_additional_configuration_values
Expand Down
2 changes: 1 addition & 1 deletion profiles/core/inputs.tf
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,7 @@ variable custom_swoop_input_map {
"swoop.conductor.argo.enabled" = false
"swoop.conductor.argo.crdsInstall" = false
"swoop.conductor.argo.objectCounts" = 5
"swoop.conductor.instanceName" = "instance-a"
"swoop.conductor.instanceName" = "main"
"swoop.bundle.serviceAccount" = "swoop-bundle"
}
}
Expand Down
2 changes: 2 additions & 0 deletions profiles/core/profile.tf
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,8 @@ module "swoop" {
custom_swoop_caboose_service_input_map = var.custom_swoop_caboose_service_input_map
custom_swoop_conductor_service_input_map = var.custom_swoop_conductor_service_input_map
swoop_sa_iam_role = var.swoop_sa_iam_role
custom_stac_fastapi_input_map = var.custom_stac_fastapi_input_map
stac_namespace = var.stac_namespace

depends_on = [
module.service_mesh,
Expand Down

0 comments on commit 78674ed

Please sign in to comment.