Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PR-test #5

Open
wants to merge 8 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,9 @@ RUN mkdir -p /manning/rest_django_payments
WORKDIR /manning/rest_django_payments
COPY requirements.txt /manning/rest_django_payments/
RUN pip install -r requirements.txt
RUN pip install -r mysqlclient
ADD . /manning/rest_django_payments/

EXPOSE 8200
EXPOSE 8080

CMD ["gunicorn", "--chdir", "rest_django_payments", "--bind", ":8200", "rest_django_payments.wsgi:application"]
CMD ["gunicorn", "--bind", ":8080", "rest_django_payments.wsgi:application"]
8 changes: 8 additions & 0 deletions charts/preview/requirements.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,14 @@ dependencies:
repository: http://chartmuseum.jenkins-x.io
version: 2.3.92

- name: mysql
repository: https://kubernetes-charts.storage.googleapis.com/
version: ">=0.15.0"

- name: rest-django-trading
repository: http://jenkins-x-chartmuseum:8080/
version: ">= 0.0.1"

# !! "alias: preview" must be last entry in dependencies array !!
# !! Place custom dependencies above !!
- alias: preview
Expand Down
8 changes: 8 additions & 0 deletions charts/preview/templates/mysql.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
apiVersion: v1
kind: Service
metadata:
name: mysql
spec:
externalName: mysql
ports:
- port: 3306
16 changes: 14 additions & 2 deletions charts/preview/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,21 @@ expose:
exposer: Ingress
http: true
tlsacme: false
mysql:
fullnameOverride: mysql
persistence:
enabled: true
accessMode: ReadWriteOnce
size: 1Gi
annotations: {}
mysqlRootPassword: password
mysqlDatabase: moneyfx

preview:
nameOverride: rest-django-payments
replicaCount: 1
image:
repository:
tag:
pullPolicy: IfNotPresent
repository: null
tag: null
namespace: jx-previews
4 changes: 4 additions & 0 deletions charts/rest-django-payments/templates/service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@ spec:
targetPort: {{ .Values.service.internalPort }}
protocol: TCP
name: http
- port: 8200
targetPort: {{ .Values.service.internalPort }}
protocol: TCP
name: http-old
selector:
app: {{ template "fullname" . }}
{{- end }}
10 changes: 5 additions & 5 deletions charts/rest-django-payments/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -47,17 +47,17 @@ service:
name: rest-django-payments
type: ClusterIP
externalPort: 80
internalPort: 8080
internalPort: 8200
annotations:
fabric8.io/expose: "true"
fabric8.io/ingress.annotations: "kubernetes.io/ingress.class: nginx"
resources:
limits:
cpu: 100m
memory: 128Mi
cpu: 200m
memory: 512Mi
requests:
cpu: 100m
memory: 128Mi
cpu: 200m
memory: 512Mi
ingress:
enabled: false
probePath: /
Expand Down