apiVersion: v1 kind: Service metadata: name: gogs labels: run: gogs spec: ports: - name: http port: 80 targetPort: 3000 - name: ssh port: 2222 targetPort: 2222 selector: run: gogs type: LoadBalancer status: loadBalancer: {} --- apiVersion: v1 kind: PersistentVolume metadata: name: gogs-data spec: capacity: storage: 1Gi volumeMode: Filesystem accessModes: - ReadWriteOnce persistentVolumeReclaimPolicy: Retain # Keep 4eva storageClassName: default mountOptions: - hard - nfsvers=3 nfs: path: /mnt/DroboFS/Shares/Public/important/gogs/ server: 10.42.42.10 claimRef: name: gogs-data namespace: default --- apiVersion: v1 kind: PersistentVolumeClaim metadata: name: gogs-data spec: storageClassName: standard accessModes: - ReadWriteOnce resources: requests: storage: 1Gi status: {} --- apiVersion: apps/v1 kind: Deployment metadata: name: gogs spec: replicas: 1 selector: matchLabels: run: gogs strategy: type: Recreate template: metadata: labels: run: gogs spec: terminationGracePeriodSeconds: 30 containers: # - image: whatever4711/gogs - image: fdamstra/gogs:latest imagePullPolicy: "Always" name: gogs ports: - containerPort: 3000 - containerPort: 2222 env: - name: SOCAT_LINK value: "false" resources: limits: memory: "2Gi" cpu: "1500m" requests: memory: "250Mi" cpu: "250m" volumeMounts: - mountPath: /data name: gogs-data - mountPath: /app/gogs/custom/conf/app.ini name: gogs-data subPath: gogs/conf/app.ini restartPolicy: Always volumes: - name: gogs-data persistentVolumeClaim: claimName: gogs-data dnsPolicy: "None" dnsConfig: nameservers: - 10.42.42.239 - 10.42.42.1 searches: - default.svc.cluster.local - svc.cluster.local - cluster.local options: - name: ndots value: "2" - name: edns0 - name: trust-ad status: {} --- # Hosting apiVersion: networking.k8s.io/v1 kind: Ingress metadata: name: gogs-ingress annotations: cert-manager.io/cluster-issuer: "letsencrypt-prod" ## No basic auth for gogs ## type of authentication #nginx.ingress.kubernetes.io/auth-type: basic ## name of the secret that contains the user/password definitions #nginx.ingress.kubernetes.io/auth-secret: basic-auth ## message to display with an appropriate context why the authentication is required #nginx.ingress.kubernetes.io/auth-realm: 'Authentication Required - Octoprint' spec: tls: - hosts: - git.monkeybox.org - gogs.monkeybox.org secretName: gogs-tls rules: - host: git.monkeybox.org http: paths: - path: / pathType: Prefix backend: service: name: gogs port: number: 80 - host: gogs.monkeybox.org http: paths: - path: / pathType: Prefix backend: service: name: gogs port: number: 80