Files
homey/templates/gitea.yaml
T
Aner Zakobar cf778e2960 tmp
2021-09-15 15:40:57 +03:00

83 lines
1.8 KiB
YAML

---
apiVersion: v1
kind: Secret
metadata:
name: gitea-admin-pass
annotations:
secret-generator.v1.mittwald.de/autogenerate: password
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: gitea
spec:
replicas: 1
selector:
matchLabels:
app: gitea
template:
metadata:
labels:
app: gitea
spec:
containers:
- name: gitea
image: gitea/gitea
ports:
- containerPort: 2222
name: ssh
- containerPort: 3000
name: http
volumeMounts:
- name: gitea-persistent-storage
mountPath: /data
subPath: backup/gitea/gitea/data
volumes:
- name: gitea-persistent-storage
persistentVolumeClaim:
claimName: homey-pvc-nfs
---
apiVersion: v1
kind: Service
metadata:
name: gitea-svc
spec:
type: NodePort
selector:
app: gitea
ports:
- name: ssh
protocol: TCP
port: 2222
targetPort: ssh
- name: http
protocol: TCP
port: 3000
targetPort: 3000
selector:
app: gitea
---
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: gitea-ingress
annotations:
kubernetes.io/ingress.allow-http: "false"
nginx.ingress.kubernetes.io/auth-url: http://ldap-auth.{{ .Release.Namespace }}.svc.cluster.local:80
nginx.ingress.kubernetes.io/auth-response-headers: 'X-Auth-Request-Access-Token, Authorization'
nginx.ingress.kubernetes.io/configuration-snippet: |
auth_request_set $token $upstream_http_x_auth_request_access_token;
add_header 'Authorization' $token;
spec:
rules:
- host: git.{{ .Values.homey.url }}
http:
paths:
- path: /
pathType: Prefix
backend:
service:
name: gitea-svc
port:
number: 3000