apiVersion: apps/v1
kind: Deployment
metadata:
  name: hexa-demo-opa-server-agent
spec:
  selector:
    matchLabels:
      app: hexa-demo-opa-server-agent
      tier: frontend
  replicas: 1
  template:
    metadata:
      labels:
        app: hexa-demo-opa-server-agent
        tier: frontend
    spec:
      containers:
        - name: hexa-demo-opa-server-agent
          image: hexaregistry.azurecr.io/opa-server:latest
          args:
            - "run"
            - "--server"
            - "--addr"
            - "0.0.0.0:8887"
            - "--config-file"
            - "/config.yaml"
          imagePullPolicy: Always
          resources:
            requests:
              cpu: 100m
              memory: 100Mi
          env:
            - name: PORT
              value: "8887"
            - name: HEXA_DEMO_URL
              value: http://hexa-demo.default.svc.cluster.local:8886

          ports:
            - containerPort: 8887
