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 Mar 22, 2025
1 parent 08ba8d5 commit 8a2e85a
Show file tree
Hide file tree
Showing 3 changed files with 64 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-"
}
}
32 changes: 29 additions & 3 deletions values/loki.yml.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -60,12 +60,25 @@ 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: 3
resources:
requests:
cpu: 10m
cpu: 100m
memory: 128Mi
limits:
cpu: 1000m
Expand All @@ -90,7 +103,7 @@ gateway:
replicas: 1
resources:
requests:
cpu: 10m
cpu: 100m
memory: 128Mi
limits:
cpu: 100m
Expand Down Expand Up @@ -120,10 +133,23 @@ read:
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
replicas: 3
resources:
requests:
cpu: 10m
cpu: 100m
memory: 128Mi
limits:
cpu: 500m
Expand Down

0 comments on commit 8a2e85a

Please sign in to comment.