Browse Source

helm charts mostly finished

pull/867/head
eiximenis 6 years ago
parent
commit
91fdc3bd8a
110 changed files with 1080 additions and 770 deletions
  1. +2
    -19
      k8s/helm/apigwmm/templates/NOTES.txt
  2. +4
    -4
      k8s/helm/apigwmm/templates/deployment.yaml
  3. +2
    -3
      k8s/helm/apigwmm/templates/ingress.yaml
  4. +1
    -2
      k8s/helm/apigwmm/templates/ocelot-cm.yaml
  5. +1
    -1
      k8s/helm/apigwmm/values.yaml
  6. +2
    -19
      k8s/helm/apigwms/templates/NOTES.txt
  7. +4
    -4
      k8s/helm/apigwms/templates/deployment.yaml
  8. +2
    -3
      k8s/helm/apigwms/templates/ingress.yaml
  9. +1
    -2
      k8s/helm/apigwms/templates/ocelot-cm.yaml
  10. +1
    -1
      k8s/helm/apigwms/values.yaml
  11. +2
    -19
      k8s/helm/apigwwm/templates/NOTES.txt
  12. +4
    -4
      k8s/helm/apigwwm/templates/deployment.yaml
  13. +2
    -3
      k8s/helm/apigwwm/templates/ingress.yaml
  14. +1
    -2
      k8s/helm/apigwwm/templates/ocelot-cm.yaml
  15. +1
    -1
      k8s/helm/apigwwm/values.yaml
  16. +2
    -19
      k8s/helm/apigwws/templates/NOTES.txt
  17. +4
    -4
      k8s/helm/apigwws/templates/deployment.yaml
  18. +2
    -3
      k8s/helm/apigwws/templates/ingress.yaml
  19. +1
    -2
      k8s/helm/apigwws/templates/ocelot-cm.yaml
  20. +1
    -1
      k8s/helm/apigwws/values.yaml
  21. +1
    -1
      k8s/helm/app.yaml
  22. +8
    -19
      k8s/helm/basket-api/templates/NOTES.txt
  23. +0
    -34
      k8s/helm/basket-api/templates/ingress.yaml
  24. +0
    -7
      k8s/helm/basket-api/values.yaml
  25. +21
    -0
      k8s/helm/basket-data/.helmignore
  26. +5
    -0
      k8s/helm/basket-data/Chart.yaml
  27. +8
    -0
      k8s/helm/basket-data/templates/NOTES.txt
  28. +32
    -0
      k8s/helm/basket-data/templates/_helpers.tpl
  29. +43
    -0
      k8s/helm/basket-data/templates/deployment.yaml
  30. +19
    -0
      k8s/helm/basket-data/templates/service.yaml
  31. +19
    -0
      k8s/helm/basket-data/values.yaml
  32. +9
    -19
      k8s/helm/catalog-api/templates/NOTES.txt
  33. +1
    -1
      k8s/helm/catalog-api/templates/configmap.yaml
  34. +0
    -34
      k8s/helm/catalog-api/templates/ingress.yaml
  35. +0
    -6
      k8s/helm/catalog-api/values.yaml
  36. +66
    -0
      k8s/helm/deploy-all.ps1
  37. +21
    -0
      k8s/helm/eshop-common/.helmignore
  38. +5
    -0
      k8s/helm/eshop-common/Chart.yaml
  39. +7
    -0
      k8s/helm/eshop-common/templates/NOTES.txt
  40. +32
    -0
      k8s/helm/eshop-common/templates/_helpers.tpl
  41. +3
    -0
      k8s/helm/eshop-common/templates/_names.tpl
  42. +9
    -0
      k8s/helm/eshop-common/templates/secret.yaml
  43. +0
    -0
      k8s/helm/eshop-common/values.yaml
  44. +4
    -19
      k8s/helm/identity-api/templates/NOTES.txt
  45. +1
    -1
      k8s/helm/identity-api/templates/configmap.yaml
  46. +2
    -3
      k8s/helm/identity-api/templates/ingress.yaml
  47. +2
    -2
      k8s/helm/identity-api/values.yaml
  48. +16
    -9
      k8s/helm/inf.yaml
  49. +5
    -0
      k8s/helm/ingress_values.yaml
  50. +21
    -0
      k8s/helm/keystore-data/.helmignore
  51. +5
    -0
      k8s/helm/keystore-data/Chart.yaml
  52. +8
    -0
      k8s/helm/keystore-data/templates/NOTES.txt
  53. +32
    -0
      k8s/helm/keystore-data/templates/_helpers.tpl
  54. +43
    -0
      k8s/helm/keystore-data/templates/deployment.yaml
  55. +19
    -0
      k8s/helm/keystore-data/templates/service.yaml
  56. +19
    -0
      k8s/helm/keystore-data/values.yaml
  57. +9
    -19
      k8s/helm/locations-api/templates/NOTES.txt
  58. +0
    -34
      k8s/helm/locations-api/templates/ingress.yaml
  59. +9
    -19
      k8s/helm/marketing-api/templates/NOTES.txt
  60. +0
    -34
      k8s/helm/marketing-api/templates/ingress.yaml
  61. +8
    -19
      k8s/helm/mobileshoppingagg/templates/NOTES.txt
  62. +0
    -34
      k8s/helm/mobileshoppingagg/templates/ingress.yaml
  63. +21
    -0
      k8s/helm/nosql-data/.helmignore
  64. +5
    -0
      k8s/helm/nosql-data/Chart.yaml
  65. +8
    -0
      k8s/helm/nosql-data/templates/NOTES.txt
  66. +32
    -0
      k8s/helm/nosql-data/templates/_helpers.tpl
  67. +8
    -0
      k8s/helm/nosql-data/templates/_names.tpl
  68. +43
    -0
      k8s/helm/nosql-data/templates/deployment.yaml
  69. +19
    -0
      k8s/helm/nosql-data/templates/service.yaml
  70. +19
    -0
      k8s/helm/nosql-data/values.yaml
  71. +8
    -19
      k8s/helm/ordering-api/templates/NOTES.txt
  72. +1
    -1
      k8s/helm/ordering-api/templates/configmap.yaml
  73. +0
    -34
      k8s/helm/ordering-api/templates/ingress.yaml
  74. +3
    -19
      k8s/helm/ordering-backgroundtasks/templates/NOTES.txt
  75. +1
    -1
      k8s/helm/ordering-backgroundtasks/templates/configmap.yaml
  76. +0
    -34
      k8s/helm/ordering-backgroundtasks/templates/ingress.yaml
  77. +0
    -2
      k8s/helm/ordering-backgroundtasks/values.yaml
  78. +8
    -19
      k8s/helm/ordering-signalrhub/templates/NOTES.txt
  79. +0
    -34
      k8s/helm/ordering-signalrhub/templates/ingress.yaml
  80. +1
    -1
      k8s/helm/ordering-signalrhub/values.yaml
  81. +9
    -19
      k8s/helm/payment-api/templates/NOTES.txt
  82. +0
    -34
      k8s/helm/payment-api/templates/ingress.yaml
  83. +1
    -1
      k8s/helm/payment-api/values.yaml
  84. +21
    -0
      k8s/helm/rabbitmq/.helmignore
  85. +5
    -0
      k8s/helm/rabbitmq/Chart.yaml
  86. +8
    -0
      k8s/helm/rabbitmq/templates/NOTES.txt
  87. +32
    -0
      k8s/helm/rabbitmq/templates/_helpers.tpl
  88. +8
    -0
      k8s/helm/rabbitmq/templates/_names.tpl
  89. +43
    -0
      k8s/helm/rabbitmq/templates/deployment.yaml
  90. +19
    -0
      k8s/helm/rabbitmq/templates/service.yaml
  91. +19
    -0
      k8s/helm/rabbitmq/values.yaml
  92. +21
    -0
      k8s/helm/sql-data/.helmignore
  93. +5
    -0
      k8s/helm/sql-data/Chart.yaml
  94. +8
    -0
      k8s/helm/sql-data/templates/NOTES.txt
  95. +32
    -0
      k8s/helm/sql-data/templates/_helpers.tpl
  96. +8
    -0
      k8s/helm/sql-data/templates/_names.tpl
  97. +50
    -0
      k8s/helm/sql-data/templates/deployment.yaml
  98. +19
    -0
      k8s/helm/sql-data/templates/service.yaml
  99. +19
    -0
      k8s/helm/sql-data/values.yaml
  100. +2
    -19
      k8s/helm/webmvc/templates/NOTES.txt

+ 2
- 19
k8s/helm/apigwmm/templates/NOTES.txt View File

@ -1,19 +1,2 @@
1. Get the application URL by running these commands:
{{- if .Values.ingress.enabled }}
{{- range .Values.ingress.hosts }}
http{{ if $.Values.ingress.tls }}s{{ end }}://{{ . }}{{ $.Values.ingress.path }}
{{- end }}
{{- else if contains "NodePort" .Values.service.type }}
export NODE_PORT=$(kubectl get --namespace {{ .Release.Namespace }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ template "apigwmm.fullname" . }})
export NODE_IP=$(kubectl get nodes --namespace {{ .Release.Namespace }} -o jsonpath="{.items[0].status.addresses[0].address}")
echo http://$NODE_IP:$NODE_PORT
{{- else if contains "LoadBalancer" .Values.service.type }}
NOTE: It may take a few minutes for the LoadBalancer IP to be available.
You can watch the status of by running 'kubectl get svc -w {{ template "apigwmm.fullname" . }}'
export SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ template "apigwmm.fullname" . }} -o jsonpath='{.status.loadBalancer.ingress[0].ip}')
echo http://$SERVICE_IP:{{ .Values.service.port }}
{{- else if contains "ClusterIP" .Values.service.type }}
export POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l "app={{ template "apigwmm.name" . }},release={{ .Release.Name }}" -o jsonpath="{.items[0].metadata.name}")
echo "Visit http://127.0.0.1:8080 to use your application"
kubectl port-forward $POD_NAME 8080:80
{{- end }}
eShop API Gateway for Mobile Marketing services installed
----------------------------------------------------------

+ 4
- 4
k8s/helm/apigwmm/templates/deployment.yaml View File

@ -34,15 +34,15 @@ spec:
configMap:
name: {{ $ocelotcfgname }}
items:
- key: mm
- key: configuration-mobile-marketing.json
path: configuration.json
containers:
- name: {{ .Chart.Name }}
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
volumeMounts:
- name: config
mountPath: /app/configuration
volumeMounts:
- name: config
mountPath: /app/configuration
env:
- name: PATH_BASE
value: {{ include "pathBase" (list .Values.app.ingress.entries.mobilemarketingapigw .) }}


+ 2
- 3
k8s/helm/apigwmm/templates/ingress.yaml View File

@ -1,10 +1,9 @@
{{- if .Values.ingress.enabled -}}
{{- $fullName := include "apigwmm.fullname" . -}}
{{- $ingressPath := include "pathBase" (list .Values.app.ingress.entries.mobilemarketingapigw .) -}}
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
name: {{ $fullName }}
name: {{ template "apigwmm.fullname" . }}
labels:
app: {{ template "apigwmm.name" . }}
chart: {{ template "apigwmm.chart" . }}
@ -29,6 +28,6 @@ spec:
paths:
- path: {{ $ingressPath }}
backend:
serviceName: {{ $fullName }}
serviceName: {{ .Values.app.svc.mobilemarketingapigw }}
servicePort: http
{{- end }}

