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

[jupyter-health, kitware, opensci, pythia ] Enable cost attribution #5041

Merged
merged 5 commits into from
Nov 6, 2024
Merged
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
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"],
},
},
}