-
Notifications
You must be signed in to change notification settings - Fork 4
/
deploy.yaml
92 lines (91 loc) · 1.76 KB
/
deploy.yaml
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
92
apiVersion: v1
kind: Namespace
metadata:
creationTimestamp: null
name: token-demo
---
apiVersion: v1
kind: ServiceAccount
metadata:
labels:
app: token-client
name: token-client-test
namespace: token-demo
---
apiVersion: v1
kind: Service
metadata:
labels:
app: token-client
name: token-client
namespace: token-demo
spec:
ports:
- name: http
port: 8080
selector:
app: token-client
---
apiVersion: apps/v1
kind: Deployment
metadata:
labels:
app: token-client
name: token-client
namespace: token-demo
spec:
replicas: 2
selector:
matchLabels:
app: token-client
strategy:
rollingUpdate:
maxUnavailable: 1
template:
metadata:
labels:
app: token-client
spec:
serviceAccountName: token-client-test
containers:
- image: jpweber/tokenclient:0.2.3
name: token-client
ports:
- containerPort: 8080
resources:
limits:
cpu: 100m
memory: 128Mi
requests:
cpu: 10m
memory: 32Mi
volumeMounts:
- mountPath: /var/run/secrets/tokens
name: factor-token
volumes:
- name: factor-token
projected:
sources:
- serviceAccountToken:
audience: factors
expirationSeconds: 600
path: factor-token
---
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
labels:
app: token-client
name: token-client
namespace: token-demo
spec:
rules:
# unless you live in my house you probably should
# change this to a hostname you have access to
- host: token-client.k8s.weber.home
http:
paths:
- backend:
serviceName: token-client
servicePort: 8080
path: /