+ 1
- 2
k8s/helm/apigwmm/templates/ocelot-cm.yaml View File

@ -10,6 +10,5 @@ metadata:
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
data:
mm: |-
{{ (.Files.Glob "configuration-mobile-marketing.json").AsConfig }}
{{ (.Files.Glob "configuration-mobile-marketing.json").AsConfig | indent 2 }}

+ 1
- 1
k8s/helm/apigwmm/values.yaml View File

@ -12,7 +12,7 @@ service:
port: 80
ingress:
enabled: false
enabled: true
annotations: {}
tls: []


+ 2
- 19
k8s/helm/apigwms/templates/NOTES.txt View File

@ -1,19 +1,2 @@
1. Get the application URL by running these commands:
{{- if .Values.ingress.enabled }}
{{- range .Values.ingress.hosts }}
http{{ if $.Values.ingress.tls }}s{{ end }}://{{ . }}{{ $.Values.ingress.path }}
{{- end }}
{{- else if contains "NodePort" .Values.service.type }}
export NODE_PORT=$(kubectl get --namespace {{ .Release.Namespace }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ template "apigwms.fullname" . }})
export NODE_IP=$(kubectl get nodes --namespace {{ .Release.Namespace }} -o jsonpath="{.items[0].status.addresses[0].address}")
echo http://$NODE_IP:$NODE_PORT
{{- else if contains "LoadBalancer" .Values.service.type }}
NOTE: It may take a few minutes for the LoadBalancer IP to be available.
You can watch the status of by running 'kubectl get svc -w {{ template "apigwms.fullname" . }}'
export SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ template "apigwms.fullname" . }} -o jsonpath='{.status.loadBalancer.ingress[0].ip}')
echo http://$SERVICE_IP:{{ .Values.service.port }}
{{- else if contains "ClusterIP" .Values.service.type }}
export POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l "app={{ template "apigwms.name" . }},release={{ .Release.Name }}" -o jsonpath="{.items[0].metadata.name}")
echo "Visit http://127.0.0.1:8080 to use your application"
kubectl port-forward $POD_NAME 8080:80
{{- end }}
eShop API Gateway for Mobile Shopping services installed
--------------------------------------------------------

+ 4
- 4
k8s/helm/apigwms/templates/deployment.yaml View File

@ -34,15 +34,15 @@ spec:
configMap:
name: {{ $ocelotcfgname }}
items:
- key: ms
- key: configuration-mobile-shopping.json
path: configuration.json
containers:
- name: {{ .Chart.Name }}
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
volumeMounts:
- name: config
mountPath: /app/configuration
volumeMounts:
- name: config
mountPath: /app/configuration
env:
- name: PATH_BASE
value: {{ include "pathBase" (list .Values.app.ingress.entries.mobileshoppingapigw .) }}


+ 2
- 3
k8s/helm/apigwms/templates/ingress.yaml View File

@ -1,10 +1,9 @@
{{- if .Values.ingress.enabled -}}
{{- $fullName := include "apigwms.fullname" . -}}
{{- $ingressPath := include "pathBase" (list .Values.app.ingress.entries.mobileshoppingapigw .) -}}
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
name: {{ $fullName }}
name: {{ template "apigwms.fullname" . }}
labels:
app: {{ template "apigwms.name" . }}
chart: {{ template "apigwms.chart" . }}
@ -29,6 +28,6 @@ spec:
paths:
- path: {{ $ingressPath }}
backend:
serviceName: {{ $fullName }}
serviceName: {{ .Values.app.svc.mobileshoppingapigw }}
servicePort: http
{{- end }}

+ 1
- 2
k8s/helm/apigwms/templates/ocelot-cm.yaml View File

@ -10,6 +10,5 @@ metadata:
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
data:
ms: |-
{{ (.Files.Glob "configuration-mobile-shopping.json").AsConfig }}
{{ (.Files.Glob "configuration-mobile-shopping.json").AsConfig | indent 2 }}

+ 1
- 1
k8s/helm/apigwms/values.yaml View File

@ -12,7 +12,7 @@ service:
port: 80
ingress:
enabled: false
enabled: true
annotations: {}
tls: []


+ 2
- 19
k8s/helm/apigwwm/templates/NOTES.txt View File

@ -1,19 +1,2 @@
1. Get the application URL by running these commands:
{{- if .Values.ingress.enabled }}
{{- range .Values.ingress.hosts }}
http{{ if $.Values.ingress.tls }}s{{ end }}://{{ . }}{{ $.Values.ingress.path }}
{{- end }}
{{- else if contains "NodePort" .Values.service.type }}
export NODE_PORT=$(kubectl get --namespace {{ .Release.Namespace }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ template "apigwwm.fullname" . }})
export NODE_IP=$(kubectl get nodes --namespace {{ .Release.Namespace }} -o jsonpath="{.items[0].status.addresses[0].address}")
echo http://$NODE_IP:$NODE_PORT
{{- else if contains "LoadBalancer" .Values.service.type }}
NOTE: It may take a few minutes for the LoadBalancer IP to be available.
You can watch the status of by running 'kubectl get svc -w {{ template "apigwwm.fullname" . }}'
export SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ template "apigwwm.fullname" . }} -o jsonpath='{.status.loadBalancer.ingress[0].ip}')
echo http://$SERVICE_IP:{{ .Values.service.port }}
{{- else if contains "ClusterIP" .Values.service.type }}
export POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l "app={{ template "apigwwm.name" . }},release={{ .Release.Name }}" -o jsonpath="{.items[0].metadata.name}")
echo "Visit http://127.0.0.1:8080 to use your application"
kubectl port-forward $POD_NAME 8080:80
{{- end }}
eShop API Gateway for Web Marketing services installed
------------------------------------------------------

+ 4
- 4
k8s/helm/apigwwm/templates/deployment.yaml View File

@ -34,15 +34,15 @@ spec:
configMap:
name: {{ $ocelotcfgname }}
items:
- key: wm
- key: configuration-web-marketing.json
path: configuration.json
containers:
- name: {{ .Chart.Name }}
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
volumeMounts:
- name: config
mountPath: /app/configuration
volumeMounts:
- name: config
mountPath: /app/configuration
env:
- name: PATH_BASE
value: {{ include "pathBase" (list .Values.app.ingress.entries.webmarketingapigw .) }}


+ 2
- 3
k8s/helm/apigwwm/templates/ingress.yaml View File

@ -1,10 +1,9 @@
{{- if .Values.ingress.enabled -}}
{{- $fullName := include "apigwwm.fullname" . -}}
{{- $ingressPath := include "pathBase" (list .Values.app.ingress.entries.webmarketingapigw .) -}}
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
name: {{ $fullName }}
name: {{ template "apigwwm.fullname" . }}
labels:
app: {{ template "apigwwm.name" . }}
chart: {{ template "apigwwm.chart" . }}
@ -29,6 +28,6 @@ spec:
paths:
- path: {{ $ingressPath }}
backend:
serviceName: {{ $fullName }}
serviceName: {{ .Values.app.svc.webmarketingapigw }}
servicePort: http
{{- end }}

+ 1
- 2
k8s/helm/apigwwm/templates/ocelot-cm.yaml View File

@ -10,6 +10,5 @@ metadata:
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
data:
wm: |-
{{ (.Files.Glob "configuration-web-marketing.json").AsConfig }}
{{ (.Files.Glob "configuration-web-marketing.json").AsConfig | indent 2 -}}

+ 1
- 1
k8s/helm/apigwwm/values.yaml View File

@ -12,7 +12,7 @@ service:
port: 80
ingress:
enabled: false
enabled: true
annotations: {}
tls: []


+ 2
- 19
k8s/helm/apigwws/templates/NOTES.txt View File

@ -1,19 +1,2 @@
1. Get the application URL by running these commands:
{{- if .Values.ingress.enabled }}
{{- range .Values.ingress.hosts }}
http{{ if $.Values.ingress.tls }}s{{ end }}://{{ . }}{{ $.Values.ingress.path }}
{{- end }}
{{- else if contains "NodePort" .Values.service.type }}
export NODE_PORT=$(kubectl get --namespace {{ .Release.Namespace }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ template "apigwws.fullname" . }})
export NODE_IP=$(kubectl get nodes --namespace {{ .Release.Namespace }} -o jsonpath="{.items[0].status.addresses[0].address}")
echo http://$NODE_IP:$NODE_PORT
{{- else if contains "LoadBalancer" .Values.service.type }}
NOTE: It may take a few minutes for the LoadBalancer IP to be available.
You can watch the status of by running 'kubectl get svc -w {{ template "apigwws.fullname" . }}'
export SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ template "apigwws.fullname" . }} -o jsonpath='{.status.loadBalancer.ingress[0].ip}')
echo http://$SERVICE_IP:{{ .Values.service.port }}
{{- else if contains "ClusterIP" .Values.service.type }}
export POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l "app={{ template "apigwws.name" . }},release={{ .Release.Name }}" -o jsonpath="{.items[0].metadata.name}")
echo "Visit http://127.0.0.1:8080 to use your application"
kubectl port-forward $POD_NAME 8080:80
{{- end }}
eShop API Gateway for Web Shopping services installed
-----------------------------------------------------

+ 4
- 4
k8s/helm/apigwws/templates/deployment.yaml View File

@ -34,15 +34,15 @@ spec:
configMap:
name: {{ $ocelotcfgname }}
items:
- key: ws
- key: configuration-web-shopping.json
path: configuration.json
containers:
- name: {{ .Chart.Name }}
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
volumeMounts:
- name: config
mountPath: /app/configuration
volumeMounts:
- name: config
mountPath: /app/configuration
env:
- name: PATH_BASE
value: {{ include "pathBase" (list .Values.app.ingress.entries.webshoppingapigw .) }}


+ 2
- 3
k8s/helm/apigwws/templates/ingress.yaml View File

@ -1,10 +1,9 @@
{{- if .Values.ingress.enabled -}}
{{- $fullName := include "apigwws.fullname" . -}}
{{- $ingressPath := include "pathBase" (list .Values.app.ingress.entries.webshoppingapigw .) -}}
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
name: {{ $fullName }}
name: {{ template "apigwws.fullname" . }}
labels:
app: {{ template "apigwws.name" . }}
chart: {{ template "apigwws.chart" . }}
@ -29,6 +28,6 @@ spec:
paths:
- path: {{ $ingressPath }}
backend:
serviceName: {{ $fullName }}
serviceName: {{ .Values.app.svc.webshoppingapigw }}
servicePort: http
{{- end }}

+ 1
- 2
k8s/helm/apigwws/templates/ocelot-cm.yaml View File

@ -10,6 +10,5 @@ metadata:
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
data:
ws: |-
{{ (.Files.Glob "configuration-web-shopping.json").AsConfig }}
{{ (.Files.Glob "configuration-web-shopping.json").AsConfig | indent 2 }}

+ 1
- 1
k8s/helm/apigwws/values.yaml View File

