mirror of
https://github.com/thejimnicholson/gitea.git
synced 2025-12-06 03:30:42 +00:00
Factor out storage creation
This commit is contained in:
parent
b930129093
commit
2223590d72
22
gitea-pv.yaml
Normal file
22
gitea-pv.yaml
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
---
|
||||||
|
apiVersion: v1
|
||||||
|
kind: PersistentVolume
|
||||||
|
metadata:
|
||||||
|
name: gitea-pv
|
||||||
|
namespace: gitea
|
||||||
|
labels:
|
||||||
|
app: gitea
|
||||||
|
spec:
|
||||||
|
capacity:
|
||||||
|
storage: 5Gi
|
||||||
|
accessModes:
|
||||||
|
- ReadWriteOnce
|
||||||
|
persistentVolumeReclaimPolicy: Retain
|
||||||
|
mountOptions:
|
||||||
|
- nolock
|
||||||
|
nfs:
|
||||||
|
server: 10.0.96.2
|
||||||
|
path: "/volume1/storage/git-repo"
|
||||||
|
claimRef:
|
||||||
|
namespace: gitea
|
||||||
|
name: gitea-pvc
|
||||||
14
gitea-pvc.yaml
Normal file
14
gitea-pvc.yaml
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
---
|
||||||
|
apiVersion: v1
|
||||||
|
kind: PersistentVolumeClaim
|
||||||
|
metadata:
|
||||||
|
name: gitea-pvc
|
||||||
|
namespace: gitea
|
||||||
|
labels:
|
||||||
|
app: gitea
|
||||||
|
spec:
|
||||||
|
accessModes:
|
||||||
|
- ReadWriteOnce
|
||||||
|
resources:
|
||||||
|
requests:
|
||||||
|
storage: 5Gi
|
||||||
@ -1,18 +1,22 @@
|
|||||||
apiVersion: kustomize.config.k8s.io/v1beta1
|
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||||
kind: Kustomization
|
kind: Kustomization
|
||||||
namespace: gitea
|
namespace: gitea
|
||||||
# secretGenerator:
|
secretGenerator:
|
||||||
# - literals:
|
- literals:
|
||||||
# - pg_password=some1pass5here9
|
- pg_username=postgres
|
||||||
# name: gitea-secrets
|
- pg_password=some1pass5here9
|
||||||
# generatorOptions:
|
name: gitea-secrets
|
||||||
# disableNameSuffixHash: true
|
generatorOptions:
|
||||||
# labels:
|
disableNameSuffixHash: true
|
||||||
# type: generated
|
labels:
|
||||||
|
type: generated
|
||||||
resources:
|
resources:
|
||||||
- namespace.yaml
|
- namespace.yaml
|
||||||
- secrets.yaml
|
# - secrets.yaml
|
||||||
- storage.yaml
|
- postgres-pv.yaml
|
||||||
|
- postgres-pvc.yaml
|
||||||
|
- gitea-pv.yaml
|
||||||
|
- gitea-pvc.yaml
|
||||||
- configuration.yaml
|
- configuration.yaml
|
||||||
- postgres-deployment.yaml
|
- postgres-deployment.yaml
|
||||||
- postgres-service.yaml
|
- postgres-service.yaml
|
||||||
|
|||||||
22
postgres-pv.yaml
Normal file
22
postgres-pv.yaml
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
---
|
||||||
|
apiVersion: v1
|
||||||
|
kind: PersistentVolume
|
||||||
|
metadata:
|
||||||
|
name: postgres-pv
|
||||||
|
namespace: gitea
|
||||||
|
labels:
|
||||||
|
app: gitea
|
||||||
|
spec:
|
||||||
|
capacity:
|
||||||
|
storage: 5Gi
|
||||||
|
accessModes:
|
||||||
|
- ReadWriteOnce
|
||||||
|
persistentVolumeReclaimPolicy: Retain
|
||||||
|
mountOptions:
|
||||||
|
- nolock
|
||||||
|
nfs:
|
||||||
|
server: 10.0.96.2
|
||||||
|
path: "/volume1/storage/git-database"
|
||||||
|
claimRef:
|
||||||
|
namespace: gitea
|
||||||
|
name: postgres-pvc
|
||||||
14
postgres-pvc.yaml
Normal file
14
postgres-pvc.yaml
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
---
|
||||||
|
apiVersion: v1
|
||||||
|
kind: PersistentVolumeClaim
|
||||||
|
metadata:
|
||||||
|
name: postgres-pvc
|
||||||
|
namespace: gitea
|
||||||
|
labels:
|
||||||
|
app: gitea
|
||||||
|
spec:
|
||||||
|
accessModes:
|
||||||
|
- ReadWriteOnce
|
||||||
|
resources:
|
||||||
|
requests:
|
||||||
|
storage: 5Gi
|
||||||
72
storage.yaml
72
storage.yaml
@ -1,72 +0,0 @@
|
|||||||
---
|
|
||||||
apiVersion: v1
|
|
||||||
kind: PersistentVolume
|
|
||||||
metadata:
|
|
||||||
name: postgres-pv
|
|
||||||
namespace: gitea
|
|
||||||
labels:
|
|
||||||
app: gitea
|
|
||||||
spec:
|
|
||||||
capacity:
|
|
||||||
storage: 5Gi
|
|
||||||
accessModes:
|
|
||||||
- ReadWriteOnce
|
|
||||||
persistentVolumeReclaimPolicy: Retain
|
|
||||||
mountOptions:
|
|
||||||
- nolock
|
|
||||||
nfs:
|
|
||||||
server: 10.0.96.2
|
|
||||||
path: "/volume1/storage/git-database"
|
|
||||||
claimRef:
|
|
||||||
namespace: gitea
|
|
||||||
name: postgres-pvc
|
|
||||||
---
|
|
||||||
apiVersion: v1
|
|
||||||
kind: PersistentVolume
|
|
||||||
metadata:
|
|
||||||
name: gitea-pv
|
|
||||||
namespace: gitea
|
|
||||||
labels:
|
|
||||||
app: gitea
|
|
||||||
spec:
|
|
||||||
capacity:
|
|
||||||
storage: 5Gi
|
|
||||||
accessModes:
|
|
||||||
- ReadWriteOnce
|
|
||||||
persistentVolumeReclaimPolicy: Retain
|
|
||||||
mountOptions:
|
|
||||||
- nolock
|
|
||||||
nfs:
|
|
||||||
server: 10.0.96.2
|
|
||||||
path: "/volume1/storage/git-repo"
|
|
||||||
claimRef:
|
|
||||||
namespace: gitea
|
|
||||||
name: gitea-pvc
|
|
||||||
---
|
|
||||||
apiVersion: v1
|
|
||||||
kind: PersistentVolumeClaim
|
|
||||||
metadata:
|
|
||||||
name: postgres-pvc
|
|
||||||
namespace: gitea
|
|
||||||
labels:
|
|
||||||
app: gitea
|
|
||||||
spec:
|
|
||||||
accessModes:
|
|
||||||
- ReadWriteOnce
|
|
||||||
resources:
|
|
||||||
requests:
|
|
||||||
storage: 5Gi
|
|
||||||
---
|
|
||||||
apiVersion: v1
|
|
||||||
kind: PersistentVolumeClaim
|
|
||||||
metadata:
|
|
||||||
name: gitea-pvc
|
|
||||||
namespace: gitea
|
|
||||||
labels:
|
|
||||||
app: gitea
|
|
||||||
spec:
|
|
||||||
accessModes:
|
|
||||||
- ReadWriteOnce
|
|
||||||
resources:
|
|
||||||
requests:
|
|
||||||
storage: 5Gi
|
|
||||||
Loading…
Reference in New Issue
Block a user