Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -1027,7 +1027,7 @@ spec:
- name: RELATED_IMAGE_gateway_header_sidecar
value: quay.io/che-incubator/header-rewrite-proxy:latest
- name: RELATED_IMAGE_openvsx
value: quay.io/che-incubator/che-openvsx:v1.2.0
value: quay.io/che-incubator/che-openvsx:v1.3.0
- name: RELATED_IMAGE_openvsx_postgres
value: quay.io/sclorg/postgresql-16-c9s:20260319
- name: CHE_FLAVOR
Expand Down Expand Up @@ -1197,7 +1197,7 @@ spec:
name: gateway-authorization-sidecar
- image: quay.io/che-incubator/header-rewrite-proxy:latest
name: gateway-header-sidecar
- image: quay.io/che-incubator/che-openvsx:v1.2.0
- image: quay.io/che-incubator/che-openvsx:v1.3.0
name: openvsx
- image: quay.io/sclorg/postgresql-16-c9s:20260319
name: openvsx-postgres
Expand Down
2 changes: 1 addition & 1 deletion config/manager/manager.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ spec:
- name: RELATED_IMAGE_gateway_header_sidecar
value: quay.io/che-incubator/header-rewrite-proxy:latest
- name: RELATED_IMAGE_openvsx
value: quay.io/che-incubator/che-openvsx:v1.2.0
value: quay.io/che-incubator/che-openvsx:v1.3.0
- name: RELATED_IMAGE_openvsx_postgres
value: quay.io/sclorg/postgresql-16-c9s:20260319
- name: CHE_FLAVOR
Expand Down
2 changes: 1 addition & 1 deletion deploy/deployment/kubernetes/combined.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29058,7 +29058,7 @@ spec:
- name: RELATED_IMAGE_gateway_header_sidecar
value: quay.io/che-incubator/header-rewrite-proxy:latest
- name: RELATED_IMAGE_openvsx
value: quay.io/che-incubator/che-openvsx:v1.2.0
value: quay.io/che-incubator/che-openvsx:v1.3.0
- name: RELATED_IMAGE_openvsx_postgres
value: quay.io/sclorg/postgresql-16-c9s:20260319
- name: CHE_FLAVOR
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ spec:
- name: RELATED_IMAGE_gateway_header_sidecar
value: quay.io/che-incubator/header-rewrite-proxy:latest
- name: RELATED_IMAGE_openvsx
value: quay.io/che-incubator/che-openvsx:v1.2.0
value: quay.io/che-incubator/che-openvsx:v1.3.0
- name: RELATED_IMAGE_openvsx_postgres
value: quay.io/sclorg/postgresql-16-c9s:20260319
- name: CHE_FLAVOR
Expand Down
2 changes: 1 addition & 1 deletion deploy/deployment/openshift/combined.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29060,7 +29060,7 @@ spec:
- name: RELATED_IMAGE_gateway_header_sidecar
value: quay.io/che-incubator/header-rewrite-proxy:latest
- name: RELATED_IMAGE_openvsx
value: quay.io/che-incubator/che-openvsx:v1.2.0
value: quay.io/che-incubator/che-openvsx:v1.3.0
- name: RELATED_IMAGE_openvsx_postgres
value: quay.io/sclorg/postgresql-16-c9s:20260319
- name: CHE_FLAVOR
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ spec:
- name: RELATED_IMAGE_gateway_header_sidecar
value: quay.io/che-incubator/header-rewrite-proxy:latest
- name: RELATED_IMAGE_openvsx
value: quay.io/che-incubator/che-openvsx:v1.2.0
value: quay.io/che-incubator/che-openvsx:v1.3.0
- name: RELATED_IMAGE_openvsx_postgres
value: quay.io/sclorg/postgresql-16-c9s:20260319
- name: CHE_FLAVOR
Expand Down
2 changes: 1 addition & 1 deletion helmcharts/next/templates/che-operator.Deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ spec:
- name: RELATED_IMAGE_gateway_header_sidecar
value: quay.io/che-incubator/header-rewrite-proxy:latest
- name: RELATED_IMAGE_openvsx
value: quay.io/che-incubator/che-openvsx:v1.2.0
value: quay.io/che-incubator/che-openvsx:v1.3.0
- name: RELATED_IMAGE_openvsx_postgres
value: quay.io/sclorg/postgresql-16-c9s:20260319
- name: CHE_FLAVOR
Expand Down
14 changes: 12 additions & 2 deletions pkg/deploy/openvsx/openvsx-server/application.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,10 @@ server:
port: 8080
servlet:
context-path: /openvsx
forward-headers-strategy: native
# Must be 'none': Spring Boot turns the native strategy on by itself on Kubernetes, and that
# rewrites remoteAddr from X-Forwarded-For before OpenVSX's trusted-proxy filter runs, so the
# filter would check the end client rather than the gateway in front of it.
forward-headers-strategy: none

management:
health:
Expand Down Expand Up @@ -80,6 +83,13 @@ bucket4j:
enabled: false

ovsx:
# The absolute URLs OpenVSX puts in its responses are built from this. Setting it makes the
# server ignore X-Forwarded-Host/-Proto/-Prefix entirely. Without it those headers are read
# from any peer in the trusted ranges, and the gateway passes a client-supplied
# X-Forwarded-Prefix straight through, which lets an unauthenticated caller poison the
# cached URLs. Empty falls back to the header-based resolution.
server:
url: ${OVSX_SERVER_URL:}
databasesearch:
enabled: true
elasticsearch:
Expand All @@ -89,7 +99,7 @@ ovsx:
integrity:
key-pair: create
registry:
version: 'v1.2.0'
version: 'v1.3.0'
storage:
local:
directory: /openvsx/extensions
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,10 @@ func (r *OpenVSXServerReconciler) getDeploymentSpec(ctx *chetypes.DeployContext)
Name: "OVSX_REGISTRY_URL",
Value: openvsx.GetOpenVSXServerServiceURL(ctx),
},
{
Name: "OVSX_SERVER_URL",
Value: openvsx.GetOpenVSXServerPublicURL(ctx),
},
{
Name: "CONFIG_REVISION",
Value: configRevision,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ import (
"github.com/eclipse-che/che-operator/pkg/deploy"
"github.com/eclipse-che/che-operator/pkg/deploy/expose"
"github.com/eclipse-che/che-operator/pkg/deploy/gateway"
"github.com/eclipse-che/che-operator/pkg/deploy/openvsx"
)

func (r *OpenVSXServerReconciler) exposeEndpoint(ctx *chetypes.DeployContext) (string, bool, error) {
Expand All @@ -44,7 +45,7 @@ func (r *OpenVSXServerReconciler) createGatewayConfig(ctx *chetypes.DeployContex
}

func (r *OpenVSXServerReconciler) syncOpenVSXURLStatus(ctx *chetypes.DeployContext) error {
openVSXURL := "https://" + ctx.CheHost + "/" + constants.OpenVSXServerGatewayPath
openVSXURL := openvsx.GetOpenVSXServerPublicURL(ctx)

if openVSXURL != ctx.CheCluster.Status.OpenVSXURL {
ctx.CheCluster.Status.OpenVSXURL = openVSXURL
Expand Down
4 changes: 4 additions & 0 deletions pkg/deploy/openvsx/openvsx_common.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,3 +27,7 @@ func GetOpenVSXServerServiceURL(ctx *chetypes.DeployContext) string {
constants.OpenVSXServerGatewayPath,
)
}

func GetOpenVSXServerPublicURL(ctx *chetypes.DeployContext) string {
return fmt.Sprintf("https://%s/%s", ctx.CheHost, constants.OpenVSXServerGatewayPath)
}
Loading