Finished default app of apps installation
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
apiVersion: v2
|
||||
name: argocd-base-application
|
||||
name: app-of-apps
|
||||
description: Helm chart for installing the ArgoCD base application
|
||||
|
||||
# A chart can be either an 'application' or a 'library' chart.
|
||||
@@ -1,7 +1,7 @@
|
||||
apiVersion: argoproj.io/v1alpha1
|
||||
kind: Application
|
||||
metadata:
|
||||
name: applications
|
||||
name: app-of-apps
|
||||
namespace: argocd
|
||||
finalizers:
|
||||
- resources-finalizer.argocd.argoproj.io
|
||||
@@ -11,6 +11,6 @@ spec:
|
||||
server: https://kubernetes.default.svc
|
||||
namespace: argocd
|
||||
source:
|
||||
{{- toYaml .Values.source | nindent 4 }}
|
||||
{{- .Values.source | nindent 4 }}
|
||||
syncPolicy:
|
||||
{{- toYaml .Values.syncPolicy | nindent 4 }}
|
||||
{{- .Values.syncPolicy | nindent 4 }}
|
||||
@@ -1,10 +1,10 @@
|
||||
resource "helm_release" "argocd" {
|
||||
depends_on = [kubernetes_namespace_v1.argocd]
|
||||
name = "argo-cd"
|
||||
namespace = "argocd"
|
||||
create_namespace = true
|
||||
chart = "argo-cd"
|
||||
version = "9.2.4"
|
||||
repository = "https://argoproj.github.io/argo-helm"
|
||||
namespace = kubernetes_namespace_v1.argocd.id
|
||||
timeout = 120
|
||||
set = local.argocd_values
|
||||
}
|
||||
@@ -30,8 +30,9 @@ resource "helm_release" "cilium_lb_config" {
|
||||
resource "helm_release" "argocd_app_of_apps" {
|
||||
count = var.install_argocd_app_of_apps ? 1 : 0
|
||||
depends_on = [helm_release.argocd]
|
||||
name = "cilium-lb-config"
|
||||
chart = "${path.module}/helm_charts/cilium-lb-config"
|
||||
name = "app-of-apps"
|
||||
chart = "${path.module}/helm_charts/app-of-apps"
|
||||
namespace = kubernetes_namespace_v1.argocd.id
|
||||
timeout = 60
|
||||
set = [
|
||||
{
|
||||
@@ -44,3 +45,26 @@ resource "helm_release" "argocd_app_of_apps" {
|
||||
},
|
||||
]
|
||||
}
|
||||
|
||||
# data "helm_template" "argocd_app_of_apps" {
|
||||
#
|
||||
# depends_on = [helm_release.argocd]
|
||||
# name = "app-of-apps"
|
||||
# chart = "${path.module}/helm_charts/app-of-apps"
|
||||
# namespace = kubernetes_namespace_v1.argocd.id
|
||||
# timeout = 60
|
||||
# set = [
|
||||
# {
|
||||
# name = "source"
|
||||
# value = var.argocd_app_of_apps_source
|
||||
# },
|
||||
# {
|
||||
# name = "syncPolicy"
|
||||
# value = var.argocd_app_of_apps_sync_policy
|
||||
# },
|
||||
# ]
|
||||
# }
|
||||
#
|
||||
# output "argocd_app_of_apps_rendered_yaml" {
|
||||
# value = data.helm_template.argocd_app_of_apps.manifest
|
||||
# }
|
||||
5
kubernetes/namespaces.tf
Normal file
5
kubernetes/namespaces.tf
Normal file
@@ -0,0 +1,5 @@
|
||||
resource "kubernetes_namespace_v1" "argocd" {
|
||||
metadata {
|
||||
name = "argocd"
|
||||
}
|
||||
}
|
||||
@@ -1,5 +1,9 @@
|
||||
terraform {
|
||||
required_providers {
|
||||
kubernetes = {
|
||||
source = "hashicorp/kubernetes"
|
||||
version = "3.0.1"
|
||||
}
|
||||
helm = {
|
||||
source = "hashicorp/helm"
|
||||
version = "3.1.1"
|
||||
@@ -7,6 +11,11 @@ terraform {
|
||||
}
|
||||
}
|
||||
|
||||
provider "kubernetes" {
|
||||
config_path = var.kubernetes_config_path
|
||||
config_context = var.Kubernetes_config_context
|
||||
}
|
||||
|
||||
provider "helm" {
|
||||
kubernetes = {
|
||||
config_path = var.kubernetes_config_path
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
resource "kubernetes_secret_v1" "argocd_app_of_apps_git_repo" {
|
||||
count = var.install_argocd_app_of_apps_git_repo_secret ? 1 : 0
|
||||
depends_on = [helm_release.argocd_app_of_apps]
|
||||
depends_on = [kubernetes_namespace_v1.argocd]
|
||||
metadata {
|
||||
namespace = "argocd"
|
||||
namespace = kubernetes_namespace_v1.argocd.id
|
||||
name = "argocd-app-of-apps-git-repo"
|
||||
labels = {
|
||||
"argocd.argoproj.io/secret-type" = "repository"
|
||||
|
||||
@@ -43,10 +43,9 @@ variable "install_argocd_app_of_apps" {
|
||||
variable "argocd_app_of_apps_source" {
|
||||
type = string
|
||||
default = <<-EOT
|
||||
source:
|
||||
repoURL: https://github.com/max-pfeiffer/proxmox-talos-opentofu
|
||||
targetRevision: main
|
||||
path: argocd/root
|
||||
targetRevision: feature/make-gitops-part-configurable
|
||||
path: argocd
|
||||
directory:
|
||||
recurse: true
|
||||
EOT
|
||||
@@ -55,7 +54,6 @@ EOT
|
||||
variable "argocd_app_of_apps_sync_policy" {
|
||||
type = string
|
||||
default = <<-EOT
|
||||
syncPolicy:
|
||||
automated:
|
||||
prune: true
|
||||
selfHeal: true
|
||||
|
||||
Reference in New Issue
Block a user