@ -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 | |||
---------------------------------------------------------- |
@ -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 | |||
-------------------------------------------------------- |
@ -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 | |||
------------------------------------------------------ |
@ -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 | |||
----------------------------------------------------- |
@ -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 |
@ -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,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 |
@ -0,0 +1,5 @@ | |||
apiVersion: v1 | |||
appVersion: "1.0" | |||
description: A Helm chart for Kubernetes | |||
name: basket-data | |||
version: 0.1.0 |
@ -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 |
@ -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 -}} |
@ -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 }} |
@ -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 }} |
@ -0,0 +1,19 @@ | |||
replicaCount: 1 | |||
image: | |||
repository: redis | |||
tag: 4.0.10 | |||
pullPolicy: IfNotPresent | |||
service: | |||
type: ClusterIP | |||
port: 6379 | |||
resources: {} | |||
nodeSelector: {} | |||
tolerations: [] | |||
affinity: {} |
@ -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,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,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 | |||
@ -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 |
@ -0,0 +1,5 @@ | |||
apiVersion: v1 | |||
appVersion: "1.0" | |||
description: A Helm chart for Kubernetes | |||
name: eshop-common | |||
version: 0.1.0 |
@ -0,0 +1,7 @@ | |||
Common eShop resources installed: | |||
{{- if .Values.inf.registry -}} | |||
* Docker registry secret ({{ .Values.inf.registry.secretName }}) | |||
{{- end -}} | |||
+++ Done +++ |
@ -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 -}} |
@ -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 }} |
@ -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 -}} |
@ -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. |
@ -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" |
@ -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 |
@ -0,0 +1,5 @@ | |||
apiVersion: v1 | |||
appVersion: "1.0" | |||
description: A Helm chart for Kubernetes | |||
name: keystore-data | |||
version: 0.1.0 |
@ -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 |
@ -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 -}} |
@ -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 }} |
@ -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 }} |
@ -0,0 +1,19 @@ | |||
replicaCount: 1 | |||
image: | |||
repository: redis | |||
tag: 4.0.10 | |||
pullPolicy: IfNotPresent | |||
service: | |||
type: ClusterIP | |||
port: 6379 | |||
resources: {} | |||
nodeSelector: {} | |||
tolerations: [] | |||
affinity: {} |
@ -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 | |||
@ -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 }} |
@ -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 | |||
@ -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 }} |
@ -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 |
@ -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 }} |
@ -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 |
@ -0,0 +1,5 @@ | |||
apiVersion: v1 | |||
appVersion: "1.0" | |||
description: A Helm chart for Kubernetes | |||
name: nosql-data | |||
version: 0.1.0 |
@ -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 |
@ -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 -}} |
@ -0,0 +1,8 @@ | |||
{{- define "mongo-name" -}} | |||
{{- if .Values.inf.mongo.host -}} | |||
{{- .Values.inf.mongo.host -}} | |||
{{- else -}} | |||
{{- printf "%s" "nosql-data" -}} | |||
{{- end -}} | |||
{{- end -}} |
@ -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 }} |
@ -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 }} |
@ -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: {} |
@ -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,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 }} |
@ -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,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 }} |
@ -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 |
@ -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,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 | |||
@ -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 }} |
@ -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 |
@ -0,0 +1,5 @@ | |||
apiVersion: v1 | |||
appVersion: "1.0" | |||
description: A Helm chart for Kubernetes | |||
name: rabbitmq | |||
version: 0.1.0 |
@ -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 |
@ -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 -}} |
@ -0,0 +1,8 @@ | |||
{{- define "mongo-name" -}} | |||
{{- if .Values.inf.mongo.host -}} | |||
{{- .Values.inf.mongo.host -}} | |||
{{- else -}} | |||
{{- printf "%s" "rabbitmq" -}} | |||
{{- end -}} | |||
{{- end -}} |
@ -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 }} |
@ -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 }} |
@ -0,0 +1,19 @@ | |||
replicaCount: 1 | |||
image: | |||
repository: rabbitmq | |||
tag: 3-management | |||
pullPolicy: IfNotPresent | |||
service: | |||
type: ClusterIP | |||
port: 5672 | |||
resources: {} | |||
nodeSelector: {} | |||
tolerations: [] | |||
affinity: {} |
@ -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 |
@ -0,0 +1,5 @@ | |||
apiVersion: v1 | |||
appVersion: "1.0" | |||
description: A Helm chart for Kubernetes | |||
name: sql-data | |||
version: 0.1.0 |
@ -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 |
@ -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 -}} |
@ -0,0 +1,8 @@ | |||
{{- define "sql-name" -}} | |||
{{- if .Values.inf.sql.host -}} | |||
{{- .Values.inf.sql.host -}} | |||
{{- else -}} | |||
{{- printf "%s" "sql-data" -}} | |||
{{- end -}} | |||
{{- end -}} |
@ -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 }} |
@ -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 }} |
@ -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: {} |
@ -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. | |||
----------------------- |