File tree Expand file tree Collapse file tree 1 file changed +17
-5
lines changed Expand file tree Collapse file tree 1 file changed +17
-5
lines changed Original file line number Diff line number Diff line change @@ -137,13 +137,25 @@ metadata:
137
137
namespace: kube-system
138
138
data:
139
139
priorities: |-
140
- {% for ng in config ['node_groups' ]|reverse %}
141
- {{ (loop.index0+1) * 10 }}:
142
- {% if ng ['spot' ] %}
140
+ {% for p in range (1, 100) %}
141
+ {% set found = {'priority' : False } %}
142
+ {% for ng in config ['node_groups' ] %}
143
+ {% if ng ['priority' ] == p %}
144
+ {% - if found .update ({'priority' :True }) %} {% - endif %}
145
+ {% endif %}
146
+ {% endfor %}
147
+ {% if found ['priority' ] %}
148
+ {{ 101-p }}:
149
+ {% endif %}
150
+ {% for ng in config ['node_groups' ] %}
151
+ {% if ng ['priority' ] == p %}
152
+ {% if ng ['spot' ] %}
143
153
- .*{{ 'cx-ws-' + ng['name'] }}.*
144
- {% else %}
154
+ {% else %}
145
155
- .*{{ 'cx-wd-' + ng['name'] }}.*
146
- {% endif %}
156
+ {% endif %}
157
+ {% endif %}
158
+ {% endfor %}
147
159
{% endfor %}
148
160
---
149
161
apiVersion: apps/v1
You can’t perform that action at this time.
0 commit comments