This repository has been archived by the owner on Jun 9, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 10
/
manifest.yaml
173 lines (168 loc) · 3.86 KB
/
manifest.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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
---
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
name: autoscalers.pangolinscaler.com
spec:
group: pangolinscaler.com
versions:
- name: v1alpha1
served: true
storage: true
schema:
openAPIV3Schema:
type: object
required:
- spec
properties:
spec:
type: object
required:
- strategy
- kind
- selector
- metric
- interval
properties:
strategy:
type: string
pattern: '^(BangBang)$'
kind:
type: string
pattern: '^(Deployment|ReplicaSet|StatefulSet)$'
default: Deployment
selector:
type: object
required:
- matchLabels
properties:
matchLabels:
type: object
additionalProperties:
type: string
metric:
type: object
required:
- name
properties:
name:
type: string
interval:
type: integer
minimum: 5
maximum: 900
default: 10
interval:
type: integer
minimum: 10
maximum: 900
default: 30
limits:
type: object
properties:
replicas:
type: object
properties:
min:
type: integer
minimum: 1
default: 1
max:
type: integer
minimum: 1
default: 10
bangBang:
type: object
required:
- lower
- upper
properties:
lower:
type: number
upper:
type: number
scope: Namespaced
names:
plural: autoscalers
singular: autoscaler
kind: AutoScaler
---
apiVersion: v1
kind: Namespace
metadata:
name: autoscaler
---
apiVersion: v1
kind: ServiceAccount
metadata:
name: pangolin
namespace: autoscaler
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: pangolin-role
rules:
- apiGroups:
- pangolinscaler.com
resources:
- autoscalers
verbs:
- get
- watch
- list
- apiGroups:
- extensions
- apps
resources:
- deployments
- replicasets
- statefulsets
verbs:
- get
- list
- update
- patch
- apiGroups: [""]
resources:
- pods
verbs:
- get
- list
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: pangolin-role-binding
subjects:
- kind: ServiceAccount
name: pangolin
namespace: autoscaler
roleRef:
kind: ClusterRole
name: pangolin-role
apiGroup: rbac.authorization.k8s.io
---
apiVersion: apps/v1
kind: ReplicaSet
metadata:
name: pangolin
namespace: autoscaler
labels:
controller: pangolin
spec:
replicas: 1
selector:
matchLabels:
controller: pangolin
template:
metadata:
labels:
controller: pangolin
spec:
serviceAccountName: pangolin
automountServiceAccountToken: true
priorityClassName: system-cluster-critical
containers:
- name: pangolin
image: pangolinscaler/pangolin:v0.1.0