Skip to content

Commit ac17b58

Browse files
committed
Update charts
1 parent 17716d4 commit ac17b58

11 files changed

+84
-13
lines changed

Dockerfile

+1
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ RUN mkdir -p /usr/share/GeoIP/ && \
3030

3131
WORKDIR /code
3232
COPY requirements/ /code/
33+
COPY app/ /code/app/
3334

3435
RUN pip install -r test.txt
3536
COPY bin/docker-command.bash /bin/docker-command.bash

Jenkinsfile

-4
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,6 @@ pipeline {
1919
}
2020
steps {
2121
container('python') {
22-
sh "python -m unittest"
23-
2422
sh 'export VERSION=$PREVIEW_VERSION && skaffold build -f skaffold.yaml'
2523

2624

@@ -55,8 +53,6 @@ pipeline {
5553
}
5654
}
5755
container('python') {
58-
sh "python -m unittest"
59-
6056
sh 'export VERSION=`cat VERSION` && skaffold build -f skaffold.yaml'
6157

6258
sh "jx step post build --image $DOCKER_REGISTRY/$ORG/$APP_NAME:\$(cat VERSION)"

OWNERS

+8
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,12 @@
11
approvers:
22
- gc-jenkins-x
3+
- mbeacom
4+
- owocki
5+
- thelostone-mc
6+
- SaptakS
37
reviewers:
48
- gc-jenkins-x
9+
- mbeacom
10+
- owocki
11+
- thelostone-mc
12+
- SaptakS

OWNERS_ALIASES

+12
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,18 @@
11
aliases:
22
- gc-jenkins-x
3+
- mbeacom
4+
- owocki
5+
- thelostone-mc
6+
- SaptakS
37
best-approvers:
48
- gc-jenkins-x
9+
- mbeacom
10+
- owocki
11+
- thelostone-mc
12+
- SaptakS
513
best-reviewers:
614
- gc-jenkins-x
15+
- mbeacom
16+
- owocki
17+
- thelostone-mc
18+
- SaptakS

charts/preview/requirements.yaml

+8
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,14 @@ dependencies:
88
name: exposecontroller
99
repository: https://chartmuseum.build.cd.jenkins-x.io
1010
version: 2.3.56
11+
- name: redis
12+
alias: redis
13+
version: ~4.1.2
14+
repository: https://kubernetes-charts.storage.googleapis.com
15+
- name: postgresql
16+
alias: db
17+
version: ~0.19.0
18+
repository: https://kubernetes-charts.storage.googleapis.com
1119
- alias: preview
1220
name: web
1321
repository: file://../web

charts/preview/values.yaml

+11-1
Original file line numberDiff line numberDiff line change
@@ -19,4 +19,14 @@ preview:
1919
image:
2020
repository:
2121
tag:
22-
pullPolicy: IfNotPresent
22+
pullPolicy: IfNotPresent
23+
24+
terminationGracePeriodSeconds: 30
25+
redis:
26+
cluster.enabled: false
27+
usePassword: false
28+
db:
29+
postgresUser: postgres
30+
postgresPassword: gitcoin
31+
postgresDatabase: postgres
32+
imageTag: "9.6"

charts/web/templates/configmap.yaml

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
apiVersion: v1
2+
kind: ConfigMap
3+
metadata:
4+
name: web-config
5+
data:
6+
.env: |-
7+
CACHE_URL=dbcache://my_cache_table
8+
REDIS_URL=rediscache://{{ .Release.Name }}-master:6379/0?client_class=django_redis.client.DefaultClient
9+
CACHEOPS_REDIS=redis://{{ .Release.Name }}-master:6379/0
10+
COLLECTFAST_CACHE_URL=dbcache://collectfast
11+
DATABASE_HOST={{ .Release.Name }}-db
12+
DEBUG=on
13+
FORCE_GET_PRICES=on
14+
DATABASE_USER=postgres
15+
DATABASE_NAME=postgres
16+
DATABASE_PASSWORD=gitcoin
17+
DATABASE_URL=psql://postgres:gitcoin@{{ .Release.Name }}-db:5432/postgres

charts/web/templates/deployment.yaml

+9
Original file line numberDiff line numberDiff line change
@@ -25,3 +25,12 @@ spec:
2525
- containerPort: {{ .Values.service.internalPort }}
2626
resources:
2727
{{ toYaml .Values.resources | indent 12 }}
28+
volumeMounts:
29+
- name: config-volume
30+
mountPath: /code/app/app/.env
31+
subPath: .env
32+
volumes:
33+
- name: config-volume
34+
configMap:
35+
name: web-config
36+
terminationGracePeriodSeconds: {{ .Values.terminationGracePeriodSeconds }}

charts/web/values.yaml

+16-6
Original file line numberDiff line numberDiff line change
@@ -10,16 +10,26 @@ service:
1010
name: web
1111
type: ClusterIP
1212
externalPort: 80
13-
internalPort: 8080
13+
internalPort: 8000
1414
annotations:
1515
fabric8.io/expose: "true"
1616
fabric8.io/ingress.annotations: "kubernetes.io/ingress.class: nginx"
1717
resources:
1818
limits:
19-
cpu: 100m
20-
memory: 128Mi
19+
cpu: 1000m
20+
memory: 1024Mi
2121
requests:
22-
cpu: 100m
23-
memory: 128Mi
22+
cpu: 200m
23+
memory: 512Mi
2424
ingress:
25-
enabled: false
25+
enabled: true
26+
basedomain: "jx.ci.gitcoin.co"
27+
terminationGracePeriodSeconds: 30
28+
redis:
29+
cluster.enabled: false
30+
usePassword: false
31+
db:
32+
postgresUser: postgres
33+
postgresPassword: gitcoin
34+
postgresDatabase: postgres
35+
imageTag: "9.6"

detect

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
BUILD_DIR=$1
44

55
# Exit early if app is clearly not Python.
6-
if [ ! -f $BUILD_DIR/requirements.txt ] && [ ! -f $BUILD_DIR/setup.py ] && [ ! -f $BUILD_DIR/Pipfile ]; then
6+
if [ ! -f $BUILD_DIR/requirements/test.txt ] && [ ! -f $BUILD_DIR/setup.py ] && [ ! -f $BUILD_DIR/Pipfile ]; then
77
exit 1
88
fi
99

skaffold.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ build:
55
envTemplate:
66
template: "{{.DOCKER_REGISTRY}}/gitcoinco/web:{{.VERSION}}"
77
artifacts:
8-
- imageName: changeme
8+
- imageName: gitcoin-web
99
workspace: .
1010
docker: {}
1111
local: {}

0 commit comments

Comments
 (0)