Code development platform for open source projects from the European Union institutions

Skip to content
Snippets Groups Projects
Unverified Commit 255f92fe authored by Vara Bonthu's avatar Vara Bonthu Committed by GitHub
Browse files

Merge pull request #48 from aws-samples/fluentbit

FluentBit for workers addon updated with examples
parents 3bce55ab f767138c
No related branches found
No related tags found
No related merge requests found
Showing
with 492 additions and 104 deletions
# Application Account Dev Cluster Deployment
The following steps walks you through the deployment of this example
This example deploys the following Basic EKS Cluster with VPC
- Creates a new sample VPC, 3 Private Subnets and 3 Public Subnets
- Creates Internet gateway for Public Subnets and NAT Gateway for Private Subnets
- Creates EKS Cluster Control plane with one managed node group, self managed and fargate profile
- Deploys all available Helm Addons
# How to Deploy
## Prerequisites:
Ensure that you have installed the following tools in your Mac or Windows Laptop before start working with this module and run Terraform Plan and Apply
1. [aws cli](https://docs.aws.amazon.com/cli/latest/userguide/install-cliv2.html)
2. [aws-iam-authenticator](https://docs.aws.amazon.com/eks/latest/userguide/install-aws-iam-authenticator.html)
3. [kubectl](https://Kubernetes.io/docs/tasks/tools/)
4. [terraform](https://learn.hashicorp.com/tutorials/terraform/install-cli)
## Deployment Steps
#### Step1: Clone the repo using the command below
```shell script
git clone https://gitlab.aws.dev/vabonthu/terraform-aws-eks-accelerator-patterns.git
```
#### Step2: Run Terraform INIT
to initialize a working directory with configuration files
```shell script
cd deploy/advanced/live/preprod/eu-west-1/application_acct/dev
terraform init
```
#### Step3: Run Terraform PLAN
to verify the resources created by this execution
```shell script
export AWS_REGION="eu-west-1" # Select your own region
terraform plan
```
#### Step4: Finally, Terraform APPLY
to create resources
```shell script
terraform apply
```
Enter `yes` to apply
### Configure kubectl and test cluster
EKS Cluster details can be extracted from terraform output or from AWS Console to get the name of cluster. This following command used to update the `kubeconfig` in your local machine where you run kubectl commands to interact with your EKS Cluster.
#### Step5: Run update-kubeconfig command.
`~/.kube/config` file gets updated with cluster details and certificate from the below command
$ aws eks --region eu-west-1 update-kubeconfig --name <cluster-name>
#### Step6: List all the worker nodes by running the command below
$ kubectl get nodes
#### Step7: List all the pods running in kube-system namespace
$ kubectl get pods -n kube-system
# How to Destroy
```shell script
cd deploy/advanced/live/preprod/eu-west-1/application_acct/dev
terraform destroy
```
agones:
featureGates: ""
metrics:
prometheusEnabled: true
prometheusServiceDiscovery: true
stackdriverEnabled: false
stackdriverProjectID: ""
stackdriverLabels: ""
rbacEnabled: true
registerServiceAccounts: true
registerWebhooks: true
registerApiService: true
crds:
install: true
cleanupOnDelete: true
serviceaccount:
controller: agones-controller
sdk: agones-sdk
allocator: agones-allocator
createPriorityClass: true
priorityClassName: agones-system
controller:
resources: {}
# requests:
# cpu: 1
# memory: 256Mi
nodeSelector:
kubernetes.io/os: linux
annotations: {}
tolerations:
- key: "agones.dev/agones-system"
operator: "Equal"
value: "true"
effect: "NoExecute"
affinity:
nodeAffinity:
preferredDuringSchedulingIgnoredDuringExecution:
- weight: 1
preference:
matchExpressions:
- key: agones.dev/agones-system
operator: Exists
generateTLS: true
safeToEvict: false
persistentLogs: true
persistentLogsSizeLimitMB: 10000
logLevel: info
numWorkers: 100
apiServerQPS: 400
apiServerQPSBurst: 500
http:
port: 8080
healthCheck:
initialDelaySeconds: 3
periodSeconds: 3
failureThreshold: 3
timeoutSeconds: 1
ping:
install: true
resources: {}
# requests:
# cpu: 1
# memory: 256Mi
nodeSelector:
kubernetes.io/os: linux
annotations: {}
tolerations:
- key: "agones.dev/agones-system"
operator: "Equal"
value: "true"
effect: "NoExecute"
affinity:
nodeAffinity:
preferredDuringSchedulingIgnoredDuringExecution:
- weight: 1
preference:
matchExpressions:
- key: agones.dev/agones-system
operator: Exists
replicas: 2
http:
expose: true
response: ok
port: 80
serviceType: LoadBalancer
loadBalancerIP: ""
loadBalancerSourceRanges: []
annotations:
service.beta.kubernetes.io/aws-load-balancer-internal: "false"
service.beta.kubernetes.io/aws-load-balancer-type: "nlb"
udp:
expose: ${expose_udp}
rateLimit: 20
port: 50000
serviceType: LoadBalancer
loadBalancerIP: ""
loadBalancerSourceRanges: []
annotations:
service.beta.kubernetes.io/aws-load-balancer-internal: "false"
service.beta.kubernetes.io/aws-load-balancer-type: "nlb"
healthCheck:
initialDelaySeconds: 3
periodSeconds: 3
failureThreshold: 3
timeoutSeconds: 5
allocator:
install: true
apiServerQPS: 400
apiServerQPSBurst: 500
logLevel: info
annotations: {}
resources: {}
# requests:
# cpu: 1
# memory: 256Mi
nodeSelector:
kubernetes.io/os: linux
healthCheck:
initialDelaySeconds: 3
periodSeconds: 3
failureThreshold: 3
timeoutSeconds: 1
tolerations:
- key: "agones.dev/agones-system"
operator: "Equal"
value: "true"
effect: "NoExecute"
affinity:
nodeAffinity:
preferredDuringSchedulingIgnoredDuringExecution:
- weight: 1
preference:
matchExpressions:
- key: agones.dev/agones-system
operator: Exists
replicas: 3
http:
port: 443
serviceType: LoadBalancer
loadBalancerIP: ""
loadBalancerSourceRanges: []
annotations:
service.beta.kubernetes.io/aws-load-balancer-internal: "false"
service.beta.kubernetes.io/aws-load-balancer-type: "nlb"
generateTLS: true
generateClientTLS: true
disableMTLS: false
disableTLS: false
remoteAllocationTimeout: 10s
totalRemoteAllocationTimeout: 30s
image:
registry: gcr.io/agones-images
tag: 1.15.0
controller:
name: agones-controller
pullPolicy: IfNotPresent
sdk:
name: agones-sdk
cpuRequest: 30m
cpuLimit: 0
memoryRequest: 0
memoryLimit: 0
alwaysPull: false
ping:
name: agones-ping
pullPolicy: IfNotPresent
allocator:
name: agones-allocator
pullPolicy: IfNotPresent
gameservers:
namespaces:
- default
minPort: ${gameserver_minport}
maxPort: ${gameserver_maxport}
podPreserveUnknownFields: false
helm:
installTests: false
controller:
image:
registry: k8s.gcr.io
image: ingress-nginx/controller
tag: v0.47.0
containerName: nginx-controller
service:
enabled: true
annotations:
service.beta.kubernetes.io/aws-load-balancer-backend-protocol: tcp
service.beta.kubernetes.io/aws-load-balancer-connection-idle-timeout: '60'
service.beta.kubernetes.io/aws-load-balancer-cross-zone-load-balancing-enabled: 'true'
service.beta.kubernetes.io/aws-load-balancer-internal: "false"
service.beta.kubernetes.io/aws-load-balancer-type: "nlb"
# Configures the ports the nginx-controller listens on
containerPort:
http: 80
https: 443
kind: deployment
......@@ -242,21 +242,21 @@ module "aws-eks-accelerator-for-terraform" {
# EKS SELF MANAGED WORKER NODE GROUPS
#---------------------------------------------------------#
enable_windows_support = false
windows_vpc_resource_controller_image_tag = "v0.2.7" # enable_windows_support= true
windows_vpc_admission_webhook_image_tag = "v0.2.7" # enable_windows_support= true
enable_windows_support = false
enable_self_managed_nodegroups = false
self_managed_node_groups = {
#---------------------------------------------------------#
# ON-DEMAND Self Managed Worker Group - Worker Group - 1
#---------------------------------------------------------#
self_mg_4 = {
node_group_name = "self-managed-ondemand" # Name is used to create a dedicated IAM role for each node group and adds to AWS-AUTH config map
launch_template_os = "amazonlinux2eks" # amazonlinux2eks or bottlerocket or windows
custom_ami_id = "ami-0dfaa019a300f219c" # Bring your own custom AMI generated by Packer/ImageBuilder/Puppet etc.
public_ip = false # Enable only for public subnets
pre_userdata = <<-EOT
node_group_name = "self-managed-ondemand" # Name is used to create a dedicated IAM role for each node group and adds to AWS-AUTH config map
create_launch_template = true
launch_template_os = "amazonlinux2eks" # amazonlinux2eks or bottlerocket or windows
custom_ami_id = "ami-0dfaa019a300f219c" # Bring your own custom AMI generated by Packer/ImageBuilder/Puppet etc.
public_ip = false # Enable only for public subnets
pre_userdata = <<-EOT
yum install -y amazon-ssm-agent \
systemctl enable amazon-ssm-agent && systemctl start amazon-ssm-agent \
EOT
......@@ -291,6 +291,7 @@ module "aws-eks-accelerator-for-terraform" {
spot_m5 = {
# 1> Node Group configuration - Part1
node_group_name = "self-managed-spot"
create_launch_template = true
launch_template_os = "amazonlinux2eks" # amazonlinux2eks or bottlerocket or windows
custom_ami_id = "ami-0dfaa019a300f219c" # Bring your own custom AMI generated by Packer/ImageBuilder/Puppet etc.
public_ip = false # Enable only for public subnets
......@@ -329,6 +330,7 @@ module "aws-eks-accelerator-for-terraform" {
brkt_m5 = {
node_group_name = "self-managed-brkt"
create_launch_template = true
launch_template_os = "bottlerocket" # amazonlinux2eks or bottlerocket or windows
custom_ami_id = "ami-044b114caf98ce8c5" # Bring your own custom AMI generated by Packer/ImageBuilder/Puppet etc.
public_ip = false # Use this to enable public IP for EC2 instances; only for public subnets used in launch templates ;
......@@ -365,13 +367,14 @@ module "aws-eks-accelerator-for-terraform" {
# ON-DEMAND Self Managed Windows Worker Node Group
#---------------------------------------------------------#
windows_od = {
node_group_name = "windows-ondemand" # Name is used to create a dedicated IAM role for each node group and adds to AWS-AUTH config map
node_group_name = "windows-ondemand"
create_launch_template = true
launch_template_os = "windows" # amazonlinux2eks or bottlerocket or windows
# custom_ami_id = "ami-xxxxxxxxxxxxxxxx" # Bring your own custom AMI. Default Windows AMI is the latest EKS Optimized Windows Server 2019 English Core AMI.
public_ip = false # Enable only for public subnets
disk_size = 50
instance_type = "m5.large"
instance_type = "m5n.large"
desired_size = 2
max_size = 4
......@@ -386,9 +389,8 @@ module "aws-eks-accelerator-for-terraform" {
additional_tags = {
ExtraTag = "windows-on-demand"
Name = "windows-on-demand"
subnet_type = "private"
}
}
subnet_ids = [] # Define your private/public subnets list with comma seprated subnet_ids = ['subnet1','subnet2','subnet3']
......@@ -547,26 +549,82 @@ module "aws-eks-accelerator-for-terraform" {
}
#---------------------------------------
# AWS-FOR-FLUENTBIT HELM ADDON
# ENABLE EMR ON EKS
#---------------------------------------
enable_emr_on_eks = true # Default is false
emr_on_eks_username = "emr-containers" # Optinal default value is emr-containers
emr_on_eks_namespace = "spark" # Optinal default value is spark
// enable_emr_on_eks_config = {
// emr_on_eks_username = "emr-containers" # Optinal default value is emr-containers
// emr_on_eks_namespace = "spark" # Optinal default value is spark
// }
nginx_ingress_controller_enable = false
# Optional nginx_helm_chart
nginx_helm_chart = {
name = "ingress-nginx"
chart = "ingress-nginx"
repository = "https://kubernetes.github.io/ingress-nginx"
version = "3.33.0"
namespace = "kube-system"
values = [templatefile("${path.module}/k8s_addons/nginx-values.yaml", {})]
}
aws_for_fluent_bit_enable = true
aws_for_fluent_bit_cw_log_group = "/aws/eks/${module.aws-eks-accelerator-for-terraform.cluster_name}/fluentbit-cloudwatch-logs"
# Optional Map value
aws_for_fluent_bit_helm_chart = {
name = "aws-for-fluent-bit" # (Required) Release name.
repository = "https://aws.github.io/eks-charts" # (Optional) Repository URL where to locate the requested chart.
chart = "aws-for-fluent-bit" # (Required) Chart name to be installed.
version = "0.1.0" # (Optional) Specify the exact chart version to install. If this is not specified, the latest version is installed.
namespace = "logging" # (Optional) The namespace to install the release into. Defaults to default
timeout = "1200" # (Optional)
lint = "true" # (Optional)
# NOTE: Agones requires a Node group in Public Subnets and enable Public IP
agones_enable = false
# Optional agones_helm_chart
agones_helm_chart = {
name = "agones"
chart = "agones"
repository = "https://agones.dev/chart/stable"
version = "1.15.0"
namespace = "kube-system"
gameserver_minport = 7000 # required for sec group changes to worker nodes
gameserver_maxport = 8000 # required for sec group changes to worker nodes
values = [templatefile("${path.module}/k8s_addons/agones-values.yaml", {
expose_udp = true
gameserver_namespaces = "{${join(",", ["default", "xbox-gameservers", "xbox-gameservers"])}}"
gameserver_minport = 7000
gameserver_maxport = 8000
})]
}
# (Optional) Example to show how to pass metrics-server-values.yaml
values = [templatefile("${path.module}/k8s_addons/aws-for-fluent-bit-values.yaml", {
operating_system = "linux",
aws_open_telemetry_enable = false
aws_open_telemetry_addon = {
aws_open_telemetry_namespace = "aws-otel-eks"
aws_open_telemetry_emitter_otel_resource_attributes = "service.namespace=AWSObservability,service.name=ADOTEmitService"
aws_open_telemetry_emitter_name = "trace-emitter"
aws_open_telemetry_emitter_image = "public.ecr.aws/g9c4k4i4/trace-emitter:1"
aws_open_telemetry_collector_image = "public.ecr.aws/aws-observability/aws-otel-collector:latest"
aws_open_telemetry_aws_region = "eu-west-1"
aws_open_telemetry_emitter_oltp_endpoint = "localhost:55680"
}
#---------------------------------------
# AWS-FOR-FLUENTBIT HELM ADDON
#---------------------------------------
aws_for_fluentbit_enable = true
aws_for_fluentbit_helm_chart = {
name = "aws-for-fluent-bit"
chart = "aws-for-fluent-bit"
repository = "https://aws.github.io/eks-charts"
version = "0.1.0"
namespace = "logging"
aws_for_fluent_bit_cw_log_group = "/${local.cluster_name}/worker-fluentbit-logs" # Optional
aws_for_fluentbit_cwlog_retention_in_days = 90
create_namespace = true
values = [templatefile("${path.module}/k8s_addons/aws-for-fluentbit-values.yaml", {
region = data.aws_region.current.name,
aws_for_fluent_bit_cw_log_group = "/aws/eks/${module.aws-eks-accelerator-for-terraform.cluster_name}/fluentbit-cloudwatch-logs"
aws_for_fluent_bit_cw_log_group = "/${local.cluster_name}/worker-fluentbit-logs"
})]
set = [
{
name = "nodeSelector.kubernetes\\.io/os"
value = "linux"
}
]
}
}
......@@ -81,13 +81,11 @@ module "nginx_ingress" {
depends_on = [module.aws_eks]
}
module "aws-for-fluent-bit" {
count = var.create_eks && var.aws_for_fluent_bit_enable ? 1 : 0
source = "./kubernetes-addons/aws-for-fluent-bit"
aws_for_fluent_bit_cw_log_retention_in_days = var.aws_for_fluent_bit_cw_log_retention_in_days
aws_for_fluent_bit_cw_log_group = var.aws_for_fluent_bit_cw_log_group
aws_for_fluent_bit_helm_chart = var.aws_for_fluent_bit_helm_chart
count = var.create_eks && var.aws_for_fluentbit_enable ? 1 : 0
source = "./kubernetes-addons/aws-for-fluentbit"
aws_for_fluentbit_helm_chart = var.aws_for_fluentbit_helm_chart
eks_cluster_id = module.aws_eks.cluster_id
depends_on = [module.aws_eks]
}
......
......@@ -43,14 +43,13 @@ No modules.
| Name | Description | Type | Default | Required |
|------|-------------|------|---------|:--------:|
| <a name="input_aws_for_fluent_bit_cw_log_group"></a> [aws\_for\_fluent\_bit\_cw\_log\_group](#input\_aws\_for\_fluent\_bit\_cw\_log\_group) | Log group name in Cloudwatch for streaming logs from worker nodes. | `string` | n/a | yes |
| <a name="input_aws_for_fluent_bit_cw_log_retention_in_days"></a> [aws\_for\_fluent\_bit\_cw\_log\_retention\_in\_days](#input\_aws\_for\_fluent\_bit\_cw\_log\_retention\_in\_days) | Number of days to retain log events. Default retention - 90 days. | `number` | n/a | yes |
| <a name="input_aws_for_fluent_bit_helm_chart"></a> [aws\_for\_fluent\_bit\_helm\_chart](#input\_aws\_for\_fluent\_bit\_helm\_chart) | Helm chart definition for aws\_for\_fluent\_bit. | `any` | n/a | yes |
| <a name="input_aws_for_fluentbit_helm_chart"></a> [aws\_for\_fluentbit\_helm\_chart](#input\_aws\_for\_fluentbit\_helm\_chart) | Helm chart definition for aws\_for\_fluent\_bit. | `any` | `{}` | no |
| <a name="input_eks_cluster_id"></a> [eks\_cluster\_id](#input\_eks\_cluster\_id) | EKS cluster Id | `string` | n/a | yes |
## Outputs
| Name | Description |
|------|-------------|
| <a name="output_cw_loggroup_arn"></a> [cw\_loggroup\_arn](#output\_cw\_loggroup\_arn) | EKS Cloudwatch group arn |
| <a name="output_cw_loggroup_name"></a> [cw\_loggroup\_name](#output\_cw\_loggroup\_name) | EKS Cloudwatch group Name |
| <a name="output_aws_fluent_bit_cw_log_group_arn"></a> [aws\_fluent\_bit\_cw\_log\_group\_arn](#output\_aws\_fluent\_bit\_cw\_log\_group\_arn) | AWS Fluent Bit CloudWatch Log Group ARN |
| <a name="output_aws_fluent_bit_cw_log_group_name"></a> [aws\_fluent\_bit\_cw\_log\_group\_name](#output\_aws\_fluent\_bit\_cw\_log\_group\_name) | AWS Fluent Bit CloudWatch Log Group Name |
<!-- END OF PRE-COMMIT-TERRAFORM DOCS HOOK -->
locals {
default_aws_for_fluent_bit_helm_app = {
name = "aws-for-fluent-bit"
chart = "aws-for-fluent-bit"
repository = "https://aws.github.io/eks-charts"
version = "0.1.0"
namespace = "logging"
timeout = "1200"
create_namespace = true
values = [templatefile("${path.module}/templates/aws-for-fluent-bit-values.yaml", {
aws_for_fluentbit_cwlog_group_name = "/${var.eks_cluster_id}/worker-fluentbit-logs"
default_aws_for_fluentbit_helm_app = {
name = "aws-for-fluent-bit"
chart = "aws-for-fluent-bit"
repository = "https://aws.github.io/eks-charts"
version = "0.1.0"
namespace = "logging"
timeout = "1200"
create_namespace = true
aws_for_fluent_bit_cw_log_group = local.aws_for_fluentbit_cwlog_group_name
aws_for_fluentbit_cwlog_retention_in_days = 90
values = [templatefile("${path.module}/aws-for-fluent-bit-values.yaml", {
region = data.aws_region.current.name,
aws_for_fluent_bit_cw_log_group = var.aws_for_fluent_bit_cw_log_group
aws_for_fluent_bit_cw_log_group = local.aws_for_fluentbit_cwlog_group_name
})]
set = [
{
......@@ -22,7 +27,7 @@ locals {
lint = true
wait = true
wait_for_jobs = false
description = "aws-for-fluent-bit helm Chart deployment configuration"
description = "aws-for-fluentbit Helm Chart deployment configuration"
verify = false
keyring = ""
repository_key_file = ""
......@@ -47,7 +52,7 @@ locals {
}
aws_for_fluent_bit_helm_app = merge(
local.default_aws_for_fluent_bit_helm_app,
var.aws_for_fluent_bit_helm_chart)
aws_for_fluentbit_helm_app = merge(
local.default_aws_for_fluentbit_helm_app,
var.aws_for_fluentbit_helm_chart)
}
......@@ -19,51 +19,51 @@
data "aws_region" "current" {}
resource "aws_cloudwatch_log_group" "eks_worker_logs" {
name = var.aws_for_fluent_bit_cw_log_group
retention_in_days = var.aws_for_fluent_bit_cw_log_retention_in_days
name = local.aws_for_fluentbit_helm_app["aws_for_fluent_bit_cw_log_group"]
retention_in_days = local.aws_for_fluentbit_helm_app["aws_for_fluentbit_cwlog_retention_in_days"]
}
resource "helm_release" "aws_for_fluent_bit" {
name = local.aws_for_fluent_bit_helm_app["name"]
repository = local.aws_for_fluent_bit_helm_app["repository"]
chart = local.aws_for_fluent_bit_helm_app["chart"]
version = local.aws_for_fluent_bit_helm_app["version"]
namespace = local.aws_for_fluent_bit_helm_app["namespace"]
timeout = local.aws_for_fluent_bit_helm_app["timeout"]
values = local.aws_for_fluent_bit_helm_app["values"]
create_namespace = local.aws_for_fluent_bit_helm_app["create_namespace"]
lint = local.aws_for_fluent_bit_helm_app["lint"]
description = local.aws_for_fluent_bit_helm_app["description"]
repository_key_file = local.aws_for_fluent_bit_helm_app["repository_key_file"]
repository_cert_file = local.aws_for_fluent_bit_helm_app["repository_cert_file"]
repository_ca_file = local.aws_for_fluent_bit_helm_app["repository_ca_file"]
repository_username = local.aws_for_fluent_bit_helm_app["repository_username"]
repository_password = local.aws_for_fluent_bit_helm_app["repository_password"]
verify = local.aws_for_fluent_bit_helm_app["verify"]
keyring = local.aws_for_fluent_bit_helm_app["keyring"]
disable_webhooks = local.aws_for_fluent_bit_helm_app["disable_webhooks"]
reuse_values = local.aws_for_fluent_bit_helm_app["reuse_values"]
reset_values = local.aws_for_fluent_bit_helm_app["reset_values"]
force_update = local.aws_for_fluent_bit_helm_app["force_update"]
recreate_pods = local.aws_for_fluent_bit_helm_app["recreate_pods"]
cleanup_on_fail = local.aws_for_fluent_bit_helm_app["cleanup_on_fail"]
max_history = local.aws_for_fluent_bit_helm_app["max_history"]
atomic = local.aws_for_fluent_bit_helm_app["atomic"]
skip_crds = local.aws_for_fluent_bit_helm_app["skip_crds"]
render_subchart_notes = local.aws_for_fluent_bit_helm_app["render_subchart_notes"]
disable_openapi_validation = local.aws_for_fluent_bit_helm_app["disable_openapi_validation"]
wait = local.aws_for_fluent_bit_helm_app["wait"]
wait_for_jobs = local.aws_for_fluent_bit_helm_app["wait_for_jobs"]
dependency_update = local.aws_for_fluent_bit_helm_app["dependency_update"]
replace = local.aws_for_fluent_bit_helm_app["replace"]
name = local.aws_for_fluentbit_helm_app["name"]
repository = local.aws_for_fluentbit_helm_app["repository"]
chart = local.aws_for_fluentbit_helm_app["chart"]
version = local.aws_for_fluentbit_helm_app["version"]
namespace = local.aws_for_fluentbit_helm_app["namespace"]
timeout = local.aws_for_fluentbit_helm_app["timeout"]
values = local.aws_for_fluentbit_helm_app["values"]
create_namespace = local.aws_for_fluentbit_helm_app["create_namespace"]
lint = local.aws_for_fluentbit_helm_app["lint"]
description = local.aws_for_fluentbit_helm_app["description"]
repository_key_file = local.aws_for_fluentbit_helm_app["repository_key_file"]
repository_cert_file = local.aws_for_fluentbit_helm_app["repository_cert_file"]
repository_ca_file = local.aws_for_fluentbit_helm_app["repository_ca_file"]
repository_username = local.aws_for_fluentbit_helm_app["repository_username"]
repository_password = local.aws_for_fluentbit_helm_app["repository_password"]
verify = local.aws_for_fluentbit_helm_app["verify"]
keyring = local.aws_for_fluentbit_helm_app["keyring"]
disable_webhooks = local.aws_for_fluentbit_helm_app["disable_webhooks"]
reuse_values = local.aws_for_fluentbit_helm_app["reuse_values"]
reset_values = local.aws_for_fluentbit_helm_app["reset_values"]
force_update = local.aws_for_fluentbit_helm_app["force_update"]
recreate_pods = local.aws_for_fluentbit_helm_app["recreate_pods"]
cleanup_on_fail = local.aws_for_fluentbit_helm_app["cleanup_on_fail"]
max_history = local.aws_for_fluentbit_helm_app["max_history"]
atomic = local.aws_for_fluentbit_helm_app["atomic"]
skip_crds = local.aws_for_fluentbit_helm_app["skip_crds"]
render_subchart_notes = local.aws_for_fluentbit_helm_app["render_subchart_notes"]
disable_openapi_validation = local.aws_for_fluentbit_helm_app["disable_openapi_validation"]
wait = local.aws_for_fluentbit_helm_app["wait"]
wait_for_jobs = local.aws_for_fluentbit_helm_app["wait_for_jobs"]
dependency_update = local.aws_for_fluentbit_helm_app["dependency_update"]
replace = local.aws_for_fluentbit_helm_app["replace"]
postrender {
binary_path = local.aws_for_fluent_bit_helm_app["postrender"]
binary_path = local.aws_for_fluentbit_helm_app["postrender"]
}
dynamic "set" {
iterator = each_item
for_each = local.aws_for_fluent_bit_helm_app["set"] == null ? [] : local.aws_for_fluent_bit_helm_app["set"]
for_each = local.aws_for_fluentbit_helm_app["set"] == null ? [] : local.aws_for_fluentbit_helm_app["set"]
content {
name = each_item.value.name
......@@ -73,7 +73,7 @@ resource "helm_release" "aws_for_fluent_bit" {
dynamic "set_sensitive" {
iterator = each_item
for_each = local.aws_for_fluent_bit_helm_app["set_sensitive"] == null ? [] : local.aws_for_fluent_bit_helm_app["set_sensitive"]
for_each = local.aws_for_fluentbit_helm_app["set_sensitive"] == null ? [] : local.aws_for_fluentbit_helm_app["set_sensitive"]
content {
name = each_item.value.name
......@@ -81,4 +81,5 @@ resource "helm_release" "aws_for_fluent_bit" {
}
}
depends_on = [aws_cloudwatch_log_group.eks_worker_logs]
}
......@@ -16,11 +16,11 @@
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
output "cw_loggroup_name" {
description = "EKS Cloudwatch group Name"
output "aws_fluent_bit_cw_log_group_name" {
description = "AWS Fluent Bit CloudWatch Log Group Name"
value = aws_cloudwatch_log_group.eks_worker_logs.name
}
output "cw_loggroup_arn" {
description = "EKS Cloudwatch group arn"
output "aws_fluent_bit_cw_log_group_arn" {
description = "AWS Fluent Bit CloudWatch Log Group ARN"
value = aws_cloudwatch_log_group.eks_worker_logs.arn
}
......@@ -16,18 +16,14 @@
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
variable "aws_for_fluent_bit_cw_log_retention_in_days" {
type = number
description = "Number of days to retain log events. Default retention - 90 days."
}
variable "aws_for_fluent_bit_cw_log_group" {
type = string
description = "Log group name in Cloudwatch for streaming logs from worker nodes."
}
variable "aws_for_fluent_bit_helm_chart" {
variable "aws_for_fluentbit_helm_chart" {
type = any
description = "Helm chart definition for aws_for_fluent_bit."
default = {}
}
variable "eks_cluster_id" {
type = string
description = "EKS cluster Id"
}
......@@ -43,7 +43,7 @@ No requirements.
| Name | Version |
|------|---------|
| <a name="provider_helm"></a> [helm](#provider\_helm) | 2.3.0 |
| <a name="provider_helm"></a> [helm](#provider\_helm) | n/a |
## Modules
......
locals {
fargate_fluentbit_cwlog_group = "/aws/${var.eks_cluster_id}/fargate-fluentbit-cloudwatch"
fargate_fluentbit_cwlog_group = "/${var.eks_cluster_id}/fargate-fluentbit-logs"
fargate_fluentbit_cwlog_stream_prefix = "fargate-logs-"
default_fargate_fluentbit_helm_app = {
......
......@@ -27,7 +27,7 @@ No requirements.
| Name | Version |
|------|---------|
| <a name="provider_helm"></a> [helm](#provider\_helm) | 2.3.0 |
| <a name="provider_helm"></a> [helm](#provider\_helm) | n/a |
## Modules
......
......@@ -64,7 +64,6 @@ variable "public_subnet_ids" {
type = list(string)
default = []
}
#----------------------------------------------------------
# EKS CONTROL PLANE
#----------------------------------------------------------
......@@ -135,7 +134,6 @@ variable "kube_proxy_addon_version" {
default = "v1.20.4-eksbuild.2"
description = "KubeProxy Addon version"
}
#----------------------------------------------------------
# EKS WORKER NODES
#----------------------------------------------------------
......@@ -210,19 +208,16 @@ variable "aws_auth_additional_labels" {
#----------------------------------------------------------
# KUBERNETES ADDONS VARIABLES
#----------------------------------------------------------
variable "enable_emr_on_eks" {
type = bool
default = false
description = "Enabling EMR on EKS Config"
}
variable "emr_on_eks_username" {
type = string
default = "emr-containers"
description = "EMR on EKS username"
}
variable "emr_on_eks_namespace" {
type = string
default = "spark"
......@@ -245,19 +240,16 @@ variable "aws_managed_prometheus_enable" {
default = false
description = "Enable AWS Managed Prometheus service"
}
variable "aws_managed_prometheus_workspace_name" {
type = string
default = "aws-managed-prometheus-workspace"
description = "AWS Managed Prometheus WorkSpace Name"
}
variable "prometheus_enable" {
description = "Enable Community Prometheus Helm Addon"
type = bool
default = false
}
variable "prometheus_helm_chart" {
description = "Community Prometheus Helm Addon Config"
type = any
......@@ -280,7 +272,6 @@ variable "traefik_ingress_controller_enable" {
default = false
description = "Enabling Traefik Ingress Controller on eks cluster"
}
variable "traefik_helm_chart" {
type = any
default = {}
......@@ -308,7 +299,6 @@ variable "agones_helm_chart" {
default = {}
description = "Agones GameServer Helm chart config"
}
#-----------AWS LB Ingress Controller-------------
variable "aws_lb_ingress_controller_enable" {
type = bool
......@@ -341,37 +331,22 @@ variable "nginx_ingress_controller_enable" {
default = false
description = "Enabling NGINX Ingress Controller on EKS Cluster"
}
variable "nginx_helm_chart" {
description = "NGINX Ingress Controller Helm Chart Configuration"
type = any
default = {}
}
#-----------AWS FOR FLUENT BIT-------------
variable "aws_for_fluent_bit_enable" {
variable "aws_for_fluentbit_enable" {
type = bool
default = false
description = "Enabling aws_for_fluent_bit on eks cluster"
description = "Enabling FluentBit Addon on EKS Worker Nodes"
}
variable "aws_for_fluent_bit_cw_log_group" {
type = string
description = "Log group name in Cloudwatch for streaming logs from worker nodes"
default = "/aws/eks/eks-cluster/fluentbit-cloudwatch-log"
}
variable "aws_for_fluent_bit_helm_chart" {
variable "aws_for_fluentbit_helm_chart" {
type = any
description = "Helm chart definition for aws_for_fluent_bit"
default = {}
}
variable "aws_for_fluent_bit_cw_log_retention_in_days" {
default = 90
description = "Number of days to retain log events. Default retention - 90 days."
type = number
}
#-----------FARGATE FLUENT BIT-------------
variable "fargate_fluentbit_enable" {
type = bool
......@@ -383,7 +358,6 @@ variable "fargate_fluentbit_config" {
description = "Fargate fluentbit configuration "
default = {}
}
#-----------CERT MANAGER-------------
variable "cert_manager_enable" {
type = bool
......@@ -395,14 +369,12 @@ variable "cert_manager_helm_chart" {
description = "Cert Manager Helm chart configuration"
default = {}
}
#-----------WINDOWS VPC CONTROLLERS-------------
#------WINDOWS VPC CONTROLLERS-------------
variable "windows_vpc_controllers_helm_chart" {
type = any
description = "Windows VPC Controllers Helm chart configuration"
default = {}
}
#-----------AWS OPEN TELEMETRY ADDON-------------
variable "aws_open_telemetry_enable" {
type = bool
......@@ -414,7 +386,6 @@ variable "aws_open_telemetry_addon" {
default = {}
description = "AWS Open Telemetry Distro Addon Configuration"
}
#-----------OPEN TELEMETRY HELM CHART-------------
variable "opentelemetry_enable" {
type = bool
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment