Search

Chapter 6. ConsolePlugin [console.openshift.io/v1]

download PDF
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

6.1. Specification

PropertyTypeDescription

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.

6.1.1. .spec

Description
ConsolePluginSpec is the desired plugin configuration.
Type
object
Required
  • backend
  • displayName
PropertyTypeDescription

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.

6.1.2. .spec.backend

Description
backend holds the configuration of backend which is serving console’s plugin .
Type
object
Required
  • type
PropertyTypeDescription

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. ---

6.1.3. .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
PropertyTypeDescription

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.

6.1.4. .spec.i18n

Description
i18n is the configuration of plugin’s localization resources.
Type
object
Required
  • loadType
PropertyTypeDescription

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.

6.1.5. .spec.proxy

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

6.1.6. .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
PropertyTypeDescription

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.

6.1.7. .spec.proxy[].endpoint

Description
endpoint provides information about endpoint to which the request is proxied to.
Type
object
Required
  • type
PropertyTypeDescription

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. ---

6.1.8. .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
PropertyTypeDescription

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.

6.2. 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

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

HTTP method
DELETE
Description
delete collection of ConsolePlugin
Table 6.1. HTTP responses
HTTP codeReponse body

200 - OK

Status schema

401 - Unauthorized

Empty

HTTP method
GET
Description
list objects of kind ConsolePlugin
Table 6.2. HTTP responses
HTTP codeReponse body

200 - OK

ConsolePluginList schema

401 - Unauthorized

Empty

HTTP method
POST
Description
create a ConsolePlugin
Table 6.3. Query parameters
ParameterTypeDescription

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 6.4. Body parameters
ParameterTypeDescription

body

ConsolePlugin schema

 
Table 6.5. HTTP responses
HTTP codeReponse body

200 - OK

ConsolePlugin schema

201 - Created

ConsolePlugin schema

202 - Accepted

ConsolePlugin schema

401 - Unauthorized

Empty

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

Table 6.6. Global path parameters
ParameterTypeDescription

name

string

name of the ConsolePlugin

HTTP method
DELETE
Description
delete a ConsolePlugin
Table 6.7. Query parameters
ParameterTypeDescription

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 6.8. HTTP responses
HTTP codeReponse body

200 - OK

Status schema

202 - Accepted

Status schema

401 - Unauthorized

Empty

HTTP method
GET
Description
read the specified ConsolePlugin
Table 6.9. HTTP responses
HTTP codeReponse body

200 - OK

ConsolePlugin schema

401 - Unauthorized

Empty

HTTP method
PATCH
Description
partially update the specified ConsolePlugin
Table 6.10. Query parameters
ParameterTypeDescription

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 6.11. HTTP responses
HTTP codeReponse body

200 - OK

ConsolePlugin schema

401 - Unauthorized

Empty

HTTP method
PUT
Description
replace the specified ConsolePlugin
Table 6.12. Query parameters
ParameterTypeDescription

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 6.13. Body parameters
ParameterTypeDescription

body

ConsolePlugin schema

 
Table 6.14. HTTP responses
HTTP codeReponse body

200 - OK

ConsolePlugin schema

201 - Created

ConsolePlugin schema

401 - Unauthorized

Empty

Red Hat logoGithubRedditYoutubeTwitter

Learn

Try, buy, & sell

Communities

About Red Hat Documentation

We help Red Hat users innovate and achieve their goals with our products and services with content they can trust.

Making open source more inclusive

Red Hat is committed to replacing problematic language in our code, documentation, and web properties. For more details, see the Red Hat Blog.

About Red Hat

We deliver hardened solutions that make it easier for enterprises to work across platforms and environments, from the core datacenter to the network edge.

© 2024 Red Hat, Inc.