Description of problem:
Create a template to provision a new Job (extensions/v1beta1) reports an "unknown type Job" error message when used.
Use case was to create templates to run one-time jobs on demand with parallelism and completion, such as a bench mark test.
Version-Release number of selected component (if applicable):
CDK version beta5
How reproducible: easy
Steps to Reproduce:
1. Create a template for a Job
2. Use 'Add to Project' to request an instance of Job
Reported error 'unknown type Job'
It should create Job. Note: Jobs can be successfully created without using templates.
Apologies in advance if I'm triaging this incorrectly.
Could you please attach your template?
Created attachment 1139070 [details]
Example template using a Job
Attached is an example template that attempts to create a new resource of typeJob
What openshift version are you running? I tested the latest master and it worked for me, albeit with a couple of required changes to your template. I had to set parallelism and completions to hard-coded int values instead of parameters, because the parameters turn into strings, and these values must be ints.
It was latest CDK beta - that may be why it didn't work, perhaps?
What is the output of running this command? `openshift version`
Maciej, are jobs supposed to work in 188.8.131.52? I know they work in 3.2...
To be clear, the Job works when not part of a template, it's only when I tried to template the Job that I hit this issue.
Ed, that might be crucial information. Will look into this tomorrow morning.
Jobs in 3.1 where only available if you specified to enable experimental API, but since you're mentioning plain Jobs work ok I assume you have that on, on the other hand 'unknown type Job' suggests it's not on.
Additionally between 3.1 and 3.2 there were more significant changes in how API is registered, it might be that templates don't work well with those, or rather didn't work well with experimental APIs. Can you verify if running cli version works for you:
oc process -f template.yaml -v URL=google.pl | oc create -f -
Checked against latest master, it's working correctly. Moving to QA.
Jobs can be successfully created using templates.
# oc process -f template.yaml -v URL=google.pl | oc create -f -
job "ab" created
# oc get job
NAME DESIRED SUCCESSFUL AGE
ab 1 0 40s
# openshift version
fyi, I can verify that this was broken in 3.1 but appears to have been fixed later.
# oc version
In my case, a yaml template containing a job could be launched from the CLI using oc process and running oc create on the resulting json.
However, if I uploaded the yaml template to a project via oc create and then tried to launch from the console via "Add to project", it failed with an unknown kind error.
note, using origin image tags from https://hub.docker.com/r/openshift/origin/tags/ and running allinone containers, this appears to have been fixed in v1.1.2 but was broken previously.
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.
For information on the advisory, and where to find the updated
files, follow the link below.
If the solution does not work for you, open a new bug report.