-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathstatic-client-template.yaml
44 lines (44 loc) · 1.05 KB
/
static-client-template.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
apiVersion: v1
kind: Service
metadata:
name: static-client
namespace: $CLIENT_NS
spec:
selector:
app: static-client
ports:
- port: 80
---
apiVersion: v1
kind: ServiceAccount
metadata:
name: static-client
namespace: $CLIENT_NS
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: static-client
namespace: $CLIENT_NS
spec:
replicas: 1
selector:
matchLabels:
app: static-client
template:
metadata:
name: static-client
labels:
app: static-client
annotations:
'consul.hashicorp.com/connect-inject': 'true'
consul.hashicorp.com/connect-service-upstreams: "static-server.$SERVER_NS.$PARTITION:8080"
spec:
containers:
- name: static-client
image: curlimages/curl:latest
# Just spin & wait forever, we'll use `kubectl exec` to demo
command: ['/bin/sh', '-c', '--']
args: ['while true; do sleep 30; done;']
# If ACLs are enabled, the serviceAccountName must match the Consul service name.
serviceAccountName: static-client