Bugzilla (bugzilla.redhat.com) will be under maintenance for infrastructure upgrades and will not be available on July 31st between 12:30 AM - 05:30 AM UTC. We appreciate your understanding and patience. You can follow status.redhat.com for details.
Bug 1415916 - CronJobs do not appear to be registered as a valid kind
Summary: CronJobs do not appear to be registered as a valid kind
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Documentation
Version: 3.4.0
Hardware: x86_64
OS: Linux
unspecified
high
Target Milestone: ---
: ---
Assignee: Maciej Szulik
QA Contact: Chuan Yu
Vikram Goyal
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-01-24 04:44 UTC by Andrew Block
Modified: 2018-05-08 23:45 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-05-08 23:45:44 UTC
Target Upstream Version:


Attachments (Terms of Use)

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.


Note You need to log in before you can comment on or make changes to this bug.