feat: Configure Open VSX registry URL (#1466)
* feat: Configure Open VSX registry URL Signed-off-by: Anatolii Bazko <abazko@redhat.com>pull/1469/head
parent
bd588312a2
commit
7f051fa08d
|
|
@ -175,6 +175,7 @@ func TestConvertFrom(t *testing.T) {
|
|||
Url: "ExternalPluginRegistries_2",
|
||||
},
|
||||
},
|
||||
OpenVSXURL: "open-vsx-registry",
|
||||
},
|
||||
DevfileRegistry: chev2.DevfileRegistry{
|
||||
Deployment: &chev2.Deployment{
|
||||
|
|
@ -442,6 +443,7 @@ func TestConvertFrom(t *testing.T) {
|
|||
assert.Equal(t, checlusterv1.Spec.Server.ExternalPluginRegistry, true)
|
||||
assert.Equal(t, checlusterv1.Spec.Server.GitSelfSignedCert, true)
|
||||
assert.Equal(t, checlusterv1.Spec.Server.NonProxyHosts, "NonProxyHosts_1|NonProxyHosts_2")
|
||||
assert.Equal(t, checlusterv1.Spec.Server.OpenVSXRegistryURL, "open-vsx-registry")
|
||||
assert.Equal(t, checlusterv1.Spec.Server.PluginRegistryCpuLimit, "2")
|
||||
assert.Equal(t, checlusterv1.Spec.Server.PluginRegistryCpuRequest, "1")
|
||||
assert.Equal(t, checlusterv1.Spec.Server.PluginRegistryImage, "PluginRegistryImage")
|
||||
|
|
|
|||
|
|
@ -227,6 +227,7 @@ func TestConvertTo(t *testing.T) {
|
|||
Effect: "Effect",
|
||||
},
|
||||
},
|
||||
OpenVSXRegistryURL: "open-vsx-registry",
|
||||
},
|
||||
Database: chev1.CheClusterSpecDB{
|
||||
ExternalDb: true,
|
||||
|
|
@ -411,6 +412,7 @@ func TestConvertTo(t *testing.T) {
|
|||
assert.Equal(t, checlusterv2.Spec.Components.PluginRegistry.Deployment.Containers[0].Resources.Requests.Cpu, resource.MustParse("1"))
|
||||
assert.Equal(t, checlusterv2.Spec.Components.PluginRegistry.Deployment.Containers[0].Resources.Requests.Memory, resource.MustParse("100Mi"))
|
||||
assert.Equal(t, checlusterv2.Spec.Components.PluginRegistry.DisableInternalRegistry, true)
|
||||
assert.Equal(t, checlusterv2.Spec.Components.PluginRegistry.OpenVSXURL, "open-vsx-registry")
|
||||
assert.Equal(t, checlusterv2.Spec.Components.PluginRegistry.ExternalPluginRegistries, []chev2.ExternalPluginRegistry{{Url: "PluginRegistryUrl"}})
|
||||
|
||||
assert.Equal(t, checlusterv2.Spec.DevEnvironments.Storage.Pvc.ClaimSize, "WorkspacePvcClaimSize")
|
||||
|
|
|
|||
|
|
@ -180,6 +180,7 @@ func (dst *CheCluster) convertFrom_Server(src *chev2.CheCluster) error {
|
|||
}
|
||||
|
||||
func (dst *CheCluster) convertFrom_Server_PluginRegistry(src *chev2.CheCluster) error {
|
||||
dst.Spec.Server.OpenVSXRegistryURL = src.Spec.Components.PluginRegistry.OpenVSXURL
|
||||
dst.Spec.Server.ExternalPluginRegistry = src.Spec.Components.PluginRegistry.DisableInternalRegistry
|
||||
|
||||
if src.Spec.Components.PluginRegistry.DisableInternalRegistry {
|
||||
|
|
|
|||
|
|
@ -394,6 +394,7 @@ func (src *CheCluster) convertTo_Components_CheServer(dst *chev2.CheCluster) err
|
|||
}
|
||||
|
||||
func (src *CheCluster) convertTo_Components_PluginRegistry(dst *chev2.CheCluster) error {
|
||||
dst.Spec.Components.PluginRegistry.OpenVSXURL = src.Spec.Server.OpenVSXRegistryURL
|
||||
dst.Spec.Components.PluginRegistry.DisableInternalRegistry = src.Spec.Server.ExternalPluginRegistry
|
||||
|
||||
if dst.Spec.Components.PluginRegistry.DisableInternalRegistry {
|
||||
|
|
|
|||
|
|
@ -366,6 +366,9 @@ type CheClusterSpecServer struct {
|
|||
// These default components are meant to be used when a Devfile does not contain any components.
|
||||
// +optional
|
||||
WorkspaceDefaultComponents []devfile.Component `json:"workspaceDefaultComponents,omitempty"`
|
||||
// Open VSX registry URL. If omitted an embedded instance will be used.
|
||||
// +optional
|
||||
OpenVSXRegistryURL string `json:"openVSXRegistryURL,omitempty"`
|
||||
}
|
||||
|
||||
// +k8s:openapi-gen=true
|
||||
|
|
|
|||
|
|
@ -242,6 +242,9 @@ type PluginRegistry struct {
|
|||
// External plugin registries.
|
||||
// +optional
|
||||
ExternalPluginRegistries []ExternalPluginRegistry `json:"externalPluginRegistries,omitempty"`
|
||||
// Open VSX registry URL. If omitted an embedded instance will be used.
|
||||
// +optional
|
||||
OpenVSXURL string `json:"openVSXURL,omitempty"`
|
||||
}
|
||||
|
||||
// Configuration settings related to the devfile registry used by the Che installation.
|
||||
|
|
|
|||
|
|
@ -76,7 +76,7 @@ metadata:
|
|||
operators.operatorframework.io/project_layout: go.kubebuilder.io/v3
|
||||
repository: https://github.com/eclipse-che/che-operator
|
||||
support: Eclipse Foundation
|
||||
name: eclipse-che-preview-openshift.v7.52.0-639.next
|
||||
name: eclipse-che-preview-openshift.v7.52.0-642.next
|
||||
namespace: placeholder
|
||||
spec:
|
||||
apiservicedefinitions: {}
|
||||
|
|
@ -1390,7 +1390,7 @@ spec:
|
|||
maturity: stable
|
||||
provider:
|
||||
name: Eclipse Foundation
|
||||
version: 7.52.0-639.next
|
||||
version: 7.52.0-642.next
|
||||
webhookdefinitions:
|
||||
- admissionReviewVersions:
|
||||
- v1
|
||||
|
|
|
|||
|
|
@ -888,6 +888,10 @@ spec:
|
|||
resources. See the doc https://docs.openshift.com/container-platform/4.4/networking/enable-cluster-wide-proxy.html.
|
||||
See also the `proxyURL` fields.'
|
||||
type: string
|
||||
openVSXRegistryURL:
|
||||
description: Open VSX registry URL. If omitted an embedded instance
|
||||
will be used.
|
||||
type: string
|
||||
pluginRegistryCpuLimit:
|
||||
description: Overrides the CPU limit used in the plugin registry
|
||||
deployment. In cores. (500m = .5 cores). Default to 500m.
|
||||
|
|
@ -3622,6 +3626,10 @@ spec:
|
|||
type: string
|
||||
type: object
|
||||
type: array
|
||||
openVSXURL:
|
||||
description: Open VSX registry URL. If omitted an embedded
|
||||
instance will be used.
|
||||
type: string
|
||||
type: object
|
||||
type: object
|
||||
containerRegistry:
|
||||
|
|
|
|||
|
|
@ -857,6 +857,10 @@ spec:
|
|||
resources. See the doc https://docs.openshift.com/container-platform/4.4/networking/enable-cluster-wide-proxy.html.
|
||||
See also the `proxyURL` fields.'
|
||||
type: string
|
||||
openVSXRegistryURL:
|
||||
description: Open VSX registry URL. If omitted an embedded instance
|
||||
will be used.
|
||||
type: string
|
||||
pluginRegistryCpuLimit:
|
||||
description: Overrides the CPU limit used in the plugin registry
|
||||
deployment. In cores. (500m = .5 cores). Default to 500m.
|
||||
|
|
@ -3521,6 +3525,10 @@ spec:
|
|||
type: string
|
||||
type: object
|
||||
type: array
|
||||
openVSXURL:
|
||||
description: Open VSX registry URL. If omitted an embedded
|
||||
instance will be used.
|
||||
type: string
|
||||
type: object
|
||||
type: object
|
||||
containerRegistry:
|
||||
|
|
|
|||
|
|
@ -544,6 +544,9 @@ spec:
|
|||
nonProxyHosts:
|
||||
description: 'List of hosts that will be reached directly, bypassing the proxy. Specify wild card domain use the following form `.<DOMAIN>` and `|` as delimiter, for example: `localhost|.my.host.com|123.42.12.32` Only use when configuring a proxy is required. Operator respects OpenShift cluster wide proxy configuration and no additional configuration is required, but defining `nonProxyHosts` in a custom resource leads to merging non proxy hosts lists from the cluster proxy configuration and ones defined in the custom resources. See the doc https://docs.openshift.com/container-platform/4.4/networking/enable-cluster-wide-proxy.html. See also the `proxyURL` fields.'
|
||||
type: string
|
||||
openVSXRegistryURL:
|
||||
description: Open VSX registry URL. If omitted an embedded instance will be used.
|
||||
type: string
|
||||
pluginRegistryCpuLimit:
|
||||
description: Overrides the CPU limit used in the plugin registry deployment. In cores. (500m = .5 cores). Default to 500m.
|
||||
type: string
|
||||
|
|
@ -2389,6 +2392,9 @@ spec:
|
|||
type: string
|
||||
type: object
|
||||
type: array
|
||||
openVSXURL:
|
||||
description: Open VSX registry URL. If omitted an embedded instance will be used.
|
||||
type: string
|
||||
type: object
|
||||
type: object
|
||||
containerRegistry:
|
||||
|
|
|
|||
|
|
@ -539,6 +539,9 @@ spec:
|
|||
nonProxyHosts:
|
||||
description: 'List of hosts that will be reached directly, bypassing the proxy. Specify wild card domain use the following form `.<DOMAIN>` and `|` as delimiter, for example: `localhost|.my.host.com|123.42.12.32` Only use when configuring a proxy is required. Operator respects OpenShift cluster wide proxy configuration and no additional configuration is required, but defining `nonProxyHosts` in a custom resource leads to merging non proxy hosts lists from the cluster proxy configuration and ones defined in the custom resources. See the doc https://docs.openshift.com/container-platform/4.4/networking/enable-cluster-wide-proxy.html. See also the `proxyURL` fields.'
|
||||
type: string
|
||||
openVSXRegistryURL:
|
||||
description: Open VSX registry URL. If omitted an embedded instance will be used.
|
||||
type: string
|
||||
pluginRegistryCpuLimit:
|
||||
description: Overrides the CPU limit used in the plugin registry deployment. In cores. (500m = .5 cores). Default to 500m.
|
||||
type: string
|
||||
|
|
@ -2384,6 +2387,9 @@ spec:
|
|||
type: string
|
||||
type: object
|
||||
type: array
|
||||
openVSXURL:
|
||||
description: Open VSX registry URL. If omitted an embedded instance will be used.
|
||||
type: string
|
||||
type: object
|
||||
type: object
|
||||
containerRegistry:
|
||||
|
|
|
|||
|
|
@ -544,6 +544,9 @@ spec:
|
|||
nonProxyHosts:
|
||||
description: 'List of hosts that will be reached directly, bypassing the proxy. Specify wild card domain use the following form `.<DOMAIN>` and `|` as delimiter, for example: `localhost|.my.host.com|123.42.12.32` Only use when configuring a proxy is required. Operator respects OpenShift cluster wide proxy configuration and no additional configuration is required, but defining `nonProxyHosts` in a custom resource leads to merging non proxy hosts lists from the cluster proxy configuration and ones defined in the custom resources. See the doc https://docs.openshift.com/container-platform/4.4/networking/enable-cluster-wide-proxy.html. See also the `proxyURL` fields.'
|
||||
type: string
|
||||
openVSXRegistryURL:
|
||||
description: Open VSX registry URL. If omitted an embedded instance will be used.
|
||||
type: string
|
||||
pluginRegistryCpuLimit:
|
||||
description: Overrides the CPU limit used in the plugin registry deployment. In cores. (500m = .5 cores). Default to 500m.
|
||||
type: string
|
||||
|
|
@ -2389,6 +2392,9 @@ spec:
|
|||
type: string
|
||||
type: object
|
||||
type: array
|
||||
openVSXURL:
|
||||
description: Open VSX registry URL. If omitted an embedded instance will be used.
|
||||
type: string
|
||||
type: object
|
||||
type: object
|
||||
containerRegistry:
|
||||
|
|
|
|||
|
|
@ -539,6 +539,9 @@ spec:
|
|||
nonProxyHosts:
|
||||
description: 'List of hosts that will be reached directly, bypassing the proxy. Specify wild card domain use the following form `.<DOMAIN>` and `|` as delimiter, for example: `localhost|.my.host.com|123.42.12.32` Only use when configuring a proxy is required. Operator respects OpenShift cluster wide proxy configuration and no additional configuration is required, but defining `nonProxyHosts` in a custom resource leads to merging non proxy hosts lists from the cluster proxy configuration and ones defined in the custom resources. See the doc https://docs.openshift.com/container-platform/4.4/networking/enable-cluster-wide-proxy.html. See also the `proxyURL` fields.'
|
||||
type: string
|
||||
openVSXRegistryURL:
|
||||
description: Open VSX registry URL. If omitted an embedded instance will be used.
|
||||
type: string
|
||||
pluginRegistryCpuLimit:
|
||||
description: Overrides the CPU limit used in the plugin registry deployment. In cores. (500m = .5 cores). Default to 500m.
|
||||
type: string
|
||||
|
|
@ -2384,6 +2387,9 @@ spec:
|
|||
type: string
|
||||
type: object
|
||||
type: array
|
||||
openVSXURL:
|
||||
description: Open VSX registry URL. If omitted an embedded instance will be used.
|
||||
type: string
|
||||
type: object
|
||||
type: object
|
||||
containerRegistry:
|
||||
|
|
|
|||
|
|
@ -539,6 +539,9 @@ spec:
|
|||
nonProxyHosts:
|
||||
description: 'List of hosts that will be reached directly, bypassing the proxy. Specify wild card domain use the following form `.<DOMAIN>` and `|` as delimiter, for example: `localhost|.my.host.com|123.42.12.32` Only use when configuring a proxy is required. Operator respects OpenShift cluster wide proxy configuration and no additional configuration is required, but defining `nonProxyHosts` in a custom resource leads to merging non proxy hosts lists from the cluster proxy configuration and ones defined in the custom resources. See the doc https://docs.openshift.com/container-platform/4.4/networking/enable-cluster-wide-proxy.html. See also the `proxyURL` fields.'
|
||||
type: string
|
||||
openVSXRegistryURL:
|
||||
description: Open VSX registry URL. If omitted an embedded instance will be used.
|
||||
type: string
|
||||
pluginRegistryCpuLimit:
|
||||
description: Overrides the CPU limit used in the plugin registry deployment. In cores. (500m = .5 cores). Default to 500m.
|
||||
type: string
|
||||
|
|
@ -2384,6 +2387,9 @@ spec:
|
|||
type: string
|
||||
type: object
|
||||
type: array
|
||||
openVSXURL:
|
||||
description: Open VSX registry URL. If omitted an embedded instance will be used.
|
||||
type: string
|
||||
type: object
|
||||
type: object
|
||||
containerRegistry:
|
||||
|
|
|
|||
Loading…
Reference in New Issue