apiVersion: apps/v1
kind: Deployment
metadata:
  name: hexa-demo
spec:
  selector:
    matchLabels:
      app: hexa-demo
      tier: frontend
  replicas: 1
  template:
    metadata:
      labels:
        app: hexa-demo
        tier: frontend
    spec:
      containers:
        - name: hexa-demo
          image: gcr.io/${GCP_PROJECT_ID}/${GCP_PROJECT_NAME}:tag1
          imagePullPolicy: Always
          command:
            - demo
          resources:
            requests:
              cpu: 100m
              memory: 100Mi
          env:
            - name: PORT
              value: "8886"
            - name: OPA_SERVER_URL
              value: http://hexa-demo-opa-server-agent.default.svc.cluster.local:8887/v1/data/authz/allow

          ports:
            - containerPort: 8886
