2021-12-09 01:12:59 +07:00
|
|
|
provider "kubernetes" {
|
2021-12-12 12:00:24 +07:00
|
|
|
config_path = "${path.root}/../metal/kubeconfig.yaml"
|
2021-12-09 01:12:59 +07:00
|
|
|
}
|
|
|
|
|
2021-12-08 10:32:20 +07:00
|
|
|
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
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|