apiVersion: apps/v1
kind: Deployment
metadata:
  name: authz-adapter
  namespace: juwan
  labels:
    app: authz-adapter
spec:
  replicas: 1
  selector:
    matchLabels:
      app: authz-adapter
  template:
    metadata:
      labels:
        app: authz-adapter
    spec:
      imagePullSecrets:
        - name: registry-creds
      containers:
      - name: authz-adapter
        image: registry.juwan.xhttp.zip/juwan/authz-adapter:latest
        ports:
        - name: grpc
          containerPort: 9002
        env:
          - name: LISTEN_ON
            value: "0.0.0.0:9002"
          - name: USER_RPC_TARGET
            value: "user-rpc-svc.juwan:8080"
        resources:
          requests:
            cpu: 10m
            memory: 32Mi
          limits:
            memory: 512Mi

---
apiVersion: v1
kind: Service
metadata:
  name: authz-adapter-svc
  namespace: juwan
spec:
  ports:
    - name: grpc
      port: 9002
      targetPort: 9002
  selector:
    app: authz-adapter
