Bug 1415916

Summary: CronJobs do not appear to be registered as a valid kind
Product: OpenShift Container Platform Reporter: Andrew Block <andrew.block>
Component: DocumentationAssignee: Maciej Szulik <maszulik>
Status: CLOSED CURRENTRELEASE QA Contact: Chuan Yu <chuyu>
Severity: high Docs Contact: Vikram Goyal <vigoyal>
Priority: unspecified    
Version: 3.4.0CC: aos-bugs, dma, jforrest, jokerman, mmccomas
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-05-08 23:45:44 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Andrew Block 2017-01-24 04:44:25 UTC
Description of problem:

CronJobs are not registered as a valid Kind

Version-Release number of selected component (if applicable):

3.4.0.39

How reproducible:
Always

Steps to Reproduce:

1. Use example CronJob from documentation (https://docs.openshift.com/container-platform/3.4/dev_guide/cron_jobs.html)

Save the following in a file called test-cron.yaml

apiVersion: batch/v2alpha1
kind: CronJob
metadata:
  name: pi
spec:
  schedule: "*/1 * * * *"  
  jobTemplate:             
    spec:
      template:
        spec:
          containers:
          - name: pi
            image: perl
            command: ["perl",  "-Mbignum=bpi", "-wle", "print bpi(2000)"]
          restartPolicy: Never

Execute the following from the command line

oc create -f test-cron.yaml

Actual results:

error: unable to recognize "test-cron.yaml": no matches for batch/, Kind=CronJob

Expected results:

CronJob created successfully

Additional info:

Comment 1 Jessica Forrester 2017-01-24 12:53:51 UTC
This is a documentation issue.  CronJob should be ScheduledJob in 3.4

Comment 2 Maciej Szulik 2017-01-24 13:03:25 UTC
Fix in https://github.com/openshift/openshift-docs/pull/3563

Comment 3 Maciej Szulik 2017-01-25 12:09:51 UTC
The fix is merged and live.

Comment 4 Chuan Yu 2017-02-24 06:11:27 UTC
Verified, the changes is OK.

Comment 5 Vikram Goyal 2018-05-08 23:45:44 UTC
This is live here:

https://docs.openshift.com/container-platform/3.4/dev_guide/scheduled_jobs.html

Closing this bug.