Add Google Cloud K3s infrastructure support
- Add Terraform configuration for GCP instance and storage - Add startup script for K3s installation and configuration - Add pipeline scripts for deployment and management - Add Forgejo deployment manifests and configuration
This commit is contained in:
parent
7384722305
commit
2ab7872af1
30 changed files with 1024 additions and 324 deletions
68
gcloud/tf/k3s/forgejo/deployment.yaml
Normal file
68
gcloud/tf/k3s/forgejo/deployment.yaml
Normal file
|
|
@ -0,0 +1,68 @@
|
|||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: forgejo-deployment
|
||||
namespace: forgejo
|
||||
labels:
|
||||
app: forgejo-app
|
||||
spec:
|
||||
replicas: 1
|
||||
strategy:
|
||||
type: Recreate
|
||||
selector:
|
||||
matchLabels:
|
||||
app: forgejo-app
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: forgejo-app
|
||||
spec:
|
||||
terminationGracePeriodSeconds: 10
|
||||
containers:
|
||||
- name: forgejo
|
||||
image: codeberg.org/forgejo/forgejo:11.0.6
|
||||
imagePullPolicy: IfNotPresent
|
||||
env:
|
||||
- name: FORGEJO__repository__ENABLE_PUSH_CREATE_USER
|
||||
value: "true"
|
||||
- name: FORGEJO__server__ROOT_URL
|
||||
value: "https://frg.headshed.dev/"
|
||||
- name: FORGEJO__repository__DEFAULT_BRANCH
|
||||
value: "main"
|
||||
- name: FORGEJO__server__LFS_START_SERVER
|
||||
value: "true"
|
||||
- name: FORGEJO__security__INSTALL_LOCK
|
||||
value: "true"
|
||||
- name: FORGEJO__service__DISABLE_REGISTRATION
|
||||
value: "false"
|
||||
ports:
|
||||
- name: http
|
||||
containerPort: 3000
|
||||
protocol: TCP
|
||||
- name: ssh
|
||||
containerPort: 22
|
||||
resources:
|
||||
requests:
|
||||
memory: "128Mi"
|
||||
cpu: "100m"
|
||||
limits:
|
||||
memory: "256Mi"
|
||||
cpu: "500m"
|
||||
tty: true
|
||||
volumeMounts:
|
||||
- name: forgejo-data
|
||||
mountPath: /data
|
||||
# - name: forgejo-timezone
|
||||
# mountPath: /etc/timezone
|
||||
# - name: forgejo-localtime
|
||||
# mountPath: /etc/localtime
|
||||
volumes:
|
||||
- name: forgejo-data
|
||||
persistentVolumeClaim:
|
||||
claimName: forgejo-data-pvc
|
||||
# - name: forgejo-timezone
|
||||
# configMap:
|
||||
# name: forgejo-timezone
|
||||
# - name: forgejo-localtime
|
||||
# configMap:
|
||||
# name: forgejo-localtime
|
||||
Loading…
Add table
Add a link
Reference in a new issue