mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-20 01:38:19 +08:00
deploy: helm charts templates for single-node (#587)
This commit is contained in:
1 parent
e88220c424
commit
98a15069eb
14 files changed
+343
-1
No files matched your search
@@ -0,0 +1,63 @@
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
labels:
|
||||
app: backend
|
||||
name: backend-deployment
|
||||
namespace: hydro-namespace
|
||||
spec:
|
||||
replicas: {{.Values.Backend.Replicas}}
|
||||
revisionHistoryLimit: 1
|
||||
strategy:
|
||||
type: RollingUpdate
|
||||
selector:
|
||||
matchLabels:
|
||||
app: backend
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: backend
|
||||
spec:
|
||||
containers:
|
||||
- name: oj-backend
|
||||
image: {{.Values.Backend.Image}}
|
||||
imagePullPolicy: IfNotPresent
|
||||
volumeMounts:
|
||||
- mountPath: /data/file
|
||||
name: file-volume
|
||||
- mountPath: /root/.hydro
|
||||
name: backend-volume
|
||||
- mountPath: /root/.hydro-config-map
|
||||
name: config-json-volume
|
||||
ports:
|
||||
- name: server-port
|
||||
containerPort: 80
|
||||
command: ["/bin/sh", "-c"]
|
||||
args:
|
||||
- |
|
||||
cp /root/.hydro-config-map/addon.json /root/.hydro/ &&
|
||||
cp /root/.hydro-config-map/config.json /root/.hydro/ &&
|
||||
hydrooj
|
||||
|
||||
initContainers:
|
||||
- name: init-mydb
|
||||
image: busybox
|
||||
command:
|
||||
[
|
||||
"sh",
|
||||
"-c",
|
||||
"until nslookup {{.Values.Global.Mongo.SvcDomain}}; do echo waiting for {{.Values.Global.Mongo.SvcDomain}}; sleep 2; done;",
|
||||
]
|
||||
restartPolicy: Always
|
||||
volumes:
|
||||
- name: file-volume
|
||||
hostPath:
|
||||
path: {{.Values.Backend.FileVolume}}
|
||||
type: DirectoryOrCreate
|
||||
- name: backend-volume
|
||||
hostPath:
|
||||
path: {{.Values.Backend.BackendVolume}}
|
||||
type: DirectoryOrCreate
|
||||
- name: config-volume
|
||||
configMap:
|
||||
name: backend-config-map
|
||||
Reference in new issue
Block a user