-
Notifications
You must be signed in to change notification settings - Fork 115
/
labels.tf
42 lines (40 loc) · 994 Bytes
/
labels.tf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
### frigga name
module "frigga" {
source = "Young-ook/spinnaker/aws//modules/frigga"
version = "2.3.5"
name = var.name == null || var.name == "" ? "eks" : var.name
petname = var.name == null || var.name == "" ? true : false
}
locals {
name = module.frigga.name
default-tags = merge(
{ "terraform.io" = "managed" },
{ "Name" = local.name },
)
}
### kubernetes tags
locals {
eks-shared-tag = {
format("kubernetes.io/cluster/%s", local.name) = "shared"
}
eks-owned-tag = {
format("kubernetes.io/cluster/%s", local.name) = "owned"
}
eks-elb-tag = {
"kubernetes.io/role/elb" = "1"
}
eks-internal-elb-tag = {
"kubernetes.io/role/internal-elb" = "1"
}
eks-autoscaler-tag = {
"k8s.io/cluster-autoscaler/enabled" = "true"
format("k8s.io/cluster-autoscaler/%s", local.name) = "owned"
}
eks-tag = merge(
{
"eks:cluster-name" = local.name
},
local.eks-owned-tag,
local.eks-autoscaler-tag,
)
}