Skip to content

Commit

Permalink
Server airgap samples
Browse files Browse the repository at this point in the history
Signed-off-by: Anatolii Bazko <[email protected]>
  • Loading branch information
tolusha committed Aug 2, 2024
1 parent a272742 commit 4a61e92
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
9 changes: 9 additions & 0 deletions pkg/deploy/dashboard/dashboard_deployment_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
package dashboard

import (
"fmt"
"os"

"k8s.io/apimachinery/pkg/api/resource"
Expand Down Expand Up @@ -169,6 +170,10 @@ func TestDashboardDeploymentEnvVars(t *testing.T) {
Name: "CHECLUSTER_CR_NAME",
Value: "eclipse-che",
},
{
Name: "CHE_DASHBOARD_INTERNAL_URL",
Value: fmt.Sprintf("http://%s-dashboard.eclipse-che.svc:8080", defaults.GetCheFlavor()),
},
{
Name: "CHE_INTERNAL_URL",
Value: "http://che-host.eclipse-che.svc:8080/api",
Expand Down Expand Up @@ -249,6 +254,10 @@ func TestDashboardDeploymentEnvVars(t *testing.T) {
Name: "CHECLUSTER_CR_NAME",
Value: "eclipse-che",
},
{
Name: "CHE_DASHBOARD_INTERNAL_URL",
Value: fmt.Sprintf("http://%s-dashboard.eclipse-che.svc:8080", defaults.GetCheFlavor()),
},
{
Name: "CHE_INTERNAL_URL",
Value: "http://che-host.eclipse-che.svc:8080/api",
Expand Down
6 changes: 6 additions & 0 deletions pkg/deploy/dashboard/deployment_dashboard.go
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,12 @@ func (d *DashboardReconciler) getDashboardDeploymentSpec(ctx *chetypes.DeployCon
Value: ctx.CheCluster.Name},
)

envVars = append(envVars,
corev1.EnvVar{
Name: "CHE_DASHBOARD_INTERNAL_URL",
Value: fmt.Sprintf("http://%s.%s.svc:8080", d.getComponentName(ctx), ctx.CheCluster.Namespace)},
)

envVars = append(envVars,
corev1.EnvVar{
Name: "CHE_INTERNAL_URL",
Expand Down

0 comments on commit 4a61e92

Please sign in to comment.