---
apiVersion: apps/v1
kind: Deployment
metadata:
  name: mizutest-grpc-py-server
  labels:
    name: mizutest-grpc-py-server
  namespace: sock-shop
spec:
  replicas: 1
  selector:
    matchLabels:
      name: mizutest-grpc-py-server
  template:
    metadata:
      labels:
        name: mizutest-grpc-py-server
    spec:
      containers:
      - name: mizutest-grpc-py-server
        image: mertyildiran/mizutest-grpc-py-server:latest
        env:
        - name: PYTHONUNBUFFERED
          value: "1"
        - name: PYTHONIOENCODING
          value: "UTF-8"
        imagePullPolicy: Always
        command: ["sh", "-c",  "./run.sh > /dev/null 2>&1"]
        resources:
          limits:
            cpu: 75m
            memory: 100Mi
          requests:
            cpu: 10m
            memory: 10Mi
        ports:
        - containerPort: 50051
        securityContext:
          runAsNonRoot: true
          runAsUser: 10001
          capabilities:
            drop:
              - all
            add:
              - NET_BIND_SERVICE
          readOnlyRootFilesystem: true
      nodeSelector:
        beta.kubernetes.io/os: linux
