initial
This commit is contained in:
114
gitea.yaml
Normal file
114
gitea.yaml
Normal file
@@ -0,0 +1,114 @@
|
||||
apiVersion: v1
|
||||
kind: Namespace
|
||||
metadata:
|
||||
name: gitea
|
||||
|
||||
---
|
||||
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: gitea
|
||||
namespace: gitea
|
||||
labels:
|
||||
app: gitea
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
app: gitea
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: gitea
|
||||
spec:
|
||||
containers:
|
||||
- name: gitea
|
||||
image: gitea/gitea:latest
|
||||
ports:
|
||||
- containerPort: 3000
|
||||
name: gitea
|
||||
- containerPort: 22
|
||||
name: git-ssh
|
||||
volumeMounts:
|
||||
- mountPath: /data
|
||||
name: git-data
|
||||
volumes:
|
||||
- name: git-data
|
||||
persistentVolumeClaim:
|
||||
claimName: gitea-pvc
|
||||
|
||||
---
|
||||
|
||||
apiVersion: v1
|
||||
kind: PersistentVolumeClaim
|
||||
metadata:
|
||||
name: gitea-pvc
|
||||
namespace: gitea
|
||||
spec:
|
||||
accessModes:
|
||||
- ReadWriteOnce
|
||||
resources:
|
||||
requests:
|
||||
storage: 5Gi
|
||||
|
||||
---
|
||||
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: gitea-service
|
||||
namespace: gitea
|
||||
spec:
|
||||
selector:
|
||||
app: gitea
|
||||
ports:
|
||||
- name: gitea-http
|
||||
port: 3000
|
||||
- name: gitea-ssh
|
||||
port: 22
|
||||
|
||||
---
|
||||
|
||||
apiVersion: networking.k8s.io/v1
|
||||
kind: Ingress
|
||||
metadata:
|
||||
name: gitea-tls
|
||||
namespace: gitea
|
||||
annotations:
|
||||
cert-manager.io/cluster-issuer: letsencrypt-issuer
|
||||
kubernetes.io/ingress.class: traefik
|
||||
name: gitea
|
||||
spec:
|
||||
tls:
|
||||
- hosts:
|
||||
- git.clarkeis.com
|
||||
secretName: gitea-tls
|
||||
rules:
|
||||
- host: git.clarkeis.com
|
||||
http:
|
||||
paths:
|
||||
- path: /
|
||||
pathType: Prefix
|
||||
backend:
|
||||
service:
|
||||
name: gitea-service
|
||||
port:
|
||||
number: 3000
|
||||
|
||||
---
|
||||
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: gitea-ssh-svc
|
||||
namespace: gitea
|
||||
spec:
|
||||
selector:
|
||||
app: gitea
|
||||
ports:
|
||||
- port: 2223
|
||||
targetPort: 22
|
||||
name: ssh
|
||||
type: LoadBalancer
|
||||
loadBalancerIP: 192.168.50.50
|
||||
Reference in New Issue
Block a user