crates bootstrap
This commit is contained in:
parent
09802a55c0
commit
560a2fc6a1
1
.gitignore
vendored
1
.gitignore
vendored
@ -1,6 +1,7 @@
|
|||||||
pvs/
|
pvs/
|
||||||
|
|
||||||
*.sql
|
*.sql
|
||||||
|
*.sql.gz
|
||||||
*.tar.gz
|
*.tar.gz
|
||||||
*.secret.yaml
|
*.secret.yaml
|
||||||
ntwl.sublime-workspace
|
ntwl.sublime-workspace
|
||||||
|
|||||||
@ -14,7 +14,7 @@ metadata:
|
|||||||
kind: PersistentVolumeClaim
|
kind: PersistentVolumeClaim
|
||||||
apiVersion: v1
|
apiVersion: v1
|
||||||
metadata:
|
metadata:
|
||||||
name: crates-postgres-pvc
|
name: crates-postgres-data
|
||||||
namespace: crates
|
namespace: crates
|
||||||
spec:
|
spec:
|
||||||
storageClassName: zfs-fast
|
storageClassName: zfs-fast
|
||||||
@ -26,6 +26,20 @@ spec:
|
|||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
|
kind: PersistentVolumeClaim
|
||||||
|
apiVersion: v1
|
||||||
|
metadata:
|
||||||
|
name: crates-postgres-bootstrap
|
||||||
|
namespace: crates
|
||||||
|
spec:
|
||||||
|
accessModes:
|
||||||
|
- ReadWriteOnce
|
||||||
|
resources:
|
||||||
|
requests:
|
||||||
|
storage: 1Gi
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
# -----------------------------------------------------------------------
|
# -----------------------------------------------------------------------
|
||||||
# DEPLOYMENTS
|
# DEPLOYMENTS
|
||||||
# -----------------------------------------------------------------------
|
# -----------------------------------------------------------------------
|
||||||
@ -69,28 +83,32 @@ spec:
|
|||||||
volumeMounts:
|
volumeMounts:
|
||||||
- name: crates-postgres-storage
|
- name: crates-postgres-storage
|
||||||
mountPath: /var/lib/postgresql/data
|
mountPath: /var/lib/postgresql/data
|
||||||
|
- name: crates-postgres-bootstrap
|
||||||
|
mountPath: /docker-entrypoint-initdb.d
|
||||||
|
|
||||||
volumes:
|
volumes:
|
||||||
- name: crates-postgres-storage
|
- name: crates-postgres-storage
|
||||||
persistentVolumeClaim:
|
persistentVolumeClaim:
|
||||||
claimName: crates-postgres-pvc
|
claimName: crates-postgres-data
|
||||||
|
- name: crates-postgres-bootstrap
|
||||||
|
persistentVolumeClaim:
|
||||||
|
claimName: crates-postgres-bootstrap
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
|
# apiVersion: v1
|
||||||
|
# kind: Pod
|
||||||
|
# metadata:
|
||||||
|
# name: nbody-gpu-benchmark
|
||||||
|
# namespace: default
|
||||||
|
# spec:
|
||||||
|
|
||||||
apiVersion: apps/v1
|
apiVersion: apps/v1
|
||||||
kind: Deployment
|
kind: Pod
|
||||||
metadata:
|
metadata:
|
||||||
namespace: crates
|
namespace: crates
|
||||||
name: crates-api
|
name: crates-api
|
||||||
spec:
|
spec:
|
||||||
replicas: 1
|
|
||||||
selector:
|
|
||||||
matchLabels:
|
|
||||||
app: crates-api
|
|
||||||
template:
|
|
||||||
metadata:
|
|
||||||
labels:
|
|
||||||
app: crates-api
|
|
||||||
spec:
|
spec:
|
||||||
containers:
|
containers:
|
||||||
- name: crates-api
|
- name: crates-api
|
||||||
@ -123,21 +141,13 @@ spec:
|
|||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
apiVersion: apps/v1
|
apiVersion: v1
|
||||||
kind: Deployment
|
kind: Pod
|
||||||
metadata:
|
metadata:
|
||||||
namespace: crates
|
namespace: crates
|
||||||
name: crates-migrate
|
name: crates-migrate
|
||||||
spec:
|
spec:
|
||||||
replicas: 1
|
restartPolicy: OnFailure
|
||||||
selector:
|
|
||||||
matchLabels:
|
|
||||||
app: crates-migrate
|
|
||||||
template:
|
|
||||||
metadata:
|
|
||||||
labels:
|
|
||||||
app: crates-migrate
|
|
||||||
spec:
|
|
||||||
containers:
|
containers:
|
||||||
- name: crates-migrate
|
- name: crates-migrate
|
||||||
image: registry.ntwl.xyz/crates-api
|
image: registry.ntwl.xyz/crates-api
|
||||||
|
|||||||
@ -15,7 +15,7 @@ metadata:
|
|||||||
kind: PersistentVolumeClaim
|
kind: PersistentVolumeClaim
|
||||||
apiVersion: v1
|
apiVersion: v1
|
||||||
metadata:
|
metadata:
|
||||||
name: spacerace-postgres-pvc
|
name: spacerace-postgres-data
|
||||||
namespace: spacerace
|
namespace: spacerace
|
||||||
spec:
|
spec:
|
||||||
storageClassName: zfs-fast
|
storageClassName: zfs-fast
|
||||||
@ -27,6 +27,20 @@ spec:
|
|||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
|
kind: PersistentVolumeClaim
|
||||||
|
apiVersion: v1
|
||||||
|
metadata:
|
||||||
|
name: spacerace-postgres-bootstrap
|
||||||
|
namespace: spacerace
|
||||||
|
spec:
|
||||||
|
accessModes:
|
||||||
|
- ReadWriteOnce
|
||||||
|
resources:
|
||||||
|
requests:
|
||||||
|
storage: 1Gi
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
# -----------------------------------------------------------------------
|
# -----------------------------------------------------------------------
|
||||||
# DEPLOYMENTS
|
# DEPLOYMENTS
|
||||||
# -----------------------------------------------------------------------
|
# -----------------------------------------------------------------------
|
||||||
@ -70,41 +84,46 @@ spec:
|
|||||||
volumeMounts:
|
volumeMounts:
|
||||||
- name: spacerace-postgres-storage
|
- name: spacerace-postgres-storage
|
||||||
mountPath: /var/lib/postgresql/data
|
mountPath: /var/lib/postgresql/data
|
||||||
|
- name: spacerace-postgres-bootstrap
|
||||||
|
mountPath: /docker-entrypoint-initdb.d
|
||||||
|
|
||||||
volumes:
|
volumes:
|
||||||
- name: spacerace-postgres-storage
|
- name: spacerace-postgres-storage
|
||||||
persistentVolumeClaim:
|
persistentVolumeClaim:
|
||||||
claimName: spacerace-postgres-pvc
|
claimName: spacerace-postgres-data
|
||||||
|
- name: spacerace-postgres-bootstrap
|
||||||
|
persistentVolumeClaim:
|
||||||
|
claimName: spacerace-postgres-bootstrap
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
apiVersion: apps/v1
|
# apiVersion: apps/v1
|
||||||
kind: Deployment
|
# kind: Deployment
|
||||||
metadata:
|
# metadata:
|
||||||
name: spacerace-api
|
# name: spacerace-api
|
||||||
namespace: spacerace
|
# namespace: spacerace
|
||||||
spec:
|
# spec:
|
||||||
replicas: 1
|
# replicas: 1
|
||||||
selector:
|
# selector:
|
||||||
matchLabels:
|
# matchLabels:
|
||||||
app: spacerace-api
|
# app: spacerace-api
|
||||||
template:
|
# template:
|
||||||
metadata:
|
# metadata:
|
||||||
labels:
|
# labels:
|
||||||
app: spacerace-api
|
# app: spacerace-api
|
||||||
spec:
|
# spec:
|
||||||
containers:
|
# containers:
|
||||||
- name: spacerace-api
|
# - name: spacerace-api
|
||||||
image: registry.ntwl.xyz/spacerace-api
|
# image: registry.ntwl.xyz/spacerace-api
|
||||||
imagePullPolicy: IfNotPresent
|
# imagePullPolicy: IfNotPresent
|
||||||
ports:
|
# ports:
|
||||||
- containerPort: 80
|
# - containerPort: 80
|
||||||
env:
|
# env:
|
||||||
- name: CONNECTIONSTRINGS__SPACERACE
|
# - name: CONNECTIONSTRINGS__SPACERACE
|
||||||
valueFrom:
|
# valueFrom:
|
||||||
secretKeyRef:
|
# secretKeyRef:
|
||||||
name: spacerace
|
# name: spacerace
|
||||||
key: CONNECTIONSTRINGS__SPACERACE
|
# key: CONNECTIONSTRINGS__SPACERACE
|
||||||
---
|
---
|
||||||
|
|
||||||
# -----------------------------------------------------------------------
|
# -----------------------------------------------------------------------
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user