Skip to content

Commit

Permalink
Merge branch 'main' into BC-7772-introduce-ddd-objects
Browse files Browse the repository at this point in the history
  • Loading branch information
CeEv authored Aug 26, 2024
2 parents 6ed8437 + 3ed05fc commit 6e095be
Show file tree
Hide file tree
Showing 435 changed files with 9,697 additions and 3,046 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/migrations.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ on:

env:
MONGODB_VERSION: 6.0
NODE_VERSION: '18'
NODE_VERSION: '20'
jobs:
migration:
runs-on: ubuntu-latest
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ permissions:

env:
MONGODB_VERSION: 6.0
NODE_VERSION: '18'
NODE_VERSION: '20'
jobs:
feathers_tests_cov:
runs-on: ubuntu-latest
Expand Down
1 change: 1 addition & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
engine-strict=true
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
18
20
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
FROM docker.io/node:18 AS git
FROM docker.io/node:20 AS git

RUN mkdir /app && chown -R node:node /app
WORKDIR /app
COPY .git .
RUN git config --global --add safe.directory /app && echo "{\"sha\": \"$(git rev-parse HEAD)\", \"version\": \"$(git describe --tags --abbrev=0)\", \"commitDate\": \"$(git log -1 --format=%cd --date=format:'%Y-%m-%dT%H:%M:%SZ')\", \"birthdate\": \"$(date +%Y-%m-%dT%H:%M:%SZ)\"}" > /app/serverversion

FROM docker.io/node:18-alpine
FROM docker.io/node:20-alpine
ENV TZ=Europe/Berlin
RUN apk add --no-cache git make python3
# to run ldap sync as script curl is needed
Expand Down
9 changes: 9 additions & 0 deletions ansible/roles/common-cartridge/meta/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
galaxy_info:
role_name: common-cartridge
author: Schul-Cloud Verbund
description: Role for installing common cartridge import export micro service
company: Schul-Cloud Verbund
license: license (AGPLv3)
min_ansible_version: "2.8"
galaxy_tags: []
dependencies: []
48 changes: 48 additions & 0 deletions ansible/roles/common-cartridge/tasks/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@

- name: Configmap
kubernetes.core.k8s:
kubeconfig: ~/.kube/config
namespace: "{{ NAMESPACE }}"
template: configmap.yml.j2
when: WITH_COMMON_CARTRIDGE is defined and WITH_COMMON_CARTRIDGE|bool
tags:
- configmap

- name: 1Password
kubernetes.core.k8s:
kubeconfig: ~/.kube/config
namespace: "{{ NAMESPACE }}"
template: onepassword.yml.j2
when:
- ONEPASSWORD_OPERATOR is defined and ONEPASSWORD_OPERATOR|bool
- WITH_COMMON_CARTRIDGE is defined and WITH_COMMON_CARTRIDGE|bool
tags:
- 1password

- name: Deployment
kubernetes.core.k8s:
kubeconfig: ~/.kube/config
namespace: "{{ NAMESPACE }}"
template: deployment.yml.j2
when: WITH_COMMON_CARTRIDGE is defined and WITH_COMMON_CARTRIDGE|bool
tags:
- deployment

- name: Service
kubernetes.core.k8s:
kubeconfig: ~/.kube/config
namespace: "{{ NAMESPACE }}"
template: svc.yml.j2
when: WITH_COMMON_CARTRIDGE is defined and WITH_COMMON_CARTRIDGE|bool
tags:
- service

