Skip to content

Commit a0898a5

Browse files
committed
[THREESCALE-12007] run system-app with default cmd
Assisted-by: Claude Code
1 parent a3d4b43 commit a0898a5

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

pkg/3scale/amp/component/system.go

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -315,6 +315,8 @@ func (system *System) buildAppEnv() []v1.EnvVar {
315315

316316
func (system *System) buildAppMasterContainerEnv() []v1.EnvVar {
317317
result := system.buildSystemBaseEnv()
318+
result = append(result, helper.EnvVarFromValue("PORT", "3002"))
319+
result = append(result, helper.EnvVarFromValue("TENANT_MODE", "master"))
318320
if system.Options.AppMetrics {
319321
result = append(result, helper.EnvVarFromValue(SystemAppPrometheusExporterPortEnvVarName, strconv.Itoa(SystemAppMasterContainerPrometheusPort)))
320322
}
@@ -325,6 +327,8 @@ func (system *System) buildAppMasterContainerEnv() []v1.EnvVar {
325327

326328
func (system *System) buildAppProviderContainerEnv() []v1.EnvVar {
327329
result := system.buildSystemBaseEnv()
330+
result = append(result, helper.EnvVarFromValue("PORT", "3000"))
331+
result = append(result, helper.EnvVarFromValue("TENANT_MODE", "provider"))
328332
if system.Options.AppMetrics {
329333
result = append(result, helper.EnvVarFromValue(SystemAppPrometheusExporterPortEnvVarName, strconv.Itoa(SystemAppProviderContainerPrometheusPort)))
330334
}
@@ -335,6 +339,7 @@ func (system *System) buildAppProviderContainerEnv() []v1.EnvVar {
335339

336340
func (system *System) buildAppDeveloperContainerEnv() []v1.EnvVar {
337341
result := system.buildSystemBaseEnv()
342+
result = append(result, helper.EnvVarFromValue("PORT", "3001"))
338343
if system.Options.AppMetrics {
339344
result = append(result, helper.EnvVarFromValue(SystemAppPrometheusExporterPortEnvVarName, strconv.Itoa(SystemAppDeveloperContainerPrometheusPort)))
340345
}
@@ -727,7 +732,6 @@ func (system *System) AppDeployment(ctx context.Context, k8sclient client.Client
727732
{
728733
Name: SystemAppMasterContainerName,
729734
Image: containerImage,
730-
Args: []string{"env", "TENANT_MODE=master", "PORT=3002", "container-entrypoint", "bundle", "exec", "unicorn", "-c", "config/unicorn.rb"},
731735
Ports: system.appMasterPorts(),
732736
Env: system.buildAppMasterContainerEnv(),
733737
Resources: *system.Options.AppMasterContainerResourceRequirements,
@@ -778,7 +782,6 @@ func (system *System) AppDeployment(ctx context.Context, k8sclient client.Client
778782
{
779783
Name: SystemAppProviderContainerName,
780784
Image: containerImage,
781-
Args: []string{"env", "TENANT_MODE=provider", "PORT=3000", "container-entrypoint", "bundle", "exec", "unicorn", "-c", "config/unicorn.rb"},
782785
Ports: system.appProviderPorts(),
783786
Env: system.buildAppProviderContainerEnv(),
784787
Resources: *system.Options.AppProviderContainerResourceRequirements,
@@ -829,7 +832,6 @@ func (system *System) AppDeployment(ctx context.Context, k8sclient client.Client
829832
{
830833
Name: SystemAppDeveloperContainerName,
831834
Image: containerImage,
832-
Args: []string{"env", "PORT=3001", "container-entrypoint", "bundle", "exec", "unicorn", "-c", "config/unicorn.rb"},
833835
Ports: system.appDeveloperPorts(),
834836
Env: system.buildAppDeveloperContainerEnv(),
835837
Resources: *system.Options.AppDeveloperContainerResourceRequirements,

0 commit comments

Comments
 (0)