apiVersion: apps/v1
kind: Deployment
metadata:
  name: marketplace
  namespace: sme
spec:
  replicas: 1
  selector:
    matchLabels:
      app: sme-marketplace
  template:
    metadata:
      labels:
        app: sme-marketplace
    spec:
      serviceAccountName: marketplace
      automountServiceAccountToken: false
      imagePullSecrets:
        - name: ghcr-pull-secret
      containers:
        - name: marketplace
          image: ghcr.io/openova-io/openova/marketplace:046e5eb
          imagePullPolicy: Always
          ports:
            - containerPort: 8080
          resources:
            requests:
              cpu: 10m
              memory: 32Mi
            limits:
              cpu: 100m
              memory: 64Mi
          livenessProbe:
            httpGet:
              path: /healthz
              port: 8080
            initialDelaySeconds: 3
            periodSeconds: 10
          readinessProbe:
            httpGet:
              path: /healthz
              port: 8080
            initialDelaySeconds: 2
            periodSeconds: 5
          securityContext:
            allowPrivilegeEscalation: false
            runAsNonRoot: true
            runAsUser: 1001
---
apiVersion: v1
kind: Service
metadata:
  name: marketplace
  namespace: sme
spec:
  selector:
    app: sme-marketplace
  ports:
    - port: 8080
      targetPort: 8080
