idk i brought Istio and some other things

This commit is contained in:
Oriol
2023-04-08 18:41:41 +01:00
parent 4e9641201d
commit a924d8ba91
37 changed files with 2002 additions and 44 deletions

34
istio_a/README.md Normal file
View File

@ -0,0 +1,34 @@
# https://istio.io/latest/docs/setup/getting-started/
### https://istio.io/latest/docs/setup/additional-setup/config-profiles/
```shell
istioctl install --set profile=default -y
```
### https://istio.io/latest/docs/setup/additional-setup/sidecar-injection/
### ?
https://istio.io/latest/docs/examples/microservices-istio/istio-ingress-gateway/
```sh
NAMESPACE=istio-test
```
### Wildcard hosts
https://istio.io/latest/docs/tasks/traffic-management/egress/wildcard-egress-hosts/
### ingress gateway
https://istio.io/latest/docs/setup/additional-setup/gateway/
## Documentation
https://istio.io/latest/docs/reference/config/networking/virtual-service/#VirtualService
## Dashboard
### Kiali
https://istio.io/latest/docs/ops/integrations/kiali/#installation

45
istio_a/default.yaml Normal file
View File

@ -0,0 +1,45 @@
apiVersion: networking.istio.io/v1beta1
kind: Gateway
metadata:
name: bookinfo-gateway
spec:
# The selector matches the ingress gateway pod labels.
# If you installed Istio using Helm following the standard documentation, this would be "istio=ingress"
selector:
istio: ingressgateway # use istio default controller
servers:
- port:
number: 80
name: http
protocol: HTTP
hosts:
- "*"
---
apiVersion: networking.istio.io/v1beta1
kind: VirtualService
metadata:
name: bookinfo
spec:
hosts:
- "*"
gateways:
- bookinfo-gateway
http:
- match:
- uri:
exact: /productpage
- uri:
prefix: /static
- uri:
exact: /login
# - uri:
# exact: /logout
# - uri:
# prefix: /api/v1/products
rewrite:
uri: /
route:
- destination:
host: productpage
port:
number: 80

53
istio_a/default2.yaml Normal file
View File

@ -0,0 +1,53 @@
apiVersion: v1
kind: Service
metadata:
name: productpage
labels:
app: productpage
service: productpage
spec:
ports:
- port: 80
name: http
selector:
app: productpage
---
apiVersion: v1
kind: ServiceAccount
metadata:
name: bookinfo-productpage
labels:
account: productpage
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: productpage-v1
labels:
app: productpage
version: v1
spec:
replicas: 1
selector:
matchLabels:
app: productpage
version: v1
template:
metadata:
# annotations:
# prometheus.io/scrape: "true"
# prometheus.io/port: "9080"
# prometheus.io/path: "/metrics"
labels:
app: productpage
version: v1
spec:
serviceAccountName: bookinfo-productpage
containers:
- name: nginx
image: nginx:1.14.2
ports:
- containerPort: 80
volumes:
- name: tmp
emptyDir: {}