# This is a testing route and will not be deployed
# - name: Ingress
# kubernetes.core.k8s:
# kubeconfig: ~/.kube/config
# namespace: "{{ NAMESPACE }}"
# template: ingress.yml.j2
# when: WITH_COMMON_CARTRIDGE is defined and WITH_COMMON_CARTRIDGE|bool
# tags:
# - ingress
34 changes: 34 additions & 0 deletions ansible/roles/common-cartridge/templates/ingress.yml.j2
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
#jinja2: trim_blocks: "True", lstrip_blocks: "True"
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: {{ NAMESPACE }}-common-cartridge-ingress
namespace: {{ NAMESPACE }}
annotations:
nginx.ingress.kubernetes.io/ssl-redirect: "{{ TLS_ENABLED|default("false") }}"
nginx.ingress.kubernetes.io/proxy-body-size: "{{ INGRESS_MAX_BODY_SIZE|default("2560") }}m"
nginx.org/client-max-body-size: "{{ INGRESS_MAX_BODY_SIZE|default("2560") }}m"
# The following properties added with BC-3606.
# The header size of the request is too big. For e.g. state and the permanent growing jwt.
# Nginx throws away the Location header, resulting in the 502 Bad Gateway.
nginx.ingress.kubernetes.io/client-header-buffer-size: 100k
nginx.ingress.kubernetes.io/http2-max-header-size: 96k
nginx.ingress.kubernetes.io/large-client-header-buffers: 4 100k
nginx.ingress.kubernetes.io/proxy-buffer-size: 96k
{% if CLUSTER_ISSUER is defined %}
cert-manager.io/cluster-issuer: {{ CLUSTER_ISSUER }}
{% endif %}
spec:
ingressClassName: {{ INGRESS_CLASS }}
rules:
{# This is a testing route and will be removed in the future #}
- host: {{ DOMAIN }}
http:
paths:
- path: /api/v3/common-cartridge/
pathType: Prefix
backend:
service:
name: common-cartridge-svc
port:
number: 3350
16 changes: 16 additions & 0 deletions ansible/roles/common-cartridge/templates/svc.yml.j2
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
apiVersion: v1
kind: Service
metadata:
name: common-cartridge-svc
namespace: {{ NAMESPACE }}
labels:
app: common-cartridge
spec:
type: ClusterIP
selector:
app: common-cartridge
ports:
- name: common-cartridge
protocol: TCP
port: 3350
targetPort: 3350
6 changes: 6 additions & 0 deletions ansible/roles/h5p-library-management/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,23 @@
namespace: "{{ NAMESPACE }}"
template: api-h5p-library-management-onepassword.yml.j2
when: ONEPASSWORD_OPERATOR is defined and ONEPASSWORD_OPERATOR|bool and WITH_H5P_LIBRARY_MANAGEMENT is defined and WITH_H5P_LIBRARY_MANAGEMENT|bool == true
tags:
- 1password

- name: H5pLibraryManagement ConfigMap
when: WITH_H5P_LIBRARY_MANAGEMENT is defined and WITH_H5P_LIBRARY_MANAGEMENT|bool == true
kubernetes.core.k8s:
kubeconfig: ~/.kube/config
namespace: "{{ NAMESPACE }}"
template: api-h5p-library-management-configmap.yml.j2
tags:
- configmap

- name: H5pLibraryManagement CronJob
when: WITH_H5P_LIBRARY_MANAGEMENT is defined and WITH_H5P_LIBRARY_MANAGEMENT|bool == true
kubernetes.core.k8s:
kubeconfig: ~/.kube/config
namespace: "{{ NAMESPACE }}"
template: api-h5p-library-management-cronjob.yml.j2
tags:
- cronjob
10 changes: 10 additions & 0 deletions ansible/roles/moin-schule-sync/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,31 +4,41 @@
kubeconfig: ~/.kube/config
namespace: "{{ NAMESPACE }}"
template: moin-schule-sync-onepassword.yml.j2
tags:
- 1password

- name: moin.schule users sync CronJob
when: WITH_MOIN_SCHULE is defined and WITH_MOIN_SCHULE|bool == true
kubernetes.core.k8s:
kubeconfig: ~/.kube/config
namespace: "{{ NAMESPACE }}"
template: moin-schule-users-sync-cronjob.yml.j2
tags:
- cronjob

- name: moin.schule users sync CronJob ConfigMap
when: WITH_MOIN_SCHULE is defined and WITH_MOIN_SCHULE|bool == true
kubernetes.core.k8s:
kubeconfig: ~/.kube/config
namespace: "{{ NAMESPACE }}"
template: moin-schule-users-sync-cronjob-configmap.yml.j2
tags:
- configmap

- name: unsynced moin.schule users deletion queueing CronJob
when: WITH_MOIN_SCHULE is defined and WITH_MOIN_SCHULE|bool == true and WITH_UNSYNCED_ENTITIES_DELETION is defined and WITH_UNSYNCED_ENTITIES_DELETION|bool == true
kubernetes.core.k8s:
kubeconfig: ~/.kube/config
namespace: "{{ NAMESPACE }}"
template: moin-schule-users-deletion-queueing-cronjob.yml.j2
tags:
- cronjob

- name: unsynced moin.schule users deletion queueing CronJob ConfigMap
when: WITH_MOIN_SCHULE is defined and WITH_MOIN_SCHULE|bool == true and WITH_UNSYNCED_ENTITIES_DELETION is defined and WITH_UNSYNCED_ENTITIES_DELETION|bool == true
kubernetes.core.k8s:
kubeconfig: ~/.kube/config
namespace: "{{ NAMESPACE }}"
template: moin-schule-users-deletion-queueing-cronjob-configmap.yml.j2
tags:
- configmap
Loading

0 comments on commit 6e095be

Please sign in to comment.