blob: 5a30ae16ffa507f571531fb28ed1667147639618 [file] [log] [blame]
Giorgi Lekveishviliec0f3bb2023-06-19 18:46:53 +04001apiVersion: apiextensions.k8s.io/v1
2kind: CustomResourceDefinition
3metadata:
4 annotations:
5 controller-gen.kubebuilder.io/version: v0.9.2
6 creationTimestamp: null
7 name: resourcerenderers.dodo.cloud.dodo.cloud
8spec:
9 group: dodo.cloud.dodo.cloud
10 names:
11 kind: ResourceRenderer
12 listKind: ResourceRendererList
13 plural: resourcerenderers
14 singular: resourcerenderer
15 scope: Namespaced
16 versions:
17 - name: v1
18 schema:
19 openAPIV3Schema:
20 description: ResourceRenderer is the Schema for the resourcerenderers API
21 properties:
22 apiVersion:
23 description: 'APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
24 type: string
25 kind:
26 description: 'Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
27 type: string
28 metadata:
29 type: object
30 spec:
31 description: ResourceRendererSpec defines the desired state of ResourceRenderer
32 properties:
33 resourceTemplate:
34 type: string
35 secretName:
36 description: Foo is an example field of ResourceRenderer. Edit resourcerenderer_types.go to remove/update
37 type: string
38 secretNamespace:
39 type: string
40 type: object
41 status:
42 description: ResourceRendererStatus defines the observed state of ResourceRenderer
43 properties:
44 ready:
45 description: 'INSERT ADDITIONAL STATUS FIELD - define observed state of cluster Important: Run "make" to regenerate code after modifying this file'
46 type: boolean
47 type: object
48 type: object
49 served: true
50 storage: true
51 subresources:
52 status: {}
53---
54apiVersion: v1
55kind: ServiceAccount
56metadata:
57 name: resource-renderer-controller-manager
58 namespace: {{ .Release.Namespace }}
59---
60apiVersion: rbac.authorization.k8s.io/v1
61kind: Role
62metadata:
63 name: resource-renderer-leader-election-role
64 namespace: {{ .Release.Namespace }}
65rules:
66- apiGroups:
67 - ""
68 resources:
69 - configmaps
70 verbs:
71 - get
72 - list
73 - watch
74 - create
75 - update
76 - patch
77 - delete
78- apiGroups:
79 - coordination.k8s.io
80 resources:
81 - leases
82 verbs:
83 - get
84 - list
85 - watch
86 - create
87 - update
88 - patch
89 - delete
90- apiGroups:
91 - ""
92 resources:
93 - events
94 verbs:
95 - create
96 - patch
97---
98apiVersion: rbac.authorization.k8s.io/v1
99kind: ClusterRole
100metadata:
101 creationTimestamp: null
102 name: resource-renderer-manager-role
103rules:
104- apiGroups:
105 - ""
106 resources:
107 - configmaps
108 verbs:
109 - create
110 - delete
111 - get
112 - list
113 - patch
114 - update
115 - watch
116- apiGroups:
117 - ""
118 resources:
119 - secrets
120 verbs:
121 - create
122 - delete
123 - get
124 - list
125 - patch
126 - update
127 - watch
128- apiGroups:
129 - dodo.cloud.dodo.cloud
130 resources:
131 - resourcerenderers
132 verbs:
133 - create
134 - delete
135 - get
136 - list
137 - patch
138 - update
139 - watch
140- apiGroups:
141 - dodo.cloud.dodo.cloud
142 resources:
143 - resourcerenderers/finalizers
144 verbs:
145 - update
146- apiGroups:
147 - dodo.cloud.dodo.cloud
148 resources:
149 - resourcerenderers/status
150 verbs:
151 - get
152 - patch
153 - update
154---
155apiVersion: rbac.authorization.k8s.io/v1
156kind: ClusterRole
157metadata:
158 name: resource-renderer-metrics-reader
159rules:
160- nonResourceURLs:
161 - /metrics
162 verbs:
163 - get
164---
165apiVersion: rbac.authorization.k8s.io/v1
166kind: ClusterRole
167metadata:
168 name: resource-renderer-proxy-role
169rules:
170- apiGroups:
171 - authentication.k8s.io
172 resources:
173 - tokenreviews
174 verbs:
175 - create
176- apiGroups:
177 - authorization.k8s.io
178 resources:
179 - subjectaccessreviews
180 verbs:
181 - create
182---
183apiVersion: rbac.authorization.k8s.io/v1
184kind: RoleBinding
185metadata:
186 name: resource-renderer-leader-election-rolebinding
187 namespace: {{ .Release.Namespace }}
188roleRef:
189 apiGroup: rbac.authorization.k8s.io
190 kind: Role
191 name: resource-renderer-leader-election-role
192subjects:
193- kind: ServiceAccount
194 name: resource-renderer-controller-manager
195 namespace: {{ .Release.Namespace }}
196---
197apiVersion: rbac.authorization.k8s.io/v1
198kind: ClusterRoleBinding
199metadata:
200 name: resource-renderer-manager-rolebinding
201roleRef:
202 apiGroup: rbac.authorization.k8s.io
203 kind: ClusterRole
204 name: resource-renderer-manager-role
205subjects:
206- kind: ServiceAccount
207 name: resource-renderer-controller-manager
208 namespace: {{ .Release.Namespace }}
209---
210apiVersion: rbac.authorization.k8s.io/v1
211kind: ClusterRoleBinding
212metadata:
213 name: resource-renderer-proxy-rolebinding
214roleRef:
215 apiGroup: rbac.authorization.k8s.io
216 kind: ClusterRole
217 name: resource-renderer-proxy-role
218subjects:
219- kind: ServiceAccount
220 name: resource-renderer-controller-manager
221 namespace: {{ .Release.Namespace }}
222---
223apiVersion: v1
224data:
225 controller_manager_config.yaml: |
226 apiVersion: controller-runtime.sigs.k8s.io/v1alpha1
227 kind: ControllerManagerConfig
228 health:
229 healthProbeBindAddress: :8081
230 metrics:
231 bindAddress: 127.0.0.1:8080
232 webhook:
233 port: 9443
234 leaderElection:
235 leaderElect: true
236 resourceName: 798a733c.dodo.cloud
237 # leaderElectionReleaseOnCancel defines if the leader should step down volume
238 # when the Manager ends. This requires the binary to immediately end when the
239 # Manager is stopped, otherwise, this setting is unsafe. Setting this significantly
240 # speeds up voluntary leader transitions as the new leader don't have to wait
241 # LeaseDuration time first.
242 # In the default scaffold provided, the program ends immediately after
243 # the manager stops, so would be fine to enable this option. However,
244 # if you are doing or is intended to do any operation such as perform cleanups
245 # after the manager stops then its usage might be unsafe.
246 # leaderElectionReleaseOnCancel: true
247kind: ConfigMap
248metadata:
249 name: resource-renderer-manager-config
250 namespace: {{ .Release.Namespace }}
251---
252apiVersion: v1
253kind: Service
254metadata:
255 labels:
256 control-plane: controller-manager
257 name: resource-renderer-controller-manager-metrics-service
258 namespace: {{ .Release.Namespace }}
259spec:
260 ports:
261 - name: https
262 port: 8443
263 protocol: TCP
264 targetPort: https
265 selector:
266 control-plane: controller-manager
267---
268apiVersion: apps/v1
269kind: Deployment
270metadata:
271 labels:
272 control-plane: controller-manager
273 name: resource-renderer-controller-manager
274 namespace: {{ .Release.Namespace }}
275spec:
276 replicas: 1
277 selector:
278 matchLabels:
279 control-plane: controller-manager
280 template:
281 metadata:
282 annotations:
283 kubectl.kubernetes.io/default-container: manager
284 labels:
285 control-plane: controller-manager
286 spec:
287 containers:
288 - args:
289 - --secure-listen-address=0.0.0.0:8443
290 - --upstream=http://127.0.0.1:8080/
291 - --logtostderr=true
292 - --v=0
293 image: gcr.io/kubebuilder/kube-rbac-proxy:v0.13.0
294 name: kube-rbac-proxy
295 ports:
296 - containerPort: 8443
297 name: https
298 protocol: TCP
299 resources:
300 limits:
301 cpu: 500m
302 memory: 128Mi
303 requests:
304 cpu: 5m
305 memory: 64Mi
306 securityContext:
307 allowPrivilegeEscalation: false
308 capabilities:
309 drop:
310 - ALL
311 - args:
312 - --health-probe-bind-address=:8081
313 - --metrics-bind-address=127.0.0.1:8080
314 - --leader-elect
315 command:
316 - /manager
317 image: giolekva/resource-renderer-controller:latest
318 imagePullPolicy: Always
319 livenessProbe:
320 httpGet:
321 path: /healthz
322 port: 8081
323 initialDelaySeconds: 15
324 periodSeconds: 20
325 name: manager
326 readinessProbe:
327 httpGet:
328 path: /readyz
329 port: 8081
330 initialDelaySeconds: 5
331 periodSeconds: 10
332 resources:
333 limits:
334 cpu: 500m
335 memory: 128Mi
336 requests:
337 cpu: 10m
338 memory: 64Mi
339 securityContext:
340 allowPrivilegeEscalation: false
341 capabilities:
342 drop:
343 - ALL
344 securityContext:
345 runAsNonRoot: true
346 serviceAccountName: resource-renderer-controller-manager
347 terminationGracePeriodSeconds: 10