apiVersion: apps/v1
kind: Deployment
metadata:
  name: hello-schedulerx-sidecar-demo
  labels:
    app: hello-schedulerx-sidecar-demo
spec:
  replicas: 1
  selector:
    matchLabels:
      app: hello-schedulerx-sidecar-demo
  template:
    metadata:
      labels:
        app: hello-schedulerx-sidecar-demo
    spec:
      containers:
      - name: node-demo
        image: registry.cn-hangzhou.aliyuncs.com/armon/hellodemo:0.0.1-amd64
        resources:
          limits:
            cpu: 500m
            memory: 128Mi
          requests:
            cpu: 500m
            memory: 128Mi
        ports:
        - containerPort: 8088
      - name: schedulerx-agent
        image: registry.cn-hangzhou.aliyuncs.com/schedulerx/agent:1.4.2-amd64
        imagePullPolicy: Always
        resources:
          limits:
            cpu: 200m
          requests:
            cpu: 200m
        env:
          - name: "SCHEDULERX_ENDPOINT"
            value: "${SCHEDULERX_ENDPOINT}"
          - name: "SCHEDULERX_NAMESPACE"
            value: "${SCHEDULERX_NAMESPACE}"
          - name: "SCHEDULERX_GROUPID"
            value: "${SCHEDULERX_GROUPID}"
          - name: "SCHEDULERX_APPKEY"
            value: "${SCHEDULERX_APPKEY}"
          - name: "SCHEDULERX_STARTER_MODE"
            value: "sidecar"
        livenessProbe: 
          exec: 
            command: ["/bin/bash","/root/health.sh"]
          timeoutSeconds: 30
          initialDelaySeconds: 30