From 8db813525c73d578bd39e71eedb3e78d851588c1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timo=20Sa=CC=88rkikoski?= Date: Fri, 17 May 2024 08:33:26 +0300 Subject: [PATCH 1/6] Add indexer OpenShift config for Rahti2 --- .../openshift/indexer/rahti2/Dockerfile | 29 +++++ .../rahti2/template-indexer-app-devel.yml | 52 ++++++++ .../template-indexer-app-production.yml | 52 ++++++++ .../rahti2/template-indexer-app-qa.yml | 52 ++++++++ .../rahti2/template-indexer-cronjob-devel.yml | 118 ++++++++++++++++++ .../template-indexer-cronjob-production.yml | 118 ++++++++++++++++++ .../rahti2/template-indexer-cronjob-qa.yml | 118 ++++++++++++++++++ .../template-indexer-manualjob-devel.yml | 113 +++++++++++++++++ .../template-indexer-manualjob-production.yml | 113 +++++++++++++++++ .../rahti2/template-indexer-manualjob-qa.yml | 113 +++++++++++++++++ 10 files changed, 878 insertions(+) create mode 100644 aspnetcore/openshift/indexer/rahti2/Dockerfile create mode 100644 aspnetcore/openshift/indexer/rahti2/template-indexer-app-devel.yml create mode 100644 aspnetcore/openshift/indexer/rahti2/template-indexer-app-production.yml create mode 100644 aspnetcore/openshift/indexer/rahti2/template-indexer-app-qa.yml create mode 100644 aspnetcore/openshift/indexer/rahti2/template-indexer-cronjob-devel.yml create mode 100644 aspnetcore/openshift/indexer/rahti2/template-indexer-cronjob-production.yml create mode 100644 aspnetcore/openshift/indexer/rahti2/template-indexer-cronjob-qa.yml create mode 100644 aspnetcore/openshift/indexer/rahti2/template-indexer-manualjob-devel.yml create mode 100644 aspnetcore/openshift/indexer/rahti2/template-indexer-manualjob-production.yml create mode 100644 aspnetcore/openshift/indexer/rahti2/template-indexer-manualjob-qa.yml diff --git a/aspnetcore/openshift/indexer/rahti2/Dockerfile b/aspnetcore/openshift/indexer/rahti2/Dockerfile new file mode 100644 index 0000000..c09c100 --- /dev/null +++ b/aspnetcore/openshift/indexer/rahti2/Dockerfile @@ -0,0 +1,29 @@ +# Builder +FROM mcr.microsoft.com/dotnet/sdk:6.0 AS build-env +WORKDIR /build + +# Copy csproj and restore as distinct layers +COPY ["packages","./packages"] +COPY ["aspnetcore/nuget.config","./Indexer/nuget.config"] +COPY ["aspnetcore/src/Indexer/Indexer.csproj","./Indexer/Indexer.csproj"] +COPY ["aspnetcore/src/ElasticService/ElasticService.csproj","./ElasticService/ElasticService.csproj"] +COPY ["aspnetcore/src/DatabaseContext/DatabaseContext.csproj","./DatabaseContext/DatabaseContext.csproj"] +COPY ["aspnetcore/src/Repositories/Repositories.csproj","./Repositories/Repositories.csproj"] +COPY ["aspnetcore/src/Service.Models/Service.Models.csproj","./Service.Models/Service.Models.csproj"] +COPY ["aspnetcore/src/Logging/Logging.csproj","./Logging/Logging.csproj"] +RUN dotnet restore "Indexer/Indexer.csproj" + +# Copy everything else and build +COPY ["aspnetcore/src/Indexer/","./Indexer"] +COPY ["aspnetcore/src/ElasticService/","./ElasticService"] +COPY ["aspnetcore/src/DatabaseContext/","./DatabaseContext"] +COPY ["aspnetcore/src/Repositories/","./Repositories"] +COPY ["aspnetcore/src/Service.Models/","./Service.Models"] +COPY ["aspnetcore/src/Logging/","./Logging"] +RUN dotnet publish "Indexer/Indexer.csproj" -c Release -o out + +# Runtime image +FROM mcr.microsoft.com/dotnet/runtime:6.0 +WORKDIR /app +COPY --from=build-env /build/out . +ENTRYPOINT ["dotnet", "CSC.PublicApi.Indexer.dll"] \ No newline at end of file diff --git a/aspnetcore/openshift/indexer/rahti2/template-indexer-app-devel.yml b/aspnetcore/openshift/indexer/rahti2/template-indexer-app-devel.yml new file mode 100644 index 0000000..32e0d03 --- /dev/null +++ b/aspnetcore/openshift/indexer/rahti2/template-indexer-app-devel.yml @@ -0,0 +1,52 @@ +# This file is part of the research.fi api +# +# Copyright 2024 Ministry of Education and Culture, Finland +# +# :author: CSC - IT Center for Science Ltd., Espoo Finland servicedesk@csc.fi +# :license: MIT +apiVersion: template.openshift.io/v1 +kind: Template +metadata: + labels: + app: publicapi-indexer-devel + template: publicapi-indexer-devel + name: publicapi-indexer-devel + annotations: + description: "Public API indexer devel" + iconClass: icon-dotnet +objects: + + # ImageStream + - apiVersion: image.openshift.io/v1 + kind: ImageStream + metadata: + name: publicapi-indexer-devel + labels: + app: publicapi-indexer-devel + spec: + lookupPolicy: + local: true + + # BuildConfig using Docker build strategy + - apiVersion: build.openshift.io/v1 + kind: BuildConfig + metadata: + name: publicapi-indexer-build-devel + labels: + app: publicapi-indexer-devel + spec: + source: + git: + uri: https://github.com/CSCfi/research-fi-publicapi.git + ref: devel + contextDir: . + strategy: + type: Docker + dockerStrategy: + dockerfilePath: aspnetcore/openshift/indexer/rahti2/Dockerfile + output: + to: + kind: ImageStreamTag + name: publicapi-indexer-devel:latest + successfulBuildsHistoryLimit: 2 + failedBuildsHistoryLimit: 2 diff --git a/aspnetcore/openshift/indexer/rahti2/template-indexer-app-production.yml b/aspnetcore/openshift/indexer/rahti2/template-indexer-app-production.yml new file mode 100644 index 0000000..ec59e88 --- /dev/null +++ b/aspnetcore/openshift/indexer/rahti2/template-indexer-app-production.yml @@ -0,0 +1,52 @@ +# This file is part of the research.fi api +# +# Copyright 2024 Ministry of Education and Culture, Finland +# +# :author: CSC - IT Center for Science Ltd., Espoo Finland servicedesk@csc.fi +# :license: MIT +apiVersion: template.openshift.io/v1 +kind: Template +metadata: + labels: + app: publicapi-indexer-production + template: publicapi-indexer-production + name: publicapi-indexer-production + annotations: + description: "Public API indexer production" + iconClass: icon-dotnet +objects: + + # ImageStream + - apiVersion: image.openshift.io/v1 + kind: ImageStream + metadata: + name: publicapi-indexer-production + labels: + app: publicapi-indexer-production + spec: + lookupPolicy: + local: true + + # BuildConfig using Docker build strategy + - apiVersion: build.openshift.io/v1 + kind: BuildConfig + metadata: + name: publicapi-indexer-build-production + labels: + app: publicapi-indexer-production + spec: + source: + git: + uri: https://github.com/CSCfi/research-fi-publicapi.git + ref: main + contextDir: . + strategy: + type: Docker + dockerStrategy: + dockerfilePath: aspnetcore/openshift/indexer/rahti2/Dockerfile + output: + to: + kind: ImageStreamTag + name: publicapi-indexer-production:latest + successfulBuildsHistoryLimit: 2 + failedBuildsHistoryLimit: 2 diff --git a/aspnetcore/openshift/indexer/rahti2/template-indexer-app-qa.yml b/aspnetcore/openshift/indexer/rahti2/template-indexer-app-qa.yml new file mode 100644 index 0000000..61d43b3 --- /dev/null +++ b/aspnetcore/openshift/indexer/rahti2/template-indexer-app-qa.yml @@ -0,0 +1,52 @@ +# This file is part of the research.fi api +# +# Copyright 2024 Ministry of Education and Culture, Finland +# +# :author: CSC - IT Center for Science Ltd., Espoo Finland servicedesk@csc.fi +# :license: MIT +apiVersion: template.openshift.io/v1 +kind: Template +metadata: + labels: + app: publicapi-indexer-qa + template: publicapi-indexer-qa + name: publicapi-indexer-qa + annotations: + description: "Public API indexer QA" + iconClass: icon-dotnet +objects: + + # ImageStream + - apiVersion: image.openshift.io/v1 + kind: ImageStream + metadata: + name: publicapi-indexer-qa + labels: + app: publicapi-indexer-qa + spec: + lookupPolicy: + local: true + + # BuildConfig using Docker build strategy + - apiVersion: build.openshift.io/v1 + kind: BuildConfig + metadata: + name: publicapi-indexer-build-qa + labels: + app: publicapi-indexer-qa + spec: + source: + git: + uri: https://github.com/CSCfi/research-fi-publicapi.git + ref: qa + contextDir: . + strategy: + type: Docker + dockerStrategy: + dockerfilePath: aspnetcore/openshift/indexer/rahti2/Dockerfile + output: + to: + kind: ImageStreamTag + name: publicapi-indexer-qa:latest + successfulBuildsHistoryLimit: 2 + failedBuildsHistoryLimit: 2 diff --git a/aspnetcore/openshift/indexer/rahti2/template-indexer-cronjob-devel.yml b/aspnetcore/openshift/indexer/rahti2/template-indexer-cronjob-devel.yml new file mode 100644 index 0000000..5fa9d9e --- /dev/null +++ b/aspnetcore/openshift/indexer/rahti2/template-indexer-cronjob-devel.yml @@ -0,0 +1,118 @@ +# This file is part of the research.fi api +# +# Copyright 2024 Ministry of Education and Culture, Finland +# +# :author: CSC - IT Center for Science Ltd., Espoo Finland servicedesk@csc.fi +# :license: MIT +apiVersion: v1 +kind: Template +metadata: + labels: + app: publicapi-indexer-devel + template: publicapi-indexer-cronjob-devel + name: publicapi-indexer-cronjob-devel +objects: + # Recurring CronJob (devel) + # Indexes db entities to ElasticSearch. + - apiVersion: batch/v1 + kind: CronJob + metadata: + name: publicapi-indexer-cronjob-devel + spec: + schedule: "0 1 * * *" # every day at 01:00 UTC + concurrencyPolicy: "Forbid" + startingDeadlineSeconds: 300 # Can start 5 minutes after the schedule + suspend: false + successfulJobsHistoryLimit: 2 + failedJobsHistoryLimit: 2 + jobTemplate: + spec: + activeDeadlineSeconds: 2400 # Can run for 40 minutes + template: + spec: + restartPolicy: Never + containers: + - name: publicapi-indexer-container-devel + image: publicapi-indexer-devel + imagePullPolicy: Always + env: + - name: "ELASTICSEARCH__PASSWORD" + valueFrom: + secretKeyRef: + name: publicapi-api-secret-devel + key: "ELASTICSEARCH__PASSWORD" + - name: "dbconnectionstring" + valueFrom: + secretKeyRef: + name: publicapi-api-secret-devel + key: dbconnectionstring + - name: "ELASTICSEARCH__URL" + valueFrom: + configMapKeyRef: + name: publicapi-api-config-devel + key: "ELASTICSEARCH__URL" + - name: "ELASTICSEARCH__USERNAME" + valueFrom: + configMapKeyRef: + name: publicapi-api-config-devel + key: "ELASTICSEARCH__USERNAME" + - name: "IndexNames__CSC.PublicApi.Service.Models.FundingCall.FundingCall" + valueFrom: + configMapKeyRef: + name: publicapi-api-config-devel + key: "IndexNames__CSC.PublicApi.Service.Models.FundingCall.FundingCall" + - name: "IndexNames__CSC.PublicApi.Service.Models.FundingDecision.FundingDecision" + valueFrom: + configMapKeyRef: + name: publicapi-api-config-devel + key: "IndexNames__CSC.PublicApi.Service.Models.FundingDecision.FundingDecision" + - name: "IndexNames__CSC.PublicApi.Service.Models.Infrastructure.Infrastructure" + valueFrom: + configMapKeyRef: + name: publicapi-api-config-devel + key: "IndexNames__CSC.PublicApi.Service.Models.Infrastructure.Infrastructure" + - name: "IndexNames__CSC.PublicApi.Service.Models.Organization.Organization" + valueFrom: + configMapKeyRef: + name: publicapi-api-config-devel + key: "IndexNames__CSC.PublicApi.Service.Models.Organization.Organization" + - name: "IndexNames__CSC.PublicApi.Service.Models.ResearchDataset.ResearchDataset" + valueFrom: + configMapKeyRef: + name: publicapi-api-config-devel + key: "IndexNames__CSC.PublicApi.Service.Models.ResearchDataset.ResearchDataset" + - name: "IndexNames__CSC.PublicApi.Service.Models.Publication.Publication" + valueFrom: + configMapKeyRef: + name: publicapi-api-config-devel + key: "IndexNames__CSC.PublicApi.Service.Models.Publication.Publication" + - name: "Serilog__MinimumLevel__Default" + valueFrom: + configMapKeyRef: + name: publicapi-api-config-devel + key: "Serilog__MinimumLevel__Default" + - name: "Serilog__WriteTo__HttpSink__Args__requestUri" + valueFrom: + configMapKeyRef: + name: publicapi-api-config-devel + key: "Serilog__WriteTo__HttpSink__Args__requestUri" + - name: "Serilog__Properties__WoodLogProjectNumber" + valueFrom: + configMapKeyRef: + name: publicapi-api-config-devel + key: "Serilog__Properties__WoodLogProjectNumber" + - name: "Serilog__Properties__WoodLogRetentionMonthsIndexer" + valueFrom: + configMapKeyRef: + name: publicapi-api-config-devel + key: "Serilog__Properties__WoodLogRetentionMonthsIndexer" + - name: "Serilog__Properties__WoodLogUsecaseIndexer" + valueFrom: + configMapKeyRef: + name: publicapi-api-config-devel + key: "Serilog__Properties__WoodLogUsecaseIndexer" + - name: "QueryTimeout" + valueFrom: + configMapKeyRef: + name: publicapi-api-config-devel + key: "QueryTimeout" diff --git a/aspnetcore/openshift/indexer/rahti2/template-indexer-cronjob-production.yml b/aspnetcore/openshift/indexer/rahti2/template-indexer-cronjob-production.yml new file mode 100644 index 0000000..e6677a9 --- /dev/null +++ b/aspnetcore/openshift/indexer/rahti2/template-indexer-cronjob-production.yml @@ -0,0 +1,118 @@ +# This file is part of the research.fi api +# +# Copyright 2024 Ministry of Education and Culture, Finland +# +# :author: CSC - IT Center for Science Ltd., Espoo Finland servicedesk@csc.fi +# :license: MIT +apiVersion: v1 +kind: Template +metadata: + labels: + app: publicapi-indexer-production + template: publicapi-indexer-cronjob-production + name: publicapi-indexer-cronjob-production +objects: + # Recurring CronJob (production) + # Indexes db entities to ElasticSearch. + - apiVersion: batch/v1 + kind: CronJob + metadata: + name: publicapi-indexer-cronjob-production + spec: + schedule: "40 19 * * *" # every day at 19:40 UTC + concurrencyPolicy: "Forbid" + startingDeadlineSeconds: 300 # Can start 5 minutes after the schedule + suspend: false + successfulJobsHistoryLimit: 2 + failedJobsHistoryLimit: 2 + jobTemplate: + spec: + activeDeadlineSeconds: 2400 # Can run for 40 minutes + template: + spec: + restartPolicy: Never + containers: + - name: publicapi-indexer-container-production + image: publicapi-indexer-production + imagePullPolicy: Always + env: + - name: "ELASTICSEARCH__PASSWORD" + valueFrom: + secretKeyRef: + name: publicapi-api-secret-production + key: "ELASTICSEARCH__PASSWORD" + - name: "dbconnectionstring" + valueFrom: + secretKeyRef: + name: publicapi-api-secret-production + key: dbconnectionstring + - name: "ELASTICSEARCH__URL" + valueFrom: + configMapKeyRef: + name: publicapi-api-config-production + key: "ELASTICSEARCH__URL" + - name: "ELASTICSEARCH__USERNAME" + valueFrom: + configMapKeyRef: + name: publicapi-api-config-production + key: "ELASTICSEARCH__USERNAME" + - name: "IndexNames__CSC.PublicApi.Service.Models.FundingCall.FundingCall" + valueFrom: + configMapKeyRef: + name: publicapi-api-config-production + key: "IndexNames__CSC.PublicApi.Service.Models.FundingCall.FundingCall" + - name: "IndexNames__CSC.PublicApi.Service.Models.FundingDecision.FundingDecision" + valueFrom: + configMapKeyRef: + name: publicapi-api-config-production + key: "IndexNames__CSC.PublicApi.Service.Models.FundingDecision.FundingDecision" + - name: "IndexNames__CSC.PublicApi.Service.Models.Infrastructure.Infrastructure" + valueFrom: + configMapKeyRef: + name: publicapi-api-config-production + key: "IndexNames__CSC.PublicApi.Service.Models.Infrastructure.Infrastructure" + - name: "IndexNames__CSC.PublicApi.Service.Models.Organization.Organization" + valueFrom: + configMapKeyRef: + name: publicapi-api-config-production + key: "IndexNames__CSC.PublicApi.Service.Models.Organization.Organization" + - name: "IndexNames__CSC.PublicApi.Service.Models.ResearchDataset.ResearchDataset" + valueFrom: + configMapKeyRef: + name: publicapi-api-config-production + key: "IndexNames__CSC.PublicApi.Service.Models.ResearchDataset.ResearchDataset" + - name: "IndexNames__CSC.PublicApi.Service.Models.Publication.Publication" + valueFrom: + configMapKeyRef: + name: publicapi-api-config-production + key: "IndexNames__CSC.PublicApi.Service.Models.Publication.Publication" + - name: "Serilog__MinimumLevel__Default" + valueFrom: + configMapKeyRef: + name: publicapi-api-config-production + key: "Serilog__MinimumLevel__Default" + - name: "Serilog__WriteTo__HttpSink__Args__requestUri" + valueFrom: + configMapKeyRef: + name: publicapi-api-config-production + key: "Serilog__WriteTo__HttpSink__Args__requestUri" + - name: "Serilog__Properties__WoodLogProjectNumber" + valueFrom: + configMapKeyRef: + name: publicapi-api-config-production + key: "Serilog__Properties__WoodLogProjectNumber" + - name: "Serilog__Properties__WoodLogRetentionMonthsIndexer" + valueFrom: + configMapKeyRef: + name: publicapi-api-config-production + key: "Serilog__Properties__WoodLogRetentionMonthsIndexer" + - name: "Serilog__Properties__WoodLogUsecaseIndexer" + valueFrom: + configMapKeyRef: + name: publicapi-api-config-production + key: "Serilog__Properties__WoodLogUsecaseIndexer" + - name: "QueryTimeout" + valueFrom: + configMapKeyRef: + name: publicapi-api-config-production + key: "QueryTimeout" diff --git a/aspnetcore/openshift/indexer/rahti2/template-indexer-cronjob-qa.yml b/aspnetcore/openshift/indexer/rahti2/template-indexer-cronjob-qa.yml new file mode 100644 index 0000000..4b12b91 --- /dev/null +++ b/aspnetcore/openshift/indexer/rahti2/template-indexer-cronjob-qa.yml @@ -0,0 +1,118 @@ +# This file is part of the research.fi api +# +# Copyright 2024 Ministry of Education and Culture, Finland +# +# :author: CSC - IT Center for Science Ltd., Espoo Finland servicedesk@csc.fi +# :license: MIT +apiVersion: v1 +kind: Template +metadata: + labels: + app: publicapi-indexer-qa + template: publicapi-indexer-cronjob-qa + name: publicapi-indexer-cronjob-qa +objects: + # Recurring CronJob (qa) + # Indexes db entities to ElasticSearch. + - apiVersion: batch/v1 + kind: CronJob + metadata: + name: publicapi-indexer-cronjob-qa + spec: + schedule: "0 2 * * *" # every day at 02:00 UTC + concurrencyPolicy: "Forbid" + startingDeadlineSeconds: 300 # Can start 5 minutes after the schedule + suspend: false + successfulJobsHistoryLimit: 2 + failedJobsHistoryLimit: 2 + jobTemplate: + spec: + activeDeadlineSeconds: 2400 # Can run for 40 minutes + template: + spec: + restartPolicy: Never + containers: + - name: publicapi-indexer-container-qa + image: publicapi-indexer-qa + imagePullPolicy: Always + env: + - name: "ELASTICSEARCH__PASSWORD" + valueFrom: + secretKeyRef: + name: publicapi-api-secret-qa + key: "ELASTICSEARCH__PASSWORD" + - name: "dbconnectionstring" + valueFrom: + secretKeyRef: + name: publicapi-api-secret-qa + key: dbconnectionstring + - name: "ELASTICSEARCH__URL" + valueFrom: + configMapKeyRef: + name: publicapi-api-config-qa + key: "ELASTICSEARCH__URL" + - name: "ELASTICSEARCH__USERNAME" + valueFrom: + configMapKeyRef: + name: publicapi-api-config-qa + key: "ELASTICSEARCH__USERNAME" + - name: "IndexNames__CSC.PublicApi.Service.Models.FundingCall.FundingCall" + valueFrom: + configMapKeyRef: + name: publicapi-api-config-qa + key: "IndexNames__CSC.PublicApi.Service.Models.FundingCall.FundingCall" + - name: "IndexNames__CSC.PublicApi.Service.Models.FundingDecision.FundingDecision" + valueFrom: + configMapKeyRef: + name: publicapi-api-config-qa + key: "IndexNames__CSC.PublicApi.Service.Models.FundingDecision.FundingDecision" + - name: "IndexNames__CSC.PublicApi.Service.Models.Infrastructure.Infrastructure" + valueFrom: + configMapKeyRef: + name: publicapi-api-config-qa + key: "IndexNames__CSC.PublicApi.Service.Models.Infrastructure.Infrastructure" + - name: "IndexNames__CSC.PublicApi.Service.Models.Organization.Organization" + valueFrom: + configMapKeyRef: + name: publicapi-api-config-qa + key: "IndexNames__CSC.PublicApi.Service.Models.Organization.Organization" + - name: "IndexNames__CSC.PublicApi.Service.Models.ResearchDataset.ResearchDataset" + valueFrom: + configMapKeyRef: + name: publicapi-api-config-qa + key: "IndexNames__CSC.PublicApi.Service.Models.ResearchDataset.ResearchDataset" + - name: "IndexNames__CSC.PublicApi.Service.Models.Publication.Publication" + valueFrom: + configMapKeyRef: + name: publicapi-api-config-qa + key: "IndexNames__CSC.PublicApi.Service.Models.Publication.Publication" + - name: "Serilog__MinimumLevel__Default" + valueFrom: + configMapKeyRef: + name: publicapi-api-config-qa + key: "Serilog__MinimumLevel__Default" + - name: "Serilog__WriteTo__HttpSink__Args__requestUri" + valueFrom: + configMapKeyRef: + name: publicapi-api-config-qa + key: "Serilog__WriteTo__HttpSink__Args__requestUri" + - name: "Serilog__Properties__WoodLogProjectNumber" + valueFrom: + configMapKeyRef: + name: publicapi-api-config-qa + key: "Serilog__Properties__WoodLogProjectNumber" + - name: "Serilog__Properties__WoodLogRetentionMonthsIndexer" + valueFrom: + configMapKeyRef: + name: publicapi-api-config-qa + key: "Serilog__Properties__WoodLogRetentionMonthsIndexer" + - name: "Serilog__Properties__WoodLogUsecaseIndexer" + valueFrom: + configMapKeyRef: + name: publicapi-api-config-qa + key: "Serilog__Properties__WoodLogUsecaseIndexer" + - name: "QueryTimeout" + valueFrom: + configMapKeyRef: + name: publicapi-api-config-qa + key: "QueryTimeout" diff --git a/aspnetcore/openshift/indexer/rahti2/template-indexer-manualjob-devel.yml b/aspnetcore/openshift/indexer/rahti2/template-indexer-manualjob-devel.yml new file mode 100644 index 0000000..b21a05e --- /dev/null +++ b/aspnetcore/openshift/indexer/rahti2/template-indexer-manualjob-devel.yml @@ -0,0 +1,113 @@ +# This file is part of the research.fi api +# +# Copyright 2024 Ministry of Education and Culture, Finland +# +# :author: CSC - IT Center for Science Ltd., Espoo Finland servicedesk@csc.fi +# :license: MIT +apiVersion: v1 +kind: Template +metadata: + labels: + app: publicapi-indexer-devel + template: publicapi-indexer-devel + name: publicapi-indexer-devel +objects: + # Single-run Job (devel) + # Use this job to index entities to ElasticSearch manually when needed. + - apiVersion: batch/v1 + kind: Job + metadata: + name: publicapi-indexer-job-devel + labels: + app: publicapi-indexer-devel + annotations: + description: ElasticSearch indexer for Public devel branch + spec: + template: + spec: + restartPolicy: Never + containers: + - name: publicapi-indexer-container-devel + image: publicapi-indexer-devel + imagePullPolicy: Always + env: + - name: "ELASTICSEARCH__PASSWORD" + valueFrom: + secretKeyRef: + name: publicapi-api-secret-devel + key: "ELASTICSEARCH__PASSWORD" + - name: "dbconnectionstring" + valueFrom: + secretKeyRef: + name: publicapi-api-secret-devel + key: dbconnectionstring + - name: "ELASTICSEARCH__URL" + valueFrom: + configMapKeyRef: + name: publicapi-api-config-devel + key: "ELASTICSEARCH__URL" + - name: "ELASTICSEARCH__USERNAME" + valueFrom: + configMapKeyRef: + name: publicapi-api-config-devel + key: "ELASTICSEARCH__USERNAME" + - name: "IndexNames__CSC.PublicApi.Service.Models.FundingCall.FundingCall" + valueFrom: + configMapKeyRef: + name: publicapi-api-config-devel + key: "IndexNames__CSC.PublicApi.Service.Models.FundingCall.FundingCall" + - name: "IndexNames__CSC.PublicApi.Service.Models.FundingDecision.FundingDecision" + valueFrom: + configMapKeyRef: + name: publicapi-api-config-devel + key: "IndexNames__CSC.PublicApi.Service.Models.FundingDecision.FundingDecision" + - name: "IndexNames__CSC.PublicApi.Service.Models.Infrastructure.Infrastructure" + valueFrom: + configMapKeyRef: + name: publicapi-api-config-devel + key: "IndexNames__CSC.PublicApi.Service.Models.Infrastructure.Infrastructure" + - name: "IndexNames__CSC.PublicApi.Service.Models.Organization.Organization" + valueFrom: + configMapKeyRef: + name: publicapi-api-config-devel + key: "IndexNames__CSC.PublicApi.Service.Models.Organization.Organization" + - name: "IndexNames__CSC.PublicApi.Service.Models.ResearchDataset.ResearchDataset" + valueFrom: + configMapKeyRef: + name: publicapi-api-config-devel + key: "IndexNames__CSC.PublicApi.Service.Models.ResearchDataset.ResearchDataset" + - name: "IndexNames__CSC.PublicApi.Service.Models.Publication.Publication" + valueFrom: + configMapKeyRef: + name: publicapi-api-config-devel + key: "IndexNames__CSC.PublicApi.Service.Models.Publication.Publication" + - name: "Serilog__MinimumLevel__Default" + valueFrom: + configMapKeyRef: + name: publicapi-api-config-devel + key: "Serilog__MinimumLevel__Default" + - name: "Serilog__WriteTo__HttpSink__Args__requestUri" + valueFrom: + configMapKeyRef: + name: publicapi-api-config-devel + key: "Serilog__WriteTo__HttpSink__Args__requestUri" + - name: "Serilog__Properties__WoodLogProjectNumber" + valueFrom: + configMapKeyRef: + name: publicapi-api-config-devel + key: "Serilog__Properties__WoodLogProjectNumber" + - name: "Serilog__Properties__WoodLogRetentionMonthsIndexer" + valueFrom: + configMapKeyRef: + name: publicapi-api-config-devel + key: "Serilog__Properties__WoodLogRetentionMonthsIndexer" + - name: "Serilog__Properties__WoodLogUsecaseIndexer" + valueFrom: + configMapKeyRef: + name: publicapi-api-config-devel + key: "Serilog__Properties__WoodLogUsecaseIndexer" + - name: "QueryTimeout" + valueFrom: + configMapKeyRef: + name: publicapi-api-config-devel + key: "QueryTimeout" diff --git a/aspnetcore/openshift/indexer/rahti2/template-indexer-manualjob-production.yml b/aspnetcore/openshift/indexer/rahti2/template-indexer-manualjob-production.yml new file mode 100644 index 0000000..86dd391 --- /dev/null +++ b/aspnetcore/openshift/indexer/rahti2/template-indexer-manualjob-production.yml @@ -0,0 +1,113 @@ +# This file is part of the research.fi api +# +# Copyright 2023 Ministry of Education and Culture, Finland +# +# :author: CSC - IT Center for Science Ltd., Espoo Finland servicedesk@csc.fi +# :license: MIT +apiVersion: v1 +kind: Template +metadata: + labels: + app: publicapi-indexer-production + template: publicapi-indexer-production + name: publicapi-indexer-production +objects: + # Single-run Job (production) + # Use this job to index entities to ElasticSearch manually when needed. + - apiVersion: batch/v1 + kind: Job + metadata: + name: publicapi-indexer-job-production + labels: + app: publicapi-indexer-production + annotations: + description: ElasticSearch indexer for Public production branch + spec: + template: + spec: + restartPolicy: Never + containers: + - name: publicapi-indexer-container-production + image: publicapi-indexer-production + imagePullPolicy: Always + env: + - name: "ELASTICSEARCH__PASSWORD" + valueFrom: + secretKeyRef: + name: publicapi-api-secret-production + key: "ELASTICSEARCH__PASSWORD" + - name: "dbconnectionstring" + valueFrom: + secretKeyRef: + name: publicapi-api-secret-production + key: dbconnectionstring + - name: "ELASTICSEARCH__URL" + valueFrom: + configMapKeyRef: + name: publicapi-api-config-production + key: "ELASTICSEARCH__URL" + - name: "ELASTICSEARCH__USERNAME" + valueFrom: + configMapKeyRef: + name: publicapi-api-config-production + key: "ELASTICSEARCH__USERNAME" + - name: "IndexNames__CSC.PublicApi.Service.Models.FundingCall.FundingCall" + valueFrom: + configMapKeyRef: + name: publicapi-api-config-production + key: "IndexNames__CSC.PublicApi.Service.Models.FundingCall.FundingCall" + - name: "IndexNames__CSC.PublicApi.Service.Models.FundingDecision.FundingDecision" + valueFrom: + configMapKeyRef: + name: publicapi-api-config-production + key: "IndexNames__CSC.PublicApi.Service.Models.FundingDecision.FundingDecision" + - name: "IndexNames__CSC.PublicApi.Service.Models.Infrastructure.Infrastructure" + valueFrom: + configMapKeyRef: + name: publicapi-api-config-production + key: "IndexNames__CSC.PublicApi.Service.Models.Infrastructure.Infrastructure" + - name: "IndexNames__CSC.PublicApi.Service.Models.Organization.Organization" + valueFrom: + configMapKeyRef: + name: publicapi-api-config-production + key: "IndexNames__CSC.PublicApi.Service.Models.Organization.Organization" + - name: "IndexNames__CSC.PublicApi.Service.Models.ResearchDataset.ResearchDataset" + valueFrom: + configMapKeyRef: + name: publicapi-api-config-production + key: "IndexNames__CSC.PublicApi.Service.Models.ResearchDataset.ResearchDataset" + - name: "IndexNames__CSC.PublicApi.Service.Models.Publication.Publication" + valueFrom: + configMapKeyRef: + name: publicapi-api-config-production + key: "IndexNames__CSC.PublicApi.Service.Models.Publication.Publication" + - name: "Serilog__MinimumLevel__Default" + valueFrom: + configMapKeyRef: + name: publicapi-api-config-production + key: "Serilog__MinimumLevel__Default" + - name: "Serilog__WriteTo__HttpSink__Args__requestUri" + valueFrom: + configMapKeyRef: + name: publicapi-api-config-production + key: "Serilog__WriteTo__HttpSink__Args__requestUri" + - name: "Serilog__Properties__WoodLogProjectNumber" + valueFrom: + configMapKeyRef: + name: publicapi-api-config-production + key: "Serilog__Properties__WoodLogProjectNumber" + - name: "Serilog__Properties__WoodLogRetentionMonthsIndexer" + valueFrom: + configMapKeyRef: + name: publicapi-api-config-production + key: "Serilog__Properties__WoodLogRetentionMonthsIndexer" + - name: "Serilog__Properties__WoodLogUsecaseIndexer" + valueFrom: + configMapKeyRef: + name: publicapi-api-config-production + key: "Serilog__Properties__WoodLogUsecaseIndexer" + - name: "QueryTimeout" + valueFrom: + configMapKeyRef: + name: publicapi-api-config-production + key: "QueryTimeout" diff --git a/aspnetcore/openshift/indexer/rahti2/template-indexer-manualjob-qa.yml b/aspnetcore/openshift/indexer/rahti2/template-indexer-manualjob-qa.yml new file mode 100644 index 0000000..b5f242b --- /dev/null +++ b/aspnetcore/openshift/indexer/rahti2/template-indexer-manualjob-qa.yml @@ -0,0 +1,113 @@ +# This file is part of the research.fi api +# +# Copyright 2023 Ministry of Education and Culture, Finland +# +# :author: CSC - IT Center for Science Ltd., Espoo Finland servicedesk@csc.fi +# :license: MIT +apiVersion: v1 +kind: Template +metadata: + labels: + app: publicapi-indexer-qa + template: publicapi-indexer-qa + name: publicapi-indexer-qa +objects: + # Single-run Job (qa) + # Use this job to index entities to ElasticSearch manually when needed. + - apiVersion: batch/v1 + kind: Job + metadata: + name: publicapi-indexer-job-qa + labels: + app: publicapi-indexer-qa + annotations: + description: ElasticSearch indexer for Public qa branch + spec: + template: + spec: + restartPolicy: Never + containers: + - name: publicapi-indexer-container-qa + image: publicapi-indexer-qa + imagePullPolicy: Always + env: + - name: "ELASTICSEARCH__PASSWORD" + valueFrom: + secretKeyRef: + name: publicapi-api-secret-qa + key: "ELASTICSEARCH__PASSWORD" + - name: "dbconnectionstring" + valueFrom: + secretKeyRef: + name: publicapi-api-secret-qa + key: dbconnectionstring + - name: "ELASTICSEARCH__URL" + valueFrom: + configMapKeyRef: + name: publicapi-api-config-qa + key: "ELASTICSEARCH__URL" + - name: "ELASTICSEARCH__USERNAME" + valueFrom: + configMapKeyRef: + name: publicapi-api-config-qa + key: "ELASTICSEARCH__USERNAME" + - name: "IndexNames__CSC.PublicApi.Service.Models.FundingCall.FundingCall" + valueFrom: + configMapKeyRef: + name: publicapi-api-config-qa + key: "IndexNames__CSC.PublicApi.Service.Models.FundingCall.FundingCall" + - name: "IndexNames__CSC.PublicApi.Service.Models.FundingDecision.FundingDecision" + valueFrom: + configMapKeyRef: + name: publicapi-api-config-qa + key: "IndexNames__CSC.PublicApi.Service.Models.FundingDecision.FundingDecision" + - name: "IndexNames__CSC.PublicApi.Service.Models.Infrastructure.Infrastructure" + valueFrom: + configMapKeyRef: + name: publicapi-api-config-qa + key: "IndexNames__CSC.PublicApi.Service.Models.Infrastructure.Infrastructure" + - name: "IndexNames__CSC.PublicApi.Service.Models.Organization.Organization" + valueFrom: + configMapKeyRef: + name: publicapi-api-config-qa + key: "IndexNames__CSC.PublicApi.Service.Models.Organization.Organization" + - name: "IndexNames__CSC.PublicApi.Service.Models.Publication.Publication" + valueFrom: + configMapKeyRef: + name: publicapi-api-config-qa + key: "IndexNames__CSC.PublicApi.Service.Models.Publication.Publication" + - name: "IndexNames__CSC.PublicApi.Service.Models.ResearchDataset.ResearchDataset" + valueFrom: + configMapKeyRef: + name: publicapi-api-config-qa + key: "IndexNames__CSC.PublicApi.Service.Models.ResearchDataset.ResearchDataset" + - name: "Serilog__MinimumLevel__Default" + valueFrom: + configMapKeyRef: + name: publicapi-api-config-qa + key: "Serilog__MinimumLevel__Default" + - name: "Serilog__WriteTo__HttpSink__Args__requestUri" + valueFrom: + configMapKeyRef: + name: publicapi-api-config-qa + key: "Serilog__WriteTo__HttpSink__Args__requestUri" + - name: "Serilog__Properties__WoodLogProjectNumber" + valueFrom: + configMapKeyRef: + name: publicapi-api-config-qa + key: "Serilog__Properties__WoodLogProjectNumber" + - name: "Serilog__Properties__WoodLogRetentionMonthsIndexer" + valueFrom: + configMapKeyRef: + name: publicapi-api-config-qa + key: "Serilog__Properties__WoodLogRetentionMonthsIndexer" + - name: "Serilog__Properties__WoodLogUsecaseIndexer" + valueFrom: + configMapKeyRef: + name: publicapi-api-config-qa + key: "Serilog__Properties__WoodLogUsecaseIndexer" + - name: "QueryTimeout" + valueFrom: + configMapKeyRef: + name: publicapi-api-config-qa + key: "QueryTimeout" From 83dea06a457c676356902f245537f8b3b6159f4b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timo=20Sa=CC=88rkikoski?= Date: Fri, 17 May 2024 08:40:31 +0300 Subject: [PATCH 2/6] Rahti2 cronjob resources in devel --- .../indexer/rahti2/template-indexer-cronjob-devel.yml | 7 +++++++ .../openshift/indexer/template-indexer-manualjob-devel.yml | 7 +++++++ 2 files changed, 14 insertions(+) diff --git a/aspnetcore/openshift/indexer/rahti2/template-indexer-cronjob-devel.yml b/aspnetcore/openshift/indexer/rahti2/template-indexer-cronjob-devel.yml index 5fa9d9e..ee92478 100644 --- a/aspnetcore/openshift/indexer/rahti2/template-indexer-cronjob-devel.yml +++ b/aspnetcore/openshift/indexer/rahti2/template-indexer-cronjob-devel.yml @@ -35,6 +35,13 @@ objects: - name: publicapi-indexer-container-devel image: publicapi-indexer-devel imagePullPolicy: Always + resources: + limits: + cpu: 1 + memory: 4Gi + requests: + cpu: 100m + memory: 2Gi env: - name: "ELASTICSEARCH__PASSWORD" valueFrom: diff --git a/aspnetcore/openshift/indexer/template-indexer-manualjob-devel.yml b/aspnetcore/openshift/indexer/template-indexer-manualjob-devel.yml index 70b80f8..8be0f19 100644 --- a/aspnetcore/openshift/indexer/template-indexer-manualjob-devel.yml +++ b/aspnetcore/openshift/indexer/template-indexer-manualjob-devel.yml @@ -29,6 +29,13 @@ objects: - name: publicapi-indexer-container-devel image: publicapi-indexer-devel imagePullPolicy: Always + resources: + limits: + cpu: 1 + memory: 4Gi + requests: + cpu: 100m + memory: 2Gi env: - name: "ELASTICSEARCH__PASSWORD" valueFrom: From 5200e38fd55a3e85385382e3424ea6133f95e242 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timo=20Sa=CC=88rkikoski?= Date: Fri, 17 May 2024 08:48:54 +0300 Subject: [PATCH 3/6] Fix error in OpenShift template apiVersion --- .../openshift/indexer/rahti2/template-indexer-cronjob-devel.yml | 2 +- .../indexer/rahti2/template-indexer-cronjob-production.yml | 2 +- .../openshift/indexer/rahti2/template-indexer-cronjob-qa.yml | 2 +- .../indexer/rahti2/template-indexer-manualjob-devel.yml | 2 +- .../indexer/rahti2/template-indexer-manualjob-production.yml | 2 +- .../openshift/indexer/rahti2/template-indexer-manualjob-qa.yml | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/aspnetcore/openshift/indexer/rahti2/template-indexer-cronjob-devel.yml b/aspnetcore/openshift/indexer/rahti2/template-indexer-cronjob-devel.yml index ee92478..e9b52b8 100644 --- a/aspnetcore/openshift/indexer/rahti2/template-indexer-cronjob-devel.yml +++ b/aspnetcore/openshift/indexer/rahti2/template-indexer-cronjob-devel.yml @@ -4,7 +4,7 @@ # # :author: CSC - IT Center for Science Ltd., Espoo Finland servicedesk@csc.fi # :license: MIT -apiVersion: v1 +apiVersion: template.openshift.io/v1 kind: Template metadata: labels: diff --git a/aspnetcore/openshift/indexer/rahti2/template-indexer-cronjob-production.yml b/aspnetcore/openshift/indexer/rahti2/template-indexer-cronjob-production.yml index e6677a9..8e0a51f 100644 --- a/aspnetcore/openshift/indexer/rahti2/template-indexer-cronjob-production.yml +++ b/aspnetcore/openshift/indexer/rahti2/template-indexer-cronjob-production.yml @@ -4,7 +4,7 @@ # # :author: CSC - IT Center for Science Ltd., Espoo Finland servicedesk@csc.fi # :license: MIT -apiVersion: v1 +apiVersion: template.openshift.io/v1 kind: Template metadata: labels: diff --git a/aspnetcore/openshift/indexer/rahti2/template-indexer-cronjob-qa.yml b/aspnetcore/openshift/indexer/rahti2/template-indexer-cronjob-qa.yml index 4b12b91..8d935b1 100644 --- a/aspnetcore/openshift/indexer/rahti2/template-indexer-cronjob-qa.yml +++ b/aspnetcore/openshift/indexer/rahti2/template-indexer-cronjob-qa.yml @@ -4,7 +4,7 @@ # # :author: CSC - IT Center for Science Ltd., Espoo Finland servicedesk@csc.fi # :license: MIT -apiVersion: v1 +apiVersion: template.openshift.io/v1 kind: Template metadata: labels: diff --git a/aspnetcore/openshift/indexer/rahti2/template-indexer-manualjob-devel.yml b/aspnetcore/openshift/indexer/rahti2/template-indexer-manualjob-devel.yml index b21a05e..34a08b9 100644 --- a/aspnetcore/openshift/indexer/rahti2/template-indexer-manualjob-devel.yml +++ b/aspnetcore/openshift/indexer/rahti2/template-indexer-manualjob-devel.yml @@ -4,7 +4,7 @@ # # :author: CSC - IT Center for Science Ltd., Espoo Finland servicedesk@csc.fi # :license: MIT -apiVersion: v1 +apiVersion: template.openshift.io/v1 kind: Template metadata: labels: diff --git a/aspnetcore/openshift/indexer/rahti2/template-indexer-manualjob-production.yml b/aspnetcore/openshift/indexer/rahti2/template-indexer-manualjob-production.yml index 86dd391..9c882f6 100644 --- a/aspnetcore/openshift/indexer/rahti2/template-indexer-manualjob-production.yml +++ b/aspnetcore/openshift/indexer/rahti2/template-indexer-manualjob-production.yml @@ -4,7 +4,7 @@ # # :author: CSC - IT Center for Science Ltd., Espoo Finland servicedesk@csc.fi # :license: MIT -apiVersion: v1 +apiVersion: template.openshift.io/v1 kind: Template metadata: labels: diff --git a/aspnetcore/openshift/indexer/rahti2/template-indexer-manualjob-qa.yml b/aspnetcore/openshift/indexer/rahti2/template-indexer-manualjob-qa.yml index b5f242b..ceb0c34 100644 --- a/aspnetcore/openshift/indexer/rahti2/template-indexer-manualjob-qa.yml +++ b/aspnetcore/openshift/indexer/rahti2/template-indexer-manualjob-qa.yml @@ -4,7 +4,7 @@ # # :author: CSC - IT Center for Science Ltd., Espoo Finland servicedesk@csc.fi # :license: MIT -apiVersion: v1 +apiVersion: template.openshift.io/v1 kind: Template metadata: labels: From 097a35513a4454523db8cc870d21061078acb089 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timo=20Sa=CC=88rkikoski?= Date: Fri, 17 May 2024 11:35:05 +0300 Subject: [PATCH 4/6] Add template metadata. Simplify secret and configmap handling. Set resource limits. --- .../rahti2/template-indexer-app-devel.yml | 2 +- .../template-indexer-app-production.yml | 2 +- .../rahti2/template-indexer-app-qa.yml | 2 +- .../rahti2/template-indexer-cronjob-devel.yml | 96 ++-------------- .../template-indexer-cronjob-production.yml | 97 +++------------- .../rahti2/template-indexer-cronjob-qa.yml | 97 +++------------- .../template-indexer-manualjob-devel.yml | 106 ++++-------------- .../template-indexer-manualjob-production.yml | 106 ++++-------------- .../rahti2/template-indexer-manualjob-qa.yml | 106 ++++-------------- 9 files changed, 107 insertions(+), 507 deletions(-) diff --git a/aspnetcore/openshift/indexer/rahti2/template-indexer-app-devel.yml b/aspnetcore/openshift/indexer/rahti2/template-indexer-app-devel.yml index 32e0d03..7121a19 100644 --- a/aspnetcore/openshift/indexer/rahti2/template-indexer-app-devel.yml +++ b/aspnetcore/openshift/indexer/rahti2/template-indexer-app-devel.yml @@ -12,7 +12,7 @@ metadata: template: publicapi-indexer-devel name: publicapi-indexer-devel annotations: - description: "Public API indexer devel" + description: "Public API indexer devel - Build and ImageStream" iconClass: icon-dotnet objects: diff --git a/aspnetcore/openshift/indexer/rahti2/template-indexer-app-production.yml b/aspnetcore/openshift/indexer/rahti2/template-indexer-app-production.yml index ec59e88..db77298 100644 --- a/aspnetcore/openshift/indexer/rahti2/template-indexer-app-production.yml +++ b/aspnetcore/openshift/indexer/rahti2/template-indexer-app-production.yml @@ -12,7 +12,7 @@ metadata: template: publicapi-indexer-production name: publicapi-indexer-production annotations: - description: "Public API indexer production" + description: "Public API indexer production - Build and ImageStream" iconClass: icon-dotnet objects: diff --git a/aspnetcore/openshift/indexer/rahti2/template-indexer-app-qa.yml b/aspnetcore/openshift/indexer/rahti2/template-indexer-app-qa.yml index 61d43b3..1206cab 100644 --- a/aspnetcore/openshift/indexer/rahti2/template-indexer-app-qa.yml +++ b/aspnetcore/openshift/indexer/rahti2/template-indexer-app-qa.yml @@ -12,7 +12,7 @@ metadata: template: publicapi-indexer-qa name: publicapi-indexer-qa annotations: - description: "Public API indexer QA" + description: "Public API indexer QA - Build and ImageStream" iconClass: icon-dotnet objects: diff --git a/aspnetcore/openshift/indexer/rahti2/template-indexer-cronjob-devel.yml b/aspnetcore/openshift/indexer/rahti2/template-indexer-cronjob-devel.yml index e9b52b8..0bb2576 100644 --- a/aspnetcore/openshift/indexer/rahti2/template-indexer-cronjob-devel.yml +++ b/aspnetcore/openshift/indexer/rahti2/template-indexer-cronjob-devel.yml @@ -11,6 +11,9 @@ metadata: app: publicapi-indexer-devel template: publicapi-indexer-cronjob-devel name: publicapi-indexer-cronjob-devel + annotations: + description: "Public API indexer devel - CronJob" + iconClass: icon-dotnet objects: # Recurring CronJob (devel) # Indexes db entities to ElasticSearch. @@ -35,91 +38,16 @@ objects: - name: publicapi-indexer-container-devel image: publicapi-indexer-devel imagePullPolicy: Always + envFrom: + - secretRef: + name: publicapi-api-secret-devel + - configMapRef: + name: publicapi-api-config-devel resources: limits: - cpu: 1 - memory: 4Gi + cpu: 500m + memory: 2Gi requests: cpu: 100m - memory: 2Gi - env: - - name: "ELASTICSEARCH__PASSWORD" - valueFrom: - secretKeyRef: - name: publicapi-api-secret-devel - key: "ELASTICSEARCH__PASSWORD" - - name: "dbconnectionstring" - valueFrom: - secretKeyRef: - name: publicapi-api-secret-devel - key: dbconnectionstring - - name: "ELASTICSEARCH__URL" - valueFrom: - configMapKeyRef: - name: publicapi-api-config-devel - key: "ELASTICSEARCH__URL" - - name: "ELASTICSEARCH__USERNAME" - valueFrom: - configMapKeyRef: - name: publicapi-api-config-devel - key: "ELASTICSEARCH__USERNAME" - - name: "IndexNames__CSC.PublicApi.Service.Models.FundingCall.FundingCall" - valueFrom: - configMapKeyRef: - name: publicapi-api-config-devel - key: "IndexNames__CSC.PublicApi.Service.Models.FundingCall.FundingCall" - - name: "IndexNames__CSC.PublicApi.Service.Models.FundingDecision.FundingDecision" - valueFrom: - configMapKeyRef: - name: publicapi-api-config-devel - key: "IndexNames__CSC.PublicApi.Service.Models.FundingDecision.FundingDecision" - - name: "IndexNames__CSC.PublicApi.Service.Models.Infrastructure.Infrastructure" - valueFrom: - configMapKeyRef: - name: publicapi-api-config-devel - key: "IndexNames__CSC.PublicApi.Service.Models.Infrastructure.Infrastructure" - - name: "IndexNames__CSC.PublicApi.Service.Models.Organization.Organization" - valueFrom: - configMapKeyRef: - name: publicapi-api-config-devel - key: "IndexNames__CSC.PublicApi.Service.Models.Organization.Organization" - - name: "IndexNames__CSC.PublicApi.Service.Models.ResearchDataset.ResearchDataset" - valueFrom: - configMapKeyRef: - name: publicapi-api-config-devel - key: "IndexNames__CSC.PublicApi.Service.Models.ResearchDataset.ResearchDataset" - - name: "IndexNames__CSC.PublicApi.Service.Models.Publication.Publication" - valueFrom: - configMapKeyRef: - name: publicapi-api-config-devel - key: "IndexNames__CSC.PublicApi.Service.Models.Publication.Publication" - - name: "Serilog__MinimumLevel__Default" - valueFrom: - configMapKeyRef: - name: publicapi-api-config-devel - key: "Serilog__MinimumLevel__Default" - - name: "Serilog__WriteTo__HttpSink__Args__requestUri" - valueFrom: - configMapKeyRef: - name: publicapi-api-config-devel - key: "Serilog__WriteTo__HttpSink__Args__requestUri" - - name: "Serilog__Properties__WoodLogProjectNumber" - valueFrom: - configMapKeyRef: - name: publicapi-api-config-devel - key: "Serilog__Properties__WoodLogProjectNumber" - - name: "Serilog__Properties__WoodLogRetentionMonthsIndexer" - valueFrom: - configMapKeyRef: - name: publicapi-api-config-devel - key: "Serilog__Properties__WoodLogRetentionMonthsIndexer" - - name: "Serilog__Properties__WoodLogUsecaseIndexer" - valueFrom: - configMapKeyRef: - name: publicapi-api-config-devel - key: "Serilog__Properties__WoodLogUsecaseIndexer" - - name: "QueryTimeout" - valueFrom: - configMapKeyRef: - name: publicapi-api-config-devel - key: "QueryTimeout" + memory: 512Mi + \ No newline at end of file diff --git a/aspnetcore/openshift/indexer/rahti2/template-indexer-cronjob-production.yml b/aspnetcore/openshift/indexer/rahti2/template-indexer-cronjob-production.yml index 8e0a51f..fede53f 100644 --- a/aspnetcore/openshift/indexer/rahti2/template-indexer-cronjob-production.yml +++ b/aspnetcore/openshift/indexer/rahti2/template-indexer-cronjob-production.yml @@ -11,6 +11,9 @@ metadata: app: publicapi-indexer-production template: publicapi-indexer-cronjob-production name: publicapi-indexer-cronjob-production + annotations: + description: "Public API indexer production - CronJob" + iconClass: icon-dotnet objects: # Recurring CronJob (production) # Indexes db entities to ElasticSearch. @@ -35,84 +38,16 @@ objects: - name: publicapi-indexer-container-production image: publicapi-indexer-production imagePullPolicy: Always - env: - - name: "ELASTICSEARCH__PASSWORD" - valueFrom: - secretKeyRef: - name: publicapi-api-secret-production - key: "ELASTICSEARCH__PASSWORD" - - name: "dbconnectionstring" - valueFrom: - secretKeyRef: - name: publicapi-api-secret-production - key: dbconnectionstring - - name: "ELASTICSEARCH__URL" - valueFrom: - configMapKeyRef: - name: publicapi-api-config-production - key: "ELASTICSEARCH__URL" - - name: "ELASTICSEARCH__USERNAME" - valueFrom: - configMapKeyRef: - name: publicapi-api-config-production - key: "ELASTICSEARCH__USERNAME" - - name: "IndexNames__CSC.PublicApi.Service.Models.FundingCall.FundingCall" - valueFrom: - configMapKeyRef: - name: publicapi-api-config-production - key: "IndexNames__CSC.PublicApi.Service.Models.FundingCall.FundingCall" - - name: "IndexNames__CSC.PublicApi.Service.Models.FundingDecision.FundingDecision" - valueFrom: - configMapKeyRef: - name: publicapi-api-config-production - key: "IndexNames__CSC.PublicApi.Service.Models.FundingDecision.FundingDecision" - - name: "IndexNames__CSC.PublicApi.Service.Models.Infrastructure.Infrastructure" - valueFrom: - configMapKeyRef: - name: publicapi-api-config-production - key: "IndexNames__CSC.PublicApi.Service.Models.Infrastructure.Infrastructure" - - name: "IndexNames__CSC.PublicApi.Service.Models.Organization.Organization" - valueFrom: - configMapKeyRef: - name: publicapi-api-config-production - key: "IndexNames__CSC.PublicApi.Service.Models.Organization.Organization" - - name: "IndexNames__CSC.PublicApi.Service.Models.ResearchDataset.ResearchDataset" - valueFrom: - configMapKeyRef: - name: publicapi-api-config-production - key: "IndexNames__CSC.PublicApi.Service.Models.ResearchDataset.ResearchDataset" - - name: "IndexNames__CSC.PublicApi.Service.Models.Publication.Publication" - valueFrom: - configMapKeyRef: - name: publicapi-api-config-production - key: "IndexNames__CSC.PublicApi.Service.Models.Publication.Publication" - - name: "Serilog__MinimumLevel__Default" - valueFrom: - configMapKeyRef: - name: publicapi-api-config-production - key: "Serilog__MinimumLevel__Default" - - name: "Serilog__WriteTo__HttpSink__Args__requestUri" - valueFrom: - configMapKeyRef: - name: publicapi-api-config-production - key: "Serilog__WriteTo__HttpSink__Args__requestUri" - - name: "Serilog__Properties__WoodLogProjectNumber" - valueFrom: - configMapKeyRef: - name: publicapi-api-config-production - key: "Serilog__Properties__WoodLogProjectNumber" - - name: "Serilog__Properties__WoodLogRetentionMonthsIndexer" - valueFrom: - configMapKeyRef: - name: publicapi-api-config-production - key: "Serilog__Properties__WoodLogRetentionMonthsIndexer" - - name: "Serilog__Properties__WoodLogUsecaseIndexer" - valueFrom: - configMapKeyRef: - name: publicapi-api-config-production - key: "Serilog__Properties__WoodLogUsecaseIndexer" - - name: "QueryTimeout" - valueFrom: - configMapKeyRef: - name: publicapi-api-config-production - key: "QueryTimeout" + envFrom: + - secretRef: + name: publicapi-api-secret-production + - configMapRef: + name: publicapi-api-config-production + resources: + limits: + cpu: 500m + memory: 3Gi + requests: + cpu: 100m + memory: 1Gi + \ No newline at end of file diff --git a/aspnetcore/openshift/indexer/rahti2/template-indexer-cronjob-qa.yml b/aspnetcore/openshift/indexer/rahti2/template-indexer-cronjob-qa.yml index 8d935b1..4dbb123 100644 --- a/aspnetcore/openshift/indexer/rahti2/template-indexer-cronjob-qa.yml +++ b/aspnetcore/openshift/indexer/rahti2/template-indexer-cronjob-qa.yml @@ -11,6 +11,9 @@ metadata: app: publicapi-indexer-qa template: publicapi-indexer-cronjob-qa name: publicapi-indexer-cronjob-qa + annotations: + description: "Public API indexer QA - CronJob" + iconClass: icon-dotnet objects: # Recurring CronJob (qa) # Indexes db entities to ElasticSearch. @@ -35,84 +38,16 @@ objects: - name: publicapi-indexer-container-qa image: publicapi-indexer-qa imagePullPolicy: Always - env: - - name: "ELASTICSEARCH__PASSWORD" - valueFrom: - secretKeyRef: - name: publicapi-api-secret-qa - key: "ELASTICSEARCH__PASSWORD" - - name: "dbconnectionstring" - valueFrom: - secretKeyRef: - name: publicapi-api-secret-qa - key: dbconnectionstring - - name: "ELASTICSEARCH__URL" - valueFrom: - configMapKeyRef: - name: publicapi-api-config-qa - key: "ELASTICSEARCH__URL" - - name: "ELASTICSEARCH__USERNAME" - valueFrom: - configMapKeyRef: - name: publicapi-api-config-qa - key: "ELASTICSEARCH__USERNAME" - - name: "IndexNames__CSC.PublicApi.Service.Models.FundingCall.FundingCall" - valueFrom: - configMapKeyRef: - name: publicapi-api-config-qa - key: "IndexNames__CSC.PublicApi.Service.Models.FundingCall.FundingCall" - - name: "IndexNames__CSC.PublicApi.Service.Models.FundingDecision.FundingDecision" - valueFrom: - configMapKeyRef: - name: publicapi-api-config-qa - key: "IndexNames__CSC.PublicApi.Service.Models.FundingDecision.FundingDecision" - - name: "IndexNames__CSC.PublicApi.Service.Models.Infrastructure.Infrastructure" - valueFrom: - configMapKeyRef: - name: publicapi-api-config-qa - key: "IndexNames__CSC.PublicApi.Service.Models.Infrastructure.Infrastructure" - - name: "IndexNames__CSC.PublicApi.Service.Models.Organization.Organization" - valueFrom: - configMapKeyRef: - name: publicapi-api-config-qa - key: "IndexNames__CSC.PublicApi.Service.Models.Organization.Organization" - - name: "IndexNames__CSC.PublicApi.Service.Models.ResearchDataset.ResearchDataset" - valueFrom: - configMapKeyRef: - name: publicapi-api-config-qa - key: "IndexNames__CSC.PublicApi.Service.Models.ResearchDataset.ResearchDataset" - - name: "IndexNames__CSC.PublicApi.Service.Models.Publication.Publication" - valueFrom: - configMapKeyRef: - name: publicapi-api-config-qa - key: "IndexNames__CSC.PublicApi.Service.Models.Publication.Publication" - - name: "Serilog__MinimumLevel__Default" - valueFrom: - configMapKeyRef: - name: publicapi-api-config-qa - key: "Serilog__MinimumLevel__Default" - - name: "Serilog__WriteTo__HttpSink__Args__requestUri" - valueFrom: - configMapKeyRef: - name: publicapi-api-config-qa - key: "Serilog__WriteTo__HttpSink__Args__requestUri" - - name: "Serilog__Properties__WoodLogProjectNumber" - valueFrom: - configMapKeyRef: - name: publicapi-api-config-qa - key: "Serilog__Properties__WoodLogProjectNumber" - - name: "Serilog__Properties__WoodLogRetentionMonthsIndexer" - valueFrom: - configMapKeyRef: - name: publicapi-api-config-qa - key: "Serilog__Properties__WoodLogRetentionMonthsIndexer" - - name: "Serilog__Properties__WoodLogUsecaseIndexer" - valueFrom: - configMapKeyRef: - name: publicapi-api-config-qa - key: "Serilog__Properties__WoodLogUsecaseIndexer" - - name: "QueryTimeout" - valueFrom: - configMapKeyRef: - name: publicapi-api-config-qa - key: "QueryTimeout" + envFrom: + - secretRef: + name: publicapi-api-secret-qa + - configMapRef: + name: publicapi-api-config-qa + resources: + limits: + cpu: 500m + memory: 3Gi + requests: + cpu: 100m + memory: 1Gi + \ No newline at end of file diff --git a/aspnetcore/openshift/indexer/rahti2/template-indexer-manualjob-devel.yml b/aspnetcore/openshift/indexer/rahti2/template-indexer-manualjob-devel.yml index 34a08b9..a3cd352 100644 --- a/aspnetcore/openshift/indexer/rahti2/template-indexer-manualjob-devel.yml +++ b/aspnetcore/openshift/indexer/rahti2/template-indexer-manualjob-devel.yml @@ -9,105 +9,39 @@ kind: Template metadata: labels: app: publicapi-indexer-devel - template: publicapi-indexer-devel - name: publicapi-indexer-devel + template: publicapi-indexer-manualjob-devel + name: publicapi-indexer-manualjob-devel + annotations: + description: "Public API indexer devel - single-run Job" + iconClass: icon-dotnet objects: # Single-run Job (devel) # Use this job to index entities to ElasticSearch manually when needed. - apiVersion: batch/v1 kind: Job metadata: - name: publicapi-indexer-job-devel + name: publicapi-indexer-manualjob-devel labels: app: publicapi-indexer-devel annotations: - description: ElasticSearch indexer for Public devel branch + description: Public API indexer devel - single-run Job spec: template: spec: restartPolicy: Never containers: - - name: publicapi-indexer-container-devel + - name: publicapi-indexer-manualjob-container-devel image: publicapi-indexer-devel imagePullPolicy: Always - env: - - name: "ELASTICSEARCH__PASSWORD" - valueFrom: - secretKeyRef: - name: publicapi-api-secret-devel - key: "ELASTICSEARCH__PASSWORD" - - name: "dbconnectionstring" - valueFrom: - secretKeyRef: - name: publicapi-api-secret-devel - key: dbconnectionstring - - name: "ELASTICSEARCH__URL" - valueFrom: - configMapKeyRef: - name: publicapi-api-config-devel - key: "ELASTICSEARCH__URL" - - name: "ELASTICSEARCH__USERNAME" - valueFrom: - configMapKeyRef: - name: publicapi-api-config-devel - key: "ELASTICSEARCH__USERNAME" - - name: "IndexNames__CSC.PublicApi.Service.Models.FundingCall.FundingCall" - valueFrom: - configMapKeyRef: - name: publicapi-api-config-devel - key: "IndexNames__CSC.PublicApi.Service.Models.FundingCall.FundingCall" - - name: "IndexNames__CSC.PublicApi.Service.Models.FundingDecision.FundingDecision" - valueFrom: - configMapKeyRef: - name: publicapi-api-config-devel - key: "IndexNames__CSC.PublicApi.Service.Models.FundingDecision.FundingDecision" - - name: "IndexNames__CSC.PublicApi.Service.Models.Infrastructure.Infrastructure" - valueFrom: - configMapKeyRef: - name: publicapi-api-config-devel - key: "IndexNames__CSC.PublicApi.Service.Models.Infrastructure.Infrastructure" - - name: "IndexNames__CSC.PublicApi.Service.Models.Organization.Organization" - valueFrom: - configMapKeyRef: - name: publicapi-api-config-devel - key: "IndexNames__CSC.PublicApi.Service.Models.Organization.Organization" - - name: "IndexNames__CSC.PublicApi.Service.Models.ResearchDataset.ResearchDataset" - valueFrom: - configMapKeyRef: - name: publicapi-api-config-devel - key: "IndexNames__CSC.PublicApi.Service.Models.ResearchDataset.ResearchDataset" - - name: "IndexNames__CSC.PublicApi.Service.Models.Publication.Publication" - valueFrom: - configMapKeyRef: - name: publicapi-api-config-devel - key: "IndexNames__CSC.PublicApi.Service.Models.Publication.Publication" - - name: "Serilog__MinimumLevel__Default" - valueFrom: - configMapKeyRef: - name: publicapi-api-config-devel - key: "Serilog__MinimumLevel__Default" - - name: "Serilog__WriteTo__HttpSink__Args__requestUri" - valueFrom: - configMapKeyRef: - name: publicapi-api-config-devel - key: "Serilog__WriteTo__HttpSink__Args__requestUri" - - name: "Serilog__Properties__WoodLogProjectNumber" - valueFrom: - configMapKeyRef: - name: publicapi-api-config-devel - key: "Serilog__Properties__WoodLogProjectNumber" - - name: "Serilog__Properties__WoodLogRetentionMonthsIndexer" - valueFrom: - configMapKeyRef: - name: publicapi-api-config-devel - key: "Serilog__Properties__WoodLogRetentionMonthsIndexer" - - name: "Serilog__Properties__WoodLogUsecaseIndexer" - valueFrom: - configMapKeyRef: - name: publicapi-api-config-devel - key: "Serilog__Properties__WoodLogUsecaseIndexer" - - name: "QueryTimeout" - valueFrom: - configMapKeyRef: - name: publicapi-api-config-devel - key: "QueryTimeout" + envFrom: + - secretRef: + name: publicapi-api-secret-devel + - configMapRef: + name: publicapi-api-config-devel + resources: + limits: + cpu: 500m + memory: 2Gi + requests: + cpu: 100m + memory: 512Mi diff --git a/aspnetcore/openshift/indexer/rahti2/template-indexer-manualjob-production.yml b/aspnetcore/openshift/indexer/rahti2/template-indexer-manualjob-production.yml index 9c882f6..67f2197 100644 --- a/aspnetcore/openshift/indexer/rahti2/template-indexer-manualjob-production.yml +++ b/aspnetcore/openshift/indexer/rahti2/template-indexer-manualjob-production.yml @@ -9,105 +9,39 @@ kind: Template metadata: labels: app: publicapi-indexer-production - template: publicapi-indexer-production - name: publicapi-indexer-production + template: publicapi-indexer-manualjob-production + name: publicapi-indexer-manualjob-production + annotations: + description: "Public API indexer production - single-run Job" + iconClass: icon-dotnet objects: # Single-run Job (production) # Use this job to index entities to ElasticSearch manually when needed. - apiVersion: batch/v1 kind: Job metadata: - name: publicapi-indexer-job-production + name: publicapi-indexer-manualjob-production labels: app: publicapi-indexer-production annotations: - description: ElasticSearch indexer for Public production branch + description: Public API indexer production - single-run Job spec: template: spec: restartPolicy: Never containers: - - name: publicapi-indexer-container-production + - name: publicapi-indexer-manualjob-container-production image: publicapi-indexer-production imagePullPolicy: Always - env: - - name: "ELASTICSEARCH__PASSWORD" - valueFrom: - secretKeyRef: - name: publicapi-api-secret-production - key: "ELASTICSEARCH__PASSWORD" - - name: "dbconnectionstring" - valueFrom: - secretKeyRef: - name: publicapi-api-secret-production - key: dbconnectionstring - - name: "ELASTICSEARCH__URL" - valueFrom: - configMapKeyRef: - name: publicapi-api-config-production - key: "ELASTICSEARCH__URL" - - name: "ELASTICSEARCH__USERNAME" - valueFrom: - configMapKeyRef: - name: publicapi-api-config-production - key: "ELASTICSEARCH__USERNAME" - - name: "IndexNames__CSC.PublicApi.Service.Models.FundingCall.FundingCall" - valueFrom: - configMapKeyRef: - name: publicapi-api-config-production - key: "IndexNames__CSC.PublicApi.Service.Models.FundingCall.FundingCall" - - name: "IndexNames__CSC.PublicApi.Service.Models.FundingDecision.FundingDecision" - valueFrom: - configMapKeyRef: - name: publicapi-api-config-production - key: "IndexNames__CSC.PublicApi.Service.Models.FundingDecision.FundingDecision" - - name: "IndexNames__CSC.PublicApi.Service.Models.Infrastructure.Infrastructure" - valueFrom: - configMapKeyRef: - name: publicapi-api-config-production - key: "IndexNames__CSC.PublicApi.Service.Models.Infrastructure.Infrastructure" - - name: "IndexNames__CSC.PublicApi.Service.Models.Organization.Organization" - valueFrom: - configMapKeyRef: - name: publicapi-api-config-production - key: "IndexNames__CSC.PublicApi.Service.Models.Organization.Organization" - - name: "IndexNames__CSC.PublicApi.Service.Models.ResearchDataset.ResearchDataset" - valueFrom: - configMapKeyRef: - name: publicapi-api-config-production - key: "IndexNames__CSC.PublicApi.Service.Models.ResearchDataset.ResearchDataset" - - name: "IndexNames__CSC.PublicApi.Service.Models.Publication.Publication" - valueFrom: - configMapKeyRef: - name: publicapi-api-config-production - key: "IndexNames__CSC.PublicApi.Service.Models.Publication.Publication" - - name: "Serilog__MinimumLevel__Default" - valueFrom: - configMapKeyRef: - name: publicapi-api-config-production - key: "Serilog__MinimumLevel__Default" - - name: "Serilog__WriteTo__HttpSink__Args__requestUri" - valueFrom: - configMapKeyRef: - name: publicapi-api-config-production - key: "Serilog__WriteTo__HttpSink__Args__requestUri" - - name: "Serilog__Properties__WoodLogProjectNumber" - valueFrom: - configMapKeyRef: - name: publicapi-api-config-production - key: "Serilog__Properties__WoodLogProjectNumber" - - name: "Serilog__Properties__WoodLogRetentionMonthsIndexer" - valueFrom: - configMapKeyRef: - name: publicapi-api-config-production - key: "Serilog__Properties__WoodLogRetentionMonthsIndexer" - - name: "Serilog__Properties__WoodLogUsecaseIndexer" - valueFrom: - configMapKeyRef: - name: publicapi-api-config-production - key: "Serilog__Properties__WoodLogUsecaseIndexer" - - name: "QueryTimeout" - valueFrom: - configMapKeyRef: - name: publicapi-api-config-production - key: "QueryTimeout" + envFrom: + - secretRef: + name: publicapi-api-secret-production + - configMapRef: + name: publicapi-api-config-production + resources: + limits: + cpu: 500m + memory: 3Gi + requests: + cpu: 100m + memory: 1Gi diff --git a/aspnetcore/openshift/indexer/rahti2/template-indexer-manualjob-qa.yml b/aspnetcore/openshift/indexer/rahti2/template-indexer-manualjob-qa.yml index ceb0c34..7d85404 100644 --- a/aspnetcore/openshift/indexer/rahti2/template-indexer-manualjob-qa.yml +++ b/aspnetcore/openshift/indexer/rahti2/template-indexer-manualjob-qa.yml @@ -9,105 +9,39 @@ kind: Template metadata: labels: app: publicapi-indexer-qa - template: publicapi-indexer-qa - name: publicapi-indexer-qa + template: publicapi-indexer-manualjob-qa + name: publicapi-indexer-manualjob-qa + annotations: + description: "Public API indexer QA - single-run Job" + iconClass: icon-dotnet objects: # Single-run Job (qa) # Use this job to index entities to ElasticSearch manually when needed. - apiVersion: batch/v1 kind: Job metadata: - name: publicapi-indexer-job-qa + name: publicapi-indexer-manualjob-qa labels: app: publicapi-indexer-qa annotations: - description: ElasticSearch indexer for Public qa branch + description: Public API indexer QA - single-run Job spec: template: spec: restartPolicy: Never containers: - - name: publicapi-indexer-container-qa + - name: publicapi-indexer-manualjob-container-qa image: publicapi-indexer-qa imagePullPolicy: Always - env: - - name: "ELASTICSEARCH__PASSWORD" - valueFrom: - secretKeyRef: - name: publicapi-api-secret-qa - key: "ELASTICSEARCH__PASSWORD" - - name: "dbconnectionstring" - valueFrom: - secretKeyRef: - name: publicapi-api-secret-qa - key: dbconnectionstring - - name: "ELASTICSEARCH__URL" - valueFrom: - configMapKeyRef: - name: publicapi-api-config-qa - key: "ELASTICSEARCH__URL" - - name: "ELASTICSEARCH__USERNAME" - valueFrom: - configMapKeyRef: - name: publicapi-api-config-qa - key: "ELASTICSEARCH__USERNAME" - - name: "IndexNames__CSC.PublicApi.Service.Models.FundingCall.FundingCall" - valueFrom: - configMapKeyRef: - name: publicapi-api-config-qa - key: "IndexNames__CSC.PublicApi.Service.Models.FundingCall.FundingCall" - - name: "IndexNames__CSC.PublicApi.Service.Models.FundingDecision.FundingDecision" - valueFrom: - configMapKeyRef: - name: publicapi-api-config-qa - key: "IndexNames__CSC.PublicApi.Service.Models.FundingDecision.FundingDecision" - - name: "IndexNames__CSC.PublicApi.Service.Models.Infrastructure.Infrastructure" - valueFrom: - configMapKeyRef: - name: publicapi-api-config-qa - key: "IndexNames__CSC.PublicApi.Service.Models.Infrastructure.Infrastructure" - - name: "IndexNames__CSC.PublicApi.Service.Models.Organization.Organization" - valueFrom: - configMapKeyRef: - name: publicapi-api-config-qa - key: "IndexNames__CSC.PublicApi.Service.Models.Organization.Organization" - - name: "IndexNames__CSC.PublicApi.Service.Models.Publication.Publication" - valueFrom: - configMapKeyRef: - name: publicapi-api-config-qa - key: "IndexNames__CSC.PublicApi.Service.Models.Publication.Publication" - - name: "IndexNames__CSC.PublicApi.Service.Models.ResearchDataset.ResearchDataset" - valueFrom: - configMapKeyRef: - name: publicapi-api-config-qa - key: "IndexNames__CSC.PublicApi.Service.Models.ResearchDataset.ResearchDataset" - - name: "Serilog__MinimumLevel__Default" - valueFrom: - configMapKeyRef: - name: publicapi-api-config-qa - key: "Serilog__MinimumLevel__Default" - - name: "Serilog__WriteTo__HttpSink__Args__requestUri" - valueFrom: - configMapKeyRef: - name: publicapi-api-config-qa - key: "Serilog__WriteTo__HttpSink__Args__requestUri" - - name: "Serilog__Properties__WoodLogProjectNumber" - valueFrom: - configMapKeyRef: - name: publicapi-api-config-qa - key: "Serilog__Properties__WoodLogProjectNumber" - - name: "Serilog__Properties__WoodLogRetentionMonthsIndexer" - valueFrom: - configMapKeyRef: - name: publicapi-api-config-qa - key: "Serilog__Properties__WoodLogRetentionMonthsIndexer" - - name: "Serilog__Properties__WoodLogUsecaseIndexer" - valueFrom: - configMapKeyRef: - name: publicapi-api-config-qa - key: "Serilog__Properties__WoodLogUsecaseIndexer" - - name: "QueryTimeout" - valueFrom: - configMapKeyRef: - name: publicapi-api-config-qa - key: "QueryTimeout" + envFrom: + - secretRef: + name: publicapi-api-secret-qa + - configMapRef: + name: publicapi-api-config-qa + resources: + limits: + cpu: 500m + memory: 3Gi + requests: + cpu: 100m + memory: 1Gi From a7b4f7fe94b57823e46595720d06724a07be3f99 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timo=20Sa=CC=88rkikoski?= Date: Fri, 17 May 2024 15:58:01 +0300 Subject: [PATCH 5/6] Revert modification in Rahti1 file --- .../openshift/indexer/template-indexer-manualjob-devel.yml | 7 ------- 1 file changed, 7 deletions(-) diff --git a/aspnetcore/openshift/indexer/template-indexer-manualjob-devel.yml b/aspnetcore/openshift/indexer/template-indexer-manualjob-devel.yml index 8be0f19..70b80f8 100644 --- a/aspnetcore/openshift/indexer/template-indexer-manualjob-devel.yml +++ b/aspnetcore/openshift/indexer/template-indexer-manualjob-devel.yml @@ -29,13 +29,6 @@ objects: - name: publicapi-indexer-container-devel image: publicapi-indexer-devel imagePullPolicy: Always - resources: - limits: - cpu: 1 - memory: 4Gi - requests: - cpu: 100m - memory: 2Gi env: - name: "ELASTICSEARCH__PASSWORD" valueFrom: From 6ec2db9b14e6a9a1b6ff07d43e01e404755d2684 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timo=20Sa=CC=88rkikoski?= Date: Fri, 17 May 2024 16:10:37 +0300 Subject: [PATCH 6/6] Fix error in Rahti2 indexer cronjob templates --- .../indexer/rahti2/template-indexer-cronjob-devel.yml | 4 ++-- .../indexer/rahti2/template-indexer-cronjob-production.yml | 4 ++-- .../openshift/indexer/rahti2/template-indexer-cronjob-qa.yml | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/aspnetcore/openshift/indexer/rahti2/template-indexer-cronjob-devel.yml b/aspnetcore/openshift/indexer/rahti2/template-indexer-cronjob-devel.yml index 0bb2576..63feb83 100644 --- a/aspnetcore/openshift/indexer/rahti2/template-indexer-cronjob-devel.yml +++ b/aspnetcore/openshift/indexer/rahti2/template-indexer-cronjob-devel.yml @@ -40,9 +40,9 @@ objects: imagePullPolicy: Always envFrom: - secretRef: - name: publicapi-api-secret-devel + name: publicapi-api-secret-devel - configMapRef: - name: publicapi-api-config-devel + name: publicapi-api-config-devel resources: limits: cpu: 500m diff --git a/aspnetcore/openshift/indexer/rahti2/template-indexer-cronjob-production.yml b/aspnetcore/openshift/indexer/rahti2/template-indexer-cronjob-production.yml index fede53f..84c9733 100644 --- a/aspnetcore/openshift/indexer/rahti2/template-indexer-cronjob-production.yml +++ b/aspnetcore/openshift/indexer/rahti2/template-indexer-cronjob-production.yml @@ -40,9 +40,9 @@ objects: imagePullPolicy: Always envFrom: - secretRef: - name: publicapi-api-secret-production + name: publicapi-api-secret-production - configMapRef: - name: publicapi-api-config-production + name: publicapi-api-config-production resources: limits: cpu: 500m diff --git a/aspnetcore/openshift/indexer/rahti2/template-indexer-cronjob-qa.yml b/aspnetcore/openshift/indexer/rahti2/template-indexer-cronjob-qa.yml index 4dbb123..5d124ae 100644 --- a/aspnetcore/openshift/indexer/rahti2/template-indexer-cronjob-qa.yml +++ b/aspnetcore/openshift/indexer/rahti2/template-indexer-cronjob-qa.yml @@ -40,9 +40,9 @@ objects: imagePullPolicy: Always envFrom: - secretRef: - name: publicapi-api-secret-qa + name: publicapi-api-secret-qa - configMapRef: - name: publicapi-api-config-qa + name: publicapi-api-config-qa resources: limits: cpu: 500m