...
1apiVersion: v1
2kind: Namespace
3metadata:
4 name: slow-cooker
5 labels:
6 workload.edge.ncr.com: platform
7---
8apiVersion: v1
9kind: ServiceAccount
10metadata:
11 name: slow-cooker
12 namespace: slow-cooker
13 labels:
14 workload.edge.ncr.com: platform
15---
16apiVersion: rbac.authorization.k8s.io/v1
17kind: ClusterRole
18metadata:
19 name: slow-cooker
20rules:
21- resources: ["deployments", "daemonsets"]
22 apiGroups: ["apps", "extensions"]
23 verbs: ["list", "get", "patch"]
24---
25apiVersion: rbac.authorization.k8s.io/v1
26kind: ClusterRoleBinding
27metadata:
28 name: slow-cooker
29roleRef:
30 name: slow-cooker
31 kind: ClusterRole
32 apiGroup: rbac.authorization.k8s.io
33subjects:
34- name: slow-cooker
35 namespace: slow-cooker
36 kind: ServiceAccount
37---
38apiVersion: batch/v1
39kind: Job
40metadata:
41 name: slow-cooker
42 namespace: slow-cooker
43spec:
44 template:
45 metadata:
46 labels:
47 app: slow-cooker
48 annotations:
49 linkerd.io/inject: enabled
50 spec:
51 restartPolicy: OnFailure
52 serviceAccountName: slow-cooker
53 initContainers:
54 - name: wait
55 image: bzl://hack/deps:alpine_container_push
56 command: ["/bin/sh", "-c", "sleep 60"]
57 containers:
58 - name: slow-cooker
59 image: us-east1-docker.pkg.dev/ret-edge-pltf-infra/workloads/slow-cooker@sha256:2e0c503624b0f5b778f7780317a6456247cbb1e639c4d2e4897759bc42453016
60 args:
61 - --interval=60s
62 - --qps=20
63 - --concurrency=5
64 - --iterations=60
65 - "@/etc/config/urllist"
66 resources:
67 limits:
68 cpu: "300m"
69 memory: 300Mi
70 requests:
71 cpu: 50m
72 memory: 50Mi
73 volumeMounts:
74 - name: urllist
75 mountPath: /etc/config/
76 volumes:
77 - name: urllist
78 configMap:
79 name: urllist
80 imagePullSecrets:
81 - name: edge-docker-pull-secret
82---
83apiVersion: v1
84kind: ConfigMap
85metadata:
86 name: urllist
87 namespace: slow-cooker
88data:
89 urllist: |
90 http://nginx.slow-cooker.svc.cluster.local
91---
92apiVersion: apps/v1
93kind: DaemonSet
94metadata:
95 name: nginx-deployment
96 namespace: slow-cooker
97 labels:
98 app: nginx
99spec:
100 selector:
101 matchLabels:
102 app: nginx
103 template:
104 metadata:
105 labels:
106 app: nginx
107 annotations:
108 linkerd.io/inject: enabled
109 spec:
110 containers:
111 - name: nginx
112 image: bzl://hack/deps:nginx_container_push
113 resources:
114 limits:
115 cpu: "100m"
116 memory: 100Mi
117 requests:
118 cpu: 50m
119 memory: 50Mi
120---
121apiVersion: v1
122kind: Service
123metadata:
124 name: nginx
125 namespace: slow-cooker
126spec:
127 type: ClusterIP
128 selector:
129 app: nginx
130 ports:
131 - protocol: TCP
132 port: 80
133 targetPort: 80
134 internalTrafficPolicy: Local
135---
136apiVersion: policy.linkerd.io/v1beta1
137kind: Server
138metadata:
139 name: nginx-server
140 namespace: slow-cooker
141spec:
142 port: 80
143 podSelector:
144 matchLabels:
145 app: nginx
146 proxyProtocol: HTTP/1
147---
148apiVersion: policy.linkerd.io/v1beta1
149kind: ServerAuthorization
150metadata:
151 name: ngnx-server-auth
152 namespace: slow-cooker
153spec:
154 client:
155 meshTLS:
156 serviceAccounts:
157 - name: slow-cooker
158 namespace: slow-cooker
159 server:
160 name: nginx-server
View as plain text