×
Description

ConsolePlugin is an extension for customizing OpenShift web console by dynamically loading code from another service running on the cluster. Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer).

Type

object

Required
  • metadata

  • spec

Specification

Property Type Description

apiVersion

string

APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources

kind

string

Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds

metadata

ObjectMeta

Standard object’s metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata

spec

object

ConsolePluginSpec is the desired plugin configuration.

.spec

Description

ConsolePluginSpec is the desired plugin configuration.

Type

object

Required
  • backend

  • displayName

Property Type Description

backend

object

backend holds the configuration of backend which is serving console’s plugin .

displayName

string

displayName is the display name of the plugin. The dispalyName should be between 1 and 128 characters.

i18n

object

i18n is the configuration of plugin’s localization resources.

proxy

array

proxy is a list of proxies that describe various service type to which the plugin needs to connect to.

proxy[]

object

ConsolePluginProxy holds information on various service types to which console’s backend will proxy the plugin’s requests.

.spec.backend

Description

backend holds the configuration of backend which is serving console’s plugin .

Type

object

Required
  • type

Property Type Description

service

object

service is a Kubernetes Service that exposes the plugin using a deployment with an HTTP server. The Service must use HTTPS and Service serving certificate. The console backend will proxy the plugins assets from the Service using the service CA bundle.

type

string

type is the backend type which servers the console’s plugin. Currently only "Service" is supported. ---

.spec.backend.service

Description

service is a Kubernetes Service that exposes the plugin using a deployment with an HTTP server. The Service must use HTTPS and Service serving certificate. The console backend will proxy the plugins assets from the Service using the service CA bundle.

Type

object

Required
  • name

  • namespace

  • port

Property Type Description

basePath

string

basePath is the path to the plugin’s assets. The primary asset it the manifest file called plugin-manifest.json, which is a JSON document that contains metadata about the plugin and the extensions.

name

string

name of Service that is serving the plugin assets.

namespace

string

namespace of Service that is serving the plugin assets.

port

integer

port on which the Service that is serving the plugin is listening to.

.spec.i18n

Description

i18n is the configuration of plugin’s localization resources.

Type

object

Required
  • loadType

Property Type Description

loadType

string

loadType indicates how the plugin’s localization resource should be loaded. Valid values are Preload, Lazy and the empty string. When set to Preload, all localization resources are fetched when the plugin is loaded. When set to Lazy, localization resources are lazily loaded as and when they are required by the console. When omitted or set to the empty string, the behaviour is equivalent to Lazy type.

.spec.proxy

Description

proxy is a list of proxies that describe various service type to which the plugin needs to connect to.

Type

array

.spec.proxy[]

Description

ConsolePluginProxy holds information on various service types to which console’s backend will proxy the plugin’s requests.

Type

object

Required
  • alias

  • endpoint

Property Type Description

alias

string

alias is a proxy name that identifies the plugin’s proxy. An alias name should be unique per plugin. The console backend exposes following proxy endpoint: /api/proxy/plugin/<plugin-name>/<proxy-alias>/<request-path>?<optional-query-parameters> Request example path: /api/proxy/plugin/acm/search/pods?namespace=openshift-apiserver

authorization

string

authorization provides information about authorization type, which the proxied request should contain

caCertificate

string

caCertificate provides the cert authority certificate contents, in case the proxied Service is using custom service CA. By default, the service CA bundle provided by the service-ca operator is used.

endpoint

object

endpoint provides information about endpoint to which the request is proxied to.

.spec.proxy[].endpoint

Description

endpoint provides information about endpoint to which the request is proxied to.

Type

object

Required
  • type

Property Type Description

service

object

service is an in-cluster Service that the plugin will connect to. The Service must use HTTPS. The console backend exposes an endpoint in order to proxy communication between the plugin and the Service. Note: service field is required for now, since currently only "Service" type is supported.

type

string

type is the type of the console plugin’s proxy. Currently only "Service" is supported. ---

.spec.proxy[].endpoint.service

Description

service is an in-cluster Service that the plugin will connect to. The Service must use HTTPS. The console backend exposes an endpoint in order to proxy communication between the plugin and the Service. Note: service field is required for now, since currently only "Service" type is supported.

Type

object

Required
  • name

  • namespace

  • port

Property Type Description

name

string

name of Service that the plugin needs to connect to.

namespace

string

namespace of Service that the plugin needs to connect to

port

integer

port on which the Service that the plugin needs to connect to is listening on.

API endpoints

The following API endpoints are available:

  • /apis/console.openshift.io/v1/consoleplugins

    • DELETE: delete collection of ConsolePlugin

    • GET: list objects of kind ConsolePlugin

    • POST: create a ConsolePlugin

  • /apis/console.openshift.io/v1/consoleplugins/{name}

    • DELETE: delete a ConsolePlugin

    • GET: read the specified ConsolePlugin

    • PATCH: partially update the specified ConsolePlugin

    • PUT: replace the specified ConsolePlugin

/apis/console.openshift.io/v1/consoleplugins

HTTP method

DELETE

Description

delete collection of ConsolePlugin

Table 1. HTTP responses
HTTP code Reponse body

200 - OK

Status schema

401 - Unauthorized

Empty

HTTP method

GET

Description

list objects of kind ConsolePlugin

Table 2. HTTP responses
HTTP code Reponse body

200 - OK

ConsolePluginList schema

401 - Unauthorized

Empty

HTTP method

POST

Description

create a ConsolePlugin

Table 3. Query parameters
Parameter Type Description

dryRun

string

When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed

fieldValidation

string

fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.

Table 4. Body parameters
Parameter Type Description

body

ConsolePlugin schema

Table 5. HTTP responses
HTTP code Reponse body

200 - OK

ConsolePlugin schema

201 - Created

ConsolePlugin schema

202 - Accepted

ConsolePlugin schema

401 - Unauthorized

Empty

/apis/console.openshift.io/v1/consoleplugins/{name}

Table 6. Global path parameters
Parameter Type Description

name

string

name of the ConsolePlugin

HTTP method

DELETE

Description

delete a ConsolePlugin

Table 7. Query parameters
Parameter Type Description

dryRun

string

When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed

Table 8. HTTP responses
HTTP code Reponse body

200 - OK

Status schema

202 - Accepted

Status schema

401 - Unauthorized

Empty

HTTP method

GET

Description

read the specified ConsolePlugin

Table 9. HTTP responses
HTTP code Reponse body

200 - OK

ConsolePlugin schema

401 - Unauthorized

Empty

HTTP method

PATCH

Description

partially update the specified ConsolePlugin

Table 10. Query parameters
Parameter Type Description

dryRun

string

When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed

fieldValidation

string

fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.

Table 11. HTTP responses
HTTP code Reponse body

200 - OK

ConsolePlugin schema

401 - Unauthorized

Empty

HTTP method

PUT

Description

replace the specified ConsolePlugin

Table 12. Query parameters
Parameter Type Description

dryRun

string

When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed

fieldValidation

string

fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.

Table 13. Body parameters
Parameter Type Description

body

ConsolePlugin schema

Table 14. HTTP responses
HTTP code Reponse body

200 - OK

ConsolePlugin schema

201 - Created

ConsolePlugin schema

401 - Unauthorized

Empty