Wikijs | Postgresql | Transport Encryption

apiVersion: v1
kind: ConfigMap
metadata:
name: wikijs-config
namespace: wikijs
labels:
app: wikijs
data:
DB_HOST: "<db_host>
DB_PORT: "5432"
DB_NAME: "<db_name>"
DB_USER: "<db_user"
DB_SSL: '{"auto":false,"rejectUnauthorized":false}'

and the reference:

 containers:
        - name: wikijs
          image: requarks/wiki:latest
          imagePullPolicy: IfNotPresent
          ports:
            - containerPort: 3000
          env:
            - name: DB_TYPE
              value: "postgres"
            - name: DB_HOST
              valueFrom:
                configMapKeyRef:
                  name: wikijs-config
                  key: DB_HOST
            - name: DB_PORT
              valueFrom:
                configMapKeyRef:
                  name: wikijs-config
                  key: DB_PORT
            - name: DB_NAME
              valueFrom:
                configMapKeyRef:
                  name: wikijs-config
                  key: DB_NAME
            - name: DB_USER
              valueFrom:
                configMapKeyRef:
                  name: wikijs-config
                  key: DB_USER
            - name: DB_SSL
              valueFrom:
                configMapKeyRef:
                  name: wikijs-config
                  key: DB_SSL

About The Author

1 thought on “Wikijs | Postgresql | Transport Encryption

  1. sunrider Post authorReply

    Turns out there is more to the thing. The DB_SSL probably needs more settings. Running it like above does not throw an error, but when I remove the pg_hba entry for ‘host’ and only leave ‘hostssl’, the connection fails. Coming back to that again.

Leave a Reply

Your email address will not be published. Required fields are marked *

12 + 10 =