OpenShift REST Resource Definition Schema: Difference between revisions

From NovaOrdis Knowledge Base
Jump to navigation Jump to search
Line 2: Line 2:


* [[OpenShift_Configuration#Definitions|OpenShift Configuration]]
* [[OpenShift_Configuration#Definitions|OpenShift Configuration]]
=Overview=
Some information about schema can be obtained with
[[oc explain]] <''resource''>
where possible resource names can be obtained with:
[[oc get]]


=apiVersion=
=apiVersion=

Revision as of 02:34, 25 November 2017

Internal

Overview

Some information about schema can be obtained with

oc explain <resource>

where possible resource names can be obtained with:

oc get

apiVersion

'apiVersion' specifies the versioned schema of the representation of the object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values.

kind

A CamelCase string representing the REST resource. Servers may infer this from the endpoint the client submits requests to. Cannot be updated in the representation.

metadata

https://docs.openshift.com/container-platform/latest/rest_api/openshift_v1.html#v1-objectmeta

Metadata contains the following:

name

The name of the resource within its namespace. When the resource is created, the name is required, and must be unique within a namespace, though in some cases, resources may allow a client to request the generation of an appropriate name automatically. When the resource is queried, the name cannot be updated.

labels

Map of key/value pairs that can be used to organize and categorize objects. The are used as arguments for selectors.

annotations

A key/value map intended to store state set by external tools. Annotations cannot be queried. Annotation must be preserved when the object is modified.

spec

The representation of the desired state of the resource.

status

The representation of the current state of the resource.