Skip to content

Commit 48a1b6b

Browse files
committed
st2canary is a job now so drop resources support
1 parent 2dd6aba commit 48a1b6b

File tree

2 files changed

+4
-68
lines changed

2 files changed

+4
-68
lines changed

templates/jobs.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -571,8 +571,8 @@ spec:
571571
- name: {{ required "Each volume must have a 'name' in jobs.extra_volumes" .name }}
572572
{{- tpl (required "Each volume must have a 'mount' definition in jobs.extra_volumes" .mount | toYaml) $ | nindent 10 }}
573573
{{- end }}
574-
resources:
575-
{{- toYaml $.Values.jobs.resources | nindent 10 }}
574+
# TODO: Find out default resource limits for this specific job (#5)
575+
#resources:
576576
volumes:
577577
{{- include "stackstorm-ha.packs-volumes" $ | nindent 8 }}
578578
{{- if $.Values.st2.packs.volumes.configs }}

tests/unit/resources_test.yaml

Lines changed: 2 additions & 66 deletions
Original file line numberDiff line numberDiff line change
@@ -4,19 +4,16 @@ templates:
44
# primary template files
55
- deployments.yaml
66

7-
# Not all jobs have resources yet
8-
- jobs.yaml
7+
# No jobs resources yet
98

109
# included templates must also be listed
1110
- configmaps_overrides.yaml
1211
- configmaps_packs.yaml
1312
- configmaps_rbac.yaml
1413
- configmaps_st2-conf.yaml
15-
- configmaps_st2-urls.yaml
1614
- configmaps_st2web.yaml
1715
- secrets_datastore_crypto_key.yaml
1816
- secrets_ssh.yaml
19-
- secrets_st2apikeys.yaml
2017
- secrets_st2auth.yaml
2118
- secrets_st2chatops.yaml
2219

@@ -42,44 +39,6 @@ tests:
4239
- isNotEmpty:
4340
path: spec.template.spec.containers[0].resources.requests.cpu
4441

45-
- it: st2canary Job has default resources
46-
template: jobs.yaml
47-
set:
48-
st2:
49-
packs:
50-
sensors: [] # ensure only 1 sensor
51-
images: []
52-
volumes: &volumes_enabled
53-
enabled: true
54-
packs:
55-
nfs:
56-
server: "10.12.34.56"
57-
path: /var/nfsshare/packs
58-
virtualenvs:
59-
nfs:
60-
server: "10.12.34.56"
61-
path: /var/nfsshare/virtualenvs
62-
configs:
63-
nfs:
64-
server: "10.12.34.56"
65-
path: /var/nfsshare/configs
66-
configs: {} # has one core.yaml config file by default (dicts get merged)
67-
# Only the st2canary job has resources, so disable the other jobs to narrow the test.
68-
jobs:
69-
skip:
70-
- apply_rbac_definitions
71-
- apikey_load
72-
- key_load
73-
- register_content
74-
asserts:
75-
- hasDocuments:
76-
count: 1
77-
78-
- isNull:
79-
path: spec.template.spec.containers[0].resources.limits
80-
- isNull:
81-
path: spec.template.spec.containers[0].resources.requests
82-
8342
- it: Deployments accept custom resources (except st2client)
8443
template: deployments.yaml
8544
set:
@@ -167,27 +126,4 @@ tests:
167126
- equal: *assert_custom_requests
168127
documentIndex: 13
169128

170-
- it: st2canary Job accepts custom resources
171-
template: jobs.yaml
172-
set:
173-
st2:
174-
packs:
175-
sensors: [] # ensure only 1 sensor
176-
images: []
177-
volumes: *volumes_enabled
178-
configs: {} # has one core.yaml config file by default (dicts get merged)
179-
# Only the st2canary job has resources, so disable the other jobs to narrow the test.
180-
jobs:
181-
resources: *custom_resources
182-
skip:
183-
- apply_rbac_definitions
184-
- apikey_load
185-
- key_load
186-
- register_content
187-
asserts:
188-
- hasDocuments:
189-
count: 1
190-
191-
- equal:
192-
path: spec.template.spec.containers[0].resources.requests
193-
value: *custom_resources_requests
129+
# Jobs do not have default resources defined yet.

0 commit comments

Comments
 (0)