@ -12,7 +12,7 @@ service:
port: 80
ingress:
enabled: false
enabled: true
annotations: {}
tls: []


+ 1
- 1
k8s/helm/app.yaml View File

@ -40,4 +40,4 @@ app: # app global settings
mobileshoppingagg: mobileshoppingagg # service name for mobile shopping aggregator
payment: payment # service name for payment api
locations: locations # service name for locations api
marketing: marketing # service name for marketing api
marketing: marketing # service name for marketing ap

+ 8
- 19
k8s/helm/basket-api/templates/NOTES.txt View File

@ -1,19 +1,8 @@
1. Get the application URL by running these commands:
{{- if .Values.ingress.enabled }}
{{- range .Values.ingress.hosts }}
http{{ if $.Values.ingress.tls }}s{{ end }}://{{ . }}{{ $.Values.ingress.path }}
{{- end }}
{{- else if contains "NodePort" .Values.service.type }}
export NODE_PORT=$(kubectl get --namespace {{ .Release.Namespace }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ template "basket-api.fullname" . }})
export NODE_IP=$(kubectl get nodes --namespace {{ .Release.Namespace }} -o jsonpath="{.items[0].status.addresses[0].address}")
echo http://$NODE_IP:$NODE_PORT
{{- else if contains "LoadBalancer" .Values.service.type }}
NOTE: It may take a few minutes for the LoadBalancer IP to be available.
You can watch the status of by running 'kubectl get svc -w {{ template "basket-api.fullname" . }}'
export SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ template "basket-api.fullname" . }} -o jsonpath='{.status.loadBalancer.ingress[0].ip}')
echo http://$SERVICE_IP:{{ .Values.service.port }}
{{- else if contains "ClusterIP" .Values.service.type }}
export POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l "app={{ template "basket-api.name" . }},release={{ .Release.Name }}" -o jsonpath="{.items[0].metadata.name}")
echo "Visit http://127.0.0.1:8080 to use your application"
kubectl port-forward $POD_NAME 8080:80
{{- end }}
eShop Basket API installed.
--------------------------
This API is not directly exposed outside cluster. If need to access it use:
export POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l "app={{ template "basket-api.name" . }},release={{ .Release.Name }}" -o jsonpath="{.items[0].metadata.name}")
echo "Visit http://127.0.0.1:8080 to use your application"
kubectl port-forward $POD_NAME 8080:80

+ 0
- 34
k8s/helm/basket-api/templates/ingress.yaml View File

@ -1,34 +0,0 @@
{{- if .Values.ingress.enabled -}}
{{- $fullName := include "basket-api.fullname" . -}}
{{- $ingressPath := include "pathBase" . -}}
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
name: {{ $fullName }}
labels:
app: {{ template "basket-api.name" . }}
chart: {{ template "basket-api.chart" . }}
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
{{- with .Values.ingress.annotations }}
annotations:
{{ toYaml . | indent 4 }}
{{- end }}
spec:
{{- if .Values.ingress.tls }}
tls:
{{- range .Values.ingress.tls }}
- hosts:
- {{ .Values.inf.k8s.dns }}
secretName: {{ .secretName }}
{{- end }}
{{- end }}
rules:
- host: {{ .Values.inf.k8s.dns }}
http:
paths:
- path: {{ $ingressPath }}
backend:
serviceName: {{ $fullName }}
servicePort: http
{{- end }}

+ 0
- 7
k8s/helm/basket-api/values.yaml View File

@ -11,13 +11,6 @@ service:
type: ClusterIP
port: 80
ingress:
enabled: false
annotations: {}
hosts:
- chart-example.local
tls: []
resources: {}


+ 21
- 0
k8s/helm/basket-data/.helmignore View File

@ -0,0 +1,21 @@
# Patterns to ignore when building packages.
# This supports shell glob matching, relative path matching, and
# negation (prefixed with !). Only one pattern per line.
.DS_Store
# Common VCS dirs
.git/
.gitignore
.bzr/
.bzrignore
.hg/
.hgignore
.svn/
# Common backup files
*.swp
*.bak
*.tmp
*~
# Various IDEs
.project
.idea/
*.tmproj

+ 5
- 0
k8s/helm/basket-data/Chart.yaml View File

@ -0,0 +1,5 @@
apiVersion: v1
appVersion: "1.0"
description: A Helm chart for Kubernetes
name: basket-data
version: 0.1.0

+ 8
- 0
k8s/helm/basket-data/templates/NOTES.txt View File

@ -0,0 +1,8 @@
eShop Redis for keystore data installed
----------------------------------------
Redis is not directly exposed outside cluster. If need to access it from outside use:
export POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l "app={{ template "basket-data.name" . }},release={{ .Release.Name }}" -o jsonpath="{.items[0].metadata.name}")
echo "Visit http://127.0.0.1:8080 to use your application"
kubectl port-forward $POD_NAME 8080:80

+ 32
- 0
k8s/helm/basket-data/templates/_helpers.tpl View File

@ -0,0 +1,32 @@
{{/* vim: set filetype=mustache: */}}
{{/*
Expand the name of the chart.
*/}}
{{- define "basket-data.name" -}}
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}}
{{- end -}}
{{/*
Create a default fully qualified app name.
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
If release name contains chart name it will be used as a full name.
*/}}
{{- define "basket-data.fullname" -}}
{{- if .Values.fullnameOverride -}}
{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}}
{{- else -}}
{{- $name := default .Chart.Name .Values.nameOverride -}}
{{- if contains $name .Release.Name -}}
{{- .Release.Name | trunc 63 | trimSuffix "-" -}}
{{- else -}}
{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}}
{{- end -}}
{{- end -}}
{{- end -}}
{{/*
Create chart name and version as used by the chart label.
*/}}
{{- define "basket-data.chart" -}}
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}}
{{- end -}}

+ 43
- 0
k8s/helm/basket-data/templates/deployment.yaml View File

@ -0,0 +1,43 @@
apiVersion: apps/v1beta2
kind: Deployment
metadata:
name: {{ template "basket-data.fullname" . }}
labels:
app: {{ template "basket-data.name" . }}
chart: {{ template "basket-data.chart" . }}
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
spec:
replicas: {{ .Values.replicaCount }}
selector:
matchLabels:
app: {{ template "basket-data.name" . }}
release: {{ .Release.Name }}
template:
metadata:
labels:
app: {{ template "basket-data.name" . }}
release: {{ .Release.Name }}
spec:
containers:
- name: {{ .Chart.Name }}
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
ports:
- name: http
containerPort: 6379
protocol: TCP
resources:
{{ toYaml .Values.resources | indent 12 }}
{{- with .Values.nodeSelector }}
nodeSelector:
{{ toYaml . | indent 8 }}
{{- end }}
{{- with .Values.affinity }}
affinity:
{{ toYaml . | indent 8 }}
{{- end }}
{{- with .Values.tolerations }}
tolerations:
{{ toYaml . | indent 8 }}
{{- end }}

+ 19
- 0
k8s/helm/basket-data/templates/service.yaml View File

@ -0,0 +1,19 @@
apiVersion: v1
kind: Service
metadata:
name: {{ .Values.inf.redis.basket.svc }}
labels:
app: {{ template "basket-data.name" . }}
chart: {{ template "basket-data.chart" . }}
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
spec:
type: {{ .Values.service.type }}
ports:
- port: {{ .Values.service.port }}
targetPort: http
protocol: TCP
name: http
selector:
app: {{ template "basket-data.name" . }}
release: {{ .Release.Name }}

+ 19
- 0
k8s/helm/basket-data/values.yaml View File

@ -0,0 +1,19 @@
replicaCount: 1
image:
repository: redis
tag: 4.0.10
pullPolicy: IfNotPresent
service:
type: ClusterIP
port: 6379
resources: {}
nodeSelector: {}
tolerations: []
affinity: {}

+ 9
- 19
k8s/helm/catalog-api/templates/NOTES.txt View File

@ -1,19 +1,9 @@
1. Get the application URL by running these commands:
{{- if .Values.ingress.enabled }}
{{- range .Values.ingress.hosts }}
http{{ if $.Values.ingress.tls }}s{{ end }}://{{ . }}{{ $.Values.ingress.path }}
{{- end }}
{{- else if contains "NodePort" .Values.service.type }}
export NODE_PORT=$(kubectl get --namespace {{ .Release.Namespace }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ template "catalog-api.fullname" . }})
export NODE_IP=$(kubectl get nodes --namespace {{ .Release.Namespace }} -o jsonpath="{.items[0].status.addresses[0].address}")
echo http://$NODE_IP:$NODE_PORT
{{- else if contains "LoadBalancer" .Values.service.type }}
NOTE: It may take a few minutes for the LoadBalancer IP to be available.
You can watch the status of by running 'kubectl get svc -w {{ template "catalog-api.fullname" . }}'
export SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ template "catalog-api.fullname" . }} -o jsonpath='{.status.loadBalancer.ingress[0].ip}')
echo http://$SERVICE_IP:{{ .Values.service.port }}
{{- else if contains "ClusterIP" .Values.service.type }}
export POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l "app={{ template "catalog-api.name" . }},release={{ .Release.Name }}" -o jsonpath="{.items[0].metadata.name}")
echo "Visit http://127.0.0.1:8080 to use your application"
kubectl port-forward $POD_NAME 8080:80
{{- end }}
eShop Catalog API installed.
----------------------------
This API is not directly exposed outside cluster. If need to access it use:
export POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l "app={{ template "catalog-api.name" . }},release={{ .Release.Name }}" -o jsonpath="{.items[0].metadata.name}")
echo "Visit http://127.0.0.1:8080 to use your application"
kubectl port-forward $POD_NAME 8080:80

+ 1
- 1
k8s/helm/catalog-api/templates/configmap.yaml View File

@ -12,7 +12,7 @@ metadata:
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
data:
catalog__ConnectionString: Server={{ $sqlsrv }};Initial Catalog={{ .Values.inf.sql.catalog.db }};User Id={{ .Values.inf.sql.catalog.user }};Password={{ .Values.inf.sql.catalog.pwd }};
catalog__ConnectionString: Server={{ $sqlsrv }};Initial Catalog={{ .Values.inf.sql.catalog.db }};User Id={{ .Values.inf.sql.common.user }};Password={{ .Values.inf.sql.common.pwd }};
catalog__PicBaseUrl: http://{{ $webshoppingapigw }}/api/v1/c/catalog/items/[0]/pic/
catalog__AzureStorageEnabled: "{{ .Values.inf.misc.useAzureStorage }}"
all__EventBusConnection: {{ .Values.inf.eventbus.constr }}


+ 0
- 34
k8s/helm/catalog-api/templates/ingress.yaml View File

@ -1,34 +0,0 @@
{{- if .Values.ingress.enabled -}}
{{- $fullName := include "catalog-api.fullname" . -}}
{{- $ingressPath := include "pathBase" . -}}
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
name: {{ $fullName }}
labels:
app: {{ template "catalog-api.name" . }}
chart: {{ template "catalog-api.chart" . }}
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
{{- with .Values.ingress.annotations }}
annotations:
{{ toYaml . | indent 4 }}
{{- end }}
spec:
{{- if .Values.ingress.tls }}
tls:
{{- range .Values.ingress.tls }}
- hosts:
- {{ .Values.inf.k8s.dns }}
secretName: {{ .secretName }}
{{- end }}
{{- end }}
rules:
- host: {{ .Values.inf.k8s.dns }}
http:
paths:
- path: {{ $ingressPath }}
backend:
serviceName: {{ $fullName }}
servicePort: http
{{- end }}

