mirror of
https://github.com/khuedoan/homelab.git
synced 2025-02-06 17:18:51 +07:00
Move ArgoCD back to infra bootstrap
Avoid ArgoCD server issue when applying Argo apps to quickly
This commit is contained in:
parent
bf8ea27bc0
commit
3516b2cb29
@ -49,7 +49,7 @@
|
||||
- DHCP server point it to the TFTP server to get boot files and boot config
|
||||
- The boot config contains parameter to get [automated OS installation config file](./metal/roles/pxe-boot/templates/http/kickstart/fedora.ks.j2)
|
||||
- The OS get installed and the machine reboots to the new operating system
|
||||
- Terraform will create a Kubernetes [cluster](./infra/main.tf)
|
||||
- Terraform will create a Kubernetes [cluster](./infra/cluster.tf) and some install some [Helm chart for bootstrap](./infra/bootstrap.tf)
|
||||
- ArgoCD will install the [applications](./apps/resources)
|
||||
|
||||
### Layers
|
||||
@ -58,7 +58,7 @@
|
||||
|-------|------------------------|---------------------------------------------------------|---------------------|
|
||||
| 0 | [metal](./metal) | Bare metal OS installation, Terraform state backend,... | Ansible, PXE server |
|
||||
| 1 | [infra](./infra) | Kubernetes clusters | Terraform, Helm |
|
||||
| 2 | [apps](./apps) | Gitea, Vault and more in the future | Argo |
|
||||
| 2 | [apps](./apps) | Gitea, Vault and more in the future | ArgoCD |
|
||||
|
||||
## Get Started
|
||||
|
||||
|
@ -2,9 +2,6 @@ apiVersion: kustomize.config.k8s.io/v1beta1
|
||||
kind: Kustomization
|
||||
|
||||
resources:
|
||||
# Prerequisites
|
||||
- resources/namespace.yaml
|
||||
- github.com/argoproj/argo-cd//manifests/cluster-install?ref=v2.0.2
|
||||
# System
|
||||
- resources/cert-manager.yaml
|
||||
- resources/longhorn.yaml
|
||||
|
@ -1,4 +0,0 @@
|
||||
apiVersion: v1
|
||||
kind: Namespace
|
||||
metadata:
|
||||
name: argocd
|
18
infra/bootstrap.tf
Normal file
18
infra/bootstrap.tf
Normal file
@ -0,0 +1,18 @@
|
||||
provider "helm" {
|
||||
kubernetes {
|
||||
host = rke_cluster.cluster.api_server_url
|
||||
client_certificate = rke_cluster.cluster.client_cert
|
||||
client_key = rke_cluster.cluster.client_key
|
||||
cluster_ca_certificate = rke_cluster.cluster.ca_crt
|
||||
}
|
||||
}
|
||||
|
||||
resource "helm_release" "argocd" {
|
||||
name = "argocd"
|
||||
repository = "https://argoproj.github.io/argo-helm"
|
||||
chart = "argo-cd"
|
||||
version = "3.1.2"
|
||||
|
||||
namespace = "argocd"
|
||||
create_namespace = true
|
||||
}
|
@ -1,3 +1,7 @@
|
||||
provider "rke" {
|
||||
debug = true
|
||||
}
|
||||
|
||||
locals {
|
||||
hosts = yamldecode(file("../metal/hosts.yml"))
|
||||
user = local.hosts.metal.vars.ansible_user
|
@ -14,7 +14,3 @@ terraform {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
provider "rke" {
|
||||
debug = true
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user