-
Notifications
You must be signed in to change notification settings - Fork 1
/
predictive_node_scaling_demo.yaml
59 lines (59 loc) · 1.53 KB
/
predictive_node_scaling_demo.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
apiVersion: v1
kind: Pod
metadata:
name: shiftweek-cluster-sizer
namespace: default
spec:
initContainers:
- name: fake-data-generator
image: quay.io/jkyros/shiftweek-11-2023:autoscaler-predictor-model
volumeMounts:
- name: data
mountPath: /usr/src/app/data
command: ["python","synthesizeData.py"]
imagePullPolicy: Always
containers:
- name: predictive-cluster-sizer
image: quay.io/jkyros/shiftweek-11-2023:predictive-cluster-sizer
volumeMounts:
- name: data
mountPath: /data
command: ["./predictive-cluster-sizer"]
args: [""]
imagePullPolicy: Always
- name: autoscaler-predictor-model
image: quay.io/jkyros/shiftweek-11-2023:autoscaler-predictor-model
ports:
- containerPort: 5001
imagePullPolicy: Always
volumes:
- name: data
emptyDir: {}
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: predictive-cluster-sizer
rules:
- apiGroups: [""]
resources: ["nodes"]
verbs: ["get", "watch", "list"]
- apiGroups: ["machine.openshift.io"]
resources: ["machinesets"]
verbs: ["get","watch","list","update","patch"]
- apiGroups: ["metrics.k8s.io"]
resources: ["nodes"]
verbs: ["get","watch","list"]
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: predictive-cluster-sizer
subjects:
- kind: ServiceAccount
name: default
namespace: default
roleRef:
kind: ClusterRole
name: predictive-cluster-sizer
apiGroup: rbac.authorization.k8s.io