-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathhttps-yages.yaml
More file actions
91 lines (91 loc) · 1.93 KB
/
https-yages.yaml
File metadata and controls
91 lines (91 loc) · 1.93 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
---
apiVersion: v1
kind: Namespace
metadata:
name: yages
labels:
# Allow for injection of the sidecar
istio-injection: enabled
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: yages
namespace: yages
spec:
replicas: 1
selector:
matchLabels:
app: yages
template:
metadata:
labels:
app: yages
spec:
containers:
- image: quay.io/mhausenblas/yages:0.1.0
name: yages
ports:
- containerPort: 9000
---
apiVersion: v1
kind: Service
metadata:
name: yages
namespace: yages
spec:
ports:
- port: 80 # Routing on port 80 of the service lets me use the name "yages" which implies port 80
targetPort: 9000 # Port on the container
protocol: TCP
name: grpc # port must be named otherwise istio won't route traffic properly
selector:
app: yages
---
apiVersion: cert-manager.io/v1
kind: Certificate # Since we're not using a typical ingress, we must manually request a certificate to cert-manager
metadata:
name: yages
namespace: istio-system
spec:
commonName: yages.civo.aaronbatilo.dev
dnsNames:
- yages.civo.aaronbatilo.dev
issuerRef:
name: letsencrypt
kind: ClusterIssuer
secretName: yages-cert
---
apiVersion: networking.istio.io/v1alpha3
kind: Gateway
metadata:
name: yages
namespace: yages
spec:
selector:
istio: ingressgateway
servers:
- port:
number: 443
name: https
protocol: HTTPS
tls:
mode: SIMPLE
credentialName: yages-cert # Gateway references the `spec.secretName` in the `Certificate` resource
hosts:
- "yages.civo.aaronbatilo.dev"
---
apiVersion: networking.istio.io/v1alpha3
kind: VirtualService
metadata:
name: yages
namespace: yages
spec:
hosts:
- "yages.civo.aaronbatilo.dev"
gateways:
- yages
http:
- route:
- destination:
host: yages # No `port` needed since we're still just using 80