feat: initial commit
- add structure to clusters, apps and argocd objects - add bootstrapping features
This commit is contained in:
commit
971835f845
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
|||||||
|
manifests/
|
||||||
15
Makefile
Normal file
15
Makefile
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
.PHONY: build clean
|
||||||
|
|
||||||
|
# Build a kustomization path to manifests directory
|
||||||
|
# Usage: make build clusters/au-syd1/bootstrap
|
||||||
|
build:
|
||||||
|
@mkdir -p manifests/$(filter-out $@,$(MAKECMDGOALS))
|
||||||
|
@kustomize build $(filter-out $@,$(MAKECMDGOALS)) --output manifests/$(filter-out $@,$(MAKECMDGOALS))
|
||||||
|
|
||||||
|
# Clean all generated manifests
|
||||||
|
clean:
|
||||||
|
@rm -rf manifests/
|
||||||
|
|
||||||
|
# Allow any argument after build to be treated as a path
|
||||||
|
%:
|
||||||
|
@:
|
||||||
7
apps/base/kustomization.yaml
Normal file
7
apps/base/kustomization.yaml
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
---
|
||||||
|
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||||
|
kind: Kustomization
|
||||||
|
|
||||||
|
resources:
|
||||||
|
- ../../argocd/projects
|
||||||
|
- ../../argocd/applicationsets
|
||||||
13
apps/base/reflector-system/kustomization.yaml
Normal file
13
apps/base/reflector-system/kustomization.yaml
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
---
|
||||||
|
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||||
|
kind: Kustomization
|
||||||
|
|
||||||
|
resources:
|
||||||
|
- namespace.yaml
|
||||||
|
|
||||||
|
helmCharts:
|
||||||
|
- name: reflector
|
||||||
|
repo: oci://ghcr.io/emberstack/helm-charts
|
||||||
|
version: "10.0.1"
|
||||||
|
releaseName: reflector
|
||||||
|
namespace: reflector-system
|
||||||
5
apps/base/reflector-system/namespace.yaml
Normal file
5
apps/base/reflector-system/namespace.yaml
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
apiVersion: v1
|
||||||
|
kind: Namespace
|
||||||
|
metadata:
|
||||||
|
name: reflector-system
|
||||||
8
apps/overlays/au-syd1/reflector-system/helm-patch.yaml
Normal file
8
apps/overlays/au-syd1/reflector-system/helm-patch.yaml
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
---
|
||||||
|
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||||
|
kind: Kustomization
|
||||||
|
|
||||||
|
helmCharts:
|
||||||
|
- name: reflector
|
||||||
|
valuesFiles:
|
||||||
|
- values.yaml
|
||||||
@ -0,0 +1,9 @@
|
|||||||
|
---
|
||||||
|
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||||
|
kind: Kustomization
|
||||||
|
|
||||||
|
resources:
|
||||||
|
- ../../../base/reflector-system
|
||||||
|
|
||||||
|
patches:
|
||||||
|
- helm-patch.yaml
|
||||||
7
apps/overlays/au-syd1/reflector-system/values.yaml
Normal file
7
apps/overlays/au-syd1/reflector-system/values.yaml
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
---
|
||||||
|
replicaCount: 2
|
||||||
|
|
||||||
|
resources:
|
||||||
|
requests:
|
||||||
|
memory: "256Mi"
|
||||||
|
cpu: "100m"
|
||||||
6
argocd/applicationsets/kustomization.yaml
Normal file
6
argocd/applicationsets/kustomization.yaml
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
---
|
||||||
|
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||||
|
kind: Kustomization
|
||||||
|
|
||||||
|
resources:
|
||||||
|
- platform.yaml
|
||||||
31
argocd/applicationsets/platform.yaml
Normal file
31
argocd/applicationsets/platform.yaml
Normal file
@ -0,0 +1,31 @@
|
|||||||
|
---
|
||||||
|
apiVersion: argoproj.io/v1alpha1
|
||||||
|
kind: ApplicationSet
|
||||||
|
metadata:
|
||||||
|
name: platform-apps
|
||||||
|
namespace: argocd
|
||||||
|
spec:
|
||||||
|
generators:
|
||||||
|
- git:
|
||||||
|
repoURL: https://git.unkin.net/unkin/argocd-apps
|
||||||
|
revision: HEAD
|
||||||
|
directories:
|
||||||
|
- path: apps/overlays/*/reflector-system
|
||||||
|
- path: apps/overlays/*/cert-manager
|
||||||
|
- path: apps/overlays/*/externaldns
|
||||||
|
template:
|
||||||
|
metadata:
|
||||||
|
name: '{{path[2]}}-{{path[3]}}' # cluster-app format (e.g., au-syd1-reflector-system)
|
||||||
|
spec:
|
||||||
|
project: platform
|
||||||
|
source:
|
||||||
|
repoURL: https://git.unkin.net/unkin/argocd-apps
|
||||||
|
targetRevision: HEAD
|
||||||
|
path: '{{path}}'
|
||||||
|
destination:
|
||||||
|
server: https://kubernetes.default.svc
|
||||||
|
namespace: '{{path[3]}}' # Use directory name as namespace
|
||||||
|
syncPolicy:
|
||||||
|
automated:
|
||||||
|
prune: true
|
||||||
|
selfHeal: true
|
||||||
6
argocd/projects/kustomization.yaml
Normal file
6
argocd/projects/kustomization.yaml
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
---
|
||||||
|
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||||
|
kind: Kustomization
|
||||||
|
|
||||||
|
resources:
|
||||||
|
- platform.yaml
|
||||||
28
argocd/projects/platform.yaml
Normal file
28
argocd/projects/platform.yaml
Normal file
@ -0,0 +1,28 @@
|
|||||||
|
---
|
||||||
|
apiVersion: argoproj.io/v1alpha1
|
||||||
|
kind: AppProject
|
||||||
|
metadata:
|
||||||
|
name: platform
|
||||||
|
namespace: argocd
|
||||||
|
spec:
|
||||||
|
description: Platform infrastructure and core services
|
||||||
|
sourceRepos:
|
||||||
|
- https://git.unkin.net/unkin/argocd-apps
|
||||||
|
- oci://ghcr.io/emberstack/helm-charts
|
||||||
|
destinations:
|
||||||
|
- namespace: 'kube-system'
|
||||||
|
server: https://kubernetes.default.svc
|
||||||
|
- namespace: 'reflector-system'
|
||||||
|
server: https://kubernetes.default.svc
|
||||||
|
clusterResourceWhitelist:
|
||||||
|
- group: ''
|
||||||
|
kind: Namespace
|
||||||
|
- group: 'rbac.authorization.k8s.io'
|
||||||
|
kind: ClusterRole
|
||||||
|
- group: 'rbac.authorization.k8s.io'
|
||||||
|
kind: ClusterRoleBinding
|
||||||
|
- group: 'apiextensions.k8s.io'
|
||||||
|
kind: CustomResourceDefinition
|
||||||
|
namespaceResourceWhitelist:
|
||||||
|
- group: '*'
|
||||||
|
kind: '*'
|
||||||
6
clusters/au-syd1/apps/kustomization.yaml
Normal file
6
clusters/au-syd1/apps/kustomization.yaml
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
---
|
||||||
|
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||||
|
kind: Kustomization
|
||||||
|
|
||||||
|
resources:
|
||||||
|
- ../../../apps/base
|
||||||
6
clusters/au-syd1/bootstrap/kustomization.yaml
Normal file
6
clusters/au-syd1/bootstrap/kustomization.yaml
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
---
|
||||||
|
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||||
|
kind: Kustomization
|
||||||
|
|
||||||
|
resources:
|
||||||
|
- https://artifactapi.k8s.syd1.au.unkin.net/api/v1/remote/github_raw/argoproj/argo-cd/refs/tags/v3.3.2/manifests/ha/install.yaml
|
||||||
Loading…
Reference in New Issue
Block a user