Skip to content

Commit

Permalink
feat: add namespace to forgejo
Browse files Browse the repository at this point in the history
  • Loading branch information
reinthal committed Dec 28, 2024
1 parent de18ee9 commit dc30db1
Showing 1 changed file with 44 additions and 46 deletions.
90 changes: 44 additions & 46 deletions apps/base/forgejo/forgejo.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,16 @@
apiVersion: v1
kind: Namespace
metadata:
name: forgejo
labels:
toolkit.fluxcd.io/tenant: kog-team
---
# forgejo-configmap.yaml
apiVersion: v1
kind: ConfigMap
metadata:
name: forgejo-config
namespace: forgejo
data:
USER_UID: "1000"
USER_GID: "1000"
Expand All @@ -11,35 +19,25 @@ data:
FORGEJO__database__NAME: "forgejo"
FORGEJO__database__USER: "forgejo"
---
# forgejo-secret.yaml
apiVersion: v1
kind: Secret
metadata:
name: forgejo-secret
type: Opaque
data:
FORGEJO__database__PASSWD: Zm9yZ2Vqbw== # base64 encoded 'forgejo'
postgres-password: Zm9yZ2Vqbw== # base64 encoded 'forgejo'

---
# forgejo-pvc.yaml
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: forgejo-data
namespace: forgejo
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 10Gi

---
# forgejo-deployment.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
name: forgejo
namespace: forgejo
spec:
replicas: 1
selector:
Expand All @@ -51,50 +49,50 @@ spec:
app: forgejo
spec:
containers:
- name: forgejo
image: codeberg.org/forgejo/forgejo:9
ports:
- containerPort: 3000
- containerPort: 22
envFrom:
- configMapRef:
name: forgejo-config
- secretRef:
name: forgejo-secret
volumeMounts:
- name: forgejo
image: codeberg.org/forgejo/forgejo:9
ports:
- containerPort: 3000
- containerPort: 22
envFrom:
- configMapRef:
name: forgejo-config
- secretRef:
name: forgejo-secret
volumeMounts:
- name: forgejo-data
mountPath: /data
- name: timezone
mountPath: /etc/timezone
readOnly: true
- name: localtime
mountPath: /etc/localtime
readOnly: true
volumes:
- name: forgejo-data
mountPath: /data
persistentVolumeClaim:
claimName: forgejo-data
- name: timezone
mountPath: /etc/timezone
readOnly: true
hostPath:
path: /etc/timezone
- name: localtime
mountPath: /etc/localtime
readOnly: true
volumes:
- name: forgejo-data
persistentVolumeClaim:
claimName: forgejo-data
- name: timezone
hostPath:
path: /etc/timezone
- name: localtime
hostPath:
path: /etc/localtime
hostPath:
path: /etc/localtime
---
apiVersion: v1
kind: Service
metadata:
name: forgejo
namespace: forgejo
spec:
type: NodePort
selector:
app: forgejo
ports:
- name: http
port: 3000
targetPort: 3000
- name: ssh
port: 22
targetPort: 22
nodePort: 30022

- name: http
port: 3000
targetPort: 3000
- name: ssh
port: 22
targetPort: 22
nodePort: 30022

0 comments on commit dc30db1

Please sign in to comment.