+ 0
- 6
k8s/helm/catalog-api/values.yaml View File

@ -11,12 +11,6 @@ service:
type: ClusterIP
port: 80
ingress:
enabled: false
annotations: {}
hosts:
- chart-example.local
tls: []
resources: {}


+ 66
- 0
k8s/helm/deploy-all.ps1 View File

@ -0,0 +1,66 @@
Param(
[parameter(Mandatory=$false)][string]$registry,
[parameter(Mandatory=$false)][string]$dockerUser,
[parameter(Mandatory=$false)][string]$dockerPassword,
[parameter(Mandatory=$false)][string]$externalDns,
[parameter(Mandatory=$false)][string]$appName="eshop",
[parameter(Mandatory=$false)][bool]$deployInfrastructure=$true,
[parameter(Mandatory=$false)][bool]$clean=$true,
[parameter(Mandatory=$false)][string]$aksName="",
[parameter(Mandatory=$false)][string]$aksRg="",
[parameter(Mandatory=$false)][string]$imageTag="latest"
)
$dns = $externalDns
if ($externalDns -eq "aks") {
if ([string]::IsNullOrEmpty($aksName) -or [string]::IsNullOrEmpty($aksRg)) {
Write-Host "Error: When using -dns aks, MUST set -aksName and -aksRg too." -ForegroundColor Red
exit 1
}
Write-Host "Getting DNS of AKS of AKS $aksName (in resource group $aksRg)..." -ForegroundColor Green
$dns = $(az aks show -n $aksName -g $aksRg --query addonProfiles.httpApplicationRouting.config.HTTPApplicationRoutingZoneName)
if ([string]::IsNullOrEmpty($dns)) {
Write-Host "Error getting DNS of AKS $aksName (in resource group $aksRg). Please ensure AKS has httpRouting enabled AND Azure CLI is logged & in version 2.0.37 or higher" -ForegroundColor Red
exit 1
}
$dns = $dns -replace '[\"]'
Write-Host "DNS base found is $dns. Will use $appName.$dns for the app!" -ForegroundColor Green
$dns = "$appName.$dns"
}
# Initialization & check commands
if ([string]::IsNullOrEmpty($dns)) {
Write-Host "No DNS specified. Ingress resources will be bound to public ip" -ForegroundColor Yellow
}
if ($clean) {
Write-Host "Cleaning previous helm releases..." -ForegroundColor Green
helm delete --purge $(helm ls -q)
Write-Host "Previous releases deleted" -ForegroundColor Green
}
$useDockerHub = [string]::IsNullOrEmpty($registry)
Write-Host "Begin eShopOnContainers installation using Helm" -ForegroundColor Green
$infras = ("sql-data", "nosql-data", "rabbitmq", "keystore-data", "basket-data")
$charts = ("eshop-common", "apigwmm", "apigwms", "apigwwm", "apigwws", "basket-api","catalog-api", "-api", "locations-api", "marketing-api", "mobileshoppingagg","ordering-api","ordering-backgroundtasks","ordering-signalrhub", "payment-api", "webmvc", "webshoppingagg", "webspa", "webstatus")
if ($deployInfrastructure) {
foreach ($infra in $infras) {
Write-Host "Installing infrastructure: $infra" -ForegroundColor Green
helm install --values app.yaml --values inf.yaml --values ingress_values.yaml --set appName=$appName --set inf.k8s.dns=$dns --name="$appName-$infra" $infra
}
}
foreach ($chart in $charts) {
Write-Host "Installing: $chart" -ForegroundColor Green
helm install --values app.yaml --values inf.yaml --values ingress_values.yaml --set appName=$appName --set inf.k8s.dns=$dns --set image.tag=$imageTag --name="$appName-$chart" $chart
}
Write-Host "helm charts installed." -ForegroundColor Green

+ 21
- 0
k8s/helm/eshop-common/.helmignore View File

@ -0,0 +1,21 @@
# Patterns to ignore when building packages.
# This supports shell glob matching, relative path matching, and
# negation (prefixed with !). Only one pattern per line.
.DS_Store
# Common VCS dirs
.git/
.gitignore
.bzr/
.bzrignore
.hg/
.hgignore
.svn/
# Common backup files
*.swp
*.bak
*.tmp
*~
# Various IDEs
.project
.idea/
*.tmproj

+ 5
- 0
k8s/helm/eshop-common/Chart.yaml View File

@ -0,0 +1,5 @@
apiVersion: v1
appVersion: "1.0"
description: A Helm chart for Kubernetes
name: eshop-common
version: 0.1.0

+ 7
- 0
k8s/helm/eshop-common/templates/NOTES.txt View File

@ -0,0 +1,7 @@
Common eShop resources installed:
{{- if .Values.inf.registry -}}
* Docker registry secret ({{ .Values.inf.registry.secretName }})
{{- end -}}
+++ Done +++

+ 32
- 0
k8s/helm/eshop-common/templates/_helpers.tpl View File

@ -0,0 +1,32 @@
{{/* vim: set filetype=mustache: */}}
{{/*
Expand the name of the chart.
*/}}
{{- define "eshop-common.name" -}}
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}}
{{- end -}}
{{/*
Create a default fully qualified app name.
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
If release name contains chart name it will be used as a full name.
*/}}
{{- define "eshop-common.fullname" -}}
{{- if .Values.fullnameOverride -}}
{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}}
{{- else -}}
{{- $name := default .Chart.Name .Values.nameOverride -}}
{{- if contains $name .Release.Name -}}
{{- .Release.Name | trunc 63 | trimSuffix "-" -}}
{{- else -}}
{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}}
{{- end -}}
{{- end -}}
{{- end -}}
{{/*
Create chart name and version as used by the chart label.
*/}}
{{- define "eshop-common.chart" -}}
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}}
{{- end -}}

+ 3
- 0
k8s/helm/eshop-common/templates/_names.tpl View File

@ -0,0 +1,3 @@
{{- define "imagePullSecret" }}
{{- printf "{\"auths\": {\"%s\": {\"auth\": \"%s\"}}}" .Values.inf.registry.server (printf "%s:%s" .Values.inf.registry.login .Values.inf.registry.pwd | b64enc) | b64enc }}
{{- end }}

+ 9
- 0
k8s/helm/eshop-common/templates/secret.yaml View File

@ -0,0 +1,9 @@
{{- if .Values.inf.registry -}}
apiVersion: v1
kind: Secret
metadata:
name: {{ .Values.inf.registry.secretName }}
type: kubernetes.io/dockerconfigjson
data:
.dockerconfigjson: {{ template "imagePullSecret" . }}
{{- end -}}

+ 0
- 0
k8s/helm/eshop-common/values.yaml View File


+ 4
- 19
k8s/helm/identity-api/templates/NOTES.txt View File

@ -1,19 +1,4 @@
1. Get the application URL by running these commands:
{{- if .Values.ingress.enabled }}
{{- range .Values.ingress.hosts }}
http{{ if $.Values.ingress.tls }}s{{ end }}://{{ . }}{{ $.Values.ingress.path }}
{{- end }}
{{- else if contains "NodePort" .Values.service.type }}
export NODE_PORT=$(kubectl get --namespace {{ .Release.Namespace }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ template "identity-api.fullname" . }})
export NODE_IP=$(kubectl get nodes --namespace {{ .Release.Namespace }} -o jsonpath="{.items[0].status.addresses[0].address}")
echo http://$NODE_IP:$NODE_PORT
{{- else if contains "LoadBalancer" .Values.service.type }}
NOTE: It may take a few minutes for the LoadBalancer IP to be available.
You can watch the status of by running 'kubectl get svc -w {{ template "identity-api.fullname" . }}'
export SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ template "identity-api.fullname" . }} -o jsonpath='{.status.loadBalancer.ingress[0].ip}')
echo http://$SERVICE_IP:{{ .Values.service.port }}
{{- else if contains "ClusterIP" .Values.service.type }}
export POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l "app={{ template "identity-api.name" . }},release={{ .Release.Name }}" -o jsonpath="{.items[0].metadata.name}")
echo "Visit http://127.0.0.1:8080 to use your application"
kubectl port-forward $POD_NAME 8080:80
{{- end }}
eShop Identity API installed.
-----------------------------
Access this API through ingress.

+ 1
- 1
k8s/helm/identity-api/templates/configmap.yaml View File

@ -20,7 +20,7 @@ metadata:
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
data:
identity__ConnectionString: Server={{ $sqlsrv }};Initial Catalog={{ .Values.inf.sql.identity.db }};User Id={{ .Values.inf.sql.identity.user }};Password={{ .Values.inf.sql.identity.pwd }};
identity__ConnectionString: Server={{ $sqlsrv }};Initial Catalog={{ .Values.inf.sql.identity.db }};User Id={{ .Values.inf.sql.common.user }};Password={{ .Values.inf.sql.common.pwd }};
identity__keystore: http://{{ .Values.inf.redis.keystore.constr }}
all__InstrumentationKey: http://{{ .Values.inf.appinsights.key }}
mvc_e: http://{{ $mvc_url }}


+ 2
- 3
k8s/helm/identity-api/templates/ingress.yaml View File

@ -1,10 +1,9 @@
{{- if .Values.ingress.enabled -}}
{{- $fullName := include "identity-api.fullname" . -}}
{{- $ingressPath := include "pathBase" . -}}
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
name: {{ $fullName }}
name: {{ template "identity-api.fullname" . }}
labels:
app: {{ template "identity-api.name" . }}
chart: {{ template "identity-api.chart" . }}
@ -29,6 +28,6 @@ spec:
paths:
- path: {{ $ingressPath }}
backend:
serviceName: {{ $fullName }}
serviceName: {{ .Values.app.svc.identity }}
servicePort: http
{{- end }}

+ 2
- 2
k8s/helm/identity-api/values.yaml View File

@ -3,7 +3,7 @@ clusterName: eshop-aks
pathBase: /identity
image:
repository: eshop/ordering.backgroundtasks
repository: eshop/identity.api
tag: latest
pullPolicy: IfNotPresent
@ -12,7 +12,7 @@ service:
port: 80
ingress:
enabled: false
enabled: true
annotations: {}
hosts:
- chart-example.local


+ 16
- 9
k8s/helm/inf.yaml View File

