restructured repo and added traefik

This commit is contained in:
Brad Stein 2025-03-29 12:04:11 -05:00
parent 0e48c4feba
commit 1ee0921751
18 changed files with 156 additions and 20 deletions

View File

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

View File

@ -1,3 +0,0 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources: []

Binary file not shown.

View File

@ -0,0 +1,62 @@
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: traefik-ingress-controller
rules:
- apiGroups:
- ""
resources:
- services
- endpoints
- secrets
- nodes
verbs:
- get
- list
- watch
- apiGroups:
- extensions
- networking.k8s.io
resources:
- ingresses
verbs:
- get
- list
- watch
- apiGroups:
- traefik.containo.us
resources:
- middlewares
- ingressroutes
- ingressroutetcps
- ingressrouteudps
- tlsoptions
- tlsstores
verbs:
- get
- list
- watch
- apiGroups:
- discovery.k8s.io
resources:
- endpointslices
verbs:
- get
- list
- watch
- apiGroups:
- networking.k8s.io
resources:
- ingressclasses
verbs:
- get
- list
- watch
- apiGroups:
- traefik.containo.us
resources:
- middlewares
verbs:
- get
- list
- watch

View File

@ -0,0 +1,12 @@
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: traefik-ingress-controller
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: traefik-ingress-controller
subjects:
- kind: ServiceAccount
name: traefik-ingress-controller
namespace: traefik

View File

@ -0,0 +1,60 @@
apiVersion: v1
items:
- apiVersion: apps/v1
kind: Deployment
metadata:
annotations:
deployment.kubernetes.io/revision: "4"
name: traefik
namespace: traefik
spec:
progressDeadlineSeconds: 600
replicas: 1
revisionHistoryLimit: 10
selector:
matchLabels:
app: traefik
strategy:
rollingUpdate:
maxSurge: 25%
maxUnavailable: 25%
type: RollingUpdate
template:
metadata:
annotations:
kubectl.kubernetes.io/restartedAt: "2025-02-12T05:57:48-06:00"
creationTimestamp: null
labels:
app: traefik
spec:
containers:
- args:
- --providers.kubernetesIngress=true
- --entrypoints.web.address=:80
- --entrypoints.websecure.address=:443
- --api.dashboard=true
image: traefik:v3.3.3
imagePullPolicy: IfNotPresent
name: traefik
ports:
- containerPort: 80
name: web
protocol: TCP
- containerPort: 443
name: websecure
protocol: TCP
- containerPort: 8080
name: admin
protocol: TCP
terminationMessagePath: /dev/termination-log
terminationMessagePolicy: File
dnsPolicy: ClusterFirst
nodeSelector:
node-role.kubernetes.io/worker: "true"
restartPolicy: Always
schedulerName: default-scheduler
serviceAccount: traefik-ingress-controller
serviceAccountName: traefik-ingress-controller
terminationGracePeriodSeconds: 30
kind: List
metadata: {}

View File

@ -0,0 +1,10 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
metadata:
name: traefik
namespace: flux-system
resources:
- deployment.yaml
- serviceaccount.yaml
- clusterrole.yaml
- clusterrolebinding.yaml

View File

@ -0,0 +1,5 @@
apiVersion: v1
kind: ServiceAccount
metadata:
name: traefik-ingress-controller
namespace: traefik

View File

@ -2,6 +2,7 @@ apiVersion: apps/v1
kind: Deployment
metadata:
name: gitea
namespace: gitea
labels:
app: gitea
spec:

View File

@ -1,12 +1,11 @@
apiVersion: kustomize.config.k8s.io/v1beta1
apiVersion: kustomize.toolkit.fluxcd.io/v1beta2
kind: Kustomization
metadata:
name: gitea-overlay
namespace: gitea
name: gitea
namespace: flux-system
resources:
- namespace.yaml
- deployment.yaml
- service.yaml
- pvc.yaml
- ingress.yaml

View File

@ -2,6 +2,7 @@ apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: gitea-data
namespace: gitea
spec:
accessModes:
- ReadWriteOnce

View File

@ -2,6 +2,7 @@ apiVersion: v1
kind: Service
metadata:
name: gitea
namespace: gitea
labels:
app: gitea
spec:
@ -27,4 +28,4 @@ spec:
- name: ssh
port: 2242
targetPort: 2242
nodePort: 32242
nodePort: 32242