Set up monorepo structure: apps, clusters, and infrastructure

This commit is contained in:
Brad Stein 2025-03-23 14:48:47 -05:00
parent 624e988f78
commit 9ed1632003
7 changed files with 76 additions and 3 deletions

View File

@ -0,0 +1,34 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: gitea
labels:
app: gitea
spec:
replicas: 1
selector:
matchLabels:
app: gitea
template:
metadata:
labels:
app: gitea
spec:
containers:
- name: gitea
image: gitea/gitea:1.23
ports:
- containerPort: 3000
env:
- name: USER_UID
value: "1000"
- name: USER_GID
value: "1000"
volumeMounts:
- name: gitea-data
mountPath: /data
volumes:
- name: gitea-data
persistentVolumeClaim:
claimName: gitea-data

View File

@ -0,0 +1,7 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- deployment.yaml
- service.yaml
- pvc.yaml

View File

@ -0,0 +1,10 @@
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: gitea-data
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 25Gi

View File

@ -0,0 +1,16 @@
apiVersion: v1
kind: Service
metadata:
name: gitea
labels:
app: gitea
spec:
type: ClusterIP
ports:
- port: 3000
targetPort: 3000
protocol: TCP
name: http
selector:
app: gitea

View File

@ -1,12 +1,13 @@
apiVersion: kustomize.toolkit.fluxcd.io/v1beta2
kind: Kustomization
metadata:
name: gitea
name: production-cluster
namespace: flux-system
spec:
interval: 10m
path: "./apps/gitea"
path: "./clusters/production"
prune: true
sourceRef:
kind: GitRepository
name: flux-system
name: flux_bootstrap

View File

@ -0,0 +1,5 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- ../../apps/production/gitea
- ../../infrastructure/production

View File