ApiGW added to mesh. Ingress updated for Linkerd
This commit is contained in:
parent
bc8e33a8ea
commit
c124e9e1ef
@ -22,6 +22,10 @@ spec:
|
||||
labels:
|
||||
app: {{ template "apigwmm.name" . }}
|
||||
release: {{ .Release.Name }}
|
||||
{{ if .Values.inf.mesh.enabled -}}
|
||||
annotations:
|
||||
linkerd.io/inject: enabled
|
||||
{{- end }}
|
||||
spec:
|
||||
{{ if .Values.inf.registry -}}
|
||||
imagePullSecrets:
|
||||
|
@ -14,6 +14,11 @@ metadata:
|
||||
annotations:
|
||||
{{ toYaml . | indent 4 }}
|
||||
{{- end }}
|
||||
{{- if .Values.inf.mesh.enabled }}
|
||||
{{- with .Values.ingress.mesh.annotations }}
|
||||
{{ toYaml . | indent 4 }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
spec:
|
||||
{{- if .Values.ingress.tls }}
|
||||
tls:
|
||||
|
@ -22,6 +22,10 @@ spec:
|
||||
labels:
|
||||
app: {{ template "apigwms.name" . }}
|
||||
release: {{ .Release.Name }}
|
||||
{{ if .Values.inf.mesh.enabled -}}
|
||||
annotations:
|
||||
linkerd.io/inject: enabled
|
||||
{{- end }}
|
||||
spec:
|
||||
{{ if .Values.inf.registry -}}
|
||||
imagePullSecrets:
|
||||
|
@ -15,6 +15,11 @@ metadata:
|
||||
annotations:
|
||||
{{ toYaml . | indent 4 }}
|
||||
{{- end }}
|
||||
{{- if .Values.inf.mesh.enabled }}
|
||||
{{- with .Values.ingress.mesh.annotations }}
|
||||
{{ toYaml . | indent 4 }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
spec:
|
||||
{{- if .Values.ingress.tls }}
|
||||
tls:
|
||||
|
@ -22,6 +22,10 @@ spec:
|
||||
labels:
|
||||
app: {{ template "apigwwm.name" . }}
|
||||
release: {{ .Release.Name }}
|
||||
{{ if .Values.inf.mesh.enabled -}}
|
||||
annotations:
|
||||
linkerd.io/inject: enabled
|
||||
{{- end }}
|
||||
spec:
|
||||
{{ if .Values.inf.registry -}}
|
||||
imagePullSecrets:
|
||||
|
@ -1,4 +1,4 @@
|
||||
{{- if .Values.ingress.enabled -}}
|
||||
ç{{- if .Values.ingress.enabled -}}
|
||||
{{- $ingressPath := include "pathBase" . -}}
|
||||
{{- $serviceName := .Values.app.svc.webmarketingapigw -}}
|
||||
|
||||
@ -15,6 +15,11 @@ metadata:
|
||||
annotations:
|
||||
{{ toYaml . | indent 4 }}
|
||||
{{- end }}
|
||||
{{- if .Values.inf.mesh.enabled }}
|
||||
{{- with .Values.ingress.mesh.annotations }}
|
||||
{{ toYaml . | indent 4 }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
spec:
|
||||
{{- if .Values.ingress.tls }}
|
||||
tls:
|
||||
|
@ -21,6 +21,10 @@ spec:
|
||||
labels:
|
||||
app: {{ template "apigwws.name" . }}
|
||||
release: {{ .Release.Name }}
|
||||
{{ if .Values.inf.mesh.enabled -}}
|
||||
annotations:
|
||||
linkerd.io/inject: enabled
|
||||
{{- end }}
|
||||
spec:
|
||||
{{ if .Values.inf.registry -}}
|
||||
imagePullSecrets:
|
||||
|
@ -14,6 +14,11 @@ metadata:
|
||||
annotations:
|
||||
{{ toYaml . | indent 4 }}
|
||||
{{- end }}
|
||||
{{- if .Values.inf.mesh.enabled }}
|
||||
{{- with .Values.ingress.mesh.annotations }}
|
||||
{{ toYaml . | indent 4 }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
spec:
|
||||
{{- if .Values.ingress.tls }}
|
||||
tls:
|
||||
|
@ -15,6 +15,11 @@ metadata:
|
||||
annotations:
|
||||
{{ toYaml . | indent 4 }}
|
||||
{{- end }}
|
||||
{{- if .Values.inf.mesh.enabled }}
|
||||
{{- with .Values.ingress.mesh.annotations }}
|
||||
{{ toYaml . | indent 4 }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
spec:
|
||||
{{- if .Values.ingress.tls }}
|
||||
tls:
|
||||
|
@ -15,6 +15,11 @@ metadata:
|
||||
annotations:
|
||||
{{ toYaml . | indent 4 }}
|
||||
{{- end }}
|
||||
{{- if .Values.inf.mesh.enabled }}
|
||||
{{- with .Values.ingress.mesh.annotations }}
|
||||
{{ toYaml . | indent 4 }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
spec:
|
||||
{{- if .Values.ingress.tls }}
|
||||
tls:
|
||||
|
@ -13,7 +13,8 @@ Param(
|
||||
[parameter(Mandatory=$false)][bool]$useLocalk8s=$false,
|
||||
[parameter(Mandatory=$false)][bool]$useMesh=$true,
|
||||
[parameter(Mandatory=$false)][string][ValidateSet('Always','IfNotPresent','Never', IgnoreCase=$false)]$imagePullPolicy="Always",
|
||||
[parameter(Mandatory=$false)][string]$chartsToDeploy="*"
|
||||
[parameter(Mandatory=$false)][string]$chartsToDeploy="*",
|
||||
[parameter(Mandatory=$false)][string]$ingressMeshAnnotationsFile="ingress_values_linkerd.yaml"
|
||||
)
|
||||
|
||||
$dns = $externalDns
|
||||
@ -83,11 +84,11 @@ if ($deployCharts) {
|
||||
if ($chartsToDeploy -eq "*" -or $chartsToDeploy.Contains($chart)) {
|
||||
Write-Host "Installing: $chart" -ForegroundColor Green
|
||||
if ($useCustomRegistry) {
|
||||
helm install --set inf.registry.server=$registry --set inf.registry.login=$dockerUser --set inf.registry.pwd=$dockerPassword --set inf.registry.secretName=eshop-docker-scret --values app.yaml --values inf.yaml --values $ingressValuesFile --set app.name=$appName --set inf.k8s.dns=$dns --set "ingress.hosts={$dns}" --set image.tag=$imageTag --set image.pullPolicy=$imagePullPolicy --set inf.mesh.enabled=$useMesh --set inf.k8s.local=$useLocalk8s --name="$appName-$chart" $chart
|
||||
helm install --set inf.registry.server=$registry --set inf.registry.login=$dockerUser --set inf.registry.pwd=$dockerPassword --set inf.registry.secretName=eshop-docker-scret --values app.yaml --values inf.yaml --values $ingressValuesFile --values $ingressMeshAnnotationsFile --set app.name=$appName --set inf.k8s.dns=$dns --set "ingress.hosts={$dns}" --set image.tag=$imageTag --set image.pullPolicy=$imagePullPolicy --set inf.mesh.enabled=$useMesh --set inf.k8s.local=$useLocalk8s --name="$appName-$chart" $chart
|
||||
}
|
||||
else {
|
||||
if ($chart -ne "eshop-common") { # eshop-common is ignored when no secret must be deployed
|
||||
helm install --values app.yaml --values inf.yaml --values $ingressValuesFile --set app.name=$appName --set inf.k8s.dns=$dns --set "ingress.hosts={$dns}" --set image.tag=$imageTag --set image.pullPolicy=$imagePullPolicy --set inf.mesh.enabled=$useMesh --set inf.k8s.local=$useLocalk8s --name="$appName-$chart" $chart
|
||||
helm install --values app.yaml --values inf.yaml --values $ingressValuesFile --values $ingressMeshAnnotationsFile --set app.name=$appName --set inf.k8s.dns=$dns --set "ingress.hosts={$dns}" --set image.tag=$imageTag --set image.pullPolicy=$imagePullPolicy --set inf.mesh.enabled=$useMesh --set inf.k8s.local=$useLocalk8s --name="$appName-$chart" $chart
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -96,7 +97,7 @@ if ($deployCharts) {
|
||||
foreach ($chart in $gateways) {
|
||||
if ($chartsToDeploy -eq "*" -or $chartsToDeploy.Contains($chart)) {
|
||||
Write-Host "Installing Api Gateway Chart: $chart" -ForegroundColor Green
|
||||
helm install --values app.yaml --values inf.yaml --values $ingressValuesFile --set app.name=$appName --set inf.k8s.dns=$dns --set "ingress.hosts={$dns}" --set image.pullPolicy=$imagePullPolicy --set inf.mesh.enabled=$useMesh --name="$appName-$chart" $chart
|
||||
helm install --values app.yaml --values inf.yaml --values $ingressValuesFile --values $ingressMeshAnnotationsFile --set app.name=$appName --set inf.k8s.dns=$dns --set "ingress.hosts={$dns}" --set image.pullPolicy=$imagePullPolicy --set inf.mesh.enabled=$useMesh --name="$appName-$chart" $chart
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -16,6 +16,11 @@ metadata:
|
||||
annotations:
|
||||
{{ toYaml . | indent 4 }}
|
||||
{{- end }}
|
||||
{{- if .Values.inf.mesh.enabled }}
|
||||
{{- with .Values.ingress.mesh.annotations }}
|
||||
{{ toYaml . | indent 4 }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
spec:
|
||||
rules:
|
||||
- http:
|
||||
|
@ -14,6 +14,11 @@ metadata:
|
||||
annotations:
|
||||
{{ toYaml . | indent 4 }}
|
||||
{{- end }}
|
||||
{{- if .Values.inf.mesh.enabled }}
|
||||
{{- with .Values.ingress.mesh.annotations }}
|
||||
{{ toYaml . | indent 4 }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
spec:
|
||||
{{- if .Values.ingress.tls }}
|
||||
tls:
|
||||
|
@ -5,3 +5,4 @@ ingress:
|
||||
kubernetes.io/ingress.class: addon-http-application-routing
|
||||
ingress.kubernetes.io/ssl-redirect: "false"
|
||||
nginx.ingress.kubernetes.io/ssl-redirect: "false"
|
||||
|
||||
|
16
k8s/helm/ingress_values_linkerd.yaml
Normal file
16
k8s/helm/ingress_values_linkerd.yaml
Normal file
@ -0,0 +1,16 @@
|
||||
# This file contains extra annotations to make Linkerd work with ingress.
|
||||
# ingress.mesh.annotations are inserted into ingress.annotations of the resource being generated, if mesh is deployed
|
||||
#
|
||||
# It is designed to work with NGINX ingress controller or the Http Application Routing
|
||||
#
|
||||
# Check https://linkerd.io/2/tasks/using-ingress/ for more info or other ingress controllers
|
||||
#
|
||||
# If using your custom file, use -ingressMeshAnnotationsFile parameter in deploy-all.ps1
|
||||
|
||||
ingress:
|
||||
mesh:
|
||||
annotations:
|
||||
nginx.ingress.kubernetes.io/configuration-snippet: |
|
||||
proxy_set_header l5d-dst-override $service_name.$namespace.svc.cluster.local:$service_port;
|
||||
proxy_hide_header l5d-remote-ip;
|
||||
proxy_hide_header l5d-server-id;
|
@ -14,6 +14,11 @@ metadata:
|
||||
annotations:
|
||||
{{ toYaml . | indent 4 }}
|
||||
{{- end }}
|
||||
{{- if .Values.inf.mesh.enabled }}
|
||||
{{- with .Values.ingress.mesh.annotations }}
|
||||
{{ toYaml . | indent 4 }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
spec:
|
||||
{{- if .Values.ingress.tls }}
|
||||
tls:
|
||||
|
@ -14,6 +14,11 @@ metadata:
|
||||
annotations:
|
||||
{{ toYaml . | indent 4 }}
|
||||
{{- end }}
|
||||
{{- if .Values.inf.mesh.enabled }}
|
||||
{{- with .Values.ingress.mesh.annotations }}
|
||||
{{ toYaml . | indent 4 }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
spec:
|
||||
{{- if .Values.ingress.tls }}
|
||||
tls:
|
||||
|
@ -14,6 +14,11 @@ metadata:
|
||||
annotations:
|
||||
{{ toYaml . | indent 4 }}
|
||||
{{- end }}
|
||||
{{- if .Values.inf.mesh.enabled }}
|
||||
{{- with .Values.ingress.mesh.annotations }}
|
||||
{{ toYaml . | indent 4 }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
spec:
|
||||
{{- if .Values.ingress.tls }}
|
||||
tls:
|
||||
|
@ -14,6 +14,11 @@ metadata:
|
||||
annotations:
|
||||
{{ toYaml . | indent 4 }}
|
||||
{{- end }}
|
||||
{{- if .Values.inf.mesh.enabled }}
|
||||
{{- with .Values.ingress.mesh.annotations }}
|
||||
{{ toYaml . | indent 4 }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
spec:
|
||||
{{- if .Values.ingress.tls }}
|
||||
tls:
|
||||
|
@ -16,6 +16,11 @@ metadata:
|
||||
annotations:
|
||||
{{ toYaml . | indent 4 }}
|
||||
{{- end }}
|
||||
{{- if .Values.inf.mesh.enabled }}
|
||||
{{- with .Values.ingress.mesh.annotations }}
|
||||
{{ toYaml . | indent 4 }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
spec:
|
||||
rules:
|
||||
- http:
|
||||
|
@ -14,6 +14,11 @@ metadata:
|
||||
annotations:
|
||||
{{ toYaml . | indent 4 }}
|
||||
{{- end }}
|
||||
{{- if .Values.inf.mesh.enabled }}
|
||||
{{- with .Values.ingress.mesh.annotations }}
|
||||
{{ toYaml . | indent 4 }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
spec:
|
||||
{{- if .Values.ingress.tls }}
|
||||
tls:
|
||||
|
@ -14,6 +14,11 @@ metadata:
|
||||
annotations:
|
||||
{{ toYaml . | indent 4 }}
|
||||
{{- end }}
|
||||
{{- if .Values.inf.mesh.enabled }}
|
||||
{{- with .Values.ingress.mesh.annotations }}
|
||||
{{ toYaml . | indent 4 }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
spec:
|
||||
{{- if .Values.ingress.tls }}
|
||||
tls:
|
||||
|
@ -13,6 +13,11 @@ metadata:
|
||||
annotations:
|
||||
{{ toYaml . | indent 4 }}
|
||||
{{- end }}
|
||||
{{- if .Values.inf.mesh.enabled }}
|
||||
{{- with .Values.ingress.mesh.annotations }}
|
||||
{{ toYaml . | indent 4 }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
spec:
|
||||
{{- if .Values.ingress.tls }}
|
||||
tls:
|
||||
|
@ -14,6 +14,11 @@ metadata:
|
||||
annotations:
|
||||
{{ toYaml . | indent 4 }}
|
||||
{{- end }}
|
||||
{{- if .Values.inf.mesh.enabled }}
|
||||
{{- with .Values.ingress.mesh.annotations }}
|
||||
{{ toYaml . | indent 4 }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
spec:
|
||||
{{- if .Values.ingress.tls }}
|
||||
tls:
|
||||
|
Loading…
x
Reference in New Issue
Block a user