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