File tree Expand file tree Collapse file tree 8 files changed +121
-10
lines changed
Expand file tree Collapse file tree 8 files changed +121
-10
lines changed Original file line number Diff line number Diff line change 1+ apiVersion : v1
2+ kind : ConfigMap
3+ metadata :
4+ name : nodebb
5+ namespace : faf-apps
6+ labels :
7+ app : nodebb
8+ data :
9+ MONGODB_USER : " nodebb"
10+ MONGODB_DATABASE : " nodebb"
Original file line number Diff line number Diff line change 1+ apiVersion : apps/v1
2+ kind : Deployment
3+ metadata :
4+ labels :
5+ app : nodebb
6+ name : nodebb
7+ spec :
8+ replicas : 1
9+ revisionHistoryLimit : 10
10+ selector :
11+ matchLabels :
12+ app : nodebb
13+ template :
14+ metadata :
15+ labels :
16+ app : nodebb
17+ spec :
18+ initContainers :
19+ - name : permission-init
20+ image : alpine:3.16.0
21+ command :
22+ - sh
23+ - -c
24+ - chown -R 1000:1000 /data/* && chmod 775 /data/* && ls -lah /data
25+ volumeMounts :
26+ - mountPath : /data/node_modules
27+ name : nodebb
28+ subPath : node_modules
29+ - mountPath : /data/build
30+ name : nodebb
31+ subPath : build
32+ - mountPath : /data/uploads
33+ name : nodebb
34+ subPath : uploads
35+ containers :
36+ - image : nodebb/docker:1.18.5
37+ {{/* command:*/}}
38+ {{/* - /bin/sh*/}}
39+ {{/* - "-c"*/}}
40+ {{/* - sleep 3600*/}}
41+ imagePullPolicy : Always
42+ name : nodebb
43+ volumeMounts :
44+ - mountPath : /usr/src/app/config.json
45+ name : config
46+ subPath : config.json
47+ - mountPath : /usr/src/app/node_modules
48+ name : nodebb
49+ subPath : node_modules
50+ - mountPath : /usr/src/app/build
51+ name : nodebb
52+ subPath : build
53+ - mountPath : /usr/src/app/public/uploads
54+ name : nodebb
55+ subPath : uploads
56+ restartPolicy : Always
57+ volumes :
58+ - name : config
59+ secret :
60+ secretName : nodebb
61+ - name : nodebb
62+ persistentVolumeClaim :
63+ claimName : nodebb-pvc
64+ securityContext :
65+ fsGroup : 1000
Original file line number Diff line number Diff line change 1+ apiVersion : traefik.io/v1alpha1
2+ kind : IngressRoute
3+ metadata :
4+ name : nodebb
5+ spec :
6+ entryPoints :
7+ - websecure
8+ routes :
9+ - match : Host(`forum.{{.Values.baseDomain}}`)
10+ kind : Rule
11+ services :
12+ - name : nodebb
13+ port : 4567
Original file line number Diff line number Diff line change 1+ apiVersion : secrets.infisical.com/v1alpha1
2+ kind : InfisicalSecret
3+ metadata :
4+ name : nodebb
5+ namespace : faf-apps
6+ spec :
7+ authentication :
8+ universalAuth :
9+ credentialsRef :
10+ secretName : infisical-machine-identity
11+ secretNamespace : faf-ops
12+ secretsScope :
13+ projectSlug : {{.Values.infisical.projectSlug}}
14+ envSlug : {{.Values.infisical.envSlug}}
15+ secretsPath : " /nodebb"
16+ managedSecretReference :
17+ secretName : nodebb
18+ secretNamespace : faf-apps
19+ creationPolicy : " Owner"
Original file line number Diff line number Diff line change 1- # This is a temporary workaround to point to the nodebb instance running in faf-stack for the API to reach it
2- # (it is exposed to the host though)
3- # TODO: Replace as soon as nodebb runs in cluster
41apiVersion : v1
52kind : Service
63metadata :
74 name : nodebb
5+ labels :
6+ app : nodebb
87spec :
9- type : ExternalName
10- externalName : {{.Values.hostName}}
8+ selector :
9+ app : nodebb
10+ ports :
11+ - port : 4567
12+ targetPort : 4567
Original file line number Diff line number Diff line change @@ -48,6 +48,11 @@ managedStorages:
4848 size : 20Gi
4949 pvc :
5050 namespace : faf-infra
51+ - pv :
52+ name : nodebb
53+ size : 15Gi
54+ pvc :
55+ namespace : faf-apps
5156 - pv :
5257 name : wordpress
5358 size : 10Gi
@@ -82,6 +87,3 @@ managedStorages:
8287# namespace: faf-apps
8388# size: 20Gi
8489# size: 10Gi
85- # - name: nodebb
86- # namespace: faf-apps
87- # size: 10Gi
Original file line number Diff line number Diff line change @@ -51,6 +51,6 @@ MONGODB_SCRIPT
5151 fi
5252}
5353
54- create_user_and_db faf-apps wikijs DB_USER DB_PASS DB_NAME
54+ create_user_and_db faf-apps nodebb MONGODB_USER MONGO_NODEBB_PASSWORD MONGODB_DATABASE
5555
5656echo " All users and databases have been processed."
Original file line number Diff line number Diff line change @@ -44,7 +44,7 @@ check_resource_exists_or_fail() {
4444 EXISTS=$( kubectl -n $NAMESPACE get " $RESOURCE_TYPE " " $RESOURCE_NAME " > /dev/null 2> /dev/null && echo true || echo false)
4545 if test " $EXISTS " = " false"
4646 then
47- echo " $RESOURCE_TYPE $RESOURCE_NAME missing. Aborting."
47+ echo " Namespace $NAMESPACE : $RESOURCE_TYPE $RESOURCE_NAME missing. Aborting."
4848 exit 1
4949 fi
5050}
You can’t perform that action at this time.
0 commit comments