---
apiVersion: apps/v1
kind: Deployment
metadata:
  name: edge
  labels:
    name: edge
    layer: client
    app.kubernetes.io/name: edge
spec:
  replicas: 1
  selector:
    matchLabels:
      app: edge
      app.kubernetes.io/name: edge
  template:
    metadata:
      labels:
        name: edge
        layer: client
        app.kubernetes.io/name: edge
      annotations:
        sidecar.istio.io/rewriteAppHTTPProbers: "true"
    spec:
      containers:
      - name: edge
        image: iad.ocir.io/oracle/ateam/mushop-edge-router:1
        imagePullPolicy: Always
        args:
          - --configfile=/config/traefik.toml
        ports:
        - name: http
          containerPort: 8080
        volumeMounts:
          - mountPath: /config
            name: config
        livenessProbe:
          httpGet:
            path: /ping
            port: http
        readinessProbe:
          httpGet:
            path: /ping
            port: http
        resources:
          limits:
            cpu: 100m
            memory: 256Mi
          requests:
            cpu: 50m
            memory: 128Mi
        securityContext:
          runAsNonRoot: true
          runAsUser: 10001
          capabilities:
            drop:
              - all
            add:
              - NET_BIND_SERVICE
          readOnlyRootFilesystem: true
      volumes:
        - name: config
          configMap:
            name: edge
