mirror of
https://github.com/khuedoan/homelab.git
synced 2024-12-23 01:24:36 +07:00
feat(external): add external ApplicationSet
For charts that requires external resources
This commit is contained in:
parent
8414b70c1c
commit
043329c5e6
3
external/.gitignore
vendored
Normal file
3
external/.gitignore
vendored
Normal file
@ -0,0 +1,3 @@
|
||||
.terraform*
|
||||
terraform.tfstate
|
||||
terraform.tfvars
|
47
external/applicationset.tf
vendored
Normal file
47
external/applicationset.tf
vendored
Normal file
@ -0,0 +1,47 @@
|
||||
resource "kubernetes_manifest" "external_applicationset" {
|
||||
manifest = {
|
||||
apiVersion = "argoproj.io/v1alpha1"
|
||||
kind = "ApplicationSet"
|
||||
metadata = {
|
||||
name = "external"
|
||||
namespace = "argocd"
|
||||
}
|
||||
spec = {
|
||||
generators = [
|
||||
{
|
||||
git = {
|
||||
directories = [
|
||||
{
|
||||
path = "external/*"
|
||||
}
|
||||
]
|
||||
repoURL = "https://github.com/khuedoan/homelab.git"
|
||||
revision = "master"
|
||||
}
|
||||
},
|
||||
]
|
||||
template = {
|
||||
metadata = {
|
||||
name = "{{path.basename}}"
|
||||
}
|
||||
spec = {
|
||||
destination = {
|
||||
name = "in-cluster"
|
||||
namespace = "{{path.basename}}"
|
||||
}
|
||||
project = "default"
|
||||
source = {
|
||||
path = "{{path}}"
|
||||
repoURL = "https://github.com/khuedoan/homelab.git"
|
||||
}
|
||||
syncPolicy = {
|
||||
automated = {
|
||||
prune = true
|
||||
selfHeal = true
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
29
external/versions.tf
vendored
Normal file
29
external/versions.tf
vendored
Normal file
@ -0,0 +1,29 @@
|
||||
terraform {
|
||||
required_version = "~> 1.0.0"
|
||||
|
||||
backend "remote" {
|
||||
hostname = "app.terraform.io"
|
||||
organization = "khuedoan"
|
||||
|
||||
workspaces {
|
||||
name = "homelab-external"
|
||||
}
|
||||
}
|
||||
|
||||
required_providers {
|
||||
cloudflare = {
|
||||
source = "cloudflare/cloudflare"
|
||||
version = "~> 3.4.0"
|
||||
}
|
||||
|
||||
b2 = {
|
||||
source = "Backblaze/b2"
|
||||
version = "~> 0.7.0"
|
||||
}
|
||||
|
||||
kubernetes = {
|
||||
source = "hashicorp/kubernetes"
|
||||
version = "~> 2.7.0"
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user