nodeport.yml
---
"apiVersion": "apps/v1"
"kind": "Deployment"
"metadata":
"labels":
"app": "svgm-ev-upload"
"customer": "ctf"
"name": "svgm-ev-upload-deployment"
"namespace": "default"
"spec":
"replicas": 1
"selector":
"matchLabels":
"app": "svgm-ev-upload"
"customer": "ctf"
"template":
"metadata":
"labels":
"app": "svgm-ev-upload"
"customer": "ctf"
"spec":
"containers":
- "name": "godview-k8s"
"command": ["bash", "-c", "sleep 60; ./bin/godview --config CTF/beijing/cytj"]
"image": "registry.aibee.cn/aibee/godview:0.0.110"
"imagePullPolicy": "Always"
"volumeMounts":
- "mountPath": "/root/CameraInfos"
"name": "camera-volume"
- "mountPath": "/tmp"
"name": "tmp-volume"
"resources":
"limits":
"cpu": 300m
"memory": "3Gi"
"requests":
"cpu": 100m
"memory": "1Gi"
- "command":
- "python"
- "upload_ev.py"
- "--bucket"
- "aibee-online-ctf-dev"
- "--full_store"
- "ctf_beijing_cytj"
"image": "registry.aibee.cn/store/signals:latest"
"imagePullPolicy": "Always"
"name": "uploadev-k8s"
"env":
- "name": "BCE_ACCESS_KEY"
"value": "da777aea3cc14810b02af74c86d528f4"
- "name": "BCE_SECRET_KEY"
"value": "429cf39f2ae04bf6974cb80902ddb373"
"volumeMounts":
- "mountPath": "/tmp"
"name": "tmp-volume"
"resources":
"limits":
"cpu": 300m
"memory": "200Mi"
"requests":
"cpu": 50m
"memory": "100Mi"
- "command":
- "python"
- "svgm_runner.py"
- "--dest"
- "aibee-online-ctf-dev"
- "--category"
- "ctf_beijing_cytj"
- "--days"
- "30"
- "--clean"
- "7"
- "--business_hour"
- "96:266"
- "--dual_write"
"image": "registry.aibee.cn/aibee/cyliu/tracking/tracking:0.0.4"
"imagePullPolicy": "Always"
"name": "svgm-k8s"
"env":
- "name": "BCE_ACCESS_KEY"
"value": "xxxxxxxxx"
- "name": "BCE_SECRET_KEY"
"value": "xxxxxxxxxyyyyyyy"
"resources":
"limits":
"cpu": 300m
"memory": "200Mi"
"requests":
"cpu": 100m
"memory": "100Mi"
"volumeMounts":
- "mountPath": "/tmp"
"name": "tmp-volume"
- "mountPath": "/root/upload_files"
"name": "uploadfiles-volume"
- "mountPath": "/go/src/code.aibee.cn/mlp/godview/bin"
"name": "godview-bin"
- "mountPath": "/go/src/code.aibee.cn/mlp/godview/config"
"name": "godview-config"
- "mountPath": "/go/src/code.aibee.cn/mlp/godview/assets"
"name": "godview-assets"
"initContainers":
- "image": "registry.aibee.cn/aibee/camerainfos/ctf_beijing_cytj:1.0.0"
"name": "load-camera"
"command":
- cp
- "-r"
- "/root/CameraInfos/."
- "/data"
"volumeMounts":
- "mountPath": "/data"
"name": "camera-volume"
- image: "registry.aibee.cn/aibee/godview:0.0.110"
name: "load-godview-schemas"
command: ["/bin/sh"]
args: ["-c", "cp /go/src/code.aibee.cn/mlp/godview/bin/* /godview-bin && cp -r /go/src/code.aibee.cn/mlp/godview/config/. /godview-config && cp -r /go/src/code.aibee.cn/mlp/godview/assets/. /godview-assets"]
"volumeMounts":
- "name": "godview-bin"
"mountPath": "/godview-bin"
- "name": "godview-config"
"mountPath": "/godview-config"
- "name": "godview-assets"
"mountPath": "/godview-assets"
"restartPolicy": "Always"
"volumes":
- "name": "tmp-volume"
"hostPath":
"path": "/tmp"
"type": "Directory"
- "name": "uploadfiles-volume"
"hostPath":
"type": "Directory"
"path": "/root/src/upload_files/cytj"
- "emptyDir": {}
"name": "godview-bin"
- "emptyDir": {}
"name": "godview-config"
- "emptyDir": {}
"name": "godview-assets"
- "emptyDir": {}
"name": "camera-volume"
---
"apiVersion": "apps/v1"
"kind": "Deployment"
"metadata":
"labels":
"app": "mysql"
"name": "mysql-deployment"
"namespace": "default"
"spec":
"replicas": 1
"selector":
"matchLabels":
"app": "mysql"
"template":
"metadata":
"labels":
"app": "mysql"
"spec":
containers:
- image: "mysql:5.7.24"
# command: ["bash", "-c", "/entrypoint.sh mysqld --port 8083"]
imagePullPolicy: "Always"
env:
- "name": "MYSQL_ROOT_PASSWORD"
"value": "password"
ports:
- containerPort: 3306
name: mysql
name: "godview-mysql-k8s"
volumeMounts:
- mountPath: "/docker-entrypoint-initdb.d"
name: "mysql-volume"
- name: "mysql-persistent-storage"
mountPath: "/var/lib/mysql"
resources:
limits:
cpu: 300m
memory: "2Gi"
requests:
cpu: 200m
memory: "1Gi"
initContainers:
- image: "registry.aibee.cn/aibee/godview:0.0.110"
name: "load-godview-schemas"
command: ["/bin/sh"]
args: ["-c", "cp /go/src/code.aibee.cn/mlp/godview/models/schemas/init.sql /schemas"]
volumeMounts:
- name: "mysql-volume"
mountPath: "/schemas"
restartPolicy: "Always"
volumes:
- emptyDir: {}
name: "mysql-volume"
- name: "mysql-persistent-storage"
persistentVolumeClaim:
claimName: "mysql-pv-claim"
---
apiVersion: "v1"
kind: "Service"
metadata:
name: "mysql-service"
namespace: "default"
spec:
type: "NodePort"
ports:
- port: 8083
targetPort: 3306
nodePort: 32000
selector:
app: "mysql"
...
mysql-volume.yml
apiVersion: v1
kind: PersistentVolume
metadata:
name: mysql-pv-volume
labels:
type: local
spec:
storageClassName: manual
capacity:
storage: 10Gi
accessModes:
- ReadWriteOnce
persistentVolumeReclaimPolicy: Delete
hostPath:
path: "/mnt/data"
mysql-pv-claim.yml
---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: mysql-pv-claim
spec:
storageClassName: manual
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 8Gi
...