Skip to content

Commit

Permalink
Adding analytics BuildConfig, Updating Docs (#1822)
Browse files Browse the repository at this point in the history
  • Loading branch information
aforde-aot authored Jul 11, 2023
1 parent 810cb26 commit c3bbe4b
Show file tree
Hide file tree
Showing 3 changed files with 60 additions and 2 deletions.
4 changes: 4 additions & 0 deletions openshift/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,10 @@ In the tools namespace use the following to create the build configurations:
oc process -f ./met-analytics.bc.yml | oc create -f -
```

```
oc process -f ./analytics-api.bc.yml | oc create -f -
```

## Image Puller Configuration

Allow image pullers from the other namespaces to pull images from tools namespace:
Expand Down
54 changes: 54 additions & 0 deletions openshift/analytics-api.bc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
apiVersion: template.openshift.io/v1
kind: Template
metadata:
name: api-build-template
annotations:
description: "Build Configuration Template for the Analytics API "
tags: "met, api, python"
objects:
- apiVersion: image.openshift.io/v1
kind: ImageStream
metadata:
name: ${APP}
spec:
lookupPolicy:
local: false
- apiVersion: build.openshift.io/v1
kind: BuildConfig
metadata:
name: ${APP}
labels:
app: ${APP}
spec:
nodeSelector: null
output:
to:
kind: ImageStreamTag
name: '${APP}:latest'
resources: {}
successfulBuildsHistoryLimit: 5
failedBuildsHistoryLimit: 5
strategy:
type: Docker
dockerStrategy:
dockerfilePath: Dockerfile
postCommit: {}
source:
type: Git
git:
uri: ${GITHUB_REPO}
ref: main
contextDir: ${GITHUB_CONTEXT_DIR}
triggers:
- type: ConfigChange
runPolicy: Serial
parameters:
- name: APP
description: "The application name"
value: analytics-api
- name: GITHUB_REPO
description: "The github repo uri"
value: 'https://github.com/bcgov/met-public.git'
- name: GITHUB_CONTEXT_DIR
description: "The repository folder context"
value: /analytics-api
4 changes: 2 additions & 2 deletions openshift/web.bc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ objects:
name: '${APP}:latest'
resources:
limits:
cpu: '2'
memory: 5Gi
cpu: '500m'
memory: 2Gi
successfulBuildsHistoryLimit: 5
failedBuildsHistoryLimit: 5
strategy:
Expand Down

0 comments on commit c3bbe4b

Please sign in to comment.