forked from openshift/origin-web-console
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathosc-autoscaling.html
143 lines (143 loc) · 5.65 KB
/
osc-autoscaling.html
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
<ng-form name="form">
<div class="autoscaling-form">
<div ng-show="showNameInput" class="form-group">
<label for="hpa-name" class="required">Autoscaler Name</label>
<span ng-class="{ 'has-error': form.name.$touched && form.name.$invalid }">
<input
id="hpa-name"
class="form-control"
type="text"
name="name"
ng-model="autoscaling.name"
ng-required="showNameInput"
ng-readonly="nameReadOnly"
ng-pattern="/^[a-z0-9]([-a-z0-9]*[a-z0-9])?$/"
ng-maxlength="63"
placeholder="my-hpa"
select-on-focus
autocorrect="off"
autocapitalize="off"
spellcheck="false"
aria-describedby="hpa-name-help">
</span>
<div>
<span id="hpa-name-help" class="help-block">
A unique name for the horizontal pod autoscaler within the project.
</span>
</div>
<div class="has-error" ng-show="form.name.$invalid && form.name.$touched">
<span ng-if="form.name.$error.required" class="help-block">
A name is required.
</span>
<span ng-show="form.name.$error.pattern" class="help-block">
Autoscaler names may only contain lower-case letters, numbers, and dashes.
They may not start or end with a dash.
</span>
</div>
</div>
<div class="form-group">
<label>Min Pods</label>
<span ng-class="{ 'has-error': form.minReplicas.$dirty && form.minReplicas.$invalid }">
<input type="number"
class="form-control"
min="1"
name="minReplicas"
placeholder="1"
ng-model="autoscaling.minReplicas"
ng-required="required"
ng-pattern="/^\d+$/"
aria-describedby="min-replicas-help">
</span>
<div id="min-replicas-help" class="help-block">
The lower limit for the number of pods that can be set by the autoscaler.
If not specified, defaults to 1.
</div>
<div class="has-error" ng-show="form.minReplicas.$dirty && form.minReplicas.$invalid">
<span ng-if="form.minReplicas.$error.number" class="help-block">
Min pods must be a number.
</span>
<span ng-if="form.minReplicas.$error.pattern" class="help-block">
Min pods must be a whole number.
</span>
<span ng-if="form.minReplicas.$error.min" class="help-block">
Min pods must be greater than or equal to 1.
</span>
</div>
</div>
<div class="form-group">
<label class="required">Max Pods</label>
<span ng-class="{ 'has-error': (form.minReplicas.$dirty || form.maxReplicas.$dirty) && form.maxReplicas.$invalid }">
<input type="number"
class="form-control"
name="maxReplicas"
placeholder="4"
required
min="{{autoscaling.minReplicas || 1}}"
ng-model="autoscaling.maxReplicas"
ng-pattern="/^\d+$/"
aria-describedby="max-replicas-help">
</span>
<div id="max-replicas-help" class="help-block">
The upper limit for the number of pods that can be set by the autoscaler.
</div>
<div class="has-error" ng-show="(form.minReplicas.$dirty || form.maxReplicas.$dirty) && form.maxReplicas.$invalid">
<span ng-if="form.maxReplicas.$error.number" class="help-block">
Max pods must be a number.
</span>
<span ng-if="form.minReplicas.$error.pattern" class="help-block">
Min pods must be a whole number.
</span>
<span class="help-block" ng-if="form.maxReplicas.$error.min">
Max pods must be greater than or equal to
<span ng-if="autoscaling.minReplicas">min pods, which is</span>
{{autoscaling.minReplicas || 1}.
</span>
<span class="help-block" ng-if="form.maxReplicas.$error.required">
Max pods is a required field.
</span>
</div>
</div>
<div class="form-group">
<label>
CPU
<span ng-if="isRequestCalculated">Limit</span>
<span ng-if="!isRequestCalculated">Request</span>
Target
</label>
<div class="input-group" ng-class="{ 'has-error': form.targetCPU.$invalid && form.targetCPU.$touched }">
<input type="number"
class="form-control"
min="1"
name="targetCPU"
ng-attr-placeholder="{{defaultTargetCPUDisplayValue}}"
ng-model="targetCPUInput.percent"
ng-pattern="/^\d+$/"
aria-describedby="target-cpu-help">
<span class="input-group-addon">%</span>
</div>
<div id="target-cpu-help" class="help-block">
The percentage of the CPU
<span ng-if="isRequestCalculated">limit</span>
<span ng-if="!isRequestCalculated">request</span>
that each pod should ideally be using. Pods will be added or removed
periodically when CPU usage exceeds or drops below this target value.
Defaults to {{defaultTargetCPUDisplayValue}}%.
</div>
<div class="learn-more-block">
<a href="{{'compute_resources' | helpLink}}" target="_blank">Learn more <i class="fa fa-external-link" aria-hidden> </i></a>
</div>
<!-- Add extra top margin for the learn more block -->
<div class="has-error" style="margin-top: 10px;" ng-show="form.targetCPU.$touched && form.targetCPU.$invalid">
<span ng-if="form.targetCPU.$error.number" class="help-block">
Target CPU percentage must be a number.
</span>
<span ng-if="form.targetCPU.$error.pattern" class="help-block">
Target CPU percentage must be a whole number.
</span>
<span ng-if="form.targetCPU.$error.min" class="help-block">
Target CPU percentage must be greater than 1.
</span>
</div>
</div>
</div>
</ng-form>