OpenShift REST Resource Definition Schema

From NovaOrdis Knowledge Base
Jump to navigation Jump to search

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.

selector

status

The representation of the current state of the resource.