apiVersion: apps/v1
kind: Deployment
metadata:
  name: "harbor-portal"
  namespace: "harbor"
  labels:
    heritage: Helm
    release: harbor
    chart: harbor
    app: "harbor"
    app.kubernetes.io/instance: harbor
    app.kubernetes.io/name: harbor
    app.kubernetes.io/managed-by: Helm
    app.kubernetes.io/part-of: harbor
    app.kubernetes.io/version: "2.14.1"
    component: portal
    app.kubernetes.io/component: portal
spec:
  replicas: 2
  revisionHistoryLimit: 10
  selector:
    matchLabels:
      release: harbor
      app: "harbor"
      component: portal
  template:
    metadata:
      labels:
        heritage: Helm
        release: harbor
        chart: harbor
        app: "harbor"
        app.kubernetes.io/instance: harbor
        app.kubernetes.io/name: harbor
        app.kubernetes.io/managed-by: Helm
        app.kubernetes.io/part-of: harbor
        app.kubernetes.io/version: "2.14.1"
        component: portal
        app.kubernetes.io/component: portal
      annotations:
        checksum/configmap: 2c387ee9ead7158b790062d71e7e21faf5dff876522197d7c5a652d47582da28
    spec:
      securityContext:
        runAsUser: 10000
        fsGroup: 10000
      automountServiceAccountToken: false
      containers:
        - name: portal
          image: goharbor/harbor-portal:v2.14.2
          imagePullPolicy: IfNotPresent
          securityContext:
            allowPrivilegeEscalation: false
            capabilities:
              drop:
                - ALL
            privileged: false
            runAsNonRoot: true
            seccompProfile:
              type: RuntimeDefault
          livenessProbe:
            httpGet:
              path: /
              scheme: HTTP
              port: 8080
            initialDelaySeconds: 300
            periodSeconds: 10
          readinessProbe:
            httpGet:
              path: /
              scheme: HTTP
              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: "harbor-portal"
