diff --git a/resources/templates/example.yml b/resources/templates/example.yml index 444ac04..35d0e59 100644 --- a/resources/templates/example.yml +++ b/resources/templates/example.yml @@ -2,7 +2,7 @@ apiVersion: example.com/v1 kind: MyObject metadata: name: "{{._NAME_}}" - namespace: test + namespace: {{or .namespace "default"}} spec: runPolicy: coScheduling: null @@ -16,6 +16,7 @@ spec: obj-name: test instance: {{.instance}} spec: + replicas: {{.replicas}} containers: - name: test args: diff --git a/resources/tests/test-custom-resource.yml b/resources/tests/test-custom-resource.yml index fa45fe8..82f67b2 100644 --- a/resources/tests/test-custom-resource.yml +++ b/resources/tests/test-custom-resource.yml @@ -1,17 +1,21 @@ name: test-custom-resource description: submit custom resource tasks: +- id: register + type: RegisterObj + params: + template: "resources/templates/example.yml" + nameFormat: "job{{._ENUM_}}" + podNameFormat: "{{._NAME_}}-[0-9]+" + podCount: "{{.replicas}}" - id: job type: SubmitObj params: - count: 1 - grv: - group: example.com - version: v1 - resource: myobjects - template: "resources/templates/example.yml" - overrides: - name: 1 + refTaskId: register + count: 4 + params: + namespace: test + replicas: 2 instance: lnx2000 command: "sleep infinity" image: ubuntu