Skip to content

Commit

Permalink
fixing service account to pod
Browse files Browse the repository at this point in the history
  • Loading branch information
obeleh committed Feb 22, 2021
1 parent f93e727 commit b7652d5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,12 @@ resource "kubectl_manifest" "crds" {
# helm install aws-load-balancer-controller eks/aws-load-balancer-controller -n kube-system --set clusterName=<cluster-name>

data "template_file" "loadbalancer-controller" {
template = "${path.module}/yamls/loadbalancer-values.yaml"
template = file("${path.module}/yamls/loadbalancer-values.yaml")
vars = {
cluster_name = var.eks_cluster_name
vpc_id = var.vpc_id
region = var.region
service_account_name =kubernetes_service_account.alb_ingress_controller.metadata.name
}
}

Expand Down
4 changes: 2 additions & 2 deletions yamls/loadbalancer-values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,12 @@ clusterName: "${cluster_name}"

serviceAccount:
# Specifies whether a service account should be created
create: true
create: false
# Annotations to add to the service account
annotations: {}
# The name of the service account to use.
# If not set and create is true, a name is generated using the fullname template
name:
name: "${service_account_name}"

rbac:
# Specifies whether rbac resources should be created
Expand Down

0 comments on commit b7652d5

Please sign in to comment.