apiVersion: apps/v1
kind: Deployment
metadata:
  name: omni-repository
spec:
  replicas: 1
  selector:
    matchLabels:
      component: omni-repository-server
  template:
    metadata:
      labels:
        component: omni-repository-server
    spec:
      imagePullSecrets:
      - name: huawei-swr-image-pull-secret
      nodeSelector:
        omni-repo: "true"
      containers:
        - image: swr.cn-north-4.myhuaweicloud.com/opensourceway/omni/omni-repository-test:1fa69fc8996a2c08b4d2bbe235c8f2c2d24cec6b
          imagePullPolicy: Always
          name: omni-repository-server
          livenessProbe:
            httpGet:
              path: "/health"
              port: 8080
            initialDelaySeconds: 3
            periodSeconds: 5
          readinessProbe:
            httpGet:
              path: "/health"
              port: 8080
            initialDelaySeconds: 20
            failureThreshold: 1
            periodSeconds: 5
            timeoutSeconds: 10
          resources:
            requests:
              cpu: 1000m
              memory: 1000Mi
          ports:
            - containerPort: 8080
              name: public-http
              protocol: TCP
            - containerPort: 8088
              name: internal-http
              protocol: TCP
          volumeMounts:
            - mountPath: /app/data
              name: data-volume
            - mountPath: /app/config/app.toml
              name: config-volume
              subPath: app_toml
      serviceAccountName: omni-repository
      volumes:
        - name: data-volume
          persistentVolumeClaim:
            claimName: omni-repository-data
        - name: config-volume
          secret:
            secretName: omni-repository-secret
