-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into BC-4453-submission-item-file
- Loading branch information
Showing
69 changed files
with
1,654 additions
and
759 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8 changes: 8 additions & 0 deletions
8
ansible/roles/schulcloud-server-core/templates/preview-generator-configmap.yml.j2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
apiVersion: v1 | ||
kind: ConfigMap | ||
metadata: | ||
name: preview-generator-configmap | ||
namespace: {{ NAMESPACE }} | ||
labels: | ||
app: preview-generator | ||
data: |
46 changes: 46 additions & 0 deletions
46
ansible/roles/schulcloud-server-core/templates/preview-generator-deployment.yml.j2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
name: preview-generator-deployment | ||
namespace: {{ NAMESPACE }} | ||
labels: | ||
app: preview-generator | ||
spec: | ||
replicas: {{ AMQP_FILE_PREVIEW_REPLICAS|default("1", true) }} | ||
strategy: | ||
type: RollingUpdate | ||
rollingUpdate: | ||
maxSurge: 1 | ||
#maxUnavailable: 1 | ||
revisionHistoryLimit: 4 | ||
paused: false | ||
selector: | ||
matchLabels: | ||
app: preview-generator | ||
template: | ||
metadata: | ||
labels: | ||
app: preview-generator | ||
spec: | ||
securityContext: | ||
runAsUser: 1000 | ||
runAsGroup: 1000 | ||
fsGroup: 1000 | ||
runAsNonRoot: true | ||
containers: | ||
- name: preview-generator | ||
image: {{ SCHULCLOUD_SERVER_IMAGE }}:file-preview-{{ SCHULCLOUD_SERVER_IMAGE_TAG }} | ||
imagePullPolicy: IfNotPresent | ||
envFrom: | ||
- configMapRef: | ||
name: preview-generator-configmap | ||
- secretRef: | ||
name: preview-generator-secret | ||
command: ['npm', 'run', 'nest:start:preview-generator-amqp:prod'] | ||
resources: | ||
limits: | ||
cpu: {{ AMQP_FILE_PREVIEW_CPU_LIMITS|default("4000m", true) }} | ||
memory: {{ AMQP_FILE_PREVIEW_MEMORY_LIMITS|default("4000Mi", true) }} | ||
requests: | ||
cpu: {{ AMQP_FILE_PREVIEW_CPU_REQUESTS|default("100m", true) }} | ||
memory: {{ AMQP_FILE_PREVIEW_MEMORY_REQUESTS|default("250Mi", true) }} |
9 changes: 9 additions & 0 deletions
9
ansible/roles/schulcloud-server-core/templates/preview-generator-onepassword.yml.j2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
apiVersion: onepassword.com/v1 | ||
kind: OnePasswordItem | ||
metadata: | ||
name: preview-generator-secret | ||
namespace: {{ NAMESPACE }} | ||
labels: | ||
app: preview-generator | ||
spec: | ||
itemPath: "vaults/{{ ONEPASSWORD_OPERATOR_VAULT }}/items/preview-generator" |
23 changes: 23 additions & 0 deletions
23
ansible/roles/schulcloud-server-core/templates/preview-generator-scaled-object.yml.j2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
--- | ||
apiVersion: keda.sh/v1alpha1 | ||
kind: ScaledObject | ||
metadata: | ||
name: preview-generator-rabbitmq-scaledobject | ||
namespace: {{ NAMESPACE }} | ||
labels: | ||
app: preview-generator | ||
spec: | ||
scaleTargetRef: | ||
name: preview-generator-deployment | ||
idleReplicaCount: {{ AMQP_FILE_PREVIEW_IDLE_REPLICA_COUNT|default("1", true) }} | ||
minReplicaCount: {{ AMQP_FILE_PREVIEW_MIN_REPLICA_COUNT|default("1", true) }} | ||
maxReplicaCount: {{ AMQP_FILE_PREVIEW_MAX_REPLICA_COUNT|default("5", true) }} | ||
triggers: | ||
- type: rabbitmq | ||
metadata: | ||
protocol: amqp | ||
queueName: generate-preview | ||
mode: QueueLength | ||
value: "1" | ||
authenticationRef: | ||
name: rabbitmq-trigger-auth |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
/* istanbul ignore file */ | ||
/* eslint-disable no-console */ | ||
import { PreviewGeneratorAMQPModule } from '@modules/files-storage/files-preview-amqp.module'; | ||
import { NestFactory } from '@nestjs/core'; | ||
import { install as sourceMapInstall } from 'source-map-support'; | ||
|
||
async function bootstrap() { | ||
sourceMapInstall(); | ||
|
||
const nestApp = await NestFactory.createMicroservice(PreviewGeneratorAMQPModule); | ||
await nestApp.init(); | ||
|
||
console.log('#############################################'); | ||
console.log(`### Start Preview Generator AMQP Consumer ###`); | ||
console.log('#############################################'); | ||
} | ||
void bootstrap(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,3 @@ | ||
export * from './error.mapper'; | ||
export * from './copy-files-of-parent-param.builder'; | ||
export * from './files-storage-client.mapper'; | ||
export * from './files-storage-param.builder'; | ||
export * from './copy-files-of-parent-param.builder'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.