Skip to content

Commit

Permalink
draft office suite
Browse files Browse the repository at this point in the history
  • Loading branch information
yonghaoy committed Jun 24, 2024
1 parent df83536 commit 93bbdf2
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -323,15 +323,15 @@ object AllowedChartName {
def asString: String = "sas"
}

final case object OfficeSuite extends AllowedChartName {
final case object Officesuite extends AllowedChartName {
def asString: String = "Officesuite"
}

// We used to have different chart names for RStudio and SAS. This is to handle the old names for backwards-compatibility
private val deprecatedName: Map[String, AllowedChartName] = Map(
"aou-rstudio-chart" -> RStudio,
"aou-sas-chart" -> Sas,
"aou-officesuite-chart" -> OfficeSuite
"aou-officesuite-chart" -> Officesuite
)

def stringToObject: Map[String, AllowedChartName] =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ class kubernetesModelsSpec extends LeonardoTestSuite with Matchers with AnyFlatS
it should "convert chartName to AllowedChartName correctly" in {
AllowedChartName.fromChartName(ChartName("/leonardo/cromwell")) shouldBe None
AllowedChartName.fromChartName(ChartName("/leonardo/sas")) shouldBe Some(AllowedChartName.Sas)
AllowedChartName.fromChartName(ChartName("/leonardo/officesuite")) shouldBe Some(AllowedChartName.OFFICESUITE)
AllowedChartName.fromChartName(ChartName("/leonardo/officesuite")) shouldBe Some(AllowedChartName.Officesuite)
AllowedChartName.fromChartName(ChartName("/leonardo/rstudio")) shouldBe Some(
AllowedChartName.RStudio
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ final class LeoAppServiceInterp[F[_]: Parallel](config: AppServiceConfig,
case Some(cn) =>
cn match {
case AllowedChartName.RStudio => F.unit
case AllowedChartName.OfficeSuite => F.unit
case AllowedChartName.Officesuite => F.unit
case AllowedChartName.Sas =>
if (config.enableSasApp) {
if (enableIntraNodeVisibility) {
Expand Down Expand Up @@ -1465,7 +1465,7 @@ final class LeoAppServiceInterp[F[_]: Parallel](config: AppServiceConfig,
val chartVersion = req.allowedChartName.get match {
case AllowedChartName.RStudio => config.leoKubernetesConfig.allowedAppConfig.rstudioChartVersion
case AllowedChartName.Sas => config.leoKubernetesConfig.allowedAppConfig.sasChartVersion
case AllowedChartName.OfficeSuite => config.leoKubernetesConfig.allowedAppConfig.officeSuiteChartVersion
case AllowedChartName.Officesuite => config.leoKubernetesConfig.allowedAppConfig.officeSuiteChartVersion
}
gkeAppConfig.chart
.lens(_.name)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1505,7 +1505,7 @@ class LeoPubsubMessageSubscriber[F[_]](
latestAppChartVersion <- KubernetesAppConfig.configForTypeAndCloud(appResult.app.appType,
msg.cloudContext.cloudProvider
) match {
case Some(AllowedAppConfig(_, rstudioChartVersion, sasChartVersion, _, _, _, _, _, _, _)) =>
case Some(AllowedAppConfig(_, rstudioChartVersion, sasChartVersion, officesuiteChartVersion, _, _, _, _, _, _, _)) =>
AllowedChartName.fromChartName(appResult.app.chart.name) match {
case Some(AllowedChartName.RStudio) =>
F.pure(rstudioChartVersion)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -343,7 +343,7 @@ private[leonardo] object BuildHelmChartValues {
raw"""imageCredentials.password=${config.allowedAppConfig.sasContainerRegistryCredentials.password.asString}"""
) ++ common

case AllowedChartName.OfficeSuite =>
case AllowedChartName.Officesuite =>
List(
raw"""ingress.officesuite.path=${ingressPath}${"(/|$)(.*)"}""",
raw"""ingress.welder.path=${welderIngressPath}${"(/|$)(.*)"}""",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -400,7 +400,7 @@ class BuildHelmChartValuesSpec extends AnyFlatSpecLike with LeonardoTestSuite {
val envVariables = Map("WORKSPACE_NAME" -> "test-workspace-name")
val res = buildAllowedAppChartOverrideValuesString(
Config.gkeInterpConfig,
AllowedChartName.OfficeSuite,
AllowedChartName.Officesuite,
appName = AppName("app1"),
cluster = savedCluster1,
nodepoolName = Some(NodepoolName("pool1")),
Expand Down

0 comments on commit 93bbdf2

Please sign in to comment.