Skip to content

Commit

Permalink
Add nodebb
Browse files Browse the repository at this point in the history
  • Loading branch information
Brutus5000 committed Oct 22, 2024
1 parent 625cb8e commit 30485e5
Show file tree
Hide file tree
Showing 5 changed files with 90 additions and 8 deletions.
46 changes: 46 additions & 0 deletions apps/nodebb/templates/deployment.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
apiVersion: apps/v1
kind: Deployment
metadata:
labels:
app: nodebb
name: nodebb
spec:
replicas: 1
revisionHistoryLimit: 10
selector:
matchLabels:
app: nodebb
template:
metadata:
labels:
app: nodebb
spec:
containers:
- image: nodebb/docker:1.18.5
command:
- /bin/sh
- tail
- /dev/null
imagePullPolicy: Always
name: nodebb
volumeMounts:
- mountPath: /usr/src/app/config.json
name: config
subPath: config.json
- mountPath: /usr/src/app/node_modules
name: nodebb
subPath: node_modules
- mountPath: /usr/src/app/build
name: nodebb
subPath: build
- mountPath: /usr/src/app/public/uploads
name: nodebb
subPath: uploads
restartPolicy: Always
volumes:
- name: config
secret:
secretName: nodebb
- name: nodebb
persistentVolumeClaim:
claimName: nodebb-pvc
13 changes: 13 additions & 0 deletions apps/nodebb/templates/ingress.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
apiVersion: traefik.io/v1alpha1
kind: IngressRoute
metadata:
name: nodebb
spec:
entryPoints:
- websecure
routes:
- match: Host(`forum.{{.Values.baseDomain}}`)
kind: Rule
services:
- name: nodebb
port: 4567
19 changes: 19 additions & 0 deletions apps/nodebb/templates/secret.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
apiVersion: secrets.infisical.com/v1alpha1
kind: InfisicalSecret
metadata:
name: nodebb
namespace: faf-apps
spec:
authentication:
universalAuth:
credentialsRef:
secretName: infisical-machine-identity
secretNamespace: faf-ops
secretsScope:
projectSlug: {{.Values.infisical.projectSlug}}
envSlug: {{.Values.infisical.envSlug}}
secretsPath: "/nodebb"
managedSecretReference:
secretName: nodebb
secretNamespace: faf-apps
creationPolicy: "Owner"
12 changes: 7 additions & 5 deletions apps/nodebb/templates/service.yaml
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
# This is a temporary workaround to point to the nodebb instance running in faf-stack for the API to reach it
# (it is exposed to the host though)
# TODO: Replace as soon as nodebb runs in cluster
apiVersion: v1
kind: Service
metadata:
name: nodebb
labels:
app: nodebb
spec:
type: ExternalName
externalName: {{.Values.hostName}}
selector:
app: nodebb
ports:
- port: 4567
targetPort: 4567
8 changes: 5 additions & 3 deletions cluster/storage/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,11 @@ managedStorages:
size: 20Gi
pvc:
namespace: faf-infra
- pv:
name: nodebb
size: 15Gi
pvc:
namespace: faf-apps
- pv:
name: wordpress
size: 10Gi
Expand Down Expand Up @@ -82,6 +87,3 @@ managedStorages:
# namespace: faf-apps
# size: 20Gi
# size: 10Gi
# - name: nodebb
# namespace: faf-apps
# size: 10Gi

0 comments on commit 30485e5

Please sign in to comment.