@ -3,18 +3,16 @@
inf:
sql: # inf.sql defines the sql server databases & logins
# host: my-sql-server # Uncomment to specify a custom sql-server to be used. By default "sql-data-<appname>" will be used
# host: my-sql-server # Uncomment to specify a custom sql-server to be used. By default "sql-data-<appname>" will be used
common:
user: sa # SQL user
pwd: Pass@word # SQL pwd
pid: Developer
catalog: # inf.sql.catalog: settings for the catalog-api sql (user, pwd, db)
user: sa # Catalog API SQL user
pwd: Pass@word # Catalog API SQL pwd
db: CatalogDb # Catalog API SQL db name
ordering: # inf.sql.ordering: settings for the ordering-api sql (user, pwd, db)
user: sa # Ordering API SQL user
pwd: Pass@word # Ordering API SQL pwd
db: OrderingDb # Ordering API SQL db name
identity:
user: sa # Ordering API SQL user
pwd: Pass@word # Ordering API SQL pwd
db: IdentityDb # Ordering API SQL db name
mongo:
# host: my-nosql-data # Uncomment to use specify custom mongo host. By default nosql-data is used
@ -23,12 +21,15 @@ inf:
marketing:
database: MarketingDb
redis: # inf.redis defines the redis' connection strings
basket:
basket:
svc: basket-data # Name of k8s svc for basket redis
constr: basket-data # Connection string to Redis used by Basket API
keystore:
svc: keystore-data # Name of k8s svc for keystore-data redis
constr: keystore-data # Connection string to Redis used as a Keystore (by Identity API)
eventbus:
constr: rabbitmq # Event bus connection strin g
svc: rabbitmq # Name of k8s svc for rabbitmq
constr: rabbitmq # Event bus connection string
useAzure: false # true if use Azure Service Bus. False if RabbitMQ
appinsights:
key: "" # App insights to use
@ -39,3 +40,9 @@ inf:
misc: # inf.misc contains miscellaneous configuration related to infrastructure
useLoadTest: false # If running under loading test or not
useAzureStorage: false # If catalog api uses azure storage or not
# registry: # Uncomment "registry" to specify registry secret
# secretName: # secretName is the name of the secret inside k8s
# server: # Registry login server
# login: # User login
# pwd: # User pwd

+ 5
- 0
k8s/helm/ingress_values.yaml View File

@ -0,0 +1,5 @@
ingress:
annotations:
kubernetes.io/ingress.class: addon-http-application-routing
ingress.kubernetes.io/ssl-redirect: "false"
nginx.ingress.kubernetes.io/ssl-redirect: "false"

+ 21
- 0
k8s/helm/keystore-data/.helmignore View File

@ -0,0 +1,21 @@
# Patterns to ignore when building packages.
# This supports shell glob matching, relative path matching, and
# negation (prefixed with !). Only one pattern per line.
.DS_Store
# Common VCS dirs
.git/
.gitignore
.bzr/
.bzrignore
.hg/
.hgignore
.svn/
# Common backup files
*.swp
*.bak
*.tmp
*~
# Various IDEs
.project
.idea/
*.tmproj

+ 5
- 0
k8s/helm/keystore-data/Chart.yaml View File

@ -0,0 +1,5 @@
apiVersion: v1
appVersion: "1.0"
description: A Helm chart for Kubernetes
name: keystore-data
version: 0.1.0

+ 8
- 0
k8s/helm/keystore-data/templates/NOTES.txt View File

@ -0,0 +1,8 @@
eShop Redis for keystore data installed
----------------------------------------
Redis is not directly exposed outside cluster. If need to access it from outside use:
export POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l "app={{ template "keystore-data.name" . }},release={{ .Release.Name }}" -o jsonpath="{.items[0].metadata.name}")
echo "Visit http://127.0.0.1:8080 to use your application"
kubectl port-forward $POD_NAME 8080:80

+ 32
- 0
k8s/helm/keystore-data/templates/_helpers.tpl View File

@ -0,0 +1,32 @@
{{/* vim: set filetype=mustache: */}}
{{/*
Expand the name of the chart.
*/}}
{{- define "keystore-data.name" -}}
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}}
{{- end -}}
{{/*
Create a default fully qualified app name.
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
If release name contains chart name it will be used as a full name.
*/}}
{{- define "keystore-data.fullname" -}}
{{- if .Values.fullnameOverride -}}
{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}}
{{- else -}}
{{- $name := default .Chart.Name .Values.nameOverride -}}
{{- if contains $name .Release.Name -}}
{{- .Release.Name | trunc 63 | trimSuffix "-" -}}
{{- else -}}
{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}}
{{- end -}}
{{- end -}}
{{- end -}}
{{/*
Create chart name and version as used by the chart label.
*/}}
{{- define "keystore-data.chart" -}}
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}}
{{- end -}}

+ 43
- 0
k8s/helm/keystore-data/templates/deployment.yaml View File

@ -0,0 +1,43 @@
apiVersion: apps/v1beta2
kind: Deployment
metadata:
name: {{ template "keystore-data.fullname" . }}
labels:
app: {{ template "keystore-data.name" . }}
chart: {{ template "keystore-data.chart" . }}
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
spec:
replicas: {{ .Values.replicaCount }}
selector:
matchLabels:
app: {{ template "keystore-data.name" . }}
release: {{ .Release.Name }}
template:
metadata:
labels:
app: {{ template "keystore-data.name" . }}
release: {{ .Release.Name }}
spec:
containers:
- name: {{ .Chart.Name }}
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
ports:
- name: http
containerPort: 6379
protocol: TCP
resources:
{{ toYaml .Values.resources | indent 12 }}
{{- with .Values.nodeSelector }}
nodeSelector:
{{ toYaml . | indent 8 }}
{{- end }}
{{- with .Values.affinity }}
affinity:
{{ toYaml . | indent 8 }}
{{- end }}
{{- with .Values.tolerations }}
tolerations:
{{ toYaml . | indent 8 }}
{{- end }}

+ 19
- 0
k8s/helm/keystore-data/templates/service.yaml View File

@ -0,0 +1,19 @@
apiVersion: v1
kind: Service
metadata:
name: {{ .Values.inf.redis.keystore.svc }}
labels:
app: {{ template "keystore-data.name" . }}
chart: {{ template "keystore-data.chart" . }}
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
spec:
type: {{ .Values.service.type }}
ports:
- port: {{ .Values.service.port }}
targetPort: http
protocol: TCP
name: http
selector:
app: {{ template "keystore-data.name" . }}
release: {{ .Release.Name }}

+ 19
- 0
k8s/helm/keystore-data/values.yaml View File

@ -0,0 +1,19 @@
replicaCount: 1
image:
repository: redis
tag: 4.0.10
pullPolicy: IfNotPresent
service:
type: ClusterIP
port: 6379
resources: {}
nodeSelector: {}
tolerations: []
affinity: {}

+ 9
- 19
k8s/helm/locations-api/templates/NOTES.txt View File

@ -1,19 +1,9 @@
1. Get the application URL by running these commands:
{{- if .Values.ingress.enabled }}
{{- range .Values.ingress.hosts }}
http{{ if $.Values.ingress.tls }}s{{ end }}://{{ . }}{{ $.Values.ingress.path }}
{{- end }}
{{- else if contains "NodePort" .Values.service.type }}
export NODE_PORT=$(kubectl get --namespace {{ .Release.Namespace }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ template "locations-api.fullname" . }})
export NODE_IP=$(kubectl get nodes --namespace {{ .Release.Namespace }} -o jsonpath="{.items[0].status.addresses[0].address}")
echo http://$NODE_IP:$NODE_PORT
{{- else if contains "LoadBalancer" .Values.service.type }}
NOTE: It may take a few minutes for the LoadBalancer IP to be available.
You can watch the status of by running 'kubectl get svc -w {{ template "locations-api.fullname" . }}'
export SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ template "locations-api.fullname" . }} -o jsonpath='{.status.loadBalancer.ingress[0].ip}')
echo http://$SERVICE_IP:{{ .Values.service.port }}
{{- else if contains "ClusterIP" .Values.service.type }}
export POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l "app={{ template "locations-api.name" . }},release={{ .Release.Name }}" -o jsonpath="{.items[0].metadata.name}")
echo "Visit http://127.0.0.1:8080 to use your application"
kubectl port-forward $POD_NAME 8080:80
{{- end }}
eShop Locations API installed.
------------------------------
This API is not directly exposed outside cluster. If need to access it use:
export POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l "app={{ template "locations-api.name" . }},release={{ .Release.Name }}" -o jsonpath="{.items[0].metadata.name}")
echo "Visit http://127.0.0.1:8080 to use your application"
kubectl port-forward $POD_NAME 8080:80

+ 0
- 34
k8s/helm/locations-api/templates/ingress.yaml View File

@ -1,34 +0,0 @@
{{- if .Values.ingress.enabled -}}
{{- $fullName := include "locations-api.fullname" . -}}
{{- $ingressPath := include "pathBase" . -}}
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
name: {{ $fullName }}
labels:
app: {{ template "locations-api.name" . }}
chart: {{ template "locations-api.chart" . }}
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
{{- with .Values.ingress.annotations }}
annotations:
{{ toYaml . | indent 4 }}
{{- end }}
spec:
{{- if .Values.ingress.tls }}
tls:
{{- range .Values.ingress.tls }}
- hosts:
- {{ .Values.inf.k8s.dns }}
secretName: {{ .secretName }}
{{- end }}
{{- end }}
rules:
- host: {{ .Values.inf.k8s.dns }}
http:
paths:
- path: {{ $ingressPath }}
backend:
serviceName: {{ $fullName }}
servicePort: http
{{- end }}

+ 9
- 19
k8s/helm/marketing-api/templates/NOTES.txt View File

@ -1,19 +1,9 @@
1. Get the application URL by running these commands:
{{- if .Values.ingress.enabled }}
{{- range .Values.ingress.hosts }}
http{{ if $.Values.ingress.tls }}s{{ end }}://{{ . }}{{ $.Values.ingress.path }}
{{- end }}
{{- else if contains "NodePort" .Values.service.type }}
export NODE_PORT=$(kubectl get --namespace {{ .Release.Namespace }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ template "marketing-api.fullname" . }})
export NODE_IP=$(kubectl get nodes --namespace {{ .Release.Namespace }} -o jsonpath="{.items[0].status.addresses[0].address}")
echo http://$NODE_IP:$NODE_PORT
{{- else if contains "LoadBalancer" .Values.service.type }}
NOTE: It may take a few minutes for the LoadBalancer IP to be available.
You can watch the status of by running 'kubectl get svc -w {{ template "marketing-api.fullname" . }}'
export SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ template "marketing-api.fullname" . }} -o jsonpath='{.status.loadBalancer.ingress[0].ip}')
echo http://$SERVICE_IP:{{ .Values.service.port }}
{{- else if contains "ClusterIP" .Values.service.type }}
export POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l "app={{ template "marketing-api.name" . }},release={{ .Release.Name }}" -o jsonpath="{.items[0].metadata.name}")
echo "Visit http://127.0.0.1:8080 to use your application"
kubectl port-forward $POD_NAME 8080:80
{{- end }}
eShop Marketing API installed.
------------------------------
This API is not directly exposed outside cluster. If need to access it use:
export POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l "app={{ template "marketing-api.name" . }},release={{ .Release.Name }}" -o jsonpath="{.items[0].metadata.name}")
echo "Visit http://127.0.0.1:8080 to use your application"
kubectl port-forward $POD_NAME 8080:80

+ 0
- 34
k8s/helm/marketing-api/templates/ingress.yaml View File

