istio improvements

This commit is contained in:
ston1th 2019-08-07 00:42:25 +02:00
commit 97addda5f4
13 changed files with 388 additions and 7 deletions

View file

@ -1,3 +1,9 @@
apiVersion: v1
kind: ServiceAccount
metadata:
name: testapp-api
namespace: default
---
apiVersion: apps/v1
kind: Deployment
metadata:
@ -17,9 +23,17 @@ spec:
app: testapp-api
version: v1
spec:
serviceAccountName: testapp-api
containers:
- name: testapp-api
image: 127.0.0.1:5000/testapp/api:v1
resources:
limits:
cpu: 100m
memory: 128Mi
requests:
cpu: 100m
memory: 64Mi
imagePullPolicy: Always
ports:
- containerPort: 8080
@ -61,10 +75,15 @@ spec:
servers:
- port:
number: 80
name: http
protocol: HTTP
name: https
protocol: HTTPS
hosts:
- httpbin.org
tls:
mode: MUTUAL
serverCertificate: /etc/certs/cert-chain.pem
privateKey: /etc/certs/key.pem
caCertificates: /etc/certs/root-cert.pem
---
apiVersion: networking.istio.io/v1alpha3
kind: DestinationRule
@ -74,11 +93,23 @@ spec:
host: istio-egressgateway.istio-system.svc.cluster.local
subsets:
- name: httpbin
trafficPolicy:
loadBalancer:
simple: ROUND_ROBIN
portLevelSettings:
- port:
number: 80
tls:
mode: ISTIO_MUTUAL
sni: httpbin.org
# trafficPolicy:
# tls:
# mode: ISTIO_MUTUAL
---
apiVersion: networking.istio.io/v1alpha3
kind: VirtualService
metadata:
name: httpbin-egress
name: httpbin
spec:
hosts:
- httpbin.org

View file

@ -20,6 +20,13 @@ spec:
containers:
- name: testapp-api
image: 127.0.0.1:5000/testapp/api:v1
resources:
limits:
cpu: 100m
memory: 128Mi
requests:
cpu: 100m
memory: 64Mi
imagePullPolicy: Always
ports:
- containerPort: 8080