apiVersion: apps/v1
kind: Deployment
metadata:
  name: sccstore-ui
  labels:
    app: smartstudent
spec:
  replicas: 1
  selector:
    matchLabels:
      app: sccstore-ui
  template:
    metadata:
      labels:
        app: sccstore-ui
    spec:
      containers:
      - name: sccstore-ui
        image: registry-1.docker.io/domenicopiol/sccstore-ui:latest
        imagePullPolicy: Always
        env:
        - name: SPRING_PROFILES_ACTIVE
          value: "K8S"
        ports:
        - containerPort: 443
        volumeMounts:
        - name: certs
          mountPath: "/certs/" 
        livenessProbe:
          httpGet:
            path: /actuator/health/liveness
            port: 8443
            scheme: HTTPS
          timeoutSeconds: 2
          initialDelaySeconds: 20
          periodSeconds: 10
        readinessProbe:
            httpGet:
              path: /actuator/health/readiness
              port: 8443
              scheme: HTTPS
            timeoutSeconds: 2
            initialDelaySeconds: 15
            periodSeconds: 10
        resources:
          requests:
            memory: "256Mi"
            cpu: "700m"
          limits:
            memory: "300Mi"
            cpu: "2000m"
      volumes:
      - name: certs
        secret:
          secretName: sccstore-webcert
      imagePullSecrets:
      - name: regcred
