Skip to content

Commit 068ffd9

Browse files
committed
Add Helm chart usage instructions and update image tags in deployment templates
1 parent 8ece645 commit 068ffd9

File tree

10 files changed

+32
-29
lines changed

10 files changed

+32
-29
lines changed

README.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -568,6 +568,15 @@ make build
568568
```
569569

570570

571+
### How to use Helm chart
572+
573+
Inside the folder **./src/apps/k8s/helm** you can find the Helm chart to deploy the application on Kubernetes.
574+
575+
``` bash
576+
cd ./src/apps/k8s/helm
577+
microk8s helm install genocs ./gnxchart
578+
```
579+
571580

572581
### Deploy in a cloud instance
573582

src/apps/k8s/helm/gnxchart/Chart.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,10 @@ type: application
1515
# This is the chart version. This version number should be incremented each time you make changes
1616
# to the chart and its templates, including the app version.
1717
# Versions are expected to follow Semantic Versioning (https://semver.org/)
18-
version: 1.0.0
18+
version: 0.0.1
1919

2020
# This is the version number of the application being deployed. This version number should be
2121
# incremented each time you make changes to the application. Versions are not expected to
2222
# follow Semantic Versioning. They should reflect the version the application is using.
2323
# It is recommended to use it with quotes.
24-
appVersion: "1.0.0"
24+
appVersion: "1.16.0"
Lines changed: 8 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,8 @@
1-
1. Get the application URL by running these commands:
2-
{{- if .Values.ingress.enabled }}
3-
{{- range $host := .Values.ingress.hosts }}
4-
{{- range .paths }}
5-
http{{ if $.Values.ingress.tls }}s{{ end }}://{{ $host.host }}{{ .path }}
6-
{{- end }}
7-
{{- end }}
8-
{{- else if contains "NodePort" .Values.service.type }}
9-
export NODE_PORT=$(kubectl get --namespace {{ .Release.Namespace }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ include "gnxchart.fullname" . }})
10-
export NODE_IP=$(kubectl get nodes --namespace {{ .Release.Namespace }} -o jsonpath="{.items[0].status.addresses[0].address}")
11-
echo http://$NODE_IP:$NODE_PORT
12-
{{- else if contains "LoadBalancer" .Values.service.type }}
13-
NOTE: It may take a few minutes for the LoadBalancer IP to be available.
14-
You can watch the status of by running 'kubectl get --namespace {{ .Release.Namespace }} svc -w {{ include "gnxchart.fullname" . }}'
15-
export SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ include "gnxchart.fullname" . }} --template "{{"{{ range (index .status.loadBalancer.ingress 0) }}{{.}}{{ end }}"}}")
16-
echo http://$SERVICE_IP:{{ .Values.service.port }}
17-
{{- else if contains "ClusterIP" .Values.service.type }}
18-
export POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l "app.kubernetes.io/name={{ include "gnxchart.name" . }},app.kubernetes.io/instance={{ .Release.Name }}" -o jsonpath="{.items[0].metadata.name}")
19-
export CONTAINER_PORT=$(kubectl get pod --namespace {{ .Release.Namespace }} $POD_NAME -o jsonpath="{.spec.containers[0].ports[0].containerPort}")
20-
echo "Visit http://127.0.0.1:8080 to use your application"
21-
kubectl --namespace {{ .Release.Namespace }} port-forward $POD_NAME 8080:$CONTAINER_PORT
22-
{{- end }}
1+
Thank you for installing {{ .Chart.Name }}.
2+
3+
Your release is named {{ .Release.Name }}.
4+
5+
To learn more about the release, try:
6+
7+
$ helm status {{ .Release.Name }}
8+
$ helm get all {{ .Release.Name }}

src/apps/k8s/helm/gnxchart/templates/apigateway-deployment.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ spec:
1616
spec:
1717
containers:
1818
- name: apigateway-container
19-
image: genocs/apigateway:1.0.4 # Replace with your image
19+
image: "genocs/apigateway:{{ .Values.imageTag.apigateway }}"
2020
env:
2121
- name: ASPNETCORE_ENVIRONMENT
2222
value: "Development"

src/apps/k8s/helm/gnxchart/templates/identities-deployment.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ spec:
1616
spec:
1717
containers:
1818
- name: identities-container
19-
image: genocs/identities-webapi:1.0.4 # Replace with your image
19+
image: "genocs/identities-webapi:{{ .Values.imageTag.identities }}"
2020
env:
2121
- name: ASPNETCORE_ENVIRONMENT
2222
value: "Development"

src/apps/k8s/helm/gnxchart/templates/notifications-deployment.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ spec:
1616
spec:
1717
containers:
1818
- name: notifications-container
19-
image: genocs/notifications-webapi:1.0.4 # Replace with your image
19+
image: "genocs/notifications-webapi:{{ .Values.imageTag.notifications }}"
2020
env:
2121
- name: ASPNETCORE_ENVIRONMENT
2222
value: "Development"

src/apps/k8s/helm/gnxchart/templates/orders-deployment.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ spec:
1717
spec:
1818
containers:
1919
- name: orders-container
20-
image: genocs/orders-webapi:1.0.4 # Replace with your image
20+
image: "genocs/orders-webapi:{{ .Values.imageTag.orders }}"
2121
env:
2222
- name: ASPNETCORE_ENVIRONMENT
2323
value: "Development"

src/apps/k8s/helm/gnxchart/templates/products-deployment.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ spec:
1717
spec:
1818
containers:
1919
- name: products-container
20-
image: genocs/products-webapi:1.0.4 # Replace with your image
20+
image: "genocs/products-webapi:{{ .Values.imageTag.products }}"
2121
env:
2222
- name: ASPNETCORE_ENVIRONMENT
2323
value: "Development"

src/apps/k8s/helm/gnxchart/values.yaml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,3 +105,11 @@ nodeSelector: {}
105105
tolerations: []
106106

107107
affinity: {}
108+
109+
# imageTag is a map of image tags for each of the services
110+
imageTag:
111+
apigateway: "1.0.4"
112+
identities: "1.0.4"
113+
products: "1.0.4"
114+
orders: "1.0.4"
115+
notifications: "1.0.4"

0 commit comments

Comments
 (0)