Skip to content

Commit 3d6625f

Browse files
Update docs
1 parent 2fc37bd commit 3d6625f

File tree

1 file changed

+27
-38
lines changed
  • docs/howto/cost-attribution

1 file changed

+27
-38
lines changed

docs/howto/cost-attribution/aws.md

Lines changed: 27 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,21 @@ attribute cost to.
2222
- `alpha.eksctl.io/cluster-name`
2323
- `kubernetes.io/cluster/<cluster name>`
2424

25+
```{important}
26+
Currently, on clusters that have a k8s version greater or equal with 1.30,
27+
terraform managed resources already have the `2i2c.org/cluster-name`
28+
tag configured via the `default_tags` variable, and eksctl managed resources
29+
already have the tag configured for node groups via `nodegroup.libsonnet`.
30+
31+
On clusters that have a k8s version less than 1.30, eksctl managed resources,
32+
the `alpha.eksctl.io/cluster-name` and `kubernetes.io/cluster/<cluster name>`
33+
tags are present and used instead.
34+
35+
New clusters have _all_ eksctl managed resources configured to be tagged, not
36+
just the node groups. This isn't important to ensure for existing clusters'
37+
cost attribution though.
38+
```
39+
2540
The system also relies on the tag `2i2c:hub-name` to be specified in addition to
2641
the tags above for any cloud infra tied to specific hubs.
2742

@@ -31,21 +46,7 @@ create cloud resources to represent k8s resources (block storage volumes for k8s
3146
PV resources referencing certain storage classes, and load balancers for k8s
3247
Service's of type LoadBalancer).
3348

34-
1. _Configure `2i2c.org/cluster-name` tags_
35-
36-
No configuration is needed.
37-
38-
```{note}
39-
Terraform managed resources already have the tag configured via the
40-
`default_tags` variable, and eksctl managed resources already have the tag
41-
configured for node groups via `nodegroup.libsonnet`.
42-
43-
New clusters have _all_ eksctl managed resources configured to be tagged, not
44-
just the node groups. This isn't important to ensure for existing clusters'
45-
cost attribution though.
46-
```
47-
48-
2. _Configure `2i2c:hub-name` tags_
49+
1. _Configure `2i2c:hub-name` tags_
4950

5051
For any resource _specific to a hub_, declare an additional tag
5152
`2i2c:hub-name=<hub name>`. If this isn't done, they will be listed under a
@@ -54,16 +55,16 @@ Service's of type LoadBalancer).
5455
The following resources are known to be hub specific in some cases and known
5556
to incur costs.
5657

57-
- S3 buckets in terraform
58-
- EFS storage in terraform
59-
- EBS volumes in terraform
60-
- Node groups in eksctl
58+
- **S3 buckets** in terraform
59+
- **EFS storage** in terraform
60+
- **EBS volumes** in terraform
61+
- **Node groups** in eksctl
6162

6263
```{important}
6364
If EFS, EBS or nodegroups are not split based on the hub they're deployed to
64-
and instead they are shared by the entire cluster, then splliting it in order
65-
to add the `2i2c:hub-name` tag will be an opt-in feature because it would
66-
incur additional cloud costs and startup times for communities.
65+
and instead they are shared by the entire cluster, then splitting it in order
66+
to add the `2i2c:hub-name` tag is an opt-in feature because the split incurs
67+
additional cloud costs and startup times for communities.
6768
6869
See the following GitHub issue for additional context
6970
https://github.com/2i2c-org/infrastructure/issues/4928#issuecomment-2417091407
@@ -72,29 +73,17 @@ Service's of type LoadBalancer).
7273
Search and mimic configuration of other clusters to understand how to
7374
configure the `2i2c:hub-name` tags for specific cloud infra types.
7475

75-
3. _Apply changes_
76+
2. _Apply changes_
7677

7778
1. If you changed anything in terraform, apply those changes.
7879
2. If you changed anything in eksctl, apply those changed by re-creating
7980
those resources.
80-
3. If the eksctl cluster is listed and unchecked in this [github reference
81-
issue], and versioned older than k8s 1.29 or older, it needs to have its
82-
node groups re-created to get the implicitly configured
83-
`2i2c.org/cluster-name` tag unless you've not already just done this to
84-
apply a `2i2c:hub-name` tag.
85-
86-
Reference our [documentation on doing node group
87-
upgrades](upgrade-cluster:aws:node-groups) for details.
88-
4. Update the [github reference issue] and ensure the checkbox is ticked for
89-
this cluster.
90-
91-
[github reference issue]: https://github.com/2i2c-org/infrastructure/issues/4885
9281

9382
### 2. Enable cost allocation tags
9483

9584
Enabling cost allocation tags via terraform can be done for standalone AWS
96-
accounts, but not for member accounts part of an organization. Due to this,
97-
we'll provide separate ways of doing this depending on the situation.
85+
accounts, but not for member accounts part of an organization that we don't manage.
86+
Due to this, we'll provide separate ways of doing this depending on the situation.
9887

9988
`````{tab-set}
10089
@@ -194,7 +183,7 @@ storage disks dynamically provisioned in case that's relevant in the future.
194183
You can optionally backfill billing data to tags having been around for a while
195184
but not enabled as cost allocation tags.
196185

197-
You can do request this to be done once a day, and it takes a several hours to
186+
You can request this to be done once a day, and it takes a several hours to
198187
process the request. Make a request through the AWS web console by navigating to
199188
"Cost allocation tags" under "Billing and Cost Management", then from there
200189
click the "Backfill tags" button.

0 commit comments

Comments
 (0)