deviceservice.yaml 1.08 KB
Newer Older
apiVersion: apps/v1
kind: Deployment
metadata:
  name: deviceservice
spec:
  selector:
    matchLabels:
      app: deviceservice
  template:
    metadata:
      labels:
        app: deviceservice
    spec:
      terminationGracePeriodSeconds: 5
      containers:
      - name: server
        image: device:dockerfile
        imagePullPolicy: Never
        ports:
        - containerPort: 7070
        env:
        - name: DB_ENGINE
          value: "redis"
        - name: REDISDB_DATABASE_ID
          value: "0"
        - name: LOG_LEVEL
          value: "DEBUG"
        readinessProbe:
          exec:
            command: ["/bin/grpc_health_probe", "-addr=:7070"]
        livenessProbe:
          exec:
            command: ["/bin/grpc_health_probe", "-addr=:7070"]
        resources:
          requests:
            cpu: 250m
            memory: 512Mi
          limits:
            cpu: 700m
            memory: 1024Mi
---
apiVersion: v1
kind: Service
metadata:
  name: deviceservice
spec:
  type: ClusterIP
  selector:
    app: deviceservice
  ports:
  - name: grpc
    port: 7070
    targetPort: 7070