Split deployment into service and deployment

This commit is contained in:
bom 2022-06-07 18:22:12 +02:00
parent 3a735e016a
commit 1d5df300ad
2 changed files with 27 additions and 34 deletions

View file

@ -1,8 +1,3 @@
apiVersion: v1
kind: Namespace
metadata:
name: gitea
---
apiVersion: apps/v1
kind: Deployment
metadata:
@ -38,7 +33,7 @@ spec:
- name: GITEA__database__HOST
value: "postgresql-service.postgres.svc.cluster.local:5432" # Service.Namespace.svc.cluster.local
- name: GITEA__database__NAME
value: gitea
value: postgres
- name: GITEA__database__USER
value: gitea
- name: GITEA__database__PASSWD
@ -66,31 +61,3 @@ spec:
- name: gitea-data-volume
persistentVolumeClaim:
claimName: gitea-data-pvc
---
kind: Service
apiVersion: v1
metadata:
name: gitea-service
namespace: default
spec:
selector:
app: gitea
ports:
- name: gitea-http
port: 3000
---
kind: Service
apiVersion: v1
metadata:
name: gitea-ssh-service
namespace: default
spec:
type: NodePort
selector:
app: gitea
ports:
- port: 2225
targetPort: 22
nodePort: 30005

View file

@ -0,0 +1,26 @@
kind: Service
apiVersion: v1
metadata:
name: gitea-service
namespace: default
spec:
selector:
app: gitea
ports:
- name: gitea-http
port: 3000
---
kind: Service
apiVersion: v1
metadata:
name: gitea-ssh-service
namespace: default
spec:
type: NodePort
selector:
app: gitea
ports:
- port: 2225
targetPort: 22
nodePort: 30005