From 603b237091bf7ae8fa0231142cf6f81bd898518a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lauri=20V=C3=B5sandi?= Date: Thu, 3 Aug 2023 08:41:51 +0300 Subject: [PATCH] Add Wikijs --- wiki/application.yml | 99 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 99 insertions(+) create mode 100644 wiki/application.yml diff --git a/wiki/application.yml b/wiki/application.yml new file mode 100644 index 0000000..65bda04 --- /dev/null +++ b/wiki/application.yml @@ -0,0 +1,99 @@ +--- +apiVersion: codemowers.io/v1alpha1 +kind: OIDCGWClient +metadata: + name: wiki +spec: + displayName: Wiki + uri: https://wiki.k-space.ee + redirectUris: + - https://wiki.k-space.ee/login/a4cdccdc-c879-4387-a64a-6584a02a85e9/callback + allowedGroups: + - k-space:floor + grantTypes: + - authorization_code + - refresh_token + responseTypes: + - code + availableScopes: + - openid + - profile + tokenEndpointAuthMethod: client_secret_post + pkce: false +--- +apiVersion: apps/v1 +kind: StatefulSet +metadata: + name: wikijs + labels: + app.kubernetes.io/name: wikijs +spec: + serviceName: wikijs + replicas: 1 + selector: + matchLabels: + app.kubernetes.io/name: wikijs + template: + metadata: + labels: + app.kubernetes.io/name: wikijs + spec: + containers: + - name: wikijs + image: requarks/wiki:2 + env: + - name: DB_TYPE + value: mysql + - name: DB_HOST + value: mariadb.infra.k-space.ee + - name: DB_PORT + value: "3306" + - name: DB_USER + value: kspace_wiki + - name: DB_NAME + value: kspace_wiki + - name: DB_PASS + valueFrom: + secretKeyRef: + name: wikijs-secrets + key: DB_PASS + ports: + - containerPort: 3000 + name: http +--- +apiVersion: v1 +kind: Service +metadata: + name: wikijs +spec: + selector: + app.kubernetes.io/name: wikijs + ports: + - port: 80 + name: http + targetPort: http +--- +apiVersion: networking.k8s.io/v1 +kind: Ingress +metadata: + name: wikijs + annotations: + kubernetes.io/ingress.class: traefik + traefik.ingress.kubernetes.io/router.entrypoints: websecure + traefik.ingress.kubernetes.io/router.tls: "true" + external-dns.alpha.kubernetes.io/target: traefik.k-space.ee +spec: + rules: + - host: wiki.k-space.ee + http: + paths: + - pathType: Prefix + path: "/" + backend: + service: + name: wikijs + port: + name: http + tls: + - hosts: + - "*.k-space.ee"