Command "oc patch project..." is failing with error "Forbidden: not allowed on this type"

Solution Verified - Updated -

Issue

  • On Openshift releases prior to Openshift release 4.12 it was possible to run oc patch command on object type: project

  • Starting with Openshift release 4.12 the command fails with error message:

    oc patch project project-x --type merge --patch '{"metadata":{"annotations":{"openshift.io/display-name": "null","openshift.io/description": "This is a new project"}}}'
    
    The Project "project-x" is invalid: 
    * metadata.namespace: Invalid value: "project-x": field is immutable
    * metadata.namespace: Forbidden: not allowed on this type
    

Environment

  • Red Hat Openshift Container Platform (RHOCP)

    • 4.12.0-4.12.7

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content