From 2f9a35a2f72f42238884b3890e8c13222b4b7176 Mon Sep 17 00:00:00 2001 From: chemavx Date: Thu, 26 Mar 2026 17:03:36 +0000 Subject: [PATCH] Add gitea/deployments.yaml --- gitea/deployments.yaml | 111 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 111 insertions(+) create mode 100644 gitea/deployments.yaml diff --git a/gitea/deployments.yaml b/gitea/deployments.yaml new file mode 100644 index 0000000..002897b --- /dev/null +++ b/gitea/deployments.yaml @@ -0,0 +1,111 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + annotations: + deployment.kubernetes.io/revision: '3' + labels: + app: gitea + name: gitea + namespace: gitea +spec: + progressDeadlineSeconds: 600 + replicas: 1 + revisionHistoryLimit: 10 + selector: + matchLabels: + app: gitea + strategy: + rollingUpdate: + maxSurge: 25% + maxUnavailable: 25% + type: RollingUpdate + template: + metadata: + labels: + app: gitea + spec: + containers: + - env: + - name: GITEA_APP_INI + value: /data/gitea/conf/app.ini + - name: GITEA_CUSTOM + value: /data/gitea + image: gitea/gitea:1.23.1 + imagePullPolicy: IfNotPresent + livenessProbe: + failureThreshold: 3 + httpGet: + path: / + port: 3000 + scheme: HTTP + initialDelaySeconds: 60 + periodSeconds: 30 + successThreshold: 1 + timeoutSeconds: 1 + name: gitea + ports: + - containerPort: 3000 + name: http + protocol: TCP + - containerPort: 22 + name: ssh + protocol: TCP + readinessProbe: + failureThreshold: 3 + httpGet: + path: / + port: 3000 + scheme: HTTP + initialDelaySeconds: 30 + periodSeconds: 10 + successThreshold: 1 + timeoutSeconds: 1 + resources: + limits: + cpu: 500m + memory: 512Mi + requests: + cpu: 100m + memory: 256Mi + terminationMessagePath: /dev/termination-log + terminationMessagePolicy: File + volumeMounts: + - mountPath: /data + name: gitea-data + dnsPolicy: ClusterFirst + initContainers: + - command: + - sh + - -c + - 'mkdir -p /data/gitea/conf + + cp /config/app.ini /data/gitea/conf/app.ini + + chown -R 1000:1000 /data + + ' + image: busybox:1.36 + imagePullPolicy: IfNotPresent + name: init-config + resources: {} + terminationMessagePath: /dev/termination-log + terminationMessagePolicy: File + volumeMounts: + - mountPath: /data + name: gitea-data + - mountPath: /config + name: gitea-config + restartPolicy: Always + schedulerName: default-scheduler + securityContext: + fsGroup: 1000 + terminationGracePeriodSeconds: 30 + volumes: + - name: gitea-data + persistentVolumeClaim: + claimName: gitea-data + - configMap: + defaultMode: 420 + name: gitea-config + name: gitea-config +