diff --git a/console/install.go b/console/install.go index bf87abbf5e0..147d023b7b7 100644 --- a/console/install.go +++ b/console/install.go @@ -5,7 +5,6 @@ import ( "k8s.io/apimachinery/pkg/runtime/schema" consolev1 "github.com/openshift/api/console/v1" - consolev1alpha1 "github.com/openshift/api/console/v1alpha1" ) const ( @@ -13,7 +12,7 @@ const ( ) var ( - schemeBuilder = runtime.NewSchemeBuilder(consolev1alpha1.Install, consolev1.Install) + schemeBuilder = runtime.NewSchemeBuilder(consolev1.Install) // Install is a function which adds every version of this group to a scheme Install = schemeBuilder.AddToScheme ) diff --git a/console/v1alpha1/Makefile b/console/v1alpha1/Makefile deleted file mode 100644 index 022487a1516..00000000000 --- a/console/v1alpha1/Makefile +++ /dev/null @@ -1,3 +0,0 @@ -.PHONY: test -test: - make -C ../../tests test GINKGO_EXTRA_ARGS=--focus="console.openshift.io/v1alpha1" diff --git a/console/v1alpha1/doc.go b/console/v1alpha1/doc.go deleted file mode 100644 index 67ac59bc120..00000000000 --- a/console/v1alpha1/doc.go +++ /dev/null @@ -1,6 +0,0 @@ -// +k8s:deepcopy-gen=package,register -// +k8s:defaulter-gen=TypeMeta -// +k8s:openapi-gen=true - -// +groupName=console.openshift.io -package v1alpha1 diff --git a/console/v1alpha1/manual-override-crd-manifests/consoleplugins.console.openshift.io/AAA_ungated.yaml b/console/v1alpha1/manual-override-crd-manifests/consoleplugins.console.openshift.io/AAA_ungated.yaml deleted file mode 100644 index cb5e81a45af..00000000000 --- a/console/v1alpha1/manual-override-crd-manifests/consoleplugins.console.openshift.io/AAA_ungated.yaml +++ /dev/null @@ -1,215 +0,0 @@ -apiVersion: apiextensions.k8s.io/v1 -kind: CustomResourceDefinition -metadata: - annotations: - feature-gate.release.openshift.io/: "true" - name: consoleplugins.console.openshift.io -spec: - conversion: - strategy: Webhook - webhook: - clientConfig: - service: - name: webhook - namespace: openshift-console-operator - path: /crdconvert - port: 9443 - conversionReviewVersions: - - v1 - - v1alpha1 - versions: - - name: v1alpha1 - served: true - storage: false - - name: v1 - schema: - openAPIV3Schema: - description: "ConsolePlugin is an extension for customizing OpenShift web - console by dynamically loading code from another service running on the - cluster. \n Compatibility level 1: Stable within a major release for a minimum - of 12 months or 3 minor releases (whichever is longer)." - properties: - apiVersion: - description: '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' - type: string - kind: - description: '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' - type: string - metadata: - type: object - spec: - description: ConsolePluginSpec is the desired plugin configuration. - properties: - backend: - description: backend holds the configuration of backend which is serving - console's plugin . - properties: - 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. - properties: - basePath: - default: / - description: 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. - maxLength: 256 - minLength: 1 - pattern: ^[a-zA-Z0-9.\-_~!$&'()*+,;=:@\/]*$ - type: string - name: - description: name of Service that is serving the plugin assets. - maxLength: 128 - minLength: 1 - type: string - namespace: - description: namespace of Service that is serving the plugin - assets. - maxLength: 128 - minLength: 1 - type: string - port: - description: port on which the Service that is serving the - plugin is listening to. - format: int32 - maximum: 65535 - minimum: 1 - type: integer - required: - - name - - namespace - - port - type: object - type: - description: "type is the backend type which servers the console's - plugin. Currently only \"Service\" is supported. \n ---" - enum: - - Service - type: string - required: - - type - type: object - displayName: - description: displayName is the display name of the plugin. The dispalyName - should be between 1 and 128 characters. - maxLength: 128 - minLength: 1 - type: string - i18n: - description: i18n is the configuration of plugin's localization resources. - properties: - loadType: - description: 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. - enum: - - Preload - - Lazy - - "" - type: string - required: - - loadType - type: object - proxy: - description: proxy is a list of proxies that describe various service - type to which the plugin needs to connect to. - items: - description: ConsolePluginProxy holds information on various service - types to which console's backend will proxy the plugin's requests. - properties: - alias: - description: "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: \n /api/proxy/plugin///? - \n Request example path: \n /api/proxy/plugin/acm/search/pods?namespace=openshift-apiserver" - maxLength: 128 - minLength: 1 - pattern: ^[A-Za-z0-9-_]+$ - type: string - authorization: - default: None - description: authorization provides information about authorization - type, which the proxied request should contain - enum: - - UserToken - - None - type: string - caCertificate: - description: 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. - pattern: ^-----BEGIN CERTIFICATE-----([\s\S]*)-----END CERTIFICATE-----\s?$ - type: string - endpoint: - description: endpoint provides information about endpoint to - which the request is proxied to. - properties: - 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.' - properties: - name: - description: name of Service that the plugin needs to - connect to. - maxLength: 128 - minLength: 1 - type: string - namespace: - description: namespace of Service that the plugin needs - to connect to - maxLength: 128 - minLength: 1 - type: string - port: - description: port on which the Service that the plugin - needs to connect to is listening on. - format: int32 - maximum: 65535 - minimum: 1 - type: integer - required: - - name - - namespace - - port - type: object - type: - description: "type is the type of the console plugin's proxy. - Currently only \"Service\" is supported. \n ---" - enum: - - Service - type: string - required: - - type - type: object - required: - - alias - - endpoint - type: object - type: array - required: - - backend - - displayName - type: object - required: - - metadata - - spec - type: object - served: true - storage: true diff --git a/console/v1alpha1/register.go b/console/v1alpha1/register.go deleted file mode 100644 index a21f0080373..00000000000 --- a/console/v1alpha1/register.go +++ /dev/null @@ -1,39 +0,0 @@ -package v1alpha1 - -import ( - corev1 "k8s.io/api/core/v1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/runtime" - "k8s.io/apimachinery/pkg/runtime/schema" -) - -var ( - GroupName = "console.openshift.io" - GroupVersion = schema.GroupVersion{Group: GroupName, Version: "v1alpha1"} - schemeBuilder = runtime.NewSchemeBuilder(addKnownTypes, corev1.AddToScheme) - // Install is a function which adds this version to a scheme - Install = schemeBuilder.AddToScheme - - // SchemeGroupVersion generated code relies on this name - // Deprecated - SchemeGroupVersion = GroupVersion - // AddToScheme exists solely to keep the old generators creating valid code - // DEPRECATED - AddToScheme = schemeBuilder.AddToScheme -) - -// Resource generated code relies on this being here, but it logically belongs to the group -// DEPRECATED -func Resource(resource string) schema.GroupResource { - return schema.GroupResource{Group: GroupName, Resource: resource} -} - -// addKnownTypes adds types to API group -func addKnownTypes(scheme *runtime.Scheme) error { - scheme.AddKnownTypes(GroupVersion, - &ConsolePlugin{}, - &ConsolePluginList{}, - ) - metav1.AddToGroupVersion(scheme, GroupVersion) - return nil -} diff --git a/console/v1alpha1/tests/consoleplugins.console.openshift.io/AAA_ungated.yaml b/console/v1alpha1/tests/consoleplugins.console.openshift.io/AAA_ungated.yaml deleted file mode 100644 index fd9ae1368e7..00000000000 --- a/console/v1alpha1/tests/consoleplugins.console.openshift.io/AAA_ungated.yaml +++ /dev/null @@ -1,24 +0,0 @@ -apiVersion: apiextensions.k8s.io/v1 # Hack because controller-gen complains if we don't have this -name: "ConsolePlugin" -crdName: consoleplugins.console.openshift.io -version: v1alpha1 -tests: - onCreate: - - name: Should be able to create a minimal ConsolePlugin - initial: | - apiVersion: console.openshift.io/v1alpha1 - kind: ConsolePlugin - spec: - service: - name: foo - namespace: foo - port: 80 - expected: | - apiVersion: console.openshift.io/v1alpha1 - kind: ConsolePlugin - spec: - service: - name: foo - namespace: foo - port: 80 - basePath: / diff --git a/console/v1alpha1/types.go b/console/v1alpha1/types.go deleted file mode 100644 index 1c267880d8d..00000000000 --- a/console/v1alpha1/types.go +++ /dev/null @@ -1 +0,0 @@ -package v1alpha1 diff --git a/console/v1alpha1/types_console_plugin.go b/console/v1alpha1/types_console_plugin.go deleted file mode 100644 index 3533b63994a..00000000000 --- a/console/v1alpha1/types_console_plugin.go +++ /dev/null @@ -1,182 +0,0 @@ -package v1alpha1 - -import metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - -// +genclient -// +genclient:nonNamespaced -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object -// +openshift:compatibility-gen:level=4 - -// ConsolePlugin is an extension for customizing OpenShift web console by -// dynamically loading code from another service running on the cluster. -// -// Compatibility level 4: No compatibility is provided, the API can change at any point for any reason. These capabilities should not be used by applications needing long term support. -// +kubebuilder:object:root=true -// +kubebuilder:resource:path=consoleplugins,scope=Cluster -// +openshift:api-approved.openshift.io=https://github.com/openshift/api/pull/764 -// +openshift:file-pattern=operatorOrdering=90 -// +openshift:capability=Console -// +kubebuilder:metadata:annotations="description=Extension for configuring openshift web console plugins." -// +kubebuilder:metadata:annotations="displayName=ConsolePlugin" -// +kubebuilder:metadata:annotations="service.beta.openshift.io/inject-cabundle=true" -type ConsolePlugin struct { - metav1.TypeMeta `json:",inline"` - - // metadata is the standard object's metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - metav1.ObjectMeta `json:"metadata"` - - // +kubebuilder:validation:Required - // +required - Spec ConsolePluginSpec `json:"spec"` -} - -// ConsolePluginSpec is the desired plugin configuration. -type ConsolePluginSpec struct { - // displayName is the display name of the plugin. - // +kubebuilder:validation:Required - // +kubebuilder:validation:MinLength=1 - // +optional - DisplayName string `json:"displayName,omitempty"` - // 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. - // +kubebuilder:validation:Required - // +required - Service ConsolePluginService `json:"service"` - // proxy is a list of proxies that describe various service type - // to which the plugin needs to connect to. - // +kubebuilder:validation:Optional - // +optional - Proxy []ConsolePluginProxy `json:"proxy,omitempty"` -} - -// ConsolePluginProxy holds information on various service types -// to which console's backend will proxy the plugin's requests. -type ConsolePluginProxy struct { - // type is the type of the console plugin's proxy. Currently only "Service" is supported. - // +kubebuilder:validation:Required - // +required - Type ConsolePluginProxyType `json:"type"` - // 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///? - // - // Request example path: - // - // /api/proxy/plugin/acm/search/pods?namespace=openshift-apiserver - // - // +kubebuilder:validation:Required - // +kubebuilder:validation:MinLength=1 - // +kubebuilder:validation:MaxLength=128 - // +kubebuilder:validation:Pattern=`^[A-Za-z0-9-_]+$` - // +required - Alias string `json:"alias"` - // 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. - // +kubebuilder:validation:Required - // +required - Service ConsolePluginProxyServiceConfig `json:"service,omitempty"` - // 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. - // +kubebuilder:validation:Pattern=`^-----BEGIN CERTIFICATE-----([\s\S]*)-----END CERTIFICATE-----\s?$` - // +kubebuilder:validation:Optional - // +optional - CACertificate string `json:"caCertificate,omitempty"` - // authorize indicates if the proxied request should contain the logged-in user's - // OpenShift access token in the "Authorization" request header. For example: - // - // Authorization: Bearer sha256~kV46hPnEYhCWFnB85r5NrprAxggzgb6GOeLbgcKNsH0 - // - // By default the access token is not part of the proxied request. - // +kubebuilder:default:=false - // +kubebuilder:validation:Optional - // +optional - Authorize bool `json:"authorize,omitempty"` -} - -// ProxyType is an enumeration of available proxy types -// +kubebuilder:validation:Pattern=`^(Service)$` -type ConsolePluginProxyType string - -const ( - // ProxyTypeService is used when proxying communication to a Service - ProxyTypeService ConsolePluginProxyType = "Service" -) - -// ProxyTypeServiceConfig holds information on Service to which -// console's backend will proxy the plugin's requests. -type ConsolePluginProxyServiceConfig struct { - // name of Service that the plugin needs to connect to. - // +kubebuilder:validation:Required - // +kubebuilder:validation:MinLength=1 - // +kubebuilder:validation:MaxLength=128 - // +required - Name string `json:"name"` - // namespace of Service that the plugin needs to connect to - // +kubebuilder:validation:Required - // +kubebuilder:validation:MinLength=1 - // +kubebuilder:validation:MaxLength=128 - // +required - Namespace string `json:"namespace"` - // port on which the Service that the plugin needs to connect to - // is listening on. - // +kubebuilder:validation:Required - // +kubebuilder:validation:Maximum:=65535 - // +kubebuilder:validation:Minimum:=1 - // +required - Port int32 `json:"port"` -} - -// ConsolePluginService holds information on Service that is serving -// console dynamic plugin assets. -type ConsolePluginService struct { - // name of Service that is serving the plugin assets. - // +kubebuilder:validation:Required - // +kubebuilder:validation:MinLength=1 - // +kubebuilder:validation:MaxLength=128 - // +required - Name string `json:"name"` - // namespace of Service that is serving the plugin assets. - // +kubebuilder:validation:Required - // +kubebuilder:validation:MinLength=1 - // +kubebuilder:validation:MaxLength=128 - // +required - Namespace string `json:"namespace"` - // port on which the Service that is serving the plugin is listening to. - // +kubebuilder:validation:Required - // +kubebuilder:validation:Maximum:=65535 - // +kubebuilder:validation:Minimum:=1 - // +required - Port int32 `json:"port"` - // 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. - // +kubebuilder:validation:Required - // +kubebuilder:validation:MinLength=1 - // +kubebuilder:validation:Pattern=`^/` - // +kubebuilder:default:="/" - // +required - BasePath string `json:"basePath"` -} - -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object -// +openshift:compatibility-gen:level=4 - -// Compatibility level 4: No compatibility is provided, the API can change at any point for any reason. These capabilities should not be used by applications needing long term support. -type ConsolePluginList struct { - metav1.TypeMeta `json:",inline"` - - // metadata is the standard list's metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - metav1.ListMeta `json:"metadata"` - - Items []ConsolePlugin `json:"items"` -} diff --git a/console/v1alpha1/zz_generated.crd-manifests/90_consoleplugins.crd.yaml b/console/v1alpha1/zz_generated.crd-manifests/90_consoleplugins.crd.yaml deleted file mode 100644 index a70c07935bf..00000000000 --- a/console/v1alpha1/zz_generated.crd-manifests/90_consoleplugins.crd.yaml +++ /dev/null @@ -1,374 +0,0 @@ -apiVersion: apiextensions.k8s.io/v1 -kind: CustomResourceDefinition -metadata: - annotations: - api-approved.openshift.io: https://github.com/openshift/api/pull/764 - api.openshift.io/merged-by-featuregates: "true" - capability.openshift.io/name: Console - description: Extension for configuring openshift web console plugins. - displayName: ConsolePlugin - include.release.openshift.io/ibm-cloud-managed: "true" - include.release.openshift.io/self-managed-high-availability: "true" - service.beta.openshift.io/inject-cabundle: "true" - name: consoleplugins.console.openshift.io -spec: - conversion: - strategy: Webhook - webhook: - clientConfig: - service: - name: webhook - namespace: openshift-console-operator - path: /crdconvert - port: 9443 - conversionReviewVersions: - - v1 - - v1alpha1 - group: console.openshift.io - names: - kind: ConsolePlugin - listKind: ConsolePluginList - plural: consoleplugins - singular: consoleplugin - scope: Cluster - versions: - - name: v1alpha1 - schema: - openAPIV3Schema: - description: "ConsolePlugin is an extension for customizing OpenShift web - console by dynamically loading code from another service running on the - cluster. \n Compatibility level 4: No compatibility is provided, the API - can change at any point for any reason. These capabilities should not be - used by applications needing long term support." - properties: - apiVersion: - description: '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' - type: string - kind: - description: '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' - type: string - metadata: - type: object - spec: - description: ConsolePluginSpec is the desired plugin configuration. - properties: - displayName: - description: displayName is the display name of the plugin. - minLength: 1 - type: string - proxy: - description: proxy is a list of proxies that describe various service - type to which the plugin needs to connect to. - items: - description: ConsolePluginProxy holds information on various service - types to which console's backend will proxy the plugin's requests. - properties: - alias: - description: "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: \n /api/proxy/plugin///? - \n Request example path: \n /api/proxy/plugin/acm/search/pods?namespace=openshift-apiserver" - maxLength: 128 - minLength: 1 - pattern: ^[A-Za-z0-9-_]+$ - type: string - authorize: - default: false - description: "authorize indicates if the proxied request should - contain the logged-in user's OpenShift access token in the - \"Authorization\" request header. For example: \n Authorization: - Bearer sha256~kV46hPnEYhCWFnB85r5NrprAxggzgb6GOeLbgcKNsH0 - \n By default the access token is not part of the proxied - request." - type: boolean - caCertificate: - description: 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. - pattern: ^-----BEGIN CERTIFICATE-----([\s\S]*)-----END CERTIFICATE-----\s?$ - type: string - 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.' - properties: - name: - description: name of Service that the plugin needs to connect - to. - maxLength: 128 - minLength: 1 - type: string - namespace: - description: namespace of Service that the plugin needs - to connect to - maxLength: 128 - minLength: 1 - type: string - port: - description: port on which the Service that the plugin needs - to connect to is listening on. - format: int32 - maximum: 65535 - minimum: 1 - type: integer - required: - - name - - namespace - - port - type: object - type: - description: type is the type of the console plugin's proxy. - Currently only "Service" is supported. - pattern: ^(Service)$ - type: string - required: - - alias - - type - type: object - type: array - 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. - properties: - basePath: - default: / - description: 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. - minLength: 1 - pattern: ^/ - type: string - name: - description: name of Service that is serving the plugin assets. - maxLength: 128 - minLength: 1 - type: string - namespace: - description: namespace of Service that is serving the plugin assets. - maxLength: 128 - minLength: 1 - type: string - port: - description: port on which the Service that is serving the plugin - is listening to. - format: int32 - maximum: 65535 - minimum: 1 - type: integer - required: - - basePath - - name - - namespace - - port - type: object - required: - - service - type: object - required: - - metadata - - spec - type: object - served: true - storage: false - - name: v1 - schema: - openAPIV3Schema: - description: "ConsolePlugin is an extension for customizing OpenShift web - console by dynamically loading code from another service running on the - cluster. \n Compatibility level 1: Stable within a major release for a minimum - of 12 months or 3 minor releases (whichever is longer)." - properties: - apiVersion: - description: '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' - type: string - kind: - description: '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' - type: string - metadata: - type: object - spec: - description: ConsolePluginSpec is the desired plugin configuration. - properties: - backend: - description: backend holds the configuration of backend which is serving - console's plugin . - properties: - 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. - properties: - basePath: - default: / - description: 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. - maxLength: 256 - minLength: 1 - pattern: ^[a-zA-Z0-9.\-_~!$&'()*+,;=:@\/]*$ - type: string - name: - description: name of Service that is serving the plugin assets. - maxLength: 128 - minLength: 1 - type: string - namespace: - description: namespace of Service that is serving the plugin - assets. - maxLength: 128 - minLength: 1 - type: string - port: - description: port on which the Service that is serving the - plugin is listening to. - format: int32 - maximum: 65535 - minimum: 1 - type: integer - required: - - name - - namespace - - port - type: object - type: - description: "type is the backend type which servers the console's - plugin. Currently only \"Service\" is supported. \n ---" - enum: - - Service - type: string - required: - - type - type: object - displayName: - description: displayName is the display name of the plugin. The dispalyName - should be between 1 and 128 characters. - maxLength: 128 - minLength: 1 - type: string - i18n: - description: i18n is the configuration of plugin's localization resources. - properties: - loadType: - description: 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. - enum: - - Preload - - Lazy - - "" - type: string - required: - - loadType - type: object - proxy: - description: proxy is a list of proxies that describe various service - type to which the plugin needs to connect to. - items: - description: ConsolePluginProxy holds information on various service - types to which console's backend will proxy the plugin's requests. - properties: - alias: - description: "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: \n /api/proxy/plugin///? - \n Request example path: \n /api/proxy/plugin/acm/search/pods?namespace=openshift-apiserver" - maxLength: 128 - minLength: 1 - pattern: ^[A-Za-z0-9-_]+$ - type: string - authorization: - default: None - description: authorization provides information about authorization - type, which the proxied request should contain - enum: - - UserToken - - None - type: string - caCertificate: - description: 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. - pattern: ^-----BEGIN CERTIFICATE-----([\s\S]*)-----END CERTIFICATE-----\s?$ - type: string - endpoint: - description: endpoint provides information about endpoint to - which the request is proxied to. - properties: - 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.' - properties: - name: - description: name of Service that the plugin needs to - connect to. - maxLength: 128 - minLength: 1 - type: string - namespace: - description: namespace of Service that the plugin needs - to connect to - maxLength: 128 - minLength: 1 - type: string - port: - description: port on which the Service that the plugin - needs to connect to is listening on. - format: int32 - maximum: 65535 - minimum: 1 - type: integer - required: - - name - - namespace - - port - type: object - type: - description: "type is the type of the console plugin's proxy. - Currently only \"Service\" is supported. \n ---" - enum: - - Service - type: string - required: - - type - type: object - required: - - alias - - endpoint - type: object - type: array - required: - - backend - - displayName - type: object - required: - - metadata - - spec - type: object - served: true - storage: true diff --git a/console/v1alpha1/zz_generated.crd-manifests/doc.go b/console/v1alpha1/zz_generated.crd-manifests/doc.go deleted file mode 100644 index 8c4eeb33b71..00000000000 --- a/console/v1alpha1/zz_generated.crd-manifests/doc.go +++ /dev/null @@ -1 +0,0 @@ -package console_v1alpha1_crdmanifests diff --git a/console/v1alpha1/zz_generated.deepcopy.go b/console/v1alpha1/zz_generated.deepcopy.go deleted file mode 100644 index 87b68c6b183..00000000000 --- a/console/v1alpha1/zz_generated.deepcopy.go +++ /dev/null @@ -1,141 +0,0 @@ -//go:build !ignore_autogenerated -// +build !ignore_autogenerated - -// Code generated by deepcopy-gen. DO NOT EDIT. - -package v1alpha1 - -import ( - runtime "k8s.io/apimachinery/pkg/runtime" -) - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ConsolePlugin) DeepCopyInto(out *ConsolePlugin) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) - in.Spec.DeepCopyInto(&out.Spec) - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ConsolePlugin. -func (in *ConsolePlugin) DeepCopy() *ConsolePlugin { - if in == nil { - return nil - } - out := new(ConsolePlugin) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *ConsolePlugin) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ConsolePluginList) DeepCopyInto(out *ConsolePluginList) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]ConsolePlugin, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ConsolePluginList. -func (in *ConsolePluginList) DeepCopy() *ConsolePluginList { - if in == nil { - return nil - } - out := new(ConsolePluginList) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *ConsolePluginList) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ConsolePluginProxy) DeepCopyInto(out *ConsolePluginProxy) { - *out = *in - out.Service = in.Service - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ConsolePluginProxy. -func (in *ConsolePluginProxy) DeepCopy() *ConsolePluginProxy { - if in == nil { - return nil - } - out := new(ConsolePluginProxy) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ConsolePluginProxyServiceConfig) DeepCopyInto(out *ConsolePluginProxyServiceConfig) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ConsolePluginProxyServiceConfig. -func (in *ConsolePluginProxyServiceConfig) DeepCopy() *ConsolePluginProxyServiceConfig { - if in == nil { - return nil - } - out := new(ConsolePluginProxyServiceConfig) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ConsolePluginService) DeepCopyInto(out *ConsolePluginService) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ConsolePluginService. -func (in *ConsolePluginService) DeepCopy() *ConsolePluginService { - if in == nil { - return nil - } - out := new(ConsolePluginService) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ConsolePluginSpec) DeepCopyInto(out *ConsolePluginSpec) { - *out = *in - out.Service = in.Service - if in.Proxy != nil { - in, out := &in.Proxy, &out.Proxy - *out = make([]ConsolePluginProxy, len(*in)) - copy(*out, *in) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ConsolePluginSpec. -func (in *ConsolePluginSpec) DeepCopy() *ConsolePluginSpec { - if in == nil { - return nil - } - out := new(ConsolePluginSpec) - in.DeepCopyInto(out) - return out -} diff --git a/console/v1alpha1/zz_generated.featuregated-crd-manifests.yaml b/console/v1alpha1/zz_generated.featuregated-crd-manifests.yaml deleted file mode 100644 index d219598d9dc..00000000000 --- a/console/v1alpha1/zz_generated.featuregated-crd-manifests.yaml +++ /dev/null @@ -1,24 +0,0 @@ -consoleplugins.console.openshift.io: - Annotations: - description: Extension for configuring openshift web console plugins. - displayName: ConsolePlugin - service.beta.openshift.io/inject-cabundle: "true" - ApprovedPRNumber: https://github.com/openshift/api/pull/764 - CRDName: consoleplugins.console.openshift.io - Capability: Console - Category: "" - FeatureGates: [] - FilenameOperatorName: "" - FilenameOperatorOrdering: "90" - FilenameRunLevel: "" - GroupName: console.openshift.io - HasStatus: false - KindName: ConsolePlugin - Labels: {} - PluralName: consoleplugins - PrinterColumns: [] - Scope: Cluster - ShortNames: null - TopLevelFeatureGates: [] - Version: v1alpha1 - diff --git a/console/v1alpha1/zz_generated.featuregated-crd-manifests/consoleplugins.console.openshift.io/AAA_ungated.yaml b/console/v1alpha1/zz_generated.featuregated-crd-manifests/consoleplugins.console.openshift.io/AAA_ungated.yaml deleted file mode 100644 index fc015e5d6cf..00000000000 --- a/console/v1alpha1/zz_generated.featuregated-crd-manifests/consoleplugins.console.openshift.io/AAA_ungated.yaml +++ /dev/null @@ -1,169 +0,0 @@ -apiVersion: apiextensions.k8s.io/v1 -kind: CustomResourceDefinition -metadata: - annotations: - api-approved.openshift.io: https://github.com/openshift/api/pull/764 - api.openshift.io/filename-ordering: "90" - capability.openshift.io/name: Console - description: Extension for configuring openshift web console plugins. - displayName: ConsolePlugin - feature-gate.release.openshift.io/: "true" - service.beta.openshift.io/inject-cabundle: "true" - name: consoleplugins.console.openshift.io -spec: - group: console.openshift.io - names: - kind: ConsolePlugin - listKind: ConsolePluginList - plural: consoleplugins - singular: consoleplugin - scope: Cluster - versions: - - name: v1alpha1 - schema: - openAPIV3Schema: - description: "ConsolePlugin is an extension for customizing OpenShift web - console by dynamically loading code from another service running on the - cluster. \n Compatibility level 4: No compatibility is provided, the API - can change at any point for any reason. These capabilities should not be - used by applications needing long term support." - properties: - apiVersion: - description: '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' - type: string - kind: - description: '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' - type: string - metadata: - type: object - spec: - description: ConsolePluginSpec is the desired plugin configuration. - properties: - displayName: - description: displayName is the display name of the plugin. - minLength: 1 - type: string - proxy: - description: proxy is a list of proxies that describe various service - type to which the plugin needs to connect to. - items: - description: ConsolePluginProxy holds information on various service - types to which console's backend will proxy the plugin's requests. - properties: - alias: - description: "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: \n /api/proxy/plugin///? - \n Request example path: \n /api/proxy/plugin/acm/search/pods?namespace=openshift-apiserver" - maxLength: 128 - minLength: 1 - pattern: ^[A-Za-z0-9-_]+$ - type: string - authorize: - default: false - description: "authorize indicates if the proxied request should - contain the logged-in user's OpenShift access token in the - \"Authorization\" request header. For example: \n Authorization: - Bearer sha256~kV46hPnEYhCWFnB85r5NrprAxggzgb6GOeLbgcKNsH0 - \n By default the access token is not part of the proxied - request." - type: boolean - caCertificate: - description: 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. - pattern: ^-----BEGIN CERTIFICATE-----([\s\S]*)-----END CERTIFICATE-----\s?$ - type: string - 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.' - properties: - name: - description: name of Service that the plugin needs to connect - to. - maxLength: 128 - minLength: 1 - type: string - namespace: - description: namespace of Service that the plugin needs - to connect to - maxLength: 128 - minLength: 1 - type: string - port: - description: port on which the Service that the plugin needs - to connect to is listening on. - format: int32 - maximum: 65535 - minimum: 1 - type: integer - required: - - name - - namespace - - port - type: object - type: - description: type is the type of the console plugin's proxy. - Currently only "Service" is supported. - pattern: ^(Service)$ - type: string - required: - - alias - - type - type: object - type: array - 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. - properties: - basePath: - default: / - description: 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. - minLength: 1 - pattern: ^/ - type: string - name: - description: name of Service that is serving the plugin assets. - maxLength: 128 - minLength: 1 - type: string - namespace: - description: namespace of Service that is serving the plugin assets. - maxLength: 128 - minLength: 1 - type: string - port: - description: port on which the Service that is serving the plugin - is listening to. - format: int32 - maximum: 65535 - minimum: 1 - type: integer - required: - - basePath - - name - - namespace - - port - type: object - required: - - service - type: object - required: - - metadata - - spec - type: object - served: true - storage: true diff --git a/console/v1alpha1/zz_generated.swagger_doc_generated.go b/console/v1alpha1/zz_generated.swagger_doc_generated.go deleted file mode 100644 index 13b5646e755..00000000000 --- a/console/v1alpha1/zz_generated.swagger_doc_generated.go +++ /dev/null @@ -1,79 +0,0 @@ -package v1alpha1 - -// This file contains a collection of methods that can be used from go-restful to -// generate Swagger API documentation for its models. Please read this PR for more -// information on the implementation: https://github.com/emicklei/go-restful/pull/215 -// -// TODOs are ignored from the parser (e.g. TODO(andronat):... || TODO:...) if and only if -// they are on one line! For multiple line or blocks that you want to ignore use ---. -// Any context after a --- is ignored. -// -// Those methods can be generated by using hack/update-swagger-docs.sh - -// AUTO-GENERATED FUNCTIONS START HERE -var map_ConsolePlugin = map[string]string{ - "": "ConsolePlugin is an extension for customizing OpenShift web console by dynamically loading code from another service running on the cluster.\n\nCompatibility level 4: No compatibility is provided, the API can change at any point for any reason. These capabilities should not be used by applications needing long term support.", - "metadata": "metadata is the standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", -} - -func (ConsolePlugin) SwaggerDoc() map[string]string { - return map_ConsolePlugin -} - -var map_ConsolePluginList = map[string]string{ - "": "Compatibility level 4: No compatibility is provided, the API can change at any point for any reason. These capabilities should not be used by applications needing long term support.", - "metadata": "metadata is the standard list's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", -} - -func (ConsolePluginList) SwaggerDoc() map[string]string { - return map_ConsolePluginList -} - -var map_ConsolePluginProxy = map[string]string{ - "": "ConsolePluginProxy holds information on various service types to which console's backend will proxy the plugin's requests.", - "type": "type is the type of the console plugin's proxy. Currently only \"Service\" is supported.", - "alias": "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:\n\n/api/proxy/plugin///?\n\nRequest example path:\n\n/api/proxy/plugin/acm/search/pods?namespace=openshift-apiserver", - "service": "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.", - "caCertificate": "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. ", - "authorize": "authorize indicates if the proxied request should contain the logged-in user's OpenShift access token in the \"Authorization\" request header. For example:\n\nAuthorization: Bearer sha256~kV46hPnEYhCWFnB85r5NrprAxggzgb6GOeLbgcKNsH0\n\nBy default the access token is not part of the proxied request.", -} - -func (ConsolePluginProxy) SwaggerDoc() map[string]string { - return map_ConsolePluginProxy -} - -var map_ConsolePluginProxyServiceConfig = map[string]string{ - "": "ProxyTypeServiceConfig holds information on Service to which console's backend will proxy the plugin's requests.", - "name": "name of Service that the plugin needs to connect to.", - "namespace": "namespace of Service that the plugin needs to connect to", - "port": "port on which the Service that the plugin needs to connect to is listening on.", -} - -func (ConsolePluginProxyServiceConfig) SwaggerDoc() map[string]string { - return map_ConsolePluginProxyServiceConfig -} - -var map_ConsolePluginService = map[string]string{ - "": "ConsolePluginService holds information on Service that is serving console dynamic plugin assets.", - "name": "name of Service that is serving the plugin assets.", - "namespace": "namespace of Service that is serving the plugin assets.", - "port": "port on which the Service that is serving the plugin is listening to.", - "basePath": "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.", -} - -func (ConsolePluginService) SwaggerDoc() map[string]string { - return map_ConsolePluginService -} - -var map_ConsolePluginSpec = map[string]string{ - "": "ConsolePluginSpec is the desired plugin configuration.", - "displayName": "displayName is the display name of the plugin.", - "service": "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.", - "proxy": "proxy is a list of proxies that describe various service type to which the plugin needs to connect to.", -} - -func (ConsolePluginSpec) SwaggerDoc() map[string]string { - return map_ConsolePluginSpec -} - -// AUTO-GENERATED FUNCTIONS END HERE diff --git a/openapi/generated_openapi/zz_generated.openapi.go b/openapi/generated_openapi/zz_generated.openapi.go index 35b6f0ef731..f314900deae 100644 --- a/openapi/generated_openapi/zz_generated.openapi.go +++ b/openapi/generated_openapi/zz_generated.openapi.go @@ -472,12 +472,6 @@ func GetOpenAPIDefinitions(ref common.ReferenceCallback) map[string]common.OpenA "github.com/openshift/api/console/v1.ConsoleYAMLSampleSpec": schema_openshift_api_console_v1_ConsoleYAMLSampleSpec(ref), "github.com/openshift/api/console/v1.Link": schema_openshift_api_console_v1_Link(ref), "github.com/openshift/api/console/v1.NamespaceDashboardSpec": schema_openshift_api_console_v1_NamespaceDashboardSpec(ref), - "github.com/openshift/api/console/v1alpha1.ConsolePlugin": schema_openshift_api_console_v1alpha1_ConsolePlugin(ref), - "github.com/openshift/api/console/v1alpha1.ConsolePluginList": schema_openshift_api_console_v1alpha1_ConsolePluginList(ref), - "github.com/openshift/api/console/v1alpha1.ConsolePluginProxy": schema_openshift_api_console_v1alpha1_ConsolePluginProxy(ref), - "github.com/openshift/api/console/v1alpha1.ConsolePluginProxyServiceConfig": schema_openshift_api_console_v1alpha1_ConsolePluginProxyServiceConfig(ref), - "github.com/openshift/api/console/v1alpha1.ConsolePluginService": schema_openshift_api_console_v1alpha1_ConsolePluginService(ref), - "github.com/openshift/api/console/v1alpha1.ConsolePluginSpec": schema_openshift_api_console_v1alpha1_ConsolePluginSpec(ref), "github.com/openshift/api/example/v1.CELUnion": schema_openshift_api_example_v1_CELUnion(ref), "github.com/openshift/api/example/v1.EvolvingUnion": schema_openshift_api_example_v1_EvolvingUnion(ref), "github.com/openshift/api/example/v1.StableConfigType": schema_openshift_api_example_v1_StableConfigType(ref), @@ -22963,280 +22957,6 @@ func schema_openshift_api_console_v1_NamespaceDashboardSpec(ref common.Reference } } -func schema_openshift_api_console_v1alpha1_ConsolePlugin(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "ConsolePlugin is an extension for customizing OpenShift web console by dynamically loading code from another service running on the cluster.\n\nCompatibility level 4: No compatibility is provided, the API can change at any point for any reason. These capabilities should not be used by applications needing long term support.", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "kind": { - SchemaProps: spec.SchemaProps{ - Description: "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", - Type: []string{"string"}, - Format: "", - }, - }, - "apiVersion": { - SchemaProps: spec.SchemaProps{ - Description: "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", - Type: []string{"string"}, - Format: "", - }, - }, - "metadata": { - SchemaProps: spec.SchemaProps{ - Description: "metadata is the standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", - Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), - }, - }, - "spec": { - SchemaProps: spec.SchemaProps{ - Default: map[string]interface{}{}, - Ref: ref("github.com/openshift/api/console/v1alpha1.ConsolePluginSpec"), - }, - }, - }, - Required: []string{"metadata", "spec"}, - }, - }, - Dependencies: []string{ - "github.com/openshift/api/console/v1alpha1.ConsolePluginSpec", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, - } -} - -func schema_openshift_api_console_v1alpha1_ConsolePluginList(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "Compatibility level 4: No compatibility is provided, the API can change at any point for any reason. These capabilities should not be used by applications needing long term support.", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "kind": { - SchemaProps: spec.SchemaProps{ - Description: "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", - Type: []string{"string"}, - Format: "", - }, - }, - "apiVersion": { - SchemaProps: spec.SchemaProps{ - Description: "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", - Type: []string{"string"}, - Format: "", - }, - }, - "metadata": { - SchemaProps: spec.SchemaProps{ - Description: "metadata is the standard list's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", - Default: map[string]interface{}{}, - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), - }, - }, - "items": { - SchemaProps: spec.SchemaProps{ - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Default: map[string]interface{}{}, - Ref: ref("github.com/openshift/api/console/v1alpha1.ConsolePlugin"), - }, - }, - }, - }, - }, - }, - Required: []string{"metadata", "items"}, - }, - }, - Dependencies: []string{ - "github.com/openshift/api/console/v1alpha1.ConsolePlugin", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"}, - } -} - -func schema_openshift_api_console_v1alpha1_ConsolePluginProxy(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "ConsolePluginProxy holds information on various service types to which console's backend will proxy the plugin's requests.", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "type": { - SchemaProps: spec.SchemaProps{ - Description: "type is the type of the console plugin's proxy. Currently only \"Service\" is supported.", - Default: "", - Type: []string{"string"}, - Format: "", - }, - }, - "alias": { - SchemaProps: spec.SchemaProps{ - Description: "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:\n\n/api/proxy/plugin///?\n\nRequest example path:\n\n/api/proxy/plugin/acm/search/pods?namespace=openshift-apiserver", - Default: "", - Type: []string{"string"}, - Format: "", - }, - }, - "service": { - SchemaProps: spec.SchemaProps{ - 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.", - Default: map[string]interface{}{}, - Ref: ref("github.com/openshift/api/console/v1alpha1.ConsolePluginProxyServiceConfig"), - }, - }, - "caCertificate": { - SchemaProps: spec.SchemaProps{ - Description: "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.", - Type: []string{"string"}, - Format: "", - }, - }, - "authorize": { - SchemaProps: spec.SchemaProps{ - Description: "authorize indicates if the proxied request should contain the logged-in user's OpenShift access token in the \"Authorization\" request header. For example:\n\nAuthorization: Bearer sha256~kV46hPnEYhCWFnB85r5NrprAxggzgb6GOeLbgcKNsH0\n\nBy default the access token is not part of the proxied request.", - Type: []string{"boolean"}, - Format: "", - }, - }, - }, - Required: []string{"type", "alias"}, - }, - }, - Dependencies: []string{ - "github.com/openshift/api/console/v1alpha1.ConsolePluginProxyServiceConfig"}, - } -} - -func schema_openshift_api_console_v1alpha1_ConsolePluginProxyServiceConfig(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "ProxyTypeServiceConfig holds information on Service to which console's backend will proxy the plugin's requests.", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "name": { - SchemaProps: spec.SchemaProps{ - Description: "name of Service that the plugin needs to connect to.", - Default: "", - Type: []string{"string"}, - Format: "", - }, - }, - "namespace": { - SchemaProps: spec.SchemaProps{ - Description: "namespace of Service that the plugin needs to connect to", - Default: "", - Type: []string{"string"}, - Format: "", - }, - }, - "port": { - SchemaProps: spec.SchemaProps{ - Description: "port on which the Service that the plugin needs to connect to is listening on.", - Default: 0, - Type: []string{"integer"}, - Format: "int32", - }, - }, - }, - Required: []string{"name", "namespace", "port"}, - }, - }, - } -} - -func schema_openshift_api_console_v1alpha1_ConsolePluginService(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "ConsolePluginService holds information on Service that is serving console dynamic plugin assets.", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "name": { - SchemaProps: spec.SchemaProps{ - Description: "name of Service that is serving the plugin assets.", - Default: "", - Type: []string{"string"}, - Format: "", - }, - }, - "namespace": { - SchemaProps: spec.SchemaProps{ - Description: "namespace of Service that is serving the plugin assets.", - Default: "", - Type: []string{"string"}, - Format: "", - }, - }, - "port": { - SchemaProps: spec.SchemaProps{ - Description: "port on which the Service that is serving the plugin is listening to.", - Default: 0, - Type: []string{"integer"}, - Format: "int32", - }, - }, - "basePath": { - SchemaProps: spec.SchemaProps{ - Description: "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.", - Default: "", - Type: []string{"string"}, - Format: "", - }, - }, - }, - Required: []string{"name", "namespace", "port", "basePath"}, - }, - }, - } -} - -func schema_openshift_api_console_v1alpha1_ConsolePluginSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "ConsolePluginSpec is the desired plugin configuration.", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "displayName": { - SchemaProps: spec.SchemaProps{ - Description: "displayName is the display name of the plugin.", - Type: []string{"string"}, - Format: "", - }, - }, - "service": { - SchemaProps: spec.SchemaProps{ - 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.", - Default: map[string]interface{}{}, - Ref: ref("github.com/openshift/api/console/v1alpha1.ConsolePluginService"), - }, - }, - "proxy": { - SchemaProps: spec.SchemaProps{ - Description: "proxy is a list of proxies that describe various service type to which the plugin needs to connect to.", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Default: map[string]interface{}{}, - Ref: ref("github.com/openshift/api/console/v1alpha1.ConsolePluginProxy"), - }, - }, - }, - }, - }, - }, - Required: []string{"service"}, - }, - }, - Dependencies: []string{ - "github.com/openshift/api/console/v1alpha1.ConsolePluginProxy", "github.com/openshift/api/console/v1alpha1.ConsolePluginService"}, - } -} - func schema_openshift_api_example_v1_CELUnion(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ diff --git a/openapi/openapi.json b/openapi/openapi.json index 065f974244f..45c64d4e514 100644 --- a/openapi/openapi.json +++ b/openapi/openapi.json @@ -12710,182 +12710,6 @@ } } }, - "com.github.openshift.api.console.v1alpha1.ConsolePlugin": { - "description": "ConsolePlugin is an extension for customizing OpenShift web console by dynamically loading code from another service running on the cluster.\n\nCompatibility level 4: No compatibility is provided, the API can change at any point for any reason. These capabilities should not be used by applications needing long term support.", - "type": "object", - "required": [ - "metadata", - "spec" - ], - "properties": { - "apiVersion": { - "description": "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", - "type": "string" - }, - "kind": { - "description": "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", - "type": "string" - }, - "metadata": { - "description": "metadata is the standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", - "default": {}, - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta" - }, - "spec": { - "default": {}, - "$ref": "#/definitions/com.github.openshift.api.console.v1alpha1.ConsolePluginSpec" - } - } - }, - "com.github.openshift.api.console.v1alpha1.ConsolePluginList": { - "description": "Compatibility level 4: No compatibility is provided, the API can change at any point for any reason. These capabilities should not be used by applications needing long term support.", - "type": "object", - "required": [ - "metadata", - "items" - ], - "properties": { - "apiVersion": { - "description": "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", - "type": "string" - }, - "items": { - "type": "array", - "items": { - "default": {}, - "$ref": "#/definitions/com.github.openshift.api.console.v1alpha1.ConsolePlugin" - } - }, - "kind": { - "description": "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", - "type": "string" - }, - "metadata": { - "description": "metadata is the standard list's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", - "default": {}, - "$ref": "#/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ListMeta" - } - } - }, - "com.github.openshift.api.console.v1alpha1.ConsolePluginProxy": { - "description": "ConsolePluginProxy holds information on various service types to which console's backend will proxy the plugin's requests.", - "type": "object", - "required": [ - "type", - "alias" - ], - "properties": { - "alias": { - "description": "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:\n\n/api/proxy/plugin///?\n\nRequest example path:\n\n/api/proxy/plugin/acm/search/pods?namespace=openshift-apiserver", - "type": "string", - "default": "" - }, - "authorize": { - "description": "authorize indicates if the proxied request should contain the logged-in user's OpenShift access token in the \"Authorization\" request header. For example:\n\nAuthorization: Bearer sha256~kV46hPnEYhCWFnB85r5NrprAxggzgb6GOeLbgcKNsH0\n\nBy default the access token is not part of the proxied request.", - "type": "boolean" - }, - "caCertificate": { - "description": "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.", - "type": "string" - }, - "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.", - "default": {}, - "$ref": "#/definitions/com.github.openshift.api.console.v1alpha1.ConsolePluginProxyServiceConfig" - }, - "type": { - "description": "type is the type of the console plugin's proxy. Currently only \"Service\" is supported.", - "type": "string", - "default": "" - } - } - }, - "com.github.openshift.api.console.v1alpha1.ConsolePluginProxyServiceConfig": { - "description": "ProxyTypeServiceConfig holds information on Service to which console's backend will proxy the plugin's requests.", - "type": "object", - "required": [ - "name", - "namespace", - "port" - ], - "properties": { - "name": { - "description": "name of Service that the plugin needs to connect to.", - "type": "string", - "default": "" - }, - "namespace": { - "description": "namespace of Service that the plugin needs to connect to", - "type": "string", - "default": "" - }, - "port": { - "description": "port on which the Service that the plugin needs to connect to is listening on.", - "type": "integer", - "format": "int32", - "default": 0 - } - } - }, - "com.github.openshift.api.console.v1alpha1.ConsolePluginService": { - "description": "ConsolePluginService holds information on Service that is serving console dynamic plugin assets.", - "type": "object", - "required": [ - "name", - "namespace", - "port", - "basePath" - ], - "properties": { - "basePath": { - "description": "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.", - "type": "string", - "default": "" - }, - "name": { - "description": "name of Service that is serving the plugin assets.", - "type": "string", - "default": "" - }, - "namespace": { - "description": "namespace of Service that is serving the plugin assets.", - "type": "string", - "default": "" - }, - "port": { - "description": "port on which the Service that is serving the plugin is listening to.", - "type": "integer", - "format": "int32", - "default": 0 - } - } - }, - "com.github.openshift.api.console.v1alpha1.ConsolePluginSpec": { - "description": "ConsolePluginSpec is the desired plugin configuration.", - "type": "object", - "required": [ - "service" - ], - "properties": { - "displayName": { - "description": "displayName is the display name of the plugin.", - "type": "string" - }, - "proxy": { - "description": "proxy is a list of proxies that describe various service type to which the plugin needs to connect to.", - "type": "array", - "items": { - "default": {}, - "$ref": "#/definitions/com.github.openshift.api.console.v1alpha1.ConsolePluginProxy" - } - }, - "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.", - "default": {}, - "$ref": "#/definitions/com.github.openshift.api.console.v1alpha1.ConsolePluginService" - } - } - }, "com.github.openshift.api.example.v1.CELUnion": { "description": "CELUnion demonstrates how to use a discriminated union and how to validate it using CEL.", "type": "object",