75 lines
2.0 KiB
YAML
75 lines
2.0 KiB
YAML
apiVersion: v1
|
||
kind: ConfigMap
|
||
metadata:
|
||
name: runtimejson
|
||
namespace: {{ .Release.Namespace }}
|
||
data:
|
||
runtime.json: |
|
||
{
|
||
"ORION_RUNTIME_DIR": "/opt/orion/orion_runtime/",
|
||
"ORION_LOG_FILE": "/var/log/orion_runtime.log",
|
||
"Env": {},
|
||
"Mnt": [{
|
||
"Src": "/var/tmp/orion/comm",
|
||
"Dest": "/var/tmp/orion/comm",
|
||
"Mode":"ro"
|
||
},{
|
||
"Src": "/opt/orion/orion_runtime/data/orion-client",
|
||
"Dest": "/opt/orion/orion_runtime/data/orion-client",
|
||
"Mode":"ro"
|
||
}]
|
||
}
|
||
|
||
---
|
||
apiVersion: apps/v1
|
||
kind: DaemonSet
|
||
metadata:
|
||
name: orionx-container-runtime
|
||
namespace: {{ .Release.Namespace }}
|
||
spec:
|
||
selector:
|
||
matchLabels:
|
||
app: orionx-container-runtime
|
||
template:
|
||
metadata:
|
||
labels:
|
||
app: orionx-container-runtime
|
||
spec:
|
||
containers:
|
||
- name: container-runtime
|
||
image: eball/orionx-container-runtime:v1.9.3-patch2_env_setup_4.2.0-20240523023502
|
||
imagePullPolicy: IfNotPresent
|
||
lifecycle:
|
||
preStop:
|
||
exec:
|
||
command:
|
||
- /bin/bash
|
||
- -c
|
||
- "cp --parent -vrf /opt/orion-runtime ${HOST_ROOT} && chroot ${HOST_ROOT} /bin/bash -xc '/opt/orion-runtime/uninstall.sh -q true'"
|
||
env:
|
||
- name: HOST_ROOT
|
||
value: /host-root
|
||
- name: HOST_ENGINE
|
||
value: {{ .Values.container.manager }} # 支持 docker 和 containerd,请视情况修改
|
||
volumeMounts:
|
||
- name: localtime
|
||
mountPath: /etc/localtime
|
||
- name: host-root
|
||
mountPath: /host-root
|
||
- name: runtimeconf
|
||
mountPath: /opt/orion-runtime/conf/orion_runtime.json
|
||
subPath: runtime.json
|
||
securityContext:
|
||
privileged: true
|
||
hostPID: true
|
||
volumes:
|
||
- name: runtimeconf
|
||
configMap:
|
||
name: runtimejson
|
||
- name: localtime
|
||
hostPath:
|
||
path: /etc/localtime
|
||
- name: host-root
|
||
hostPath:
|
||
path: /
|