Website Migration Notice: SafePoint is now operated by CyberServal.Learn more →
DiscussionSLA

[help wanted] Detector 部署在k8s error

Published 2 years ago

# Github Discussion
# General
# help wanted

Published 2 years ago

profile_photo

boonhanchng

Updated 2 years ago

0

What happened?

部署容器在 k8s
出现 error log
'/detector/snserver.yml' -> '/detector/detector.yml'
/resources/detector/detector.yml
'/detector/libfusion2.so' -> '/detector/config/libfusion2.so'
[2024-07-10 20:18:14.546] [0] [WARN ] set rlimit_nofile = 262144 faild: Invalid argument (os error 22)
2024/07/10 20:20:04 ERROR init config failed err="invalid character '<' looking for beginning of value"

How we reproduce?

K8s Deployment...

apiVersion: apps/v1
kind: Deployment
metadata:
  name: safeline-detector
  namespace: safeline-waf
spec:
  replicas: 1
  selector:
    matchLabels:
      app: safeline-detector
  template:
    metadata:
      labels:
        app: safeline-detector
    spec:
      containers:
      - name: safeline-detector
        image: ${REGISTRY}/safeline-detector-g:latest
        ports:
        - containerPort: 8000
          name: http-8000
        - containerPort: 8001
          name: http-8001
        env:
        - name: LOG_DIR
          value: /logs/detector
        volumeMounts:
        - mountPath: /resources/detector
          name: safeline-detector-resources
        - mountPath: /logs/detector
          name: safeline-detector-log
        - mountPath: /etc/localtime
          name: localtime
          readOnly: true
      volumes:
      - name: safeline-detector-resources
        hostPath:
          path: /opt/safeline-waf/data/resources/detector
          type: Directory   
      - name: safeline-detector-log
        hostPath:
          path: /opt/safeline-waf/data/logs/detector
          type: Directory   
      - name: localtime
        hostPath:
          path: /etc/localtime
          type: File

Expected behavior

No response

Error log

'/detector/snserver.yml' -> '/detector/detector.yml'
/resources/detector/detector.yml
'/detector/libfusion2.so' -> '/detector/config/libfusion2.so'
[2024-07-10 20:18:14.546] [0] [WARN ] set rlimit_nofile = 262144 faild: Invalid argument (os error 22)
2024/07/10 20:20:04 ERROR init config failed err="invalid character '<' looking for beginning of value"

profile_photo

Lorna0

Updated 2 years ago

0

这暂时不是官方支持的部署模式,我们也没有专门测试过。转 discussion 社区看有没有社区同学可以解答吧。

[help wanted] Detector 部署在k8s error | CyberServal | CyberServal