apiVersion: apps/v1
kind: Deployment
metadata:
  name: service2
  labels:
    app: service2
spec:
  minReadySeconds: 5
  progressDeadlineSeconds: 20
  strategy:
    rollingUpdate:
      maxSurge: 1
      maxUnavailable: 0
    type: RollingUpdate
  selector:
    matchLabels:
      app: service2
  template:
    metadata:
      labels:
        app: service2
    spec:
      containers:
      - name: jaeger-agent
        image: jaegertracing/jaeger-agent
        ports:
        - containerPort: 5775
          protocol: UDP
        - containerPort: 6831
          protocol: UDP
        - containerPort: 6832
          protocol: UDP
        - containerPort: 5778
          protocol: TCP
        args: ["--collector.host-port=simplest-collector:14267"]
      - name: service2
        image: lawouach/service2:v1
        imagePullPolicy: Always
        resources:
          limits:
            cpu: "0.1"
            memory: "64Mi"
          requests:
            cpu: "0.1"
            memory: "64Mi"
        securityContext:
          runAsNonRoot: true
          runAsUser: 1000
          readOnlyRootFilesystem: true
        ports:
        - containerPort: 8000
        readinessProbe:
          periodSeconds: 2
          httpGet:
            port: 8000
            path: /health