apiVersion: apps/v1
kind: Deployment
metadata:
  name: nameofrepo
  namespace: namespacetemplate
spec:
  selector:
    matchLabels:
      app: nameofrepo
  replicas: 1
  template:
    metadata:
      labels:
        app: nameofrepo
    spec:
      volumes:
        - name: repovolume
          persistentVolumeClaim:
            claimName: claimnameRV
        - name: incomingdata
          persistentVolumeClaim:
            claimName: claimnameID
      initContainers:
        - name: nameofrepo-init
          image: initimage
          env:
            - name: "repo_name"
              value: "@repositoryname"
            - name: "codename"
              value: "codename"
          volumeMounts:
            - mountPath: /repository
              name: repovolume
      containers:
        - name: nameofrepo-uploadapi
          image: ghcr.io/bigpod98/repositorymanagernetuploadapi:latest
          resources:
            limits:
              memory: 1Gi
              cpu: "500m"
          imagePullPolicy: "IfNotPresent"
          env:
            - name: "REPONAME"
              value: "nameofrepo"
          volumeMounts:
            - mountPath: /Watch
              name: incomingdata
        - name: nameofrepo
          image: containerimage
          resources:
            limits:
              memory: 1Gi
              cpu: "500m"
          imagePullPolicy: "IfNotPresent"
          volumeMounts:
            - mountPath: /repository
              name: repovolume
            - mountPath: /Watch
              name: incomingdata
        - name: nameofrepo-server
          image: nginx
          resources:
            limits:
              memory: 1Gi
              cpu: "500m"
          imagePullPolicy: "IfNotPresent"
          ports:
            - containerPort: 80
          volumeMounts:
            - mountPath: /usr/share/nginx/html
              name: repovolume
      imagePullSecrets:
        - name: imagepullsecrettemplate