Skip to content

Commit 6007b29

Browse files
author
Ted Spinks
committed
Initial creation of 3 microservices
1 parent ff94c0f commit 6007b29

File tree

115 files changed

+3049
-3
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

115 files changed

+3049
-3
lines changed

.gitignore

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1-
.eggs
2-
.pytest_cache/
3-
minitwit.egg-info
1+
# macOS custom attributes file
2+
.DS_Store
3+
4+
# Codefresh CLI log
5+
**/venonalog.json
File renamed without changes.
File renamed without changes.

buslog/chart/Chart.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
apiVersion: v1
2+
description: A Helm chart for Kubernetes
3+
name: flaskr-buslogic
4+
version: 0.0.2
5+
appVersion: 268b6f1

buslog/chart/templates/NOTES.txt

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
2+
{{- if contains "NodePort" .Values.service.type }}
3+
Get the application URL by running these commands:
4+
export NODE_PORT=$(kubectl get --namespace {{ .Release.Namespace }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ template "fullname" . }})
5+
export NODE_IP=$(kubectl get nodes --namespace {{ .Release.Namespace }} -o jsonpath="{.items[0].status.addresses[0].address}")
6+
echo http://$NODE_IP:$NODE_PORT/login
7+
{{- else if contains "LoadBalancer" .Values.service.type }}
8+
Get the application URL by running these commands:
9+
NOTE: It may take a few minutes for the LoadBalancer IP to be available.
10+
You can watch the status of by running 'kubectl get svc -w {{ template "fullname" . }}'
11+
export SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ template "fullname" . }} -o jsonpath='{.status.loadBalancer.ingress[0].ip}')
12+
echo http://$SERVICE_IP:{{ .Values.service.externalPort }}
13+
{{- else }}
14+
http://{{ .Release.Name }}.{{ .Values.basedomain }} to access your application
15+
{{- end }}

buslog/chart/templates/_helpers.tpl

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
{{/* vim: set filetype=mustache: */}}
2+
{{/*
3+
Expand the name of the chart.
4+
*/}}
5+
{{- define "name" -}}
6+
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}}
7+
{{- end -}}
8+
9+
{{/*
10+
Create a default fully qualified app name.
11+
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
12+
*/}}
13+
{{- define "fullname" -}}
14+
{{- $name := default .Chart.Name .Values.nameOverride -}}
15+
{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}}
16+
{{- end -}}
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
apiVersion: apps/v1
2+
kind: Deployment
3+
metadata:
4+
name: {{ template "fullname" . }}
5+
labels:
6+
draft: {{ default "draft-app" .Values.draft }}
7+
chart: "{{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}"
8+
app: {{ template "fullname" . }}
9+
spec:
10+
replicas: {{ .Values.replicaCount }}
11+
selector:
12+
matchLabels:
13+
app: {{ template "fullname" . }}
14+
template:
15+
metadata:
16+
annotations:
17+
buildID: "{{ .Values.buildID }}"
18+
labels:
19+
draft: {{ default "draft-app" .Values.draft }}
20+
app: {{ template "fullname" . }}
21+
spec:
22+
containers:
23+
- name: {{ .Chart.Name }}
24+
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
25+
imagePullPolicy: {{ .Values.image.pullPolicy }}
26+
ports:
27+
- containerPort: {{ .Values.service.internalPort }}
28+
resources:
29+
{{ toYaml .Values.resources | indent 12 }}

buslog/chart/templates/ingress.yaml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
{{- if .Values.ingress.enabled -}}
2+
apiVersion: extensions/v1beta1
3+
kind: Ingress
4+
metadata:
5+
name: {{ template "fullname" . }}
6+
labels:
7+
chart: "{{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}"
8+
spec:
9+
rules:
10+
- host: {{ .Release.Name }}.{{ .Values.basedomain }}
11+
http:
12+
paths:
13+
- path: /
14+
backend:
15+
serviceName: {{ template "fullname" . }}
16+
servicePort: {{ .Values.service.externalPort }}
17+
{{- end -}}

0 commit comments

Comments
 (0)