Skip to content

Commit

Permalink
upgrade
Browse files Browse the repository at this point in the history
  • Loading branch information
paulofponciano committed Mar 29, 2024
1 parent 0f4f7c7 commit e9d6eb5
Show file tree
Hide file tree
Showing 9 changed files with 23,035 additions and 241 deletions.
7 changes: 4 additions & 3 deletions helm_argocd.tf → argocd.tf
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ data "kubectl_file_documents" "argocd_ns" {
}

data "kubectl_file_documents" "argocd" {
content = file("argocd/argocd_install.yaml")
content = file("argocd/argocd_install_2_10_5.yaml")
}

data "kubectl_file_documents" "image_updater" {
Expand All @@ -18,8 +18,9 @@ resource "kubectl_manifest" "argocd_ns" {
depends_on = [
aws_eks_node_group.cluster,
helm_release.karpenter,
kubectl_manifest.karpenter_provisioner,
kubectl_manifest.karpenter_nodetemplate
kubectl_manifest.karpenter-nodeclass,
kubectl_manifest.karpenter-nodepool-default,
time_sleep.wait_30_seconds_karpenter
]
}

Expand Down
22,852 changes: 22,852 additions & 0 deletions argocd/argocd_install_2_10_5.yaml

Large diffs are not rendered by default.

3 changes: 2 additions & 1 deletion helm_alb_ingress_controller.tf
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ resource "helm_release" "alb_ingress_controller" {
depends_on = [
aws_eks_cluster.eks_cluster,
aws_eks_node_group.cluster,
kubernetes_config_map.aws-auth
kubernetes_config_map.aws-auth,
time_sleep.wait_30_seconds_karpenter
]
}
209 changes: 29 additions & 180 deletions helm_istio.tf
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,14 @@ resource "helm_release" "istio_base" {
namespace = "istio-system"
create_namespace = true

version = "1.20.1"
version = "1.21.0"

depends_on = [
aws_eks_cluster.eks_cluster,
aws_eks_node_group.cluster,
kubernetes_config_map.aws-auth
kubernetes_config_map.aws-auth,
helm_release.karpenter,
time_sleep.wait_30_seconds_karpenter
]
}

Expand All @@ -21,13 +23,15 @@ resource "helm_release" "istiod" {
namespace = "istio-system"
create_namespace = true

version = "1.20.1"
version = "1.21.0"

depends_on = [
aws_eks_cluster.eks_cluster,
aws_eks_node_group.cluster,
kubernetes_config_map.aws-auth,
helm_release.istio_base
helm_release.istio_base,
helm_release.karpenter,
time_sleep.wait_30_seconds_karpenter
]
}

Expand All @@ -38,7 +42,7 @@ resource "helm_release" "istio_ingress" {
namespace = "istio-system"
create_namespace = true

version = "1.20.1"
version = "1.21.0"

set {
name = "service.type"
Expand Down Expand Up @@ -125,10 +129,18 @@ resource "helm_release" "istio_ingress" {
aws_eks_node_group.cluster,
kubernetes_config_map.aws-auth,
helm_release.istio_base,
helm_release.istiod
helm_release.istiod,
helm_release.karpenter,
time_sleep.wait_30_seconds_karpenter
]
}

resource "time_sleep" "wait_30_seconds_albcontroller" {
depends_on = [helm_release.alb_ingress_controller]

create_duration = "30s"
}

resource "kubectl_manifest" "istio_target_group_binding_http" {
yaml_body = <<YAML
apiVersion: elbv2.k8s.aws/v1beta1
Expand All @@ -149,7 +161,11 @@ YAML
aws_eks_node_group.cluster,
kubernetes_config_map.aws-auth,
helm_release.istio_base,
helm_release.istiod
helm_release.istiod,
helm_release.alb_ingress_controller,
time_sleep.wait_30_seconds_albcontroller,
helm_release.karpenter,
time_sleep.wait_30_seconds_karpenter
]

}
Expand All @@ -173,178 +189,11 @@ YAML
aws_eks_node_group.cluster,
kubernetes_config_map.aws-auth,
helm_release.istio_base,
helm_release.istiod
]

}

