Skip to content

Commit

Permalink
update names and resources
Browse files Browse the repository at this point in the history
  • Loading branch information
morga471 committed Apr 1, 2025
1 parent 8a527e2 commit 2db0632
Show file tree
Hide file tree
Showing 3 changed files with 51 additions and 4 deletions.
2 changes: 1 addition & 1 deletion main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ module "loki_irsa_role" {
# tflint-ignore: terraform_module_pinned_source
source = "git@github.e.it.census.gov:SCT-Engineering/tfmod-custom-iam-role-for-service-account-eks.git//?ref=main"

role_name = "r-${var.cluster_name}-loki"
role_name = format("%v%v-%v", local.prefixes["eks-role"], var.cluster_name, "-loki")

attach_s3_bucket_owner_policy = true
attach_encrypted_object_manager_policy = true
Expand Down
34 changes: 34 additions & 0 deletions prefixes.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
locals {
prefixes = {
"efs" = "v-efs-"
"s3" = "v-s3-"
"ebs" = "v-ebs-"
"kms" = "k-kms-"
"role" = "r-"
"policy" = "p-"
"group" = "g-"
"security-group" = "" # "sg-"
# VPC
"vpc" = ""
"dhcp-options" = ""
"vpc-peer" = "vpcp-"
"route-table" = "route-"
"subnet" = ""
"vpc-endpoint" = "vpce-"
"elastic-ip" = "eip-"
"nat-gateway" = "nat-"
"internet-gateway" = "igw-"
"network-acl" = "nacl-"
"customer-gateway" = "cgw-"
"vpn-gateway" = "vpcg-"
"vpn-connection" = "vpn_"
"log-group" = "lg-"
"log-stream" = "lgs-"
# EKS
"eks" = "eks-"
"eks-user" = "s-eks-"
"eks-role" = "r-eks-"
"eks-policy" = "p-eks-"
"eks-security-group" = "eks-sg-" # "sg-eks-"
}
}
19 changes: 16 additions & 3 deletions values/loki.yml.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -45,13 +45,26 @@ backend:
enabled: true
minReplicas: 1
targetCPUUtilizationPercentage: 80
behavior:
scaleUp:
stabilizationWindowSeconds: 300
policies:
- type: Pods
value: 1
periodSeconds: 60
scaleDown:
stabilizationWindowSeconds: 300
policies:
- type: Pods
value: 1
periodSeconds: 180
persistence:
storageClass: ${rwo_storage_class}
replicas: 1
replication_factor: 1
resources:
requests:
cpu: 10m
cpu: 100m
memory: 128Mi
limits:
cpu: 1000m
Expand Down Expand Up @@ -85,7 +98,7 @@ gateway:
replicas: 1
resources:
requests:
cpu: 10m
cpu: 100m
memory: 128Mi
limits:
cpu: 100m
Expand Down Expand Up @@ -114,7 +127,7 @@ read:
replicas: 1
resources:
requests:
cpu: 10m
cpu: 100m
memory: 128Mi
limits:
cpu: 100m
Expand Down

0 comments on commit 2db0632

Please sign in to comment.