@ -1,34 +0,0 @@
{{- if .Values.ingress.enabled -}}
{{- $fullName := include "marketing-api.fullname" . -}}
{{- $ingressPath := include "pathBase" . -}}
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
name: {{ $fullName }}
labels:
app: {{ template "marketing-api.name" . }}
chart: {{ template "marketing-api.chart" . }}
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
{{- with .Values.ingress.annotations }}
annotations:
{{ toYaml . | indent 4 }}
{{- end }}
spec:
{{- if .Values.ingress.tls }}
tls:
{{- range .Values.ingress.tls }}
- hosts:
- {{ .Values.inf.k8s.dns }}
secretName: {{ .secretName }}
{{- end }}
{{- end }}
rules:
- host: {{ .Values.inf.k8s.dns }}
http:
paths:
- path: {{ $ingressPath }}
backend:
serviceName: {{ $fullName }}
servicePort: http
{{- end }}

+ 8
- 19
k8s/helm/mobileshoppingagg/templates/NOTES.txt View File

@ -1,19 +1,8 @@
1. Get the application URL by running these commands:
{{- if .Values.ingress.enabled }}
{{- range .Values.ingress.hosts }}
http{{ if $.Values.ingress.tls }}s{{ end }}://{{ . }}{{ $.Values.ingress.path }}
{{- end }}
{{- else if contains "NodePort" .Values.service.type }}
export NODE_PORT=$(kubectl get --namespace {{ .Release.Namespace }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ template "mobileshoppingagg.fullname" . }})
export NODE_IP=$(kubectl get nodes --namespace {{ .Release.Namespace }} -o jsonpath="{.items[0].status.addresses[0].address}")
echo http://$NODE_IP:$NODE_PORT
{{- else if contains "LoadBalancer" .Values.service.type }}
NOTE: It may take a few minutes for the LoadBalancer IP to be available.
You can watch the status of by running 'kubectl get svc -w {{ template "mobileshoppingagg.fullname" . }}'
export SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ template "mobileshoppingagg.fullname" . }} -o jsonpath='{.status.loadBalancer.ingress[0].ip}')
echo http://$SERVICE_IP:{{ .Values.service.port }}
{{- else if contains "ClusterIP" .Values.service.type }}
export POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l "app={{ template "mobileshoppingagg.name" . }},release={{ .Release.Name }}" -o jsonpath="{.items[0].metadata.name}")
echo "Visit http://127.0.0.1:8080 to use your application"
kubectl port-forward $POD_NAME 8080:80
{{- end }}
eShop Mobile Marketing Aggregator is installed
----------------------------------------------
This API is not directly exposed outside cluster. If need to access it use:
export POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l "app={{ template "mobileshoppingagg.name" . }},release={{ .Release.Name }}" -o jsonpath="{.items[0].metadata.name}")
echo "Visit http://127.0.0.1:8080 to use your application"
kubectl port-forward $POD_NAME 8080:80

+ 0
- 34
k8s/helm/mobileshoppingagg/templates/ingress.yaml View File

@ -1,34 +0,0 @@
{{- if .Values.ingress.enabled -}}
{{- $fullName := include "mobileshoppingagg.fullname" . -}}
{{- $ingressPath := include "pathBase" . -}}
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
name: {{ $fullName }}
labels:
app: {{ template "mobileshoppingagg.name" . }}
chart: {{ template "mobileshoppingagg.chart" . }}
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
{{- with .Values.ingress.annotations }}
annotations:
{{ toYaml . | indent 4 }}
{{- end }}
spec:
{{- if .Values.ingress.tls }}
tls:
{{- range .Values.ingress.tls }}
- hosts:
- {{ .Values.inf.k8s.dns }}
secretName: {{ .secretName }}
{{- end }}
{{- end }}
rules:
- host: {{ .Values.inf.k8s.dns }}
http:
paths:
- path: {{ $ingressPath }}
backend:
serviceName: {{ $fullName }}
servicePort: http
{{- end }}

+ 21
- 0
k8s/helm/nosql-data/.helmignore View File

@ -0,0 +1,21 @@
# Patterns to ignore when building packages.
# This supports shell glob matching, relative path matching, and
# negation (prefixed with !). Only one pattern per line.
.DS_Store
# Common VCS dirs
.git/
.gitignore
.bzr/
.bzrignore
.hg/
.hgignore
.svn/
# Common backup files
*.swp
*.bak
*.tmp
*~
# Various IDEs
.project
.idea/
*.tmproj

+ 5
- 0
k8s/helm/nosql-data/Chart.yaml View File

@ -0,0 +1,5 @@
apiVersion: v1
appVersion: "1.0"
description: A Helm chart for Kubernetes
name: nosql-data
version: 0.1.0

+ 8
- 0
k8s/helm/nosql-data/templates/NOTES.txt View File

@ -0,0 +1,8 @@
eShop MongoDb Installed
-----------------------
MongoDb is not exposed outside the cluster. If need to access it from outside, use:
export POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l "app={{ template "nosql-data.name" . }},release={{ .Release.Name }}" -o jsonpath="{.items[0].metadata.name}")
echo "Visit http://127.0.0.1:8080 to use your application"
kubectl port-forward $POD_NAME 8080:80

+ 32
- 0
k8s/helm/nosql-data/templates/_helpers.tpl View File

@ -0,0 +1,32 @@
{{/* vim: set filetype=mustache: */}}
{{/*
Expand the name of the chart.
*/}}
{{- define "nosql-data.name" -}}
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}}
{{- end -}}
{{/*
Create a default fully qualified app name.
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
If release name contains chart name it will be used as a full name.
*/}}
{{- define "nosql-data.fullname" -}}
{{- if .Values.fullnameOverride -}}
{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}}
{{- else -}}
{{- $name := default .Chart.Name .Values.nameOverride -}}
{{- if contains $name .Release.Name -}}
{{- .Release.Name | trunc 63 | trimSuffix "-" -}}
{{- else -}}
{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}}
{{- end -}}
{{- end -}}
{{- end -}}
{{/*
Create chart name and version as used by the chart label.
*/}}
{{- define "nosql-data.chart" -}}
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}}
{{- end -}}

+ 8
- 0
k8s/helm/nosql-data/templates/_names.tpl View File

@ -0,0 +1,8 @@
{{- define "mongo-name" -}}
{{- if .Values.inf.mongo.host -}}
{{- .Values.inf.mongo.host -}}
{{- else -}}
{{- printf "%s" "nosql-data" -}}
{{- end -}}
{{- end -}}

+ 43
- 0
k8s/helm/nosql-data/templates/deployment.yaml View File

@ -0,0 +1,43 @@
apiVersion: apps/v1beta2
kind: Deployment
metadata:
name: {{ template "nosql-data.fullname" . }}
labels:
app: {{ template "nosql-data.name" . }}
chart: {{ template "nosql-data.chart" . }}
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
spec:
replicas: {{ .Values.replicaCount }}
selector:
matchLabels:
app: {{ template "nosql-data.name" . }}
release: {{ .Release.Name }}
template:
metadata:
labels:
app: {{ template "nosql-data.name" . }}
release: {{ .Release.Name }}
spec:
containers:
- name: {{ .Chart.Name }}
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
ports:
- name: http
containerPort: 27017
protocol: TCP
resources:
{{ toYaml .Values.resources | indent 12 }}
{{- with .Values.nodeSelector }}
nodeSelector:
{{ toYaml . | indent 8 }}
{{- end }}
{{- with .Values.affinity }}
affinity:
{{ toYaml . | indent 8 }}
{{- end }}
{{- with .Values.tolerations }}
tolerations:
{{ toYaml . | indent 8 }}
{{- end }}

+ 19
- 0
k8s/helm/nosql-data/templates/service.yaml View File

@ -0,0 +1,19 @@
apiVersion: v1
kind: Service
metadata:
name: {{ template "mongo-name" . }}
labels:
app: {{ template "nosql-data.name" . }}
chart: {{ template "nosql-data.chart" . }}
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
spec:
type: {{ .Values.service.type }}
ports:
- port: {{ .Values.service.port }}
targetPort: http
protocol: TCP
name: http
selector:
app: {{ template "nosql-data.name" . }}
release: {{ .Release.Name }}

+ 19
- 0
k8s/helm/nosql-data/values.yaml View File

@ -0,0 +1,19 @@
replicaCount: 1
image:
repository: mongo
tag: 3.6.5-jessie
pullPolicy: IfNotPresent
service:
type: ClusterIP
port: 27017
resources: {}
nodeSelector: {}
tolerations: []
affinity: {}

+ 8
- 19
k8s/helm/ordering-api/templates/NOTES.txt View File

@ -1,19 +1,8 @@
1. Get the application URL by running these commands:
{{- if .Values.ingress.enabled }}
{{- range .Values.ingress.hosts }}
http{{ if $.Values.ingress.tls }}s{{ end }}://{{ . }}{{ $.Values.ingress.path }}
{{- end }}
{{- else if contains "NodePort" .Values.service.type }}
export NODE_PORT=$(kubectl get --namespace {{ .Release.Namespace }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ template "ordering-api.fullname" . }})
export NODE_IP=$(kubectl get nodes --namespace {{ .Release.Namespace }} -o jsonpath="{.items[0].status.addresses[0].address}")
echo http://$NODE_IP:$NODE_PORT
{{- else if contains "LoadBalancer" .Values.service.type }}
NOTE: It may take a few minutes for the LoadBalancer IP to be available.
You can watch the status of by running 'kubectl get svc -w {{ template "ordering-api.fullname" . }}'
export SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ template "ordering-api.fullname" . }} -o jsonpath='{.status.loadBalancer.ingress[0].ip}')
echo http://$SERVICE_IP:{{ .Values.service.port }}
{{- else if contains "ClusterIP" .Values.service.type }}
export POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l "app={{ template "ordering-api.name" . }},release={{ .Release.Name }}" -o jsonpath="{.items[0].metadata.name}")
echo "Visit http://127.0.0.1:8080 to use your application"
kubectl port-forward $POD_NAME 8080:80
{{- end }}
eShop Ordering API installed.
-----------------------------
This API is not directly exposed outside cluster. If need to access it use:
export POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l "app={{ template "ordering-api.name" . }},release={{ .Release.Name }}" -o jsonpath="{.items[0].metadata.name}")
echo "Visit http://127.0.0.1:8080 to use your application"
kubectl port-forward $POD_NAME 8080:80

+ 1
- 1
k8s/helm/ordering-api/templates/configmap.yaml View File

@ -12,7 +12,7 @@ metadata:
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
data:
ordering__ConnectionString: Server={{ $sqlsrv }};Initial Catalog={{ .Values.inf.sql.ordering.db }};User Id={{ .Values.inf.sql.ordering.user }};Password={{ .Values.inf.sql.ordering.pwd }};
ordering__ConnectionString: Server={{ $sqlsrv }};Initial Catalog={{ .Values.inf.sql.ordering.db }};User Id={{ .Values.inf.sql.common.user }};Password={{ .Values.inf.sql.common.pwd }};
ordering__EnableLoadTest: "{{ .Values.inf.misc.useLoadTest }}"
urls__IdentityUrl: http://{{ $identity }}
all__EventBusConnection: {{ .Values.inf.eventbus.constr }}


+ 0
- 34
k8s/helm/ordering-api/templates/ingress.yaml View File

