git to internal service rather than docker-compose

This commit is contained in:
James Andariese 2023-07-22 16:27:09 -05:00
parent e179196405
commit d980866a02
4 changed files with 106 additions and 16 deletions

View File

@ -1,21 +1,9 @@
apiVersion: v1
kind: Service
metadata:
name: git
namespace: external-services
spec:
externalName: noctowl.cascade.strudelline.net
type: ExternalName
ports:
- name: http
protocol: TCP
port: 57924
--- ---
apiVersion: networking.k8s.io/v1 apiVersion: networking.k8s.io/v1
kind: Ingress kind: Ingress
metadata: metadata:
name: git name: gitea
namespace: external-services namespace: gitea
spec: spec:
ingressClassName: istio ingressClassName: istio
rules: rules:
@ -26,9 +14,9 @@ spec:
pathType: Prefix pathType: Prefix
backend: backend:
service: service:
name: git name: gitea
port: port:
number: 57924 number: 3000
tls: tls:
- hosts: - hosts:
- git.strudelline.net - git.strudelline.net

7
gitea/ns.yaml Normal file
View File

@ -0,0 +1,7 @@
apiVersion: v1
kind: Namespace
metadata:
labels:
kubernetes.io/metadata.name: gitea
wildcard-tls.kn8v.com/copy: "true"
name: gitea

73
gitea/sts.yaml Normal file
View File

@ -0,0 +1,73 @@
apiVersion: apps/v1
kind: StatefulSet
metadata:
labels:
app: gitea
name: gitea
namespace: gitea
spec:
podManagementPolicy: OrderedReady
replicas: 1
selector:
matchLabels:
app: gitea
serviceName: gitea
updateStrategy:
type: RollingUpdate
template:
metadata:
labels:
app: gitea
spec:
containers:
- name: gitea
image: gitea/gitea:1.20.0-rc2
env:
- name: GITEA__actions__ENABLED
value: "true"
- name: MINIO__server__ROOT_URL
value: https://git.strudelline.net/
- name: MINIO__server__DOMAIN
value: git.strudelline.net
- name: GITEA__actions__DEFAULT_ACTIONS_URL
value: https://github.com
livenessProbe:
httpGet:
path: /api/healthz
port: 3000
readinessProbe:
httpGet:
path: /api/healthz
port: 3000
ports:
- containerPort: 22
protocol: TCP
name: ssh
- containerPort: 3000
protocol: TCP
name: http
volumeMounts:
- mountPath: /backup
name: gitea-backup
- mountPath: /data
name: gitea-data
dnsPolicy: ClusterFirst
restartPolicy: Always
volumeClaimTemplates:
- metadata:
name: gitea-backup
spec:
accessModes: [ "ReadWriteMany" ]
storageClassName: nfs
resources:
requests:
storage: 10Gi
- metadata:
name: gitea-data
spec:
accessModes: [ "ReadWriteOnce" ]
storageClassName: local-path
resources:
requests:
storage: 10Gi

22
gitea/svc.yaml Normal file
View File

@ -0,0 +1,22 @@
apiVersion: v1
kind: Service
metadata:
labels:
app: gitea
name: gitea-ssh
namespace: gitea
annotations:
metallb.universe.tf/allow-shared-ip: 172.16.17.16
metallb.universe.tf/loadBalancerIPs: 172.16.17.16
spec:
ipFamilies:
- IPv4
ipFamilyPolicy: SingleStack
ports:
- port: 22
name: ssh
protocol: TCP
targetPort: 22
selector:
app: gitea
type: LoadBalancer