From 36fce8584bee24e382105d11730316f4479c6a89 Mon Sep 17 00:00:00 2001 From: jmanuelcorral Date: Wed, 10 Apr 2019 12:09:20 +0200 Subject: [PATCH] wip --- k8s/helm/deploy-all-istio.ps1 | 8 +- .../externaltcpconnections.yml | 96 ++++++++++++++++++ .../istio/dnsExternalNames/istioconfig.yml | Bin 0 -> 7198 bytes k8s/helm/istio/dnsExternalNames/sidecar.yml | 20 ++++ .../istio/dnsExternalNames/webmvcservices.yml | 56 ++++++++++ k8s/helm/istio/gateway.yml | 67 +++++++++++- k8s/helm/istio/virtualservices.yml | 50 ++++++++- 7 files changed, 291 insertions(+), 6 deletions(-) create mode 100644 k8s/helm/istio/dnsExternalNames/externaltcpconnections.yml create mode 100644 k8s/helm/istio/dnsExternalNames/istioconfig.yml create mode 100644 k8s/helm/istio/dnsExternalNames/sidecar.yml create mode 100644 k8s/helm/istio/dnsExternalNames/webmvcservices.yml diff --git a/k8s/helm/deploy-all-istio.ps1 b/k8s/helm/deploy-all-istio.ps1 index 6ee8a9572..eb1c6af56 100644 --- a/k8s/helm/deploy-all-istio.ps1 +++ b/k8s/helm/deploy-all-istio.ps1 @@ -20,7 +20,7 @@ $dns = $externalDns # Instalamos Istio # Specify the Istio version that will be leveraged throughout these instructions -$ISTIO_VERSION="1.0.6" +$ISTIO_VERSION="1.1.1" # Windows $ProgressPreference = 'SilentlyContinue'; @@ -28,7 +28,7 @@ $ProgressPreference = 'SilentlyContinue'; Invoke-WebRequest -URI "https://github.com/istio/istio/releases/download/$ISTIO_VERSION/istio-$ISTIO_VERSION-win.zip" -OutFile "istio-$ISTIO_VERSION.zip" Remove-Item istio-$ISTIO_VERSION -Recurse -ErrorAction Ignore Expand-Archive -Path "istio-$ISTIO_VERSION.zip" -DestinationPath . - +Pause if($installIstioOnSystem -eq $true) { New-Item -ItemType Directory -Force -Path "C:\Program Files\Istio" mv ./istio-$ISTIO_VERSION/bin/istioctl.exe "C:\Program Files/Istio/" @@ -49,7 +49,7 @@ kubectl -n istio-system create secret generic kiali --from-literal=username=$kia Write-Host "Deploying Istio in the cluster" -ForegroundColor Green -helm install istio-$ISTIO_VERSION/install/kubernetes/helm/istio --wait --name istio --namespace istio-system --set global.controlPlaneSecurityEnabled=true --set grafana.enabled=true --set tracing.enabled=true --set kiali.enabled=true +helm install istio-$ISTIO_VERSION/install/kubernetes/helm/istio --wait --name istio --namespace istio-system --set global.mtls.enabled=false --set global.controlPlaneSecurityEnabled=false --set grafana.enabled=true --set tracing.enabled=true --set kiali.enabled=true Write-Host "Setting Up Gateway" kubectl delete gateway istio-autogenerated-k8s-ingress -n istio-system @@ -84,7 +84,7 @@ $charts = ("eshop-common", "apigwmm", "apigwms", "apigwwm", "apigwws", "basket-a if ($deployInfrastructure) { foreach ($infra in $infras) { Write-Host "Installing infrastructure: $infra" -ForegroundColor Green - helm install --values app.yaml --values inf.yaml --set app.name=$appName --set inf.k8s.dns=$externalDns --name="$appName-$infra" $infra + helm install --values app.yaml --values inf.yaml --set app.name=$appName --set inf.k8s.dns=$externalDns --name="$appName-$infra" $infra } } diff --git a/k8s/helm/istio/dnsExternalNames/externaltcpconnections.yml b/k8s/helm/istio/dnsExternalNames/externaltcpconnections.yml new file mode 100644 index 000000000..5cd57dfb3 --- /dev/null +++ b/k8s/helm/istio/dnsExternalNames/externaltcpconnections.yml @@ -0,0 +1,96 @@ +apiVersion: networking.istio.io/v1alpha3 +kind: ServiceEntry +metadata: + name: basket-data +spec: + hosts: + - basket-data + ports: + - name: tcp + number: 6379 + protocol: tcp + location: MESH_EXTERNAL +--- +apiVersion: networking.istio.io/v1alpha3 +kind: ServiceEntry +metadata: + name: keystore-data +spec: + hosts: + - keystore-data + ports: + - name: tcp + number: 6379 + protocol: tcp + location: MESH_EXTERNAL +--- +apiVersion: networking.istio.io/v1alpha3 +kind: ServiceEntry +metadata: + name: nosql-data +spec: + hosts: + - nosql-data + ports: + - name: tcp + number: 27017 + protocol: tcp + location: MESH_EXTERNAL +--- +apiVersion: networking.istio.io/v1alpha3 +kind: ServiceEntry +metadata: + name: rabbitmq +spec: + hosts: + - rabbitmq + ports: + - name: tcp + number: 5672 + protocol: tcp + location: MESH_EXTERNAL +--- +apiVersion: networking.istio.io/v1alpha3 +kind: ServiceEntry +metadata: + name: sql-data +spec: + hosts: + - sql-data + ports: + - name: tcp + number: 1433 + protocol: tcp + location: MESH_EXTERNAL +--- +apiVersion: "networking.istio.io/v1alpha3" +kind: "DestinationRule" +metadata: + name: external + namespace: default +spec: + host: "*.eshop-infra.svc.cluster.local" + trafficPolicy: + tls: + mode: DISABLE +--- +apiVersion: "networking.istio.io/v1alpha3" +kind: "DestinationRule" +metadata: + name: externalsql2 + namespace: default +spec: + host: "sql-data" + trafficPolicy: + tls: + mode: DISABLE +--- +apiVersion: "networking.istio.io/v1alpha3" +kind: DestinationRule +metadata: + name: "disable-tls" +spec: + host: "*" + trafficPolicy: + tls: + mode: DISABLE \ No newline at end of file diff --git a/k8s/helm/istio/dnsExternalNames/istioconfig.yml b/k8s/helm/istio/dnsExternalNames/istioconfig.yml new file mode 100644 index 0000000000000000000000000000000000000000..611eb38edfa0ce0d99b3abe441681c73245a7078 GIT binary patch literal 7198 zcmb`MZBJWA5QX=1rT&MjAhn6qV33kZ8$ z`hBi3^J>&I+qz2qbf?k%JVQVIrZJr?aV=&&)RTY6(kyMJkD7Jk0WqlG%Fg0`o=e#W zFP<;swt2Sh3mHTywqN$oJ3b zb>_3geIWLyvPJ~KLKLhN`?8F@w%Ca;Y#MKUr=1JDAJdc6lZppYU@y;fu4k_`BX{h< zsvr9rKh13QvsMPOfVGiOT4SBQp_yyF2l7{GU%7y_GOk3MIL?HEcWm)IDx0L|Sy@AU zN9CK%ow=?s4!$<^?M7oZ^*78ja~-|I2S|sqyq#XAExleWA$g~Wzpseig*T)E57aw6I zn0c@74I_ppX-~{7>)ibfQNI%6LH0bd zdLfnudZEhN`>*snss`QCG-sHVW_#ag1ldbQQXd|-G{3JC%edQ2JZX>-({0sqb7SA& z#@{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