@ -1,34 +0,0 @@
{{- if .Values.ingress.enabled -}}
{{- $fullName := include "ordering-api.fullname" . -}}
{{- $ingressPath := include "pathBase" . -}}
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
name: {{ $fullName }}
labels:
app: {{ template "ordering-api.name" . }}
chart: {{ template "ordering-api.chart" . }}
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
{{- with .Values.ingress.annotations }}
annotations:
{{ toYaml . | indent 4 }}
{{- end }}
spec:
{{- if .Values.ingress.tls }}
tls:
{{- range .Values.ingress.tls }}
- hosts:
- {{ .Values.inf.k8s.dns }}
secretName: {{ .secretName }}
{{- end }}
{{- end }}
rules:
- host: {{ .Values.inf.k8s.dns }}
http:
paths:
- path: {{ $ingressPath }}
backend:
serviceName: {{ $fullName }}
servicePort: http
{{- end }}

+ 3
- 19
k8s/helm/ordering-backgroundtasks/templates/NOTES.txt View File

@ -1,19 +1,3 @@
1. Get the application URL by running these commands:
{{- if .Values.ingress.enabled }}
{{- range .Values.ingress.hosts }}
http{{ if $.Values.ingress.tls }}s{{ end }}://{{ . }}{{ $.Values.ingress.path }}
{{- end }}
{{- else if contains "NodePort" .Values.service.type }}
export NODE_PORT=$(kubectl get --namespace {{ .Release.Namespace }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ template "ordering-backgroundtasks.fullname" . }})
export NODE_IP=$(kubectl get nodes --namespace {{ .Release.Namespace }} -o jsonpath="{.items[0].status.addresses[0].address}")
echo http://$NODE_IP:$NODE_PORT
{{- else if contains "LoadBalancer" .Values.service.type }}
NOTE: It may take a few minutes for the LoadBalancer IP to be available.
You can watch the status of by running 'kubectl get svc -w {{ template "ordering-backgroundtasks.fullname" . }}'
export SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ template "ordering-backgroundtasks.fullname" . }} -o jsonpath='{.status.loadBalancer.ingress[0].ip}')
echo http://$SERVICE_IP:{{ .Values.service.port }}
{{- else if contains "ClusterIP" .Values.service.type }}
export POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l "app={{ template "ordering-backgroundtasks.name" . }},release={{ .Release.Name }}" -o jsonpath="{.items[0].metadata.name}")
echo "Visit http://127.0.0.1:8080 to use your application"
kubectl port-forward $POD_NAME 8080:80
{{- end }}
eShop Ordering Background Tasks installed.
------------------------------------------

+ 1
- 1
k8s/helm/ordering-backgroundtasks/templates/configmap.yaml View File

@ -11,7 +11,7 @@ metadata:
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
data:
ordering__ConnectionString: Server={{ $sqlsrv }};Initial Catalog={{ .Values.inf.sql.ordering.db }};User Id={{ .Values.inf.sql.ordering.user }};Password={{ .Values.inf.sql.ordering.pwd }};
ordering__ConnectionString: Server={{ $sqlsrv }};Initial Catalog={{ .Values.inf.sql.ordering.db }};User Id={{ .Values.inf.sql.common.user }};Password={{ .Values.inf.sql.common.pwd }};
ordering__EnableLoadTest: "{{ .Values.inf.misc.useLoadTest }}"
all__EventBusConnection: {{ .Values.inf.eventbus.constr }}
all__InstrumentationKey: {{ .Values.inf.appinsights.key }}


+ 0
- 34
k8s/helm/ordering-backgroundtasks/templates/ingress.yaml View File

@ -1,34 +0,0 @@
{{- if .Values.ingress.enabled -}}
{{- $fullName := include "ordering-backgroundtasks.fullname" . -}}
{{- $ingressPath := include "pathBase" . -}}
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
name: {{ $fullName }}
labels:
app: {{ template "ordering-backgroundtasks.name" . }}
chart: {{ template "ordering-backgroundtasks.chart" . }}
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
{{- with .Values.ingress.annotations }}
annotations:
{{ toYaml . | indent 4 }}
{{- end }}
spec:
{{- if .Values.ingress.tls }}
tls:
{{- range .Values.ingress.tls }}
- hosts:
- {{ .Values.inf.k8s.dns }}
secretName: {{ .secretName }}
{{- end }}
{{- end }}
rules:
- host: {{ .Values.inf.k8s.dns }}
http:
paths:
- path: {{ $ingressPath }}
backend:
serviceName: {{ $fullName }}
servicePort: http
{{- end }}

+ 0
- 2
k8s/helm/ordering-backgroundtasks/values.yaml View File

@ -44,8 +44,6 @@ env:
key: all__EventBusConnection
- name: AzureServiceBusEnabled
key: all__UseAzureServiceBus
- name: IdentityUrl
key: urls__IdentityUrl
- name: UseLoadTest
key: ordering__EnableLoadTest
- name: CheckUpdateTime


+ 8
- 19
k8s/helm/ordering-signalrhub/templates/NOTES.txt View File

@ -1,19 +1,8 @@
1. Get the application URL by running these commands:
{{- if .Values.ingress.enabled }}
{{- range .Values.ingress.hosts }}
http{{ if $.Values.ingress.tls }}s{{ end }}://{{ . }}{{ $.Values.ingress.path }}
{{- end }}
{{- else if contains "NodePort" .Values.service.type }}
export NODE_PORT=$(kubectl get --namespace {{ .Release.Namespace }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ template "ordering-signalrhub.fullname" . }})
export NODE_IP=$(kubectl get nodes --namespace {{ .Release.Namespace }} -o jsonpath="{.items[0].status.addresses[0].address}")
echo http://$NODE_IP:$NODE_PORT
{{- else if contains "LoadBalancer" .Values.service.type }}
NOTE: It may take a few minutes for the LoadBalancer IP to be available.
You can watch the status of by running 'kubectl get svc -w {{ template "ordering-signalrhub.fullname" . }}'
export SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ template "ordering-signalrhub.fullname" . }} -o jsonpath='{.status.loadBalancer.ingress[0].ip}')
echo http://$SERVICE_IP:{{ .Values.service.port }}
{{- else if contains "ClusterIP" .Values.service.type }}
export POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l "app={{ template "ordering-signalrhub.name" . }},release={{ .Release.Name }}" -o jsonpath="{.items[0].metadata.name}")
echo "Visit http://127.0.0.1:8080 to use your application"
kubectl port-forward $POD_NAME 8080:80
{{- end }}
eShop Ordering SignalR Hub installed
------------------------------------
This API is not directly exposed outside cluster. If need to access it use:
export POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l "app={{ template "ordering-signalrhub.name" . }},release={{ .Release.Name }}" -o jsonpath="{.items[0].metadata.name}")
echo "Visit http://127.0.0.1:8080 to use your application"
kubectl port-forward $POD_NAME 8080:80

+ 0
- 34
k8s/helm/ordering-signalrhub/templates/ingress.yaml View File

@ -1,34 +0,0 @@
{{- if .Values.ingress.enabled -}}
{{- $fullName := include "ordering-signalrhub.fullname" . -}}
{{- $ingressPath := include "pathBase" . -}}
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
name: {{ $fullName }}
labels:
app: {{ template "ordering-signalrhub.name" . }}
chart: {{ template "ordering-signalrhub.chart" . }}
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
{{- with .Values.ingress.annotations }}
annotations:
{{ toYaml . | indent 4 }}
{{- end }}
spec:
{{- if .Values.ingress.tls }}
tls:
{{- range .Values.ingress.tls }}
- hosts:
- {{ .Values.inf.k8s.dns }}
secretName: {{ .secretName }}
{{- end }}
{{- end }}
rules:
- host: {{ .Values.inf.k8s.dns }}
http:
paths:
- path: {{ $ingressPath }}
backend:
serviceName: {{ $fullName }}
servicePort: http
{{- end }}

+ 1
- 1
k8s/helm/ordering-signalrhub/values.yaml View File

@ -3,7 +3,7 @@ clusterName: eshop-aks
pathBase: /ordering-signalrhub
image:
repository: eshop/ordering-signalrhub
repository: eshop/ordering.signalrhub
tag: latest
pullPolicy: IfNotPresent


+ 9
- 19
k8s/helm/payment-api/templates/NOTES.txt View File

@ -1,19 +1,9 @@
1. Get the application URL by running these commands:
{{- if .Values.ingress.enabled }}
{{- range .Values.ingress.hosts }}
http{{ if $.Values.ingress.tls }}s{{ end }}://{{ . }}{{ $.Values.ingress.path }}
{{- end }}
{{- else if contains "NodePort" .Values.service.type }}
export NODE_PORT=$(kubectl get --namespace {{ .Release.Namespace }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ template "payment-api.fullname" . }})
export NODE_IP=$(kubectl get nodes --namespace {{ .Release.Namespace }} -o jsonpath="{.items[0].status.addresses[0].address}")
echo http://$NODE_IP:$NODE_PORT
{{- else if contains "LoadBalancer" .Values.service.type }}
NOTE: It may take a few minutes for the LoadBalancer IP to be available.
You can watch the status of by running 'kubectl get svc -w {{ template "payment-api.fullname" . }}'
export SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ template "payment-api.fullname" . }} -o jsonpath='{.status.loadBalancer.ingress[0].ip}')
echo http://$SERVICE_IP:{{ .Values.service.port }}
{{- else if contains "ClusterIP" .Values.service.type }}
export POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l "app={{ template "payment-api.name" . }},release={{ .Release.Name }}" -o jsonpath="{.items[0].metadata.name}")
echo "Visit http://127.0.0.1:8080 to use your application"
kubectl port-forward $POD_NAME 8080:80
{{- end }}
eShop Payment API installed.
----------------------------
This API is not directly exposed outside cluster. If need to access it use:
export POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l "app={{ template "payment-api.name" . }},release={{ .Release.Name }}" -o jsonpath="{.items[0].metadata.name}")
echo "Visit http://127.0.0.1:8080 to use your application"
kubectl port-forward $POD_NAME 8080:80

+ 0
- 34
k8s/helm/payment-api/templates/ingress.yaml View File

@ -1,34 +0,0 @@
{{- if .Values.ingress.enabled -}}
{{- $fullName := include "payment-api.fullname" . -}}
{{- $ingressPath := include "pathBase" . -}}
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
name: {{ $fullName }}
labels:
app: {{ template "payment-api.name" . }}
chart: {{ template "payment-api.chart" . }}
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
{{- with .Values.ingress.annotations }}
annotations:
{{ toYaml . | indent 4 }}
{{- end }}
spec:
{{- if .Values.ingress.tls }}
tls:
{{- range .Values.ingress.tls }}
- hosts:
- {{ .Values.inf.k8s.dns }}
secretName: {{ .secretName }}
{{- end }}
{{- end }}
rules:
- host: {{ .Values.inf.k8s.dns }}
http:
paths:
- path: {{ $ingressPath }}
backend:
serviceName: {{ $fullName }}
servicePort: http
{{- end }}

+ 1
- 1
k8s/helm/payment-api/values.yaml View File

@ -3,7 +3,7 @@ clusterName: eshop-aks
pathBase: /payment-api
image:
repository: eshop/locations.api
repository: eshop/payment.api
tag: latest
pullPolicy: IfNotPresent


