---
apiVersion: apps/v1
kind: Deployment
metadata:
  name: events
  labels:
    app.kubernetes.io/name: events
spec:
  replicas: 1
  selector:
    matchLabels:
      app: events
      app.kubernetes.io/name: events
  template:
    metadata:
      labels:
        app: events
        app.kubernetes.io/name: events
      annotations:
        sidecar.istio.io/rewriteAppHTTPProbers: "true"
    spec:
      containers:
        - name: events
          image: "iad.ocir.io/oracle/ateam/mushop-events:0.0.2"
          imagePullPolicy: IfNotPresent
          command: ["/app"]
          args:
          - -port=8080
          ports:
            - name: http
              containerPort: 8080
          livenessProbe:
            periodSeconds: 120
            httpGet:
              path: /health
              port: http
          readinessProbe:
            periodSeconds: 10
            httpGet:
              path: /health
              port: http
          resources:
            limits:
              cpu: 200m
              memory: 128Mi
            requests:
              cpu: 100m
              memory: 64Mi
          securityContext:
            capabilities:
              add:
              - NET_BIND_SERVICE
              drop:
              - all
            readOnlyRootFilesystem: true
            runAsNonRoot: true
            runAsUser: 10001
