feat:Fix the bootstrap to be deploy key application

This commit is contained in:
Story Crater Bot
2026-08-18 15:08:03 -07:00
parent eac3a2a227
commit 54fa540b33
37 changed files with 1216 additions and 1202 deletions
@@ -0,0 +1,124 @@
# ArgoCD Helm Values — Single Source of Truth
# Chart: https://github.com/argoproj/argo-helm
global:
domain: argocd.riotpiao.com
# Server configuration
server:
ingress:
enabled: true
ingressClassName: nginx
annotations:
cert-manager.io/cluster-issuer: letsencrypt-prod
nginx.ingress.kubernetes.io/ssl-passthrough: "true"
nginx.ingress.kubernetes.io/backend-protocol: "HTTPS"
hosts:
- argocd.riotpiao.com
tls:
- secretName: argocd-server-tls
hosts:
- argocd.riotpiao.com
# Allow insecure mode (terminate TLS at ingress)
extraArgs:
- --insecure
resources:
requests:
cpu: 100m
memory: 256Mi
limits:
cpu: 500m
memory: 1Gi
# Repo server configuration
repoServer:
resources:
requests:
cpu: 100m
memory: 256Mi
limits:
cpu: 500m
memory: 1Gi
# SOPS plugin for encrypted secrets
volumes:
- name: sops-age
secret:
secretName: sops-age
optional: true
volumeMounts:
- name: sops-age
mountPath: /home/argocd/.config/sops/age
readOnly: true
# Environment for SOPS
env:
- name: SOPS_AGE_KEY_FILE
value: /home/argocd/.config/sops/age/keys.txt
# Controller configuration
controller:
resources:
requests:
cpu: 200m
memory: 512Mi
limits:
cpu: 1000m
memory: 2Gi
# Application controller configuration
applicationSet:
enabled: true
# Notifications (optional, for Slack/Discord alerts)
notifications:
enabled: false
# Redis for caching
redis:
enabled: true
resources:
requests:
cpu: 50m
memory: 64Mi
limits:
cpu: 200m
memory: 256Mi
# Tolerations for control-plane
server:
tolerations:
- key: node-role.kubernetes.io/control-plane
operator: Exists
effect: NoSchedule
repoServer:
tolerations:
- key: node-role.kubernetes.io/control-plane
operator: Exists
effect: NoSchedule
controller:
tolerations:
- key: node-role.kubernetes.io/control-plane
operator: Exists
effect: NoSchedule
# ArgoCD projects
configs:
# Default project allows all repos
cm:
admin.enabled: "true"
application.instanceLabelKey: argocd.argoproj.io/instance
params:
server.insecure: true
# RBAC (allow admin full access)
configs:
rbac:
policy.default: role:readonly
policy.csv: |
g, admin, role:admin
@@ -0,0 +1,66 @@
# ArgoCD Root App-of-Apps — GitHub Mirror Source
# This is the initial configuration that breaks the circular dependency
# Points at GitHub mirror, not Forgejo (Forgejo isn't ready yet)
#
# After Forgejo is healthy and repo is pushed, use phase5-cutover/root-app-forgejo.yaml
---
apiVersion: v1
kind: Namespace
metadata:
name: argocd
---
apiVersion: argoproj.io/v1alpha1
kind: AppProject
metadata:
name: homelab
namespace: argocd
spec:
description: Homelab infrastructure and applications
sourceRepos:
- 'https://github.com/YOUR-ORG/homelab.git' # ← REPLACE with your GitHub mirror
- 'https://forgejo.riotpiao.com/YOUR-ORG/homelab.git'
- 'https://*.github.io/*' # Helm charts from GitHub Pages
- 'https://charts.*' # Public Helm repos
destinations:
- namespace: '*'
server: 'https://kubernetes.default.svc'
clusterResourceWhitelist:
- group: '*'
kind: '*'
namespaceResourceWhitelist:
- group: '*'
kind: '*'
---
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
name: homelab-root
namespace: argocd
finalizers:
- resources-finalizer.argocd.argoproj.io
spec:
project: homelab
source:
repoURL: https://github.com/YOUR-ORG/homelab.git # ← REPLACE with your GitHub mirror
targetRevision: main
path: k8s/argocd/apps
destination:
server: https://kubernetes.default.svc
namespace: argocd
syncPolicy:
automated:
prune: true
selfHeal: true
allowEmpty: false
syncOptions:
- CreateNamespace=true
- ServerSideApply=true
retry:
limit: 5
backoff:
duration: 5s
factor: 2
maxDuration: 3m