Skip to content

Commit

Permalink
Merge branch 'main' into BC-5119-Prevent-creating-new-neXboards
Browse files Browse the repository at this point in the history
  • Loading branch information
Michaellinaresxk authored Nov 17, 2023
2 parents 23027d4 + 7cf730c commit fe8e6cb
Show file tree
Hide file tree
Showing 770 changed files with 19,687 additions and 7,315 deletions.
29 changes: 21 additions & 8 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -65,22 +65,24 @@ module.exports = {
overrides: [
{
files: ['apps/**/*.ts'],
env: {
node: true,
es6: true,
},
parser: '@typescript-eslint/parser',
plugins: ['@typescript-eslint/eslint-plugin'],
parserOptions: {
project: 'apps/server/tsconfig.lint.json',
sourceType: 'module',
},
plugins: ['@typescript-eslint/eslint-plugin', 'import'],
extends: [
'airbnb-typescript/base',
'plugin:@typescript-eslint/recommended',
'plugin:@typescript-eslint/recommended-requiring-type-checking',
'prettier',
'plugin:promise/recommended',
'plugin:import/typescript',
],
parserOptions: {
project: 'apps/server/tsconfig.lint.json',
},
env: {
node: true,
es6: true,
},
rules: {
'import/no-unresolved': 'off', // better handled by ts resolver
'import/no-extraneous-dependencies': 'off', // better handles by ts resolver
Expand All @@ -98,6 +100,17 @@ module.exports = {
allowSingleExtends: true,
},
],
'@typescript-eslint/no-restricted-imports': [
'warn',
{
patterns: [
{
group: ['@infra/*/*', '@modules/*/*', '!*.module'],
message: 'Do not deep import from a module',
},
],
},
],
},
overrides: [
{
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ jobs:
uses: github/codeql-action/upload-sarif@v2
with:
sarif_file: 'trivy-results.sarif'

end-to-end-tests:
needs:
- build_and_push
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,13 @@ metadata:
namespace: {{ NAMESPACE }}
labels:
app: amqp-files
app.kubernetes.io/part-of: schulcloud-verbund
app.kubernetes.io/version: {{ SCHULCLOUD_SERVER_IMAGE_TAG }}
app.kubernetes.io/name: amqp-files
app.kubernetes.io/component: files
app.kubernetes.io/managed-by: ansible
git.branch: {{ SCHULCLOUD_SERVER_BRANCH_NAME }}
git.repo: {{ SCHULCLOUD_SERVER_REPO_NAME }}
spec:
replicas: {{ AMQP_FILE_STORAGE_REPLICAS|default("1", true) }}
strategy:
Expand All @@ -21,6 +28,13 @@ spec:
metadata:
labels:
app: amqp-files
app.kubernetes.io/part-of: schulcloud-verbund
app.kubernetes.io/version: {{ SCHULCLOUD_SERVER_IMAGE_TAG }}
app.kubernetes.io/name: amqp-files
app.kubernetes.io/component: files
app.kubernetes.io/managed-by: ansible
git.branch: {{ SCHULCLOUD_SERVER_BRANCH_NAME }}
git.repo: {{ SCHULCLOUD_SERVER_REPO_NAME }}
spec:
securityContext:
runAsUser: 1000
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,18 @@ metadata:
labels:
app: api
cronjob: delete-s3-files
app.kubernetes.io/part-of: schulcloud-verbund
app.kubernetes.io/version: {{ SCHULCLOUD_SERVER_IMAGE_TAG }}
app.kubernetes.io/name: delete-s3-files
app.kubernetes.io/component: files
app.kubernetes.io/managed-by: ansible
git.branch: {{ SCHULCLOUD_SERVER_BRANCH_NAME }}
git.repo: {{ SCHULCLOUD_SERVER_REPO_NAME }}
name: api-delete-s3-files-cronjob
spec:
concurrencyPolicy: Forbid
schedule: "{{ SERVER_FILE_DELETION_CRONJOB_SCHEDULE|default("@hourly", true) }}"
jobTemplate:
labels:
app: api
cronjob: delete-s3-files
spec:
template:
spec:
Expand All @@ -34,3 +38,14 @@ spec:
cpu: {{ API_CPU_REQUESTS|default("100m", true) }}
memory: {{ API_MEMORY_REQUESTS|default("150Mi", true) }}
restartPolicy: OnFailure
metadata:
labels:
app: api
cronjob: delete-s3-files
app.kubernetes.io/part-of: schulcloud-verbund
app.kubernetes.io/version: {{ SCHULCLOUD_SERVER_IMAGE_TAG }}
app.kubernetes.io/name: delete-s3-files
app.kubernetes.io/component: files
app.kubernetes.io/managed-by: ansible
git.branch: {{ SCHULCLOUD_SERVER_BRANCH_NAME }}
git.repo: {{ SCHULCLOUD_SERVER_REPO_NAME }}
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,13 @@ metadata:
namespace: {{ NAMESPACE }}
labels:
app: api-files
app.kubernetes.io/part-of: schulcloud-verbund
app.kubernetes.io/version: {{ SCHULCLOUD_SERVER_IMAGE_TAG }}
app.kubernetes.io/name: api-files
app.kubernetes.io/component: files
app.kubernetes.io/managed-by: ansible
git.branch: {{ SCHULCLOUD_SERVER_BRANCH_NAME }}
git.repo: {{ SCHULCLOUD_SERVER_REPO_NAME }}
spec:
replicas: {{ API_FILE_STORAGE_REPLICAS|default("1", true) }}
strategy:
Expand All @@ -21,6 +28,13 @@ spec:
metadata:
labels:
app: api-files
app.kubernetes.io/part-of: schulcloud-verbund
app.kubernetes.io/version: {{ SCHULCLOUD_SERVER_IMAGE_TAG }}
app.kubernetes.io/name: api-files
app.kubernetes.io/component: files
app.kubernetes.io/managed-by: ansible
git.branch: {{ SCHULCLOUD_SERVER_BRANCH_NAME }}
git.repo: {{ SCHULCLOUD_SERVER_REPO_NAME }}
spec:
securityContext:
runAsUser: 1000
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,13 @@ metadata:
namespace: {{ NAMESPACE }}
labels:
app: api-fwu
app.kubernetes.io/part-of: schulcloud-verbund
app.kubernetes.io/version: {{ SCHULCLOUD_SERVER_IMAGE_TAG }}
app.kubernetes.io/name: api-fwu
app.kubernetes.io/component: fwu
app.kubernetes.io/managed-by: ansible
git.branch: {{ SCHULCLOUD_SERVER_BRANCH_NAME }}
git.repo: {{ SCHULCLOUD_SERVER_REPO_NAME }}
spec:
replicas: {{ API_FWU_LEARNING_CONTENTS_REPLICAS|default("1", true) }}
strategy:
Expand All @@ -21,6 +28,13 @@ spec:
metadata:
labels:
app: api-fwu
app.kubernetes.io/part-of: schulcloud-verbund
app.kubernetes.io/version: {{ SCHULCLOUD_SERVER_IMAGE_TAG }}
app.kubernetes.io/name: api-fwu
app.kubernetes.io/component: fwu
app.kubernetes.io/managed-by: ansible
git.branch: {{ SCHULCLOUD_SERVER_BRANCH_NAME }}
git.repo: {{ SCHULCLOUD_SERVER_REPO_NAME }}
spec:
securityContext:
runAsUser: 1000
Expand Down
14 changes: 14 additions & 0 deletions ansible/roles/schulcloud-server-core/templates/deployment.yml.j2
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,13 @@ metadata:
namespace: {{ NAMESPACE }}
labels:
app: api
app.kubernetes.io/part-of: schulcloud-verbund
app.kubernetes.io/version: {{ SCHULCLOUD_SERVER_IMAGE_TAG }}
app.kubernetes.io/name: api
app.kubernetes.io/component: server
app.kubernetes.io/managed-by: ansible
git.branch: {{ SCHULCLOUD_SERVER_BRANCH_NAME }}
git.repo: {{ SCHULCLOUD_SERVER_REPO_NAME }}
spec:
replicas: {{ API_REPLICAS|default("1", true) }}
strategy:
Expand All @@ -21,6 +28,13 @@ spec:
metadata:
labels:
app: api
app.kubernetes.io/part-of: schulcloud-verbund
app.kubernetes.io/version: {{ SCHULCLOUD_SERVER_IMAGE_TAG }}
app.kubernetes.io/name: api
app.kubernetes.io/component: server
app.kubernetes.io/managed-by: ansible
git.branch: {{ SCHULCLOUD_SERVER_BRANCH_NAME }}
git.repo: {{ SCHULCLOUD_SERVER_REPO_NAME }}
spec:
securityContext:
runAsUser: 1000
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,13 @@ metadata:
namespace: {{ NAMESPACE }}
labels:
app: preview-generator
app.kubernetes.io/part-of: schulcloud-verbund
app.kubernetes.io/version: {{ SCHULCLOUD_SERVER_IMAGE_TAG }}
app.kubernetes.io/name: preview-generator
app.kubernetes.io/component: files
app.kubernetes.io/managed-by: ansible
git.branch: {{ SCHULCLOUD_SERVER_BRANCH_NAME }}
git.repo: {{ SCHULCLOUD_SERVER_REPO_NAME }}
spec:
replicas: {{ AMQP_FILE_PREVIEW_REPLICAS|default("1", true) }}
strategy:
Expand All @@ -21,6 +28,13 @@ spec:
metadata:
labels:
app: preview-generator
app.kubernetes.io/part-of: schulcloud-verbund
app.kubernetes.io/version: {{ SCHULCLOUD_SERVER_IMAGE_TAG }}
app.kubernetes.io/name: preview-generator
app.kubernetes.io/component: files
app.kubernetes.io/managed-by: ansible
git.branch: {{ SCHULCLOUD_SERVER_BRANCH_NAME }}
git.repo: {{ SCHULCLOUD_SERVER_REPO_NAME }}
spec:
securityContext:
runAsUser: 1000
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,13 @@ metadata:
namespace: {{ NAMESPACE }}
labels:
app: preview-generator
app.kubernetes.io/part-of: schulcloud-verbund
app.kubernetes.io/version: {{ SCHULCLOUD_SERVER_IMAGE_TAG }}
app.kubernetes.io/name: preview-generator
app.kubernetes.io/component: files
app.kubernetes.io/managed-by: ansible
git.branch: {{ SCHULCLOUD_SERVER_BRANCH_NAME }}
git.repo: {{ SCHULCLOUD_SERVER_REPO_NAME }}
spec:
scaleTargetRef:
name: preview-generator-deployment
Expand Down
2 changes: 1 addition & 1 deletion ansible/roles/schulcloud-server-h5p/tasks/main.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
- name: H5pEditorService
- name: H5PEditorProvider
kubernetes.core.k8s:
kubeconfig: ~/.kube/config
namespace: "{{ NAMESPACE }}"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,13 @@ metadata:
namespace: {{ NAMESPACE }}
labels:
app: api-h5p
app.kubernetes.io/part-of: schulcloud-verbund
app.kubernetes.io/version: {{ SCHULCLOUD_SERVER_IMAGE_TAG }}
app.kubernetes.io/name: api-h5p
app.kubernetes.io/component: h5p
app.kubernetes.io/managed-by: ansible
git.branch: {{ SCHULCLOUD_SERVER_BRANCH_NAME }}
git.repo: {{ SCHULCLOUD_SERVER_REPO_NAME }}
spec:
replicas: {{ API_H5P_EDITOR_REPLICAS|default("1", true) }}
strategy:
Expand All @@ -21,6 +28,13 @@ spec:
metadata:
labels:
app: api-h5p
app.kubernetes.io/part-of: schulcloud-verbund
app.kubernetes.io/version: {{ SCHULCLOUD_SERVER_IMAGE_TAG }}
app.kubernetes.io/name: api-h5p
app.kubernetes.io/component: h5p
app.kubernetes.io/managed-by: ansible
git.branch: {{ SCHULCLOUD_SERVER_BRANCH_NAME }}
git.repo: {{ SCHULCLOUD_SERVER_REPO_NAME }}
spec:
securityContext:
runAsUser: 1000
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -390,8 +390,8 @@ data:
}'

# Add Bettermarks' tools configuration as an external tool
# (stored in the 'external_tools' collection) that uses OAuth.
mongosh $DATABASE__URL --eval 'db.external_tools.replaceOne(
# (stored in the 'external-tools' collection) that uses OAuth.
mongosh $DATABASE__URL --eval 'db.external-tools.replaceOne(
{
"name": "bettermarks",
"config_type": "oauth2"
Expand Down Expand Up @@ -486,9 +486,9 @@ data:
echo "POSTed nextcloud to hydra."

# Add Nextcloud' tools configuration as an external tool
# (stored in the 'external_tools' collection) that uses OAuth.
echo "Inserting nextcloud to external_tools..."
mongosh $DATABASE__URL --eval 'db.external_tools.update(
# (stored in the 'external-tools' collection) that uses OAuth.
echo "Inserting nextcloud to external-tools..."
mongosh $DATABASE__URL --eval 'db.external-tools.update(
{
"name": "nextcloud",
"config_type": "oauth2"
Expand All @@ -512,7 +512,7 @@ data:
"upsert": true
}
);'
echo "Inserted nextcloud to external_tools."
echo "Inserted nextcloud to external-tools."

echo "Nextcloud config data init performed successfully."
fi
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,13 @@ metadata:
namespace: {{ NAMESPACE }}
labels:
app: management-deployment
app.kubernetes.io/part-of: schulcloud-verbund
app.kubernetes.io/version: {{ SCHULCLOUD_SERVER_IMAGE_TAG }}
app.kubernetes.io/name: management-deployment
app.kubernetes.io/component: management
app.kubernetes.io/managed-by: ansible
git.branch: {{ SCHULCLOUD_SERVER_BRANCH_NAME }}
git.repo: {{ SCHULCLOUD_SERVER_REPO_NAME }}
spec:
replicas: {{ API_MANAGEMENT_REPLICAS|default("1", true) }}
strategy:
Expand All @@ -20,6 +27,13 @@ spec:
metadata:
labels:
app: management-deployment
app.kubernetes.io/part-of: schulcloud-verbund
app.kubernetes.io/version: {{ SCHULCLOUD_SERVER_IMAGE_TAG }}
app.kubernetes.io/name: management-deployment
app.kubernetes.io/component: management
app.kubernetes.io/managed-by: ansible
git.branch: {{ SCHULCLOUD_SERVER_BRANCH_NAME }}
git.repo: {{ SCHULCLOUD_SERVER_REPO_NAME }}
spec:
securityContext:
runAsUser: 1000
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,13 @@ metadata:
namespace: {{ NAMESPACE }}
labels:
app: api-ldapsync-cronjob
app.kubernetes.io/part-of: schulcloud-verbund
app.kubernetes.io/version: {{ SCHULCLOUD_SERVER_IMAGE_TAG }}
app.kubernetes.io/name: api-ldapsync-cronjob
app.kubernetes.io/component: sync
app.kubernetes.io/managed-by: ansible
git.branch: {{ SCHULCLOUD_SERVER_BRANCH_NAME }}
git.repo: {{ SCHULCLOUD_SERVER_REPO_NAME }}
name: api-ldapsync-full-cronjob
spec:
schedule: "{{ SERVER_LDAP_SYNC_FULL_CRONJOB|default("0 3 * * 3,6", true) }}"
Expand All @@ -30,3 +37,13 @@ spec:
cpu: {{ API_CPU_REQUESTS|default("100m", true) }}
memory: {{ API_MEMORY_REQUESTS|default("150Mi", true) }}
restartPolicy: OnFailure
metadata:
labels:
app: api-ldapsync-cronjob
app.kubernetes.io/part-of: schulcloud-verbund
app.kubernetes.io/version: {{ SCHULCLOUD_SERVER_IMAGE_TAG }}
app.kubernetes.io/name: api-ldapsync-cronjob
app.kubernetes.io/component: sync
app.kubernetes.io/managed-by: ansible
git.branch: {{ SCHULCLOUD_SERVER_BRANCH_NAME }}
git.repo: {{ SCHULCLOUD_SERVER_REPO_NAME }}
Loading

0 comments on commit fe8e6cb

Please sign in to comment.