Skip to content

Commit

Permalink
Namespace movement in initial telemetry work
Browse files Browse the repository at this point in the history
  • Loading branch information
mcgin314 committed Feb 27, 2025
1 parent fdf48c6 commit 6e460da
Show file tree
Hide file tree
Showing 14 changed files with 72 additions and 36 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ locals {
eks_instance_disk_size = 100
eks_ng_desired_size = 3
eks_ng_max_size = 10
eks_ng_min_size = 0
eks_ng_min_size = 1
enable_cluster_creator_admin_permissions = true
terraform = true
terragrunt = true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ include "root" {
}

terraform {
source = "git@github.e.it.census.gov:SCT-Engineering/tfmod-cert-mgr.git?ref=${include.root.inputs.release_version}"
# source = "git@github.e.it.census.gov:SCT-Engineering/tfmod-cert-mgr.git?ref=${include.root.inputs.release_version}"
source = "../../../../../../../tfmod-cert-mgr"
extra_arguments "retry_lock" {
commands = get_terraform_commands_that_need_locking()
arguments = ["-lock-timeout=20m"]
Expand Down Expand Up @@ -38,4 +39,5 @@ inputs = {
profile = include.root.inputs.aws_profile
region = include.root.inputs.aws_region
release_version = include.root.inputs.release_version
namespace = include.root.inputs.namespaces["cert-manager"]
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ include "root" {
}

terraform {
source = "git@github.e.it.census.gov:SCT-Engineering/tfmod-eks-configuration.git?ref=${include.root.inputs.release_version}"
# source = "git@github.e.it.census.gov:SCT-Engineering/tfmod-eks-configuration.git?ref=${include.root.inputs.release_version}"
source = "../../../../../../../tfmod-eks-configuration"
extra_arguments "retry_lock" {
commands = get_terraform_commands_that_need_locking()
arguments = ["-lock-timeout=20m"]
Expand All @@ -32,7 +33,7 @@ generate "kubectl-provider" {
path = "kubectl-provider.tf"
if_exists = "overwrite"
contents = <<-EOF
%{ if dependency.eks.outputs.cluster_name != "a-cluster-name" ~}
%{if dependency.eks.outputs.cluster_name != "a-cluster-name"~}
data "aws_eks_cluster" "kubectl" {
name = "${dependency.eks.outputs.cluster_name}"
}
Expand All @@ -48,7 +49,7 @@ generate "kubectl-provider" {
args = ["eks", "get-token", "--cluster-name", "${dependency.eks.outputs.cluster_name}", "--region", "${include.root.inputs.aws_region}"]
}
}
%{ endif ~}
%{endif~}
EOF
}

Expand All @@ -62,4 +63,6 @@ inputs = {
security_group_all_worker_mgmt_id = dependency.eks.outputs.security_group_all_worker_mgmt_id
subnets = dependency.eks.outputs.subnets
vpc_id = dependency.eks.outputs.vpc_id
operators_ns = include.root.inputs.operator_namespace
telemetry_ns = include.root.inputs.telemetry_namespace
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ include "root" {
}

terraform {
source = "git@github.e.it.census.gov:SCT-Engineering/tfmod-grafana.git?ref=${include.root.inputs.release_version}"
# source = "git@github.e.it.census.gov:SCT-Engineering/tfmod-grafana.git?ref=${include.root.inputs.release_version}"
source = "../../../../../../../tfmod-grafana"
extra_arguments "retry_lock" {
commands = get_terraform_commands_that_need_locking()
arguments = ["-lock-timeout=20m"]
Expand Down Expand Up @@ -37,4 +38,5 @@ inputs = {
public_hostname = include.root.inputs.grafana_hostname
region = include.root.inputs.aws_region
rwo_storage_class = dependency.eks-loki.outputs.rwo_storage_class
namespace = include.root.inputs.namespaces["grafana"]
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ include "root" {
}

terraform {
source = "git@github.e.it.census.gov:SCT-Engineering/tfmod-istio.git?ref=${include.root.inputs.release_version}"
# source = "git@github.e.it.census.gov:SCT-Engineering/tfmod-istio.git?ref=${include.root.inputs.release_version}"
source = "../../../../../../../tfmod-istio"
extra_arguments "retry_lock" {
commands = get_terraform_commands_that_need_locking()
arguments = ["-lock-timeout=20m"]
Expand All @@ -30,4 +31,5 @@ inputs = {
istio_version = include.root.inputs.istio_version
profile = include.root.inputs.aws_profile
region = include.root.inputs.aws_region
namespace = include.root.inputs.namespaces["istio"]
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ include "root" {
}

terraform {
source = "git@github.e.it.census.gov:SCT-Engineering/tfmod-k8s-dashboard.git?ref=${include.root.inputs.release_version}"
# source = "git@github.e.it.census.gov:SCT-Engineering/tfmod-k8s-dashboard.git?ref=${include.root.inputs.release_version}"
source = "../../../../../../../tfmod-k8s-dashboard"
extra_arguments "retry_lock" {
commands = get_terraform_commands_that_need_locking()
arguments = ["-lock-timeout=20m"]
Expand Down Expand Up @@ -33,4 +34,5 @@ inputs = {
profile = include.root.inputs.aws_profile
public_hostname = include.root.inputs.dashboard_hostname
region = include.root.inputs.aws_region
namespace = include.root.inputs.namespaces["k8s-dashboard"]
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ include "root" {
}

terraform {
source = "git@github.e.it.census.gov:SCT-Engineering/tfmod-karpenter.git?ref=${include.root.inputs.release_version}"
# source = "git@github.e.it.census.gov:SCT-Engineering/tfmod-karpenter.git?ref=${include.root.inputs.release_version}"
source = "../../../../../../../tfmod-karpenter"
extra_arguments "retry_lock" {
commands = get_terraform_commands_that_need_locking()
arguments = ["-lock-timeout=20m"]
Expand Down Expand Up @@ -39,4 +40,5 @@ inputs = {
region = include.root.inputs.aws_region
release_version = include.root.inputs.release_version
vpc_id = dependency.eks.outputs.vpc_id
namespace = include.root.inputs.namespaces["karpenter"]
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ include "root" {
}

terraform {
source = "git@github.e.it.census.gov:SCT-Engineering/tfmod-kiali.git?ref=${include.root.inputs.release_version}"
# source = "../../../../../../../tfmod-kiali"
# source = "git@github.e.it.census.gov:SCT-Engineering/tfmod-kiali.git?ref=mcmCluster"
source = "../../../../../../../tfmod-kiali"
extra_arguments "retry_lock" {
commands = get_terraform_commands_that_need_locking()
arguments = ["-lock-timeout=20m"]
Expand Down Expand Up @@ -35,6 +35,16 @@ dependency "eks-prometheus" {
}
}
}
dependency "eks-tempo" {
config_path = "../eks-tempo"
mock_outputs = {
tempo_internal_endpoint = {
hostname = "tempo.tempo.svc.cluster.local"
port_number = 3100
url = "http://tempo.tempo.svc.cluster.local:3100/"
}
}
}
dependency "eks-grafana" {
config_path = "../eks-grafana"
mock_outputs = {
Expand All @@ -43,32 +53,35 @@ dependency "eks-grafana" {
port_number = "80"
url = "https://grafana.grafana.svc.cluster.local:80/"
}
namespace = "grafana"
public_endpoint = {
namespace = "grafana"
public_endpoint = {
hostname = "grafana.dev.lab.csp2.census.gov"
port_number = "80"
url = "https://grafana.dev.lab.csp2.census.gov:80/"
}
secret_name = "grafana"
secret_name = "grafana"
}
}

inputs = {
kiali_operator_version = include.root.inputs.kiali_operator_version
kiali_application_version = include.root.inputs.kiali_application_version
profile = include.root.inputs.aws_profile
cluster_domain = dependency.eks.inputs.vpc_domain_name
operators_namespace = "operators"
cluster_name = dependency.eks.outputs.cluster_name
certificate_issuer = dependency.eks-cert-manager.outputs.cluster_issuer_name

# istio_namespace =

profile = include.root.inputs.aws_profile
cluster_domain = dependency.eks.inputs.vpc_domain_name
operators_namespace = "operators"
cluster_name = dependency.eks.outputs.cluster_name
certificate_issuer = dependency.eks-cert-manager.outputs.cluster_issuer_name
prometheus_internal_url = dependency.eks-prometheus.outputs.prometheus_server_internal_endpoint.url
grafana_internal_url = dependency.eks-grafana.outputs.internal_endpoint.url
grafana_namespace = dependency.eks-grafana.outputs.namespace
grafana_public_url = dependency.eks-grafana.outputs.public_endpoint.url
grafana_secret_name = "grafana"
grafana_internal_url = dependency.eks-grafana.outputs.internal_endpoint.url

grafana_public_url = dependency.eks-grafana.outputs.public_endpoint.url

# grafana_secret_name = dependency.eks-grafana.outputs.secret_name
jaeger_internal_url = ""
tempo_internal_url = dependency.eks-tempo.outputs.tempo_internal_endpoint.url
namespace = include.root.inputs.namespaces["kiali"]


# client_id = var.sso_client_id
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ include "root" {
}

terraform {
source = "git@github.e.it.census.gov:SCT-Engineering/tfmod-loki.git?ref=${include.root.inputs.release_version}"
# source = "git@github.e.it.census.gov:SCT-Engineering/tfmod-loki.git?ref=${include.root.inputs.release_version}"
source = "../../../../../../../tfmod-loki"
extra_arguments "retry_lock" {
commands = get_terraform_commands_that_need_locking()
arguments = ["-lock-timeout=20m"]
Expand All @@ -25,10 +26,10 @@ dependency "eks-istio" {
skip_outputs = true
}

dependency "eks-prometheus" {
config_path = "../eks-prometheus"
skip_outputs = true
}
# dependency "eks-prometheus" {
# config_path = "../eks-prometheus"
# skip_outputs = true
# }

inputs = {
profile = include.root.inputs.aws_profile
Expand All @@ -43,4 +44,5 @@ inputs = {
memcached_tag = include.root.inputs.memcached_tag
exporter_tag = include.root.inputs.exporter_tag
sidecar_tag = include.root.inputs.sidecar_tag
namespace = include.root.inputs.namespaces["loki"]
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ include "root" {
}

terraform {
source = "git@github.e.it.census.gov:SCT-Engineering/tfmod-metrics-server.git?ref=${include.root.inputs.release_version}"
# source = "git@github.e.it.census.gov:SCT-Engineering/tfmod-metrics-server.git?ref=${include.root.inputs.release_version}"
source = "../../../../../../../tfmod-metrics-server"
extra_arguments "retry_lock" {
commands = get_terraform_commands_that_need_locking()
arguments = ["-lock-timeout=20m"]
Expand All @@ -30,4 +31,5 @@ inputs = {
region = include.root.inputs.aws_region
metrics_server_helm_chart = include.root.inputs.metrics_server_helm_chart
metrics_server_tag = include.root.inputs.metrics_server_tag
namespace = include.root.inputs.namespaces["metrics-server"]
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
include "root" {
path = find_in_parent_folders()
expose = true
path = find_in_parent_folders("root.hcl")
merge_strategy = "deep"
expose = true
}

terraform {
Expand All @@ -23,4 +24,5 @@ inputs = {
profile = include.root.inputs.aws_profile
cluster_name = dependency.eks.outputs.cluster_name
region = include.root.inputs.aws_region
namespace = include.root.inputs.namespaces["otel"]
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ include "root" {
}

terraform {
source = "git@github.e.it.census.gov:SCT-Engineering/tfmod-prometheus.git?ref=${include.root.inputs.release_version}"
# source = "git@github.e.it.census.gov:SCT-Engineering/tfmod-prometheus.git?ref=${include.root.inputs.release_version}"
source = "../../../../../../../tfmod-prometheus"
extra_arguments "retry_lock" {
commands = get_terraform_commands_that_need_locking()
arguments = ["-lock-timeout=20m"]
Expand Down Expand Up @@ -35,4 +36,5 @@ inputs = {
kube_state_metrics_tag = include.root.inputs.kube_state_metrics_tag
node_exporter_tag = include.root.inputs.node_exporter_tag
pushgateway_tag = include.root.inputs.pushgateway_tag
namespace = include.root.inputs.namespaces["prometheus"]
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ include "root" {
}

terraform {
source = "git@github.e.it.census.gov:SCT-Engineering/tfmod-tempo.git?ref=${include.root.inputs.release_version}"
# source = "git@github.e.it.census.gov:SCT-Engineering/tfmod-tempo.git?ref=${include.root.inputs.release_version}"
source = "../../../../../../../tfmod-tempo"
extra_arguments "retry_lock" {
commands = get_terraform_commands_that_need_locking()
arguments = ["-lock-timeout=20m"]
Expand Down Expand Up @@ -42,5 +43,5 @@ inputs = {
prometheus_namespace = dependency.eks-prometheus.outputs.prometheus_namespace
tempo_chart_version = include.root.inputs.tempo_chart_version
tempo_tag = include.root.inputs.tempo_tag

namespace = include.root.inputs.namespaces["tempo"]
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ include "root" {
}

terraform {
source = "git@github.e.it.census.gov:SCT-Engineering/tfmod-eks.git?ref=${include.root.inputs.release_version}"
# source = "git@github.e.it.census.gov:SCT-Engineering/tfmod-eks.git?ref=${include.root.inputs.release_version}"
source = "../../../../../../../tfmod-eks"
extra_arguments "retry_lock" {
commands = get_terraform_commands_that_need_locking()
arguments = ["-lock-timeout=20m"]
Expand Down

0 comments on commit 6e460da

Please sign in to comment.