## ISTIO ADDONS WITH INGRESS

data "kubectl_file_documents" "kiali" {
content = file("istio_addons/kiali.yaml")
}

resource "kubectl_manifest" "kiali" {
count = length(data.kubectl_file_documents.kiali.documents)
yaml_body = element(data.kubectl_file_documents.kiali.documents, count.index)
override_namespace = "istio-system"

depends_on = [
helm_release.istio_base,
helm_release.istiod
]
}

data "kubectl_file_documents" "prometheus" {
content = file("istio_addons/prometheus.yaml")
}

resource "kubectl_manifest" "prometheus" {
count = length(data.kubectl_file_documents.prometheus.documents)
yaml_body = element(data.kubectl_file_documents.prometheus.documents, count.index)
override_namespace = "istio-system"

depends_on = [
helm_release.istio_base,
helm_release.istiod
]
}

data "kubectl_file_documents" "jaeger" {
content = file("istio_addons/jaeger.yaml")
}

resource "kubectl_manifest" "jaeger" {
count = length(data.kubectl_file_documents.jaeger.documents)
yaml_body = element(data.kubectl_file_documents.jaeger.documents, count.index)
override_namespace = "istio-system"

depends_on = [
helm_release.istio_base,
helm_release.istiod
]
}

resource "kubectl_manifest" "kiali_gw" {
yaml_body = <<YAML
apiVersion: networking.istio.io/v1alpha3
kind: Gateway
metadata:
name: kiali-gateway
namespace: istio-system
spec:
selector:
istio: ingressgateway
servers:
- port:
number: 443
name: http
protocol: HTTP
hosts:
- ${var.kiali_virtual_service_host}
YAML

depends_on = [
aws_eks_cluster.eks_cluster,
aws_eks_node_group.cluster,
kubernetes_config_map.aws-auth,
helm_release.istio_base,
helm_release.istiod
helm_release.istiod,
helm_release.alb_ingress_controller,
time_sleep.wait_30_seconds_albcontroller,
helm_release.karpenter,
time_sleep.wait_30_seconds_karpenter
]

}

resource "kubectl_manifest" "kiali_virtual_service" {
yaml_body = <<YAML
apiVersion: networking.istio.io/v1alpha3
kind: VirtualService
metadata:
name: kiali
namespace: istio-system
spec:
hosts:
- ${var.kiali_virtual_service_host}
gateways:
- kiali-gateway
http:
- match:
- uri:
prefix: /
route:
- destination:
host: kiali
port:
number: 20001
YAML

depends_on = [
aws_eks_cluster.eks_cluster,
aws_eks_node_group.cluster,
kubernetes_config_map.aws-auth,
helm_release.istio_base,
helm_release.istiod
]

}

resource "kubectl_manifest" "jaeger_gw" {
yaml_body = <<YAML
apiVersion: networking.istio.io/v1alpha3
kind: Gateway
metadata:
name: jaeger
namespace: istio-system
spec:
selector:
istio: ingressgateway
servers:
- port:
number: 443
name: http
protocol: HTTP
hosts:
- ${var.jaeger_virtual_service_host}
YAML

depends_on = [
aws_eks_cluster.eks_cluster,
aws_eks_node_group.cluster,
kubernetes_config_map.aws-auth,
helm_release.istio_base,
helm_release.istiod
]

}

resource "kubectl_manifest" "jaeger_virtual_service" {
yaml_body = <<YAML
apiVersion: networking.istio.io/v1alpha3
kind: VirtualService
metadata:
name: tracing
namespace: istio-system
spec:
hosts:
- ${var.jaeger_virtual_service_host}
gateways:
- jaeger
http:
- match:
- uri:
prefix: /
route:
- destination:
host: tracing
port:
number: 80
YAML

depends_on = [
aws_eks_cluster.eks_cluster,
aws_eks_node_group.cluster,
kubernetes_config_map.aws-auth,
helm_release.istio_base,
helm_release.istiod
]

}
}
Loading

0 comments on commit e9d6eb5

Please sign in to comment.