apiVersion: apps/v1
kind: Deployment
metadata:
  name: mindforge-web
  namespace: mindforge
spec:
  replicas: 1
  selector:
    matchLabels:
      app: mindforge-web
  template:
    metadata:
      labels:
        app: mindforge-web
    spec:
      containers:
        - name: mindforge-web
          image: git.ivanch.me/ivanch/mindforge-web:latest
          imagePullPolicy: Always
          ports:
            - containerPort: 80
          resources:
            requests:
              memory: "32Mi"
              cpu: "100m"
            limits:
              memory: "128Mi"
              cpu: "250m"
---
apiVersion: v1
kind: Service
metadata:
  name: mindforge-web
  namespace: mindforge
spec:
  selector:
    app: mindforge-web
  ports:
    - port: 80
      targetPort: 80
---
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
  name: mindforge-web
  namespace: mindforge
  labels:
    app.kubernetes.io/name: mindforge-web
spec:
  ingressClassName: nginx
  rules:
    - host: "mindforge.haven"
      http:
        paths:
          - path: "/"
            pathType: Prefix
            backend:
              service:
                name: mindforge-web
                port:
                  number: 80
