apiVersion: apps/v1
kind: Deployment
metadata:
  name: gitea-deployment
  # * Create namespace before use this Deployment
  namespace: ns-gitea
  labels:
    app: gitea
spec:
  replicas: 1
  selector: 
    matchLabels:
      app: gitea
  template:
    metadata:
      labels:
        app: gitea
    spec:
      containers:
        - name: gitea
          image: gitea/gitea:latest
          imagePullPolicy: IfNotPresent
          ports:
            - containerPort: 3000
              name: gitea-http
            - containerPort: 22
              name: gitea-ssh
          volumeMounts:
            - name: nfs
              mountPath: /data
      # Linked to NFS volume
      volumes: 
        - name: nfs
          nfs:
            # NFS ip -> for see that use the following command -> kubectl get service nfs-service -n ns-gitea 
            server: ip
            path: /

