Skip to content

Commit

Permalink
Renew homelab
Browse files Browse the repository at this point in the history
  • Loading branch information
jkroepke committed Dec 20, 2024
1 parent 8c429e9 commit 70142e9
Show file tree
Hide file tree
Showing 31 changed files with 81 additions and 323 deletions.
173 changes: 0 additions & 173 deletions .github/workflows/aks-terraform.yaml

This file was deleted.

19 changes: 0 additions & 19 deletions .github/workflows/flock.yaml

This file was deleted.

28 changes: 0 additions & 28 deletions .github/workflows/helmfile.yaml

This file was deleted.

43 changes: 43 additions & 0 deletions aks/argocd/1-bootstrap/argocd.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
name: bootstrap
namespace: argocd
finalizers:
- resources-finalizer.argocd.argoproj.io
spec:
# The project the application belongs to.
project: default

# Source of the application manifests
source:
repoURL: https://github.com/jkroepke/homelab.git
targetRevision: HEAD
path: argocd/1-bootstrap

# Destination cluster and namespace to deploy the application
destination:
server: https://kubernetes.default.svc
namespace: argocd

# Sync policy
syncPolicy:
automated:
prune: true
selfHeal: true
allowEmpty: false
syncOptions:
- Validate=true
- CreateNamespace=false
- PrunePropagationPolicy=foreground
- PruneLast=true
- RespectIgnoreDifferences=true

retry:
limit: -1
backoff:
duration: 5s
factor: 2
maxDuration: 3m

revisionHistoryLimit: 1
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
33 changes: 18 additions & 15 deletions aks/terraform/infrastructure/.terraform.lock.hcl

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions aks/terraform/infrastructure/_versions.tf
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,9 @@ terraform {
azapi = {
source = "Azure/azapi"
}

azureakscommand = {
source = "jkroepke/azureakscommand"
}
}
}
16 changes: 16 additions & 0 deletions aks/terraform/infrastructure/k8s-argocd.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
resource "azureakscommand_invoke" "argocd" {
resource_group_name = azurerm_kubernetes_cluster.jok.resource_group_name
name = azurerm_kubernetes_cluster.jok.name

command = <<-EOT
helm install argocd argo-cd --wait --repo https://argoproj.github.io/argo-helm --create-namespace -n argocd
k apply -n argocd -f https://raw.githubusercontent.com/argoproj/argo-cd/stable/manifests/install.yaml
EOT

lifecycle {
postcondition {
condition = self.exit_code == 0
error_message = "exit code invalid"
}
}
}
Loading

0 comments on commit 70142e9

Please sign in to comment.