diff --git a/config/clusters/jupyter-health/support.values.yaml b/config/clusters/jupyter-health/support.values.yaml index 113d2146f7..4fa7df1103 100644 --- a/config/clusters/jupyter-health/support.values.yaml +++ b/config/clusters/jupyter-health/support.values.yaml @@ -27,6 +27,14 @@ grafana: hosts: - grafana.jupyter-health.2i2c.cloud +aws-ce-grafana-backend: + enabled: true + envBasedConfig: + clusterName: jupyter-health + serviceAccount: + annotations: + eks.amazonaws.com/role-arn: arn:aws:iam::211125465508:role/aws_ce_grafana_backend_iam_role + cluster-autoscaler: enabled: true autoDiscovery: diff --git a/config/clusters/kitware/support.values.yaml b/config/clusters/kitware/support.values.yaml index e1a483a529..dd6e6203f8 100644 --- a/config/clusters/kitware/support.values.yaml +++ b/config/clusters/kitware/support.values.yaml @@ -27,6 +27,14 @@ grafana: hosts: - grafana.kitware.2i2c.cloud +aws-ce-grafana-backend: + enabled: true + envBasedConfig: + clusterName: kitware + serviceAccount: + annotations: + eks.amazonaws.com/role-arn: arn:aws:iam::471112920937:role/aws_ce_grafana_backend_iam_role + cluster-autoscaler: enabled: true autoDiscovery: diff --git a/config/clusters/opensci/support.values.yaml b/config/clusters/opensci/support.values.yaml index d1d7ba1c91..29faa01139 100644 --- a/config/clusters/opensci/support.values.yaml +++ b/config/clusters/opensci/support.values.yaml @@ -32,3 +32,11 @@ grafana: - secretName: grafana-tls hosts: - grafana.opensci.2i2c.cloud + +aws-ce-grafana-backend: + enabled: true + envBasedConfig: + clusterName: opensci + serviceAccount: + annotations: + eks.amazonaws.com/role-arn: arn:aws:iam::211125293633:role/aws_ce_grafana_backend_iam_role diff --git a/config/clusters/projectpythia/support.values.yaml b/config/clusters/projectpythia/support.values.yaml index 969c493d89..83d805c83a 100644 --- a/config/clusters/projectpythia/support.values.yaml +++ b/config/clusters/projectpythia/support.values.yaml @@ -27,6 +27,14 @@ grafana: hosts: - grafana.projectpythia.2i2c.cloud +aws-ce-grafana-backend: + enabled: true + envBasedConfig: + clusterName: projectpythia + serviceAccount: + annotations: + eks.amazonaws.com/role-arn: arn:aws:iam::590183926898:role/aws_ce_grafana_backend_iam_role + cluster-autoscaler: enabled: true autoDiscovery: diff --git a/terraform/aws/projects/jupyter-health.tfvars b/terraform/aws/projects/jupyter-health.tfvars index 43b0246d33..851ae36211 100644 --- a/terraform/aws/projects/jupyter-health.tfvars +++ b/terraform/aws/projects/jupyter-health.tfvars @@ -2,12 +2,16 @@ region = "us-east-2" cluster_name = "jupyter-health" cluster_nodes_location = "us-east-2a" +enable_aws_ce_grafana_backend_iam = true + user_buckets = { "scratch-staging" : { - "delete_after" : 7 + "delete_after" : 7, + "tags" : { "2i2c:hub-name" : "staging" }, }, "scratch" : { - "delete_after" : 7 + "delete_after" : 7, + "tags" : { "2i2c:hub-name" : "prod" }, }, } diff --git a/terraform/aws/projects/kitware.tfvars b/terraform/aws/projects/kitware.tfvars index 47a89e6c4f..8714f56661 100644 --- a/terraform/aws/projects/kitware.tfvars +++ b/terraform/aws/projects/kitware.tfvars @@ -2,12 +2,16 @@ region = "us-west-2" cluster_name = "kitware" cluster_nodes_location = "us-west-2a" +enable_aws_ce_grafana_backend_iam = true + user_buckets = { "scratch-staging" : { - "delete_after" : 7 + "delete_after" : 7, + "tags" : { "2i2c:hub-name" : "staging" }, }, "scratch" : { - "delete_after" : 7 + "delete_after" : 7, + "tags" : { "2i2c:hub-name" : "prod" }, }, } diff --git a/terraform/aws/projects/opensci.tfvars b/terraform/aws/projects/opensci.tfvars index db6fa3729f..b69eefbce2 100644 --- a/terraform/aws/projects/opensci.tfvars +++ b/terraform/aws/projects/opensci.tfvars @@ -2,15 +2,20 @@ region = "us-west-2" cluster_name = "opensci" cluster_nodes_location = "us-west-2a" +enable_aws_ce_grafana_backend_iam = true + user_buckets = { "scratch-staging" : { - "delete_after" : 7 + "delete_after" : 7, + "tags" : { "2i2c:hub-name" : "staging" }, }, "scratch-sciencecore" : { - "delete_after" : 7 + "delete_after" : 7, + "tags" : { "2i2c:hub-name" : "sciencecore" }, }, "persistent-sciencecore" : { - "delete_after" : null + "delete_after" : null, + "tags" : { "2i2c:hub-name" : "sciencecore" }, }, } diff --git a/terraform/aws/projects/projectpythia.tfvars b/terraform/aws/projects/projectpythia.tfvars index 5cda7ae83f..45f8ea1629 100644 --- a/terraform/aws/projects/projectpythia.tfvars +++ b/terraform/aws/projects/projectpythia.tfvars @@ -6,24 +6,22 @@ default_budget_alert = { "enabled" : false, } -# Tip: uncomment and fill the missing info in the lines below if you want -# to setup scratch buckets for the hubs on this cluster. -# -#user_buckets = { -# "scratch-staging" : { -# "delete_after" : 7, -# }, -# # Tip: add more scratch buckets below, if this cluster will be multi-tenant -#} +enable_aws_ce_grafana_backend_iam = true -# Tip: uncomment and fill the missing info in the lines below if you want -# to setup specific cloud permissions for the buckets in this cluster. -# -#hub_cloud_permissions = { -# "staging" : { -# "user-sa" : { -# bucket_admin_access : ["scratch-staging"], -# }, -# }, -# # Tip: add more namespaces below, if this cluster will be multi-tenant -#} +# FIXME: placeholder bucket to get the 2i2c:hub-name tag in place +# so the community cand enable it for cost allocation purposes +# To be removed once it has been activated. +user_buckets = { + "placeholder-bucket-staging" : { + "delete_after" : 7, + "tags" : { "2i2c:hub-name" : "staging" }, + }, +} + +hub_cloud_permissions = { + "staging" : { + "user-sa" : { + bucket_admin_access : ["placeholder-bucket-staging"], + }, + }, +} \ No newline at end of file