apiVersion: apps/v1
kind: Deployment
metadata:
  name: airshelf-web
  labels:
    app: airshelf-web
spec:
  replicas: 1
  selector:
    matchLabels:
      app: airshelf-web
  template:
    metadata:
      labels:
        app: airshelf-web
    spec:
      imagePullSecrets:
      - name: cr-pull-secret
      containers:
      - name: airshelf-web
        image: ${CI_REGISTRY_IMAGE}/airshelf-web:latest
        imagePullPolicy: Always
        ports:
        - containerPort: 80
        livenessProbe:
          httpGet:
            path: /
            port: 80
          initialDelaySeconds: 10
          periodSeconds: 10
          timeoutSeconds: 3
          failureThreshold: 3
        readinessProbe:
          httpGet:
            path: /
            port: 80
          initialDelaySeconds: 5
          periodSeconds: 5
          timeoutSeconds: 3
          failureThreshold: 3
        resources:
          requests:
            memory: "32Mi"
            cpu: "20m"
          limits:
            memory: "128Mi"
            cpu: "150m"
---
apiVersion: v1
kind: Service
metadata:
  name: airshelf-web
spec:
  selector:
    app: airshelf-web
  ports:
    - protocol: TCP
      port: 80
      targetPort: 80
