Skip to content

Commit 3085657

Browse files
Merge pull request openshift#2343 from jhadvig/OCPBUGS-52556
OCPBUGS-52556: Revert v1alpha1 removal
2 parents f5e205b + 991da25 commit 3085657

File tree

2 files changed

+304
-0
lines changed

2 files changed

+304
-0
lines changed
Lines changed: 156 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,156 @@
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

console/v1/zz_generated.crd-manifests/90_consoleplugins.crd.yaml

Lines changed: 148 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -352,3 +352,151 @@ spec:
352352
type: object
353353
served: true
354354
storage: true
355+
- name: v1alpha1
356+
schema:
357+
openAPIV3Schema:
358+
description: "ConsolePlugin is an extension for customizing OpenShift web
359+
console by dynamically loading code from another service running on the
360+
cluster. \n Compatibility level 4: No compatibility is provided, the API
361+
can change at any point for any reason. These capabilities should not be
362+
used by applications needing long term support."
363+
properties:
364+
apiVersion:
365+
description: 'APIVersion defines the versioned schema of this representation
366+
of an object. Servers should convert recognized schemas to the latest
367+
internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
368+
type: string
369+
kind:
370+
description: 'Kind is a string value representing the REST resource this
371+
object represents. Servers may infer this from the endpoint the client
372+
submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
373+
type: string
374+
metadata:
375+
type: object
376+
spec:
377+
description: ConsolePluginSpec is the desired plugin configuration.
378+
properties:
379+
displayName:
380+
description: displayName is the display name of the plugin.
381+
minLength: 1
382+
type: string
383+
proxy:
384+
description: proxy is a list of proxies that describe various service
385+
type to which the plugin needs to connect to.
386+
items:
387+
description: ConsolePluginProxy holds information on various service
388+
types to which console's backend will proxy the plugin's requests.
389+
properties:
390+
alias:
391+
description: "alias is a proxy name that identifies the plugin's
392+
proxy. An alias name should be unique per plugin. The console
393+
backend exposes following proxy endpoint: \n /api/proxy/plugin/<plugin-name>/<proxy-alias>/<request-path>?<optional-query-parameters>
394+
\n Request example path: \n /api/proxy/plugin/acm/search/pods?namespace=openshift-apiserver"
395+
maxLength: 128
396+
minLength: 1
397+
pattern: ^[A-Za-z0-9-_]+$
398+
type: string
399+
authorize:
400+
default: false
401+
description: "authorize indicates if the proxied request should
402+
contain the logged-in user's OpenShift access token in the
403+
\"Authorization\" request header. For example: \n Authorization:
404+
Bearer sha256~kV46hPnEYhCWFnB85r5NrprAxggzgb6GOeLbgcKNsH0
405+
\n By default the access token is not part of the proxied
406+
request."
407+
type: boolean
408+
caCertificate:
409+
description: caCertificate provides the cert authority certificate
410+
contents, in case the proxied Service is using custom service
411+
CA. By default, the service CA bundle provided by the service-ca
412+
operator is used.
413+
pattern: ^-----BEGIN CERTIFICATE-----([\s\S]*)-----END CERTIFICATE-----\s?$
414+
type: string
415+
service:
416+
description: 'service is an in-cluster Service that the plugin
417+
will connect to. The Service must use HTTPS. The console backend
418+
exposes an endpoint in order to proxy communication between
419+
the plugin and the Service. Note: service field is required
420+
for now, since currently only "Service" type is supported.'
421+
properties:
422+
name:
423+
description: name of Service that the plugin needs to connect
424+
to.
425+
maxLength: 128
426+
minLength: 1
427+
type: string
428+
namespace:
429+
description: namespace of Service that the plugin needs
430+
to connect to
431+
maxLength: 128
432+
minLength: 1
433+
type: string
434+
port:
435+
description: port on which the Service that the plugin needs
436+
to connect to is listening on.
437+
format: int32
438+
maximum: 65535
439+
minimum: 1
440+
type: integer
441+
required:
442+
- name
443+
- namespace
444+
- port
445+
type: object
446+
type:
447+
description: type is the type of the console plugin's proxy.
448+
Currently only "Service" is supported.
449+
pattern: ^(Service)$
450+
type: string
451+
required:
452+
- alias
453+
- type
454+
type: object
455+
type: array
456+
service:
457+
description: service is a Kubernetes Service that exposes the plugin
458+
using a deployment with an HTTP server. The Service must use HTTPS
459+
and Service serving certificate. The console backend will proxy
460+
the plugins assets from the Service using the service CA bundle.
461+
properties:
462+
basePath:
463+
default: /
464+
description: basePath is the path to the plugin's assets. The
465+
primary asset it the manifest file called `plugin-manifest.json`,
466+
which is a JSON document that contains metadata about the plugin
467+
and the extensions.
468+
minLength: 1
469+
pattern: ^/
470+
type: string
471+
name:
472+
description: name of Service that is serving the plugin assets.
473+
maxLength: 128
474+
minLength: 1
475+
type: string
476+
namespace:
477+
description: namespace of Service that is serving the plugin assets.
478+
maxLength: 128
479+
minLength: 1
480+
type: string
481+
port:
482+
description: port on which the Service that is serving the plugin
483+
is listening to.
484+
format: int32
485+
maximum: 65535
486+
minimum: 1
487+
type: integer
488+
required:
489+
- basePath
490+
- name
491+
- namespace
492+
- port
493+
type: object
494+
required:
495+
- service
496+
type: object
497+
required:
498+
- metadata
499+
- spec
500+
type: object
501+
served: true
502+
storage: false

0 commit comments

Comments
 (0)