Skip to content

Commit

Permalink
Complete code
Browse files Browse the repository at this point in the history
  • Loading branch information
AshutoshAM2002 committed Aug 14, 2023
1 parent ffe1e2a commit 5ee9c8a
Show file tree
Hide file tree
Showing 4 changed files with 49 additions and 18 deletions.
14 changes: 7 additions & 7 deletions _examples/basic/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -193,22 +193,22 @@ module "addons" {
depends_on = [module.eks.cluster_name]
eks_cluster_name = module.eks.cluster_name

metrics_server = false
cluster_autoscaler = false
metrics_server = true
cluster_autoscaler = true
aws_load_balancer_controller = true
aws_node_termination_handler = false
aws_efs_csi_driver = false
aws_node_termination_handler = true
aws_efs_csi_driver = true
aws_ebs_csi_driver = true
karpenter = false
calico_tigera = false
kubeclarity = true

kiali_server = false
kiali_server = true
kiali_manifests = var.kiali_manifests

external_secrets = false
external_secrets = true
externalsecrets_manifests = var.externalsecrets_manifests

istio_ingress = false
istio_ingress = true
istio_manifests = var.istio_manifests
}
20 changes: 10 additions & 10 deletions _examples/complete/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -194,22 +194,22 @@ module "addons" {
eks_cluster_name = module.eks.cluster_name

# -- Enable Addons
metrics_server = false
cluster_autoscaler = false
aws_load_balancer_controller = false
aws_node_termination_handler = false
aws_efs_csi_driver = false
aws_ebs_csi_driver = false
metrics_server = true
cluster_autoscaler = true
aws_load_balancer_controller = true
aws_node_termination_handler = true
aws_efs_csi_driver = true
aws_ebs_csi_driver = true
karpenter = false
calico_tigera = false
kubeclarity = false
kubeclarity = true

# -- Addons with mandatory variable
istio_ingress = false
istio_ingress = true
istio_manifests = var.istio_manifests
kiali_server = false
kiali_server = true
kiali_manifests = var.kiali_manifests
external_secrets = false
external_secrets = true
externalsecrets_manifests = var.externalsecrets_manifests

# -- Path of override-values.yaml file
Expand Down
2 changes: 1 addition & 1 deletion main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ module "external_secrets" {
module "kubeclarity" {
count = var.kubeclarity ? 1 : 0
source = "./addons/kubeclarity"
helm_config = var.kubeclarity_helm_config != null ? var.kubeclarity_helm_config : { values = ["${file("../../addons/kubeclarity/config/kubeclarity.yaml")}"] }
helm_config = var.kubeclarity_helm_config != null ? var.kubeclarity_helm_config : { values = ["${local_file.kubeclarity_helm_config[0].content}"] }
manage_via_gitops = var.manage_via_gitops
addon_context = local.addon_context
}
31 changes: 31 additions & 0 deletions override_values.tf
Original file line number Diff line number Diff line change
Expand Up @@ -329,3 +329,34 @@ resourc_helm_configes:
EOT
filename = "${path.module}/override_vales/external_secrets.yaml"
}

#-----------KUBECLARITY -----------------------
resource "local_file" "kubeclarity_helm_config" {
count = var.kubeclarity ? 1 : 0
content = <<EOT
## Using limits and requests
kubeclarity:
resources:
limits:
memory: "500Mi"
cpu: "200m"
requests:
memory: "200Mi"
cpu: "100m"
podAnnotations:
co.elastic.logs/enabled: "true"
# Be careful when using ingress. As there is no authentication on Kubeclarity yet, your instance may be accessible.
# Make sure the ingress remains internal if you decide to enable it.
service:
type: LoadBalancer
port: 80
annotations:
service.beta.kubernetes.io/aws-load-balancer-scheme: "internet-facing"
service.beta.kubernetes.io/aws-load-balancer-name: "kubeclarity"
EOT
filename = "${path.module}/override_vales/kubeclarity.yaml"
}

0 comments on commit 5ee9c8a

Please sign in to comment.