# ==============================
# Khmer-EID Deployment + Service
# ==============================
---
apiVersion: apps/v1
kind: Deployment
metadata:
  name: khmer-eid
  namespace: default
spec:
  selector:
    matchLabels:
      app: khmer-eid
  template:
    metadata:
      labels:
        app: khmer-eid
    spec:
      containers:
        - name: khmer-eid
          image: khmer-eid:dev
          env:
            - name: ASPNETCORE_ENVIRONMENT
              value: Deployment
            - name: ASPNETCORE_URLS
              value: http://+:5000
          resources:
            limits:
              memory: "128Mi"
              cpu: "500m"
            requests:
              memory: 64Mi
              cpu: 20m
          ports:
            - containerPort: 5000
              name: dotnet

---
apiVersion: v1
kind: Service
metadata:
  name: khmer-eid
  namespace: default
spec:
  selector:
    app: khmer-eid
  ports:
    - port: 8200
      targetPort: dotnet