---
apiVersion: apps/v1
kind: Deployment
metadata:
  name: queue-master-sw
  labels:
    name: queue-master-sw
    app: queue-master
  namespace: sock-shop
spec:
  replicas: 1
  selector:
    matchLabels:
      app: queue-master
  template:
    metadata:
      labels:
        name: queue-master-sw
        app: queue-master
        version: v1
    spec:
      containers:
      - name: queue-master
        image: sls-registry.cn-beijing.cr.aliyuncs.com/sls-microservices/queue-master:sls_0.5
        env:
         - name: OTEL_RESOURCE_ATTRIBUTES
           value: service.name=queue-master
         - name: OTEL_EXPORTER_OTLP_ENDPOINT
           value: opentelemetry-collector.opentelemetry-collector:55680
         - name: ZIPKIN
           value: zipkin.jaeger.svc.cluster.local
         - name: JAVA_OPTS
           value: -javaagent:/usr/src/app/agent/skywalking-agent.jar -Xms64m -Xmx128m -XX:PermSize=32m -XX:MaxPermSize=64m -XX:+UseG1GC -Djava.security.egd=file:/dev/urandom
        resources:
          limits:
            cpu: 300m
            memory: 500Mi
          requests:
            cpu: 300m
            memory: 500Mi
        ports:
        - containerPort: 80
        livenessProbe:
          httpGet:
            path: /health
            port: 80
          initialDelaySeconds: 300
          periodSeconds: 3
        readinessProbe:
          httpGet:
            path: /health
            port: 80
          initialDelaySeconds: 180
          periodSeconds: 3
      nodeSelector:
        beta.kubernetes.io/os: linux
