From 35f685446b05ba00fad55d2666658bbcd66cb0f3 Mon Sep 17 00:00:00 2001 From: tuna Date: Wed, 4 Sep 2024 15:30:12 +0200 Subject: [PATCH] istio --- manifests/argocd/istio.yaml | 65 +++++++++++++++++++++++++++++++++++++ terraform/app.tf | 13 ++++++++ 2 files changed, 78 insertions(+) create mode 100644 manifests/argocd/istio.yaml diff --git a/manifests/argocd/istio.yaml b/manifests/argocd/istio.yaml new file mode 100644 index 0000000..f34f9cb --- /dev/null +++ b/manifests/argocd/istio.yaml @@ -0,0 +1,65 @@ +apiVersion: argoproj.io/v1alpha1 +kind: Application +metadata: + name: istio-base + namespace: argo +spec: + project: default + source: + chart: base + repoURL: https://istio-release.storage.googleapis.com/charts + targetRevision: 1.23.0 + helm: + releaseName: istio-base + destination: + server: "https://kubernetes.default.svc" + namespace: istio-system + syncPolicy: + syncOptions: + - CreateNamespace=true + automated: + selfHeal: true +--- +apiVersion: argoproj.io/v1alpha1 +kind: Application +metadata: + name: istiod + namespace: argo +spec: + project: default + source: + chart: istiod + repoURL: https://istio-release.storage.googleapis.com/charts + targetRevision: 1.23.0 + helm: + releaseName: istiod + destination: + server: "https://kubernetes.default.svc" + namespace: istio-system + syncPolicy: + syncOptions: + - CreateNamespace=true + automated: + selfHeal: true +--- +apiVersion: argoproj.io/v1alpha1 +kind: Application +metadata: + name: istio-ingress-helm + namespace: argo +spec: + project: default + source: + chart: gateway + repoURL: https://istio-release.storage.googleapis.com/charts + targetRevision: 1.23.0 + helm: + releaseName: istio-ingress + destination: + server: "https://kubernetes.default.svc" + namespace: istio-ingress + syncPolicy: + syncOptions: + - CreateNamespace=true + automated: + selfHeal: true \ No newline at end of file diff --git a/terraform/app.tf b/terraform/app.tf index 1b87b9d..6fcefd9 100644 --- a/terraform/app.tf +++ b/terraform/app.tf @@ -16,6 +16,19 @@ resource "kubectl_manifest" "apps" { override_namespace = "argocd" } +data "kubectl_file_documents" "istio" { + content = file("../manifests/argocd/istio.yaml") +} + +resource "kubectl_manifest" "istio" { + depends_on = [ + kubectl_manifest.argocd, + ] + for_each = data.kubectl_file_documents.istio.manifests + yaml_body = each.value + override_namespace = "argocd" +} + # I am done with externalSecrets, a lot of problems # Managing Secrets using ExternalSecrets Operator # # External-Secrets operator for the retrieval of secrets