# Copyright (c) 2020 SIGHUP s.r.l All rights reserved.
# Use of this source code is governed by a BSD-style
# license that can be found in the LICENSE file.

---
apiVersion: apps/v1
kind: Deployment
metadata:
  name: portal
  labels:
    app: harbor
    component: portal
spec:
  replicas: 1
  selector:
    matchLabels:
      app: harbor
      component: portal
  template:
    metadata:
      labels:
        app: harbor
        component: portal
    spec:
      containers:
        - name: portal
          image: goharbor/harbor-portal
          imagePullPolicy: Always
          resources:
            requests:
              memory: 256Mi
              cpu: 100m
          livenessProbe:
            httpGet:
              path: /
              port: 8080
            initialDelaySeconds: 300
            periodSeconds: 10
          readinessProbe:
            httpGet:
              path: /
              port: 8080
            initialDelaySeconds: 1
            periodSeconds: 10
          ports:
            - containerPort: 8080
          volumeMounts:
          - name: portal-config
            mountPath: /etc/nginx/nginx.conf
            subPath: nginx.conf
      volumes:
      - name: portal-config
        configMap:
          name: portal
