diff --git a/infra-cluster/gitea/manifests/config-map.yaml b/infra-cluster/gitea/manifests/config-map.yaml new file mode 100644 index 0000000..4793fb3 --- /dev/null +++ b/infra-cluster/gitea/manifests/config-map.yaml @@ -0,0 +1,27 @@ +--- +# Replace app.ini settings with env variables in the form GITEA__SECTION_NAME__KEY_NAME +# "_0X2E_" for "." in section name. +# "_0x2A_" for * +--- +apiVersion: v1 +kind: ConfigMap +metadata: + name: gitea-config + namespace: gitea +data: + GITEA__DEFAULT__APP_NAME: "Forge" + GITEA__server__DOMAIN: "git.jpace121.net" + GITEA__server__SSH_DOMAIN: "git.jpace121.net" + GITEA__server__HTTP_PORT: "3000" + GITEA__server__ROOT_URL: https://git.jpace121.net/ + GITEA__server__START_SSH_SERVER: "true" + GITEA__server__SSH_PORT: "2222" + GITEA__server__LFS_START_SERVER: "true" + GITEA__server__LFS_OFFLINE_MODE: "true" + GITEA__server__LFS_LANDING_PAGE: "explore" + GITEA__database__PATH: "/data/gitea/gitea.db" + GITEA__database__DB_TYPE: "sqlite3" + GITEA__service__ALLOW_ONLY_EXTERNAL_REGISTRATION: "true" + GITEA__openid__ENABLE_OPENID_SIGNIN: "false" + GITEA__openid__ENABLE_OPENID_SIGNUP: "false" + GITEA__webhook__ALLOWED_HOST_LIST: "0x2A" diff --git a/infra-cluster/gitea/manifests/deployment.yaml b/infra-cluster/gitea/manifests/deployment.yaml new file mode 100644 index 0000000..e0a1fea --- /dev/null +++ b/infra-cluster/gitea/manifests/deployment.yaml @@ -0,0 +1,34 @@ +--- +apiVersion: apps/v1 +kind: Deployment +metadata: + name: gitea-deployment + namespace: gitea + labels: + app: gitea +spec: + replicas: 1 + selector: + matchLabels: + app: gitea + template: + metadata: + labels: + app: gitea + spec: + containers: + - name: gitea-app + image: docker.io/gitea/gitea:1.19.0 + ports: + - containerPort: 3000 + - containerPort: 2222 + volumeMounts: + - name: storage + mountPath: "/data" + envFrom: + - configMapRef: + name: gitea-config + volumes: + - name: storage + persistentVolumeClaim: + claimName: gitea-pvc \ No newline at end of file diff --git a/infra-cluster/gitea/manifests/ingress.yaml b/infra-cluster/gitea/manifests/ingress.yaml new file mode 100644 index 0000000..28e54cc --- /dev/null +++ b/infra-cluster/gitea/manifests/ingress.yaml @@ -0,0 +1,18 @@ +--- +apiVersion: networking.k8s.io/v1 +kind: Ingress +metadata: + name: gitea + namespace: gitea +spec: + rules: + - host: git.jpace121.net + http: + paths: + - path: / + pathType: Prefix + backend: + service: + name: gitea-http + port: + number: 3000 \ No newline at end of file diff --git a/infra-cluster/gitea/manifests/pvc.yaml b/infra-cluster/gitea/manifests/pvc.yaml new file mode 100644 index 0000000..c33f640 --- /dev/null +++ b/infra-cluster/gitea/manifests/pvc.yaml @@ -0,0 +1,12 @@ +--- +apiVersion: v1 +kind: PersistentVolumeClaim +metadata: + name: gitea-pvc + namespace: gitea +spec: + accessModes: + - ReadWriteOnce + resources: + requests: + storage: 50Gi \ No newline at end of file diff --git a/infra-cluster/gitea/manifests/services.yaml b/infra-cluster/gitea/manifests/services.yaml new file mode 100644 index 0000000..29cfddd --- /dev/null +++ b/infra-cluster/gitea/manifests/services.yaml @@ -0,0 +1,26 @@ +--- +apiVersion: v1 +kind: Service +metadata: + name: gitea-ssh + namespace: gitea +spec: + type: NodePort + selector: + app: gitea + ports: + - protocol: TCP + port: 2222 +--- +apiVersion: v1 +kind: Service +metadata: + name: gitea-http + namespace: gitea +spec: + type: ClusterIP + selector: + app: gitea + ports: + - protocol: TCP + port: 3000 \ No newline at end of file diff --git a/infra-cluster/gitea/namespaces/gitea.yaml b/infra-cluster/gitea/namespaces/gitea.yaml new file mode 100644 index 0000000..09a988f --- /dev/null +++ b/infra-cluster/gitea/namespaces/gitea.yaml @@ -0,0 +1,4 @@ +apiVersion: v1 +kind: Namespace +metadata: + name: gitea