Skip to content

[help wanted] Detector 部署在k8s error #984

Description

@boonhanchng

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"

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions