Skip to content

Commit

Permalink
Update charts
Browse files Browse the repository at this point in the history
  • Loading branch information
mbeacom committed Oct 11, 2018
1 parent 17716d4 commit ac17b58
Show file tree
Hide file tree
Showing 11 changed files with 84 additions and 13 deletions.
1 change: 1 addition & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ RUN mkdir -p /usr/share/GeoIP/ && \

WORKDIR /code
COPY requirements/ /code/
COPY app/ /code/app/

RUN pip install -r test.txt
COPY bin/docker-command.bash /bin/docker-command.bash
Expand Down
4 changes: 0 additions & 4 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,6 @@ pipeline {
}
steps {
container('python') {
sh "python -m unittest"

sh 'export VERSION=$PREVIEW_VERSION && skaffold build -f skaffold.yaml'


Expand Down Expand Up @@ -55,8 +53,6 @@ pipeline {
}
}
container('python') {
sh "python -m unittest"

sh 'export VERSION=`cat VERSION` && skaffold build -f skaffold.yaml'

sh "jx step post build --image $DOCKER_REGISTRY/$ORG/$APP_NAME:\$(cat VERSION)"
Expand Down
8 changes: 8 additions & 0 deletions OWNERS
Original file line number Diff line number Diff line change
@@ -1,4 +1,12 @@
approvers:
- gc-jenkins-x
- mbeacom
- owocki
- thelostone-mc
- SaptakS
reviewers:
- gc-jenkins-x
- mbeacom
- owocki
- thelostone-mc
- SaptakS
12 changes: 12 additions & 0 deletions OWNERS_ALIASES
Original file line number Diff line number Diff line change
@@ -1,6 +1,18 @@
aliases:
- gc-jenkins-x
- mbeacom
- owocki
- thelostone-mc
- SaptakS
best-approvers:
- gc-jenkins-x
- mbeacom
- owocki
- thelostone-mc
- SaptakS
best-reviewers:
- gc-jenkins-x
- mbeacom
- owocki
- thelostone-mc
- SaptakS
8 changes: 8 additions & 0 deletions charts/preview/requirements.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,14 @@ dependencies:
name: exposecontroller
repository: https://chartmuseum.build.cd.jenkins-x.io
version: 2.3.56
- name: redis
alias: redis
version: ~4.1.2
repository: https://kubernetes-charts.storage.googleapis.com
- name: postgresql
alias: db
version: ~0.19.0
repository: https://kubernetes-charts.storage.googleapis.com
- alias: preview
name: web
repository: file://../web
12 changes: 11 additions & 1 deletion charts/preview/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,14 @@ preview:
image:
repository:
tag:
pullPolicy: IfNotPresent
pullPolicy: IfNotPresent

terminationGracePeriodSeconds: 30
redis:
cluster.enabled: false
usePassword: false
db:
postgresUser: postgres
postgresPassword: gitcoin
postgresDatabase: postgres
imageTag: "9.6"
17 changes: 17 additions & 0 deletions charts/web/templates/configmap.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
apiVersion: v1
kind: ConfigMap
metadata:
name: web-config
data:
.env: |-
CACHE_URL=dbcache://my_cache_table
REDIS_URL=rediscache://{{ .Release.Name }}-master:6379/0?client_class=django_redis.client.DefaultClient
CACHEOPS_REDIS=redis://{{ .Release.Name }}-master:6379/0
COLLECTFAST_CACHE_URL=dbcache://collectfast
DATABASE_HOST={{ .Release.Name }}-db
DEBUG=on
FORCE_GET_PRICES=on
DATABASE_USER=postgres
DATABASE_NAME=postgres
DATABASE_PASSWORD=gitcoin
DATABASE_URL=psql://postgres:gitcoin@{{ .Release.Name }}-db:5432/postgres
9 changes: 9 additions & 0 deletions charts/web/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,12 @@ spec:
- containerPort: {{ .Values.service.internalPort }}
resources:
{{ toYaml .Values.resources | indent 12 }}
volumeMounts:
- name: config-volume
mountPath: /code/app/app/.env
subPath: .env
volumes:
- name: config-volume
configMap:
name: web-config
terminationGracePeriodSeconds: {{ .Values.terminationGracePeriodSeconds }}
22 changes: 16 additions & 6 deletions charts/web/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,26 @@ service:
name: web
type: ClusterIP
externalPort: 80
internalPort: 8080
internalPort: 8000
annotations:
fabric8.io/expose: "true"
fabric8.io/ingress.annotations: "kubernetes.io/ingress.class: nginx"
resources:
limits:
cpu: 100m
memory: 128Mi
cpu: 1000m
memory: 1024Mi
requests:
cpu: 100m
memory: 128Mi
cpu: 200m
memory: 512Mi
ingress:
enabled: false
enabled: true
basedomain: "jx.ci.gitcoin.co"
terminationGracePeriodSeconds: 30
redis:
cluster.enabled: false
usePassword: false
db:
postgresUser: postgres
postgresPassword: gitcoin
postgresDatabase: postgres
imageTag: "9.6"
2 changes: 1 addition & 1 deletion detect
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
BUILD_DIR=$1

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

Expand Down
2 changes: 1 addition & 1 deletion skaffold.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ build:
envTemplate:
template: "{{.DOCKER_REGISTRY}}/gitcoinco/web:{{.VERSION}}"
artifacts:
- imageName: changeme
- imageName: gitcoin-web
workspace: .
docker: {}
local: {}
Expand Down

0 comments on commit ac17b58

Please sign in to comment.