+ 21
- 0
k8s/helm/rabbitmq/.helmignore View File

@ -0,0 +1,21 @@
# Patterns to ignore when building packages.
# This supports shell glob matching, relative path matching, and
# negation (prefixed with !). Only one pattern per line.
.DS_Store
# Common VCS dirs
.git/
.gitignore
.bzr/
.bzrignore
.hg/
.hgignore
.svn/
# Common backup files
*.swp
*.bak
*.tmp
*~
# Various IDEs
.project
.idea/
*.tmproj

+ 5
- 0
k8s/helm/rabbitmq/Chart.yaml View File

@ -0,0 +1,5 @@
apiVersion: v1
appVersion: "1.0"
description: A Helm chart for Kubernetes
name: rabbitmq
version: 0.1.0

+ 8
- 0
k8s/helm/rabbitmq/templates/NOTES.txt View File

@ -0,0 +1,8 @@
eShop rabbitmq installed
-------------------------
rabbitmq is not directly exposed outside cluster. If need to access it from outside use:
export POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l "app={{ template "rabbitmq.name" . }},release={{ .Release.Name }}" -o jsonpath="{.items[0].metadata.name}")
echo "Visit http://127.0.0.1:8080 to use your application"
kubectl port-forward $POD_NAME 8080:80

+ 32
- 0
k8s/helm/rabbitmq/templates/_helpers.tpl View File

@ -0,0 +1,32 @@
{{/* vim: set filetype=mustache: */}}
{{/*
Expand the name of the chart.
*/}}
{{- define "rabbitmq.name" -}}
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}}
{{- end -}}
{{/*
Create a default fully qualified app name.
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
If release name contains chart name it will be used as a full name.
*/}}
{{- define "rabbitmq.fullname" -}}
{{- if .Values.fullnameOverride -}}
{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}}
{{- else -}}
{{- $name := default .Chart.Name .Values.nameOverride -}}
{{- if contains $name .Release.Name -}}
{{- .Release.Name | trunc 63 | trimSuffix "-" -}}
{{- else -}}
{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}}
{{- end -}}
{{- end -}}
{{- end -}}
{{/*
Create chart name and version as used by the chart label.
*/}}
{{- define "rabbitmq.chart" -}}
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}}
{{- end -}}

+ 8
- 0
k8s/helm/rabbitmq/templates/_names.tpl View File

@ -0,0 +1,8 @@
{{- define "mongo-name" -}}
{{- if .Values.inf.mongo.host -}}
{{- .Values.inf.mongo.host -}}
{{- else -}}
{{- printf "%s" "rabbitmq" -}}
{{- end -}}
{{- end -}}

+ 43
- 0
k8s/helm/rabbitmq/templates/deployment.yaml View File

@ -0,0 +1,43 @@
apiVersion: apps/v1beta2
kind: Deployment
metadata:
name: {{ template "rabbitmq.fullname" . }}
labels:
app: {{ template "rabbitmq.name" . }}
chart: {{ template "rabbitmq.chart" . }}
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
spec:
replicas: {{ .Values.replicaCount }}
selector:
matchLabels:
app: {{ template "rabbitmq.name" . }}
release: {{ .Release.Name }}
template:
metadata:
labels:
app: {{ template "rabbitmq.name" . }}
release: {{ .Release.Name }}
spec:
containers:
- name: {{ .Chart.Name }}
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
ports:
- name: http
containerPort: 5672
protocol: TCP
resources:
{{ toYaml .Values.resources | indent 12 }}
{{- with .Values.nodeSelector }}
nodeSelector:
{{ toYaml . | indent 8 }}
{{- end }}
{{- with .Values.affinity }}
affinity:
{{ toYaml . | indent 8 }}
{{- end }}
{{- with .Values.tolerations }}
tolerations:
{{ toYaml . | indent 8 }}
{{- end }}

+ 19
- 0
k8s/helm/rabbitmq/templates/service.yaml View File

@ -0,0 +1,19 @@
apiVersion: v1
kind: Service
metadata:
name: {{ .Values.inf.eventbus.svc }}
labels:
app: {{ template "rabbitmq.name" . }}
chart: {{ template "rabbitmq.chart" . }}
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
spec:
type: {{ .Values.service.type }}
ports:
- port: {{ .Values.service.port }}
targetPort: http
protocol: TCP
name: http
selector:
app: {{ template "rabbitmq.name" . }}
release: {{ .Release.Name }}

+ 19
- 0
k8s/helm/rabbitmq/values.yaml View File

@ -0,0 +1,19 @@
replicaCount: 1
image:
repository: rabbitmq
tag: 3-management
pullPolicy: IfNotPresent
service:
type: ClusterIP
port: 5672
resources: {}
nodeSelector: {}
tolerations: []
affinity: {}

+ 21
- 0
k8s/helm/sql-data/.helmignore View File

@ -0,0 +1,21 @@
# Patterns to ignore when building packages.
# This supports shell glob matching, relative path matching, and
# negation (prefixed with !). Only one pattern per line.
.DS_Store
# Common VCS dirs
.git/
.gitignore
.bzr/
.bzrignore
.hg/
.hgignore
.svn/
# Common backup files
*.swp
*.bak
*.tmp
*~
# Various IDEs
.project
.idea/
*.tmproj

+ 5
- 0
k8s/helm/sql-data/Chart.yaml View File

@ -0,0 +1,5 @@
apiVersion: v1
appVersion: "1.0"
description: A Helm chart for Kubernetes
name: sql-data
version: 0.1.0

+ 8
- 0
k8s/helm/sql-data/templates/NOTES.txt View File

@ -0,0 +1,8 @@
eShop SQL Server Installed
--------------------------
SQL server is not exposed outside the cluster. If need to access it from outside, use:
export POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l "app={{ template "sql-data.name" . }},release={{ .Release.Name }}" -o jsonpath="{.items[0].metadata.name}")
echo "Visit http://127.0.0.1:8080 to use your application"
kubectl port-forward $POD_NAME 8080:80

+ 32
- 0
k8s/helm/sql-data/templates/_helpers.tpl View File

@ -0,0 +1,32 @@
{{/* vim: set filetype=mustache: */}}
{{/*
Expand the name of the chart.
*/}}
{{- define "sql-data.name" -}}
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}}
{{- end -}}
{{/*
Create a default fully qualified app name.
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
If release name contains chart name it will be used as a full name.
*/}}
{{- define "sql-data.fullname" -}}
{{- if .Values.fullnameOverride -}}
{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}}
{{- else -}}
{{- $name := default .Chart.Name .Values.nameOverride -}}
{{- if contains $name .Release.Name -}}
{{- .Release.Name | trunc 63 | trimSuffix "-" -}}
{{- else -}}
{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}}
{{- end -}}
{{- end -}}
{{- end -}}
{{/*
Create chart name and version as used by the chart label.
*/}}
{{- define "sql-data.chart" -}}
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}}
{{- end -}}

+ 8
- 0
k8s/helm/sql-data/templates/_names.tpl View File

@ -0,0 +1,8 @@
{{- define "sql-name" -}}
{{- if .Values.inf.sql.host -}}
{{- .Values.inf.sql.host -}}
{{- else -}}
{{- printf "%s" "sql-data" -}}
{{- end -}}
{{- end -}}

+ 50
- 0
k8s/helm/sql-data/templates/deployment.yaml View File

@ -0,0 +1,50 @@
apiVersion: apps/v1beta2
kind: Deployment
metadata:
name: {{ template "sql-data.fullname" . }}
labels:
app: {{ template "sql-data.name" . }}
chart: {{ template "sql-data.chart" . }}
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
spec:
replicas: {{ .Values.replicaCount }}
selector:
matchLabels:
app: {{ template "sql-data.name" . }}
release: {{ .Release.Name }}
template:
metadata:
labels:
app: {{ template "sql-data.name" . }}
release: {{ .Release.Name }}
spec:
containers:
- name: {{ .Chart.Name }}
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
env:
- name: ACCEPT_EULA
value: "Y"
- name: MSSQL_PID
value: {{ .Values.inf.sql.common.pid }}
- name: MSSQL_SA_PASSWORD
value: {{ .Values.inf.sql.common.pwd }}
ports:
- name: http
containerPort: 1433
protocol: TCP
resources:
{{ toYaml .Values.resources | indent 12 }}
{{- with .Values.nodeSelector }}
nodeSelector:
{{ toYaml . | indent 8 }}
{{- end }}
{{- with .Values.affinity }}
affinity:
{{ toYaml . | indent 8 }}
{{- end }}
{{- with .Values.tolerations }}
tolerations:
{{ toYaml . | indent 8 }}
{{- end }}

+ 19
- 0
k8s/helm/sql-data/templates/service.yaml View File

@ -0,0 +1,19 @@
apiVersion: v1
kind: Service
metadata:
name: {{ template "sql-name" . }}
labels:
app: {{ template "sql-data.name" . }}
chart: {{ template "sql-data.chart" . }}
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
spec:
type: {{ .Values.service.type }}
ports:
- port: {{ .Values.service.port }}
targetPort: http
protocol: TCP
name: http
selector:
app: {{ template "sql-data.name" . }}
release: {{ .Release.Name }}

+ 19
- 0
k8s/helm/sql-data/values.yaml View File

@ -0,0 +1,19 @@
replicaCount: 1
image:
repository: microsoft/mssql-server-linux
tag: 2017-CU7
pullPolicy: IfNotPresent
service:
type: ClusterIP
port: 1433
resources: {}
nodeSelector: {}
tolerations: []
affinity: {}

+ 2
- 19
k8s/helm/webmvc/templates/NOTES.txt View File

@ -1,19 +1,2 @@
1. Get the application URL by running these commands:
{{- if .Values.ingress.enabled }}
{{- range .Values.ingress.hosts }}
http{{ if $.Values.ingress.tls }}s{{ end }}://{{ . }}{{ $.Values.ingress.path }}
{{- end }}
{{- else if contains "NodePort" .Values.service.type }}
export NODE_PORT=$(kubectl get --namespace {{ .Release.Namespace }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ template "webmvc.fullname" . }})
export NODE_IP=$(kubectl get nodes --namespace {{ .Release.Namespace }} -o jsonpath="{.items[0].status.addresses[0].address}")
echo http://$NODE_IP:$NODE_PORT
{{- else if contains "LoadBalancer" .Values.service.type }}
NOTE: It may take a few minutes for the LoadBalancer IP to be available.
You can watch the status of by running 'kubectl get svc -w {{ template "webmvc.fullname" . }}'
export SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ template "webmvc.fullname" . }} -o jsonpath='{.status.loadBalancer.ingress[0].ip}')
echo http://$SERVICE_IP:{{ .Values.service.port }}
{{- else if contains "ClusterIP" .Values.service.type }}
export POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l "app={{ template "webmvc.name" . }},release={{ .Release.Name }}" -o jsonpath="{.items[0].metadata.name}")
echo "Visit http://127.0.0.1:8080 to use your application"
kubectl port-forward $POD_NAME 8080:80
{{- end }}
eShop WebMVC installed.
-----------------------

Some files were not shown because too many files changed in this diff

Loading…
Cancel
Save