apiVersion: v1 kind: Service metadata: name: gitea-service namespace: gitea spec: selector: app: gitea ports: - port: 3000 name: http targetPort: 3000 - port: 2221 name: ssh targetPort: 22 --- apiVersion: apps/v1 kind: Deployment metadata: name: gitea-deployment namespace: gitea spec: replicas: 1 selector: matchLabels: app: gitea template: metadata: labels: app: gitea spec: containers: - name: gitea image: docker.gitea.com/gitea:1.26 envFrom: - configMapRef: name: gitea-config - secretRef: name: gitea-secrets ports: - containerPort: 3000 name: http - containerPort: 2221 name: ssh volumeMounts: - name: gitea-data mountPath: /data resources: requests: memory: "512Mi" cpu: "500m" limits: memory: "1.5Gi" cpu: "1500m" volumes: - name: gitea-data persistentVolumeClaim: claimName: gitea-pvc --- apiVersion: v1 kind: PersistentVolumeClaim metadata: name: gitea-pvc namespace: gitea spec: accessModes: - ReadWriteOnce resources: requests: storage: 5Gi ---