|
| 1 | +apiVersion: apiextensions.k8s.io/v1 |
| 2 | +kind: CustomResourceDefinition |
| 3 | +metadata: |
| 4 | + annotations: |
| 5 | + feature-gate.release.openshift.io/: "true" |
| 6 | + name: consoleplugins.console.openshift.io |
| 7 | +spec: |
| 8 | + versions: |
| 9 | + - name: v1alpha1 |
| 10 | + schema: |
| 11 | + openAPIV3Schema: |
| 12 | + description: "ConsolePlugin is an extension for customizing OpenShift web |
| 13 | + console by dynamically loading code from another service running on the |
| 14 | + cluster. \n Compatibility level 4: No compatibility is provided, the API |
| 15 | + can change at any point for any reason. These capabilities should not be |
| 16 | + used by applications needing long term support." |
| 17 | + properties: |
| 18 | + apiVersion: |
| 19 | + description: 'APIVersion defines the versioned schema of this representation |
| 20 | + of an object. Servers should convert recognized schemas to the latest |
| 21 | + internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' |
| 22 | + type: string |
| 23 | + kind: |
| 24 | + description: 'Kind is a string value representing the REST resource this |
| 25 | + object represents. Servers may infer this from the endpoint the client |
| 26 | + submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' |
| 27 | + type: string |
| 28 | + metadata: |
| 29 | + type: object |
| 30 | + spec: |
| 31 | + description: ConsolePluginSpec is the desired plugin configuration. |
| 32 | + properties: |
| 33 | + displayName: |
| 34 | + description: displayName is the display name of the plugin. |
| 35 | + minLength: 1 |
| 36 | + type: string |
| 37 | + proxy: |
| 38 | + description: proxy is a list of proxies that describe various service |
| 39 | + type to which the plugin needs to connect to. |
| 40 | + items: |
| 41 | + description: ConsolePluginProxy holds information on various service |
| 42 | + types to which console's backend will proxy the plugin's requests. |
| 43 | + properties: |
| 44 | + alias: |
| 45 | + description: "alias is a proxy name that identifies the plugin's |
| 46 | + proxy. An alias name should be unique per plugin. The console |
| 47 | + backend exposes following proxy endpoint: \n /api/proxy/plugin/<plugin-name>/<proxy-alias>/<request-path>?<optional-query-parameters> |
| 48 | + \n Request example path: \n /api/proxy/plugin/acm/search/pods?namespace=openshift-apiserver" |
| 49 | + maxLength: 128 |
| 50 | + minLength: 1 |
| 51 | + pattern: ^[A-Za-z0-9-_]+$ |
| 52 | + type: string |
| 53 | + authorize: |
| 54 | + default: false |
| 55 | + description: "authorize indicates if the proxied request should |
| 56 | + contain the logged-in user's OpenShift access token in the |
| 57 | + \"Authorization\" request header. For example: \n Authorization: |
| 58 | + Bearer sha256~kV46hPnEYhCWFnB85r5NrprAxggzgb6GOeLbgcKNsH0 |
| 59 | + \n By default the access token is not part of the proxied |
| 60 | + request." |
| 61 | + type: boolean |
| 62 | + caCertificate: |
| 63 | + description: caCertificate provides the cert authority certificate |
| 64 | + contents, in case the proxied Service is using custom service |
| 65 | + CA. By default, the service CA bundle provided by the service-ca |
| 66 | + operator is used. |
| 67 | + pattern: ^-----BEGIN CERTIFICATE-----([\s\S]*)-----END CERTIFICATE-----\s?$ |
| 68 | + type: string |
| 69 | + service: |
| 70 | + description: 'service is an in-cluster Service that the plugin |
| 71 | + will connect to. The Service must use HTTPS. The console backend |
| 72 | + exposes an endpoint in order to proxy communication between |
| 73 | + the plugin and the Service. Note: service field is required |
| 74 | + for now, since currently only "Service" type is supported.' |
| 75 | + properties: |
| 76 | + name: |
| 77 | + description: name of Service that the plugin needs to connect |
| 78 | + to. |
| 79 | + maxLength: 128 |
| 80 | + minLength: 1 |
| 81 | + type: string |
| 82 | + namespace: |
| 83 | + description: namespace of Service that the plugin needs |
| 84 | + to connect to |
| 85 | + maxLength: 128 |
| 86 | + minLength: 1 |
| 87 | + type: string |
| 88 | + port: |
| 89 | + description: port on which the Service that the plugin needs |
| 90 | + to connect to is listening on. |
| 91 | + format: int32 |
| 92 | + maximum: 65535 |
| 93 | + minimum: 1 |
| 94 | + type: integer |
| 95 | + required: |
| 96 | + - name |
| 97 | + - namespace |
| 98 | + - port |
| 99 | + type: object |
| 100 | + type: |
| 101 | + description: type is the type of the console plugin's proxy. |
| 102 | + Currently only "Service" is supported. |
| 103 | + pattern: ^(Service)$ |
| 104 | + type: string |
| 105 | + required: |
| 106 | + - alias |
| 107 | + - type |
| 108 | + type: object |
| 109 | + type: array |
| 110 | + service: |
| 111 | + description: service is a Kubernetes Service that exposes the plugin |
| 112 | + using a deployment with an HTTP server. The Service must use HTTPS |
| 113 | + and Service serving certificate. The console backend will proxy |
| 114 | + the plugins assets from the Service using the service CA bundle. |
| 115 | + properties: |
| 116 | + basePath: |
| 117 | + default: / |
| 118 | + description: basePath is the path to the plugin's assets. The |
| 119 | + primary asset it the manifest file called `plugin-manifest.json`, |
| 120 | + which is a JSON document that contains metadata about the plugin |
| 121 | + and the extensions. |
| 122 | + minLength: 1 |
| 123 | + pattern: ^/ |
| 124 | + type: string |
| 125 | + name: |
| 126 | + description: name of Service that is serving the plugin assets. |
| 127 | + maxLength: 128 |
| 128 | + minLength: 1 |
| 129 | + type: string |
| 130 | + namespace: |
| 131 | + description: namespace of Service that is serving the plugin assets. |
| 132 | + maxLength: 128 |
| 133 | + minLength: 1 |
| 134 | + type: string |
| 135 | + port: |
| 136 | + description: port on which the Service that is serving the plugin |
| 137 | + is listening to. |
| 138 | + format: int32 |
| 139 | + maximum: 65535 |
| 140 | + minimum: 1 |
| 141 | + type: integer |
| 142 | + required: |
| 143 | + - basePath |
| 144 | + - name |
| 145 | + - namespace |
| 146 | + - port |
| 147 | + type: object |
| 148 | + required: |
| 149 | + - service |
| 150 | + type: object |
| 151 | + required: |
| 152 | + - metadata |
| 153 | + - spec |
| 154 | + type: object |
| 155 | + served: true |
| 156 | + storage: false |
0 commit comments