Skip to content

Commit

Permalink
[installer] Use experimental config properly for openvsx-proxy (#19368)
Browse files Browse the repository at this point in the history
  • Loading branch information
nandajavarma authored Jan 30, 2024
1 parent f0457a8 commit 38681eb
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions install/installer/pkg/components/openvsx-proxy/statefulset.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ import (
"github.com/gitpod-io/gitpod/common-go/baseserver"
"github.com/gitpod-io/gitpod/installer/pkg/cluster"
"github.com/gitpod-io/gitpod/installer/pkg/common"
"github.com/gitpod-io/gitpod/installer/pkg/config/v1/experimental"
)

func statefulset(ctx *common.RenderContext) ([]runtime.Object, error) {
Expand Down Expand Up @@ -67,8 +68,9 @@ func statefulset(ctx *common.RenderContext) ([]runtime.Object, error) {
const redisContainerName = "redis"

var proxyEnvVars []v1.EnvVar
if ctx.Config.Experimental != nil && ctx.Config.Experimental.WebApp != nil {
proxyConfig := ctx.Config.Experimental.WebApp.ProxySettings

_ = ctx.WithExperimental(func(cfg *experimental.Config) error {
proxyConfig := cfg.WebApp.ProxySettings
if proxyConfig != nil {
proxyEnvVars = []v1.EnvVar{
{
Expand All @@ -84,10 +86,9 @@ func statefulset(ctx *common.RenderContext) ([]runtime.Object, error) {
Value: proxyConfig.NoProxy,
},
}

}

}
return nil
})

return []runtime.Object{&appsv1.StatefulSet{
TypeMeta: common.TypeMetaStatefulSet,
Expand Down

0 comments on commit 38681eb

Please sign in to comment.