Skip to content

Commit

Permalink
Merge pull request 2i2c-org#5041 from GeorgianaElena/cost-attr/remaining
Browse files Browse the repository at this point in the history
 [jupyter-health, kitware, opensci, pythia ] Enable cost attribution
  • Loading branch information
GeorgianaElena authored Nov 6, 2024
2 parents 90315d3 + 68a28da commit bee2977
Show file tree
Hide file tree
Showing 8 changed files with 70 additions and 27 deletions.
8 changes: 8 additions & 0 deletions config/clusters/jupyter-health/support.values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
8 changes: 8 additions & 0 deletions config/clusters/kitware/support.values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
8 changes: 8 additions & 0 deletions config/clusters/opensci/support.values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
8 changes: 8 additions & 0 deletions config/clusters/projectpythia/support.values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
8 changes: 6 additions & 2 deletions terraform/aws/projects/jupyter-health.tfvars
Original file line number Diff line number Diff line change
Expand Up @@ -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" },
},
}

Expand Down
8 changes: 6 additions & 2 deletions terraform/aws/projects/kitware.tfvars
Original file line number Diff line number Diff line change
Expand Up @@ -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" },
},
}

Expand Down
11 changes: 8 additions & 3 deletions terraform/aws/projects/opensci.tfvars
Original file line number Diff line number Diff line change
Expand Up @@ -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" },
},
}

Expand Down
38 changes: 18 additions & 20 deletions terraform/aws/projects/projectpythia.tfvars
Original file line number Diff line number Diff line change
Expand Up @@ -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"],
},
},
}

0 comments on commit bee2977

Please sign in to comment.