# services/bstein-dev-home/frontend-deployment.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
  name: bstein-dev-home-frontend
  namespace: bstein-dev-home
spec:
  replicas: 1
  revisionHistoryLimit: 3
  selector:
    matchLabels:
      app: bstein-dev-home-frontend
  template:
    metadata:
      labels:
        app: bstein-dev-home-frontend
    spec:
      nodeSelector:
        kubernetes.io/arch: arm64
        node-role.kubernetes.io/worker: "true"
      affinity:
        nodeAffinity:
          requiredDuringSchedulingIgnoredDuringExecution:
            nodeSelectorTerms:
              - matchExpressions:
                  - key: kubernetes.io/hostname
                    operator: NotIn
                    values: ["titan-13", "titan-15", "titan-17", "titan-19"]
      imagePullSecrets:
        - name: harbor-regcred
      containers:
        - name: frontend
          image: registry.bstein.dev/bstein/bstein-dev-home-frontend:0.1.1-95
          imagePullPolicy: Always
          ports:
            - name: http
              containerPort: 8080
          readinessProbe:
            httpGet:
              path: /
              port: http
            initialDelaySeconds: 2
            periodSeconds: 5
          livenessProbe:
            httpGet:
              path: /
              port: http
            initialDelaySeconds: 10
            periodSeconds: 10
          resources:
            requests:
              cpu: 50m
              memory: 64Mi
            limits:
              cpu: 300m
              memory: 256Mi
