Skip to content

Commit

Permalink
Merge pull request #120 from CSCfi/openshift-cronjobs-to-own-templates
Browse files Browse the repository at this point in the history
Separate publicapi OpenShift cronjobs to own templates
  • Loading branch information
sarkikos authored Feb 23, 2024
2 parents 6335c2d + 643ed8e commit 54e2e50
Show file tree
Hide file tree
Showing 6 changed files with 151 additions and 109 deletions.
47 changes: 47 additions & 0 deletions aspnetcore/openshift/indexer/template-indexer-app-devel.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
# 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 [email protected]
# :license: MIT
apiVersion: v1
kind: Template
metadata:
labels:
app: publicapi-indexer-devel
template: publicapi-indexer-devel
name: publicapi-indexer-devel
objects:
# ImageStream (development)
- apiVersion: v1
kind: ImageStream
metadata:
name: publicapi-indexer-devel
labels:
app: publicapi-indexer-devel
spec:
lookupPolicy:
local: true

# BuildConfig using Docker build strategy
- apiVersion: 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:
dockerStrategy:
dockerfilePath: aspnetcore/openshift/indexer/Dockerfile
output:
to:
kind: ImageStreamTag
name: publicapi-indexer-devel:latest
successfulBuildsHistoryLimit: 4
failedBuildsHistoryLimit: 4
47 changes: 47 additions & 0 deletions aspnetcore/openshift/indexer/template-indexer-app-production.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
# 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 [email protected]
# :license: MIT
apiVersion: v1
kind: Template
metadata:
labels:
app: publicapi-indexer-production
template: publicapi-indexer-production
name: publicapi-indexer-production
objects:
# ImageStream (production)
- apiVersion: v1
kind: ImageStream
metadata:
name: publicapi-indexer-production
labels:
app: publicapi-indexer-production
spec:
lookupPolicy:
local: true

# BuildConfig using Docker build strategy
- apiVersion: 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:
dockerStrategy:
dockerfilePath: aspnetcore/openshift/indexer/Dockerfile
output:
to:
kind: ImageStreamTag
name: publicapi-indexer-production:latest
successfulBuildsHistoryLimit: 4
failedBuildsHistoryLimit: 4
47 changes: 47 additions & 0 deletions aspnetcore/openshift/indexer/template-indexer-app-qa.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
# 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 [email protected]
# :license: MIT
apiVersion: v1
kind: Template
metadata:
labels:
app: publicapi-indexer-qa
template: publicapi-indexer-qa
name: publicapi-indexer-qa
objects:
# ImageStream (qa)
- apiVersion: v1
kind: ImageStream
metadata:
name: publicapi-indexer-qa
labels:
app: publicapi-indexer-qa
spec:
lookupPolicy:
local: true

# BuildConfig using Docker build strategy
- apiVersion: 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:
dockerStrategy:
dockerfilePath: aspnetcore/openshift/indexer/Dockerfile
output:
to:
kind: ImageStreamTag
name: publicapi-indexer-qa:latest
successfulBuildsHistoryLimit: 4
failedBuildsHistoryLimit: 4
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# This file is part of the research.fi api
#
# Copyright 2022 Ministry of Education and Culture, Finland
# Copyright 2024 Ministry of Education and Culture, Finland
#
# :author: CSC - IT Center for Science Ltd., Espoo Finland [email protected]
# :license: MIT
Expand All @@ -9,8 +9,8 @@ kind: Template
metadata:
labels:
app: publicapi-indexer-devel
template: publicapi-indexer-devel
name: publicapi-indexer-devel
template: publicapi-indexer-cronjob-devel
name: publicapi-indexer-cronjob-devel
objects:
# Recurring CronJob (devel)
# Indexes db entities to ElasticSearch.
Expand Down Expand Up @@ -116,36 +116,3 @@ objects:
name: publicapi-api-config-devel
key: "QueryTimeout"
restartPolicy: Never
# ImageStream (development)
- apiVersion: v1
kind: ImageStream
metadata:
name: publicapi-indexer-devel
labels:
app: publicapi-indexer-devel
spec:
lookupPolicy:
local: true

# BuildConfig using Docker build strategy
- apiVersion: 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:
dockerStrategy:
dockerfilePath: aspnetcore/openshift/indexer/Dockerfile
output:
to:
kind: ImageStreamTag
name: publicapi-indexer-devel:latest
successfulBuildsHistoryLimit: 4
failedBuildsHistoryLimit: 4
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# This file is part of the research.fi api
#
# Copyright 2023 Ministry of Education and Culture, Finland
# Copyright 2024 Ministry of Education and Culture, Finland
#
# :author: CSC - IT Center for Science Ltd., Espoo Finland [email protected]
# :license: MIT
Expand All @@ -9,8 +9,8 @@ kind: Template
metadata:
labels:
app: publicapi-indexer-production
template: publicapi-indexer-production
name: publicapi-indexer-production
template: publicapi-indexer-cronjob-production
name: publicapi-indexer-cronjob-production
objects:
# Recurring CronJob (production)
# Indexes db entities to ElasticSearch.
Expand Down Expand Up @@ -116,36 +116,3 @@ objects:
name: publicapi-api-config-production
key: "QueryTimeout"
restartPolicy: Never
# ImageStream (production)
- apiVersion: v1
kind: ImageStream
metadata:
name: publicapi-indexer-production
labels:
app: publicapi-indexer-production
spec:
lookupPolicy:
local: true

# BuildConfig using Docker build strategy
- apiVersion: 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:
dockerStrategy:
dockerfilePath: aspnetcore/openshift/indexer/Dockerfile
output:
to:
kind: ImageStreamTag
name: publicapi-indexer-production:latest
successfulBuildsHistoryLimit: 4
failedBuildsHistoryLimit: 4
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# This file is part of the research.fi api
#
# Copyright 2023 Ministry of Education and Culture, Finland
# Copyright 2024 Ministry of Education and Culture, Finland
#
# :author: CSC - IT Center for Science Ltd., Espoo Finland [email protected]
# :license: MIT
Expand All @@ -9,8 +9,8 @@ kind: Template
metadata:
labels:
app: publicapi-indexer-qa
template: publicapi-indexer-qa
name: publicapi-indexer-qa
template: publicapi-indexer-cronjob-qa
name: publicapi-indexer-cronjob-qa
objects:
# Recurring CronJob (qa)
# Indexes db entities to ElasticSearch.
Expand Down Expand Up @@ -115,37 +115,4 @@ objects:
configMapKeyRef:
name: publicapi-api-config-qa
key: "QueryTimeout"
restartPolicy: Never
# ImageStream (qa)
- apiVersion: v1
kind: ImageStream
metadata:
name: publicapi-indexer-qa
labels:
app: publicapi-indexer-qa
spec:
lookupPolicy:
local: true

# BuildConfig using Docker build strategy
- apiVersion: 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:
dockerStrategy:
dockerfilePath: aspnetcore/openshift/indexer/Dockerfile
output:
to:
kind: ImageStreamTag
name: publicapi-indexer-qa:latest
successfulBuildsHistoryLimit: 4
failedBuildsHistoryLimit: 4
restartPolicy: Never

0 comments on commit 54e2e50

Please sign in to comment.