Skip to content

Commit b9b57c6

Browse files
authored
add emojivoto policy manifest (kubernetes#1196)
* add emojivoto policy manifest This PR adds a new file under `run.linkerd.io` to have a `emojivoto` policy manifest, that is maintained and updated based on the changes from `emojivoto.yml` manifest here. This will make it possible to access the policy manifest from `run.linkerd.io/emojivoto-policy.yml` Signed-off-by: Tarun Pothulapati <[email protected]>
1 parent 8a06020 commit b9b57c6

File tree

1 file changed

+133
-0
lines changed

1 file changed

+133
-0
lines changed
+133
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,133 @@
1+
---
2+
apiVersion: policy.linkerd.io/v1alpha1
3+
kind: Server
4+
metadata:
5+
namespace: emojivoto
6+
name: emoji-grpc
7+
labels:
8+
app.kubernetes.io/part-of: emojivoto
9+
app.kubernetes.io/name: emoji
10+
app.kubernetes.io/version: v11
11+
spec:
12+
podSelector:
13+
matchLabels:
14+
app: emoji-svc
15+
port: grpc
16+
proxyProtocol: gRPC
17+
---
18+
apiVersion: policy.linkerd.io/v1alpha1
19+
kind: ServerAuthorization
20+
metadata:
21+
namespace: emojivoto
22+
name: emoji-grpc
23+
labels:
24+
app.kubernetes.io/part-of: emojivoto
25+
app.kubernetes.io/name: emoji
26+
app.kubernetes.io/version: v11
27+
spec:
28+
# Allow all authenticated clients to access the (read-only) emoji service.
29+
server:
30+
name: emoji-grpc
31+
client:
32+
meshTLS:
33+
identities:
34+
- "*.emojivoto.serviceaccount.identity.linkerd.cluster.local"
35+
---
36+
apiVersion: policy.linkerd.io/v1alpha1
37+
kind: Server
38+
metadata:
39+
namespace: emojivoto
40+
name: prom
41+
labels:
42+
app.kubernetes.io/part-of: emojivoto
43+
app.kubernetes.io/version: v11
44+
spec:
45+
port: prom
46+
podSelector:
47+
matchExpressions:
48+
- {key: app, operator: In, values: [emoji-svc, web-svc, voting-svc]}
49+
proxyProtocol: HTTP/1
50+
---
51+
apiVersion: policy.linkerd.io/v1alpha1
52+
kind: ServerAuthorization
53+
metadata:
54+
namespace: emojivoto
55+
name: prom-prometheus
56+
labels:
57+
app.kubernetes.io/part-of: emojivoto
58+
app.kubernetes.io/version: v11
59+
spec:
60+
server:
61+
name: prom
62+
client:
63+
# allow any kind of prometheus scrapes i.e meshed and unmeshed
64+
unauthenticated: true
65+
---
66+
apiVersion: policy.linkerd.io/v1alpha1
67+
kind: Server
68+
metadata:
69+
namespace: emojivoto
70+
name: voting-grpc
71+
labels:
72+
app: voting-svc
73+
spec:
74+
podSelector:
75+
matchLabels:
76+
app: voting-svc
77+
port: grpc
78+
proxyProtocol: gRPC
79+
---
80+
apiVersion: policy.linkerd.io/v1alpha1
81+
kind: ServerAuthorization
82+
metadata:
83+
namespace: emojivoto
84+
name: voting-grpc
85+
labels:
86+
app.kubernetes.io/part-of: emojivoto
87+
app.kubernetes.io/name: voting
88+
app.kubernetes.io/version: v11
89+
spec:
90+
server:
91+
name: voting-grpc
92+
# The voting service only allows requests from the web service.
93+
client:
94+
meshTLS:
95+
serviceAccounts:
96+
- name: web
97+
---
98+
apiVersion: policy.linkerd.io/v1alpha1
99+
kind: Server
100+
metadata:
101+
namespace: emojivoto
102+
name: web-http
103+
labels:
104+
app.kubernetes.io/part-of: emojivoto
105+
app.kubernetes.io/name: web
106+
app.kubernetes.io/version: v11
107+
spec:
108+
podSelector:
109+
matchLabels:
110+
app: web-svc
111+
port: http
112+
proxyProtocol: HTTP/1
113+
---
114+
apiVersion: policy.linkerd.io/v1alpha1
115+
kind: ServerAuthorization
116+
metadata:
117+
namespace: emojivoto
118+
name: web-public
119+
labels:
120+
app.kubernetes.io/part-of: emojivoto
121+
app.kubernetes.io/name: web
122+
app.kubernetes.io/version: v11
123+
spec:
124+
server:
125+
name: web-http
126+
# Allow all clients to access the web HTTP port without regard for
127+
# authentication. If unauthenticated connections are permitted, there is no
128+
# need to describe authenticated clients.
129+
client:
130+
unauthenticated: true
131+
networks:
132+
- cidr: 0.0.0.0/0
133+
- cidr: ::/0

0 commit comments

Comments
 (0)