Skip to content

rename isEmbeddedClusterMultinodeEnabled to isEmbeddedClusterMultiNodeEnabled #5272

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
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
4 changes: 2 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,8 @@ require (
github.com/phayes/freeport v0.0.0-20220201140144-74d24b5ae9f5
github.com/pkg/errors v0.9.1
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2
github.com/replicatedhq/embedded-cluster/kinds v1.15.1-0.20250408014646-d1737c81cb6e
github.com/replicatedhq/kotskinds v0.0.0-20250410171328-3fc5effbf386
github.com/replicatedhq/embedded-cluster/kinds v1.15.1-0.20250411154749-d20d2f980f0c
github.com/replicatedhq/kotskinds v0.0.0-20250411153224-089dbeb7ba2a
github.com/replicatedhq/kurlkinds v1.5.0
github.com/replicatedhq/troubleshoot v0.117.0
github.com/replicatedhq/yaml/v3 v3.0.0-beta5-replicatedhq
Expand Down
8 changes: 4 additions & 4 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -1861,10 +1861,10 @@ github.com/redis/go-redis/v9 v9.7.3 h1:YpPyAayJV+XErNsatSElgRZZVCwXX9QzkKYNvO7x0
github.com/redis/go-redis/v9 v9.7.3/go.mod h1:bGUrSggJ9X9GUmZpZNEOQKaANxSGgOEBRltRTZHSvrA=
github.com/remyoudompheng/bigfft v0.0.0-20170806203942-52369c62f446/go.mod h1:uYEyJGbgTkfkS4+E/PavXkNJcbFIpEtjt2B0KDQ5+9M=
github.com/remyoudompheng/bigfft v0.0.0-20200410134404-eec4a21b6bb0/go.mod h1:qqbHyh8v60DhA7CoWK5oRCqLrMHRGoxYCSS9EjAz6Eo=
github.com/replicatedhq/embedded-cluster/kinds v1.15.1-0.20250408014646-d1737c81cb6e h1:3TO1DCXi2aGH6HPA4pDQ4qfe/fw10b626CJEAAYdI8c=
github.com/replicatedhq/embedded-cluster/kinds v1.15.1-0.20250408014646-d1737c81cb6e/go.mod h1:DZVH5BSrkKaZPYO6psQYRZgzPdwaxrh8CpJYW95D76E=
github.com/replicatedhq/kotskinds v0.0.0-20250410171328-3fc5effbf386 h1:pLDNazFkB1bB2eS9w9iebQHSTcz6F3QCYYWhHltLOjU=
github.com/replicatedhq/kotskinds v0.0.0-20250410171328-3fc5effbf386/go.mod h1:QjhIUu3+OmHZ09u09j3FCoTt8F3BYtQglS+OLmftu9I=
github.com/replicatedhq/embedded-cluster/kinds v1.15.1-0.20250411154749-d20d2f980f0c h1:QoAn+gFKypZPuybDUIzYQt/hzSLOMwTab/csazCAZQ8=
github.com/replicatedhq/embedded-cluster/kinds v1.15.1-0.20250411154749-d20d2f980f0c/go.mod h1:DZVH5BSrkKaZPYO6psQYRZgzPdwaxrh8CpJYW95D76E=
github.com/replicatedhq/kotskinds v0.0.0-20250411153224-089dbeb7ba2a h1:aNZ7qcuEmPGIUIIfxF7c0sdKR2+zL2vc5r2V8j8a49I=
github.com/replicatedhq/kotskinds v0.0.0-20250411153224-089dbeb7ba2a/go.mod h1:QjhIUu3+OmHZ09u09j3FCoTt8F3BYtQglS+OLmftu9I=
github.com/replicatedhq/kurlkinds v1.5.0 h1:zZ0PKNeh4kXvSzVGkn62DKTo314GxhXg1TSB3azURMc=
github.com/replicatedhq/kurlkinds v1.5.0/go.mod h1:rUpBMdC81IhmJNCWMU/uRsMETv9P0xFoMvdSP/TAr5A=
github.com/replicatedhq/termui/v3 v3.1.1-0.20200811145416-f40076d26851 h1:eRlNDHxGfVkPCRXbA4BfQJvt5DHjFiTtWy3R/t4djyY=
Expand Down
2 changes: 1 addition & 1 deletion kurl_proxy/assets/tls-warning.html
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@
<img src="/assets/images/check.svg" alt="check" />
<span class="font-bold ml-2"> Secure the Admin Console </span>
</div>
{{if .IsMultinodeEnabled }}
{{if .IsMultiNodeEnabled }}
<div
class="p-8 shadow-[0_1px_0_#c4c8ca] font-medium flex text-[#9c9c9c9c]"
>
Expand Down
2 changes: 1 addition & 1 deletion kurl_proxy/assets/tls.html
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
/>
<span class="ml-2"> Secure the Admin Console </span>
</div>
{{if .IsMultinodeEnabled }}
{{if .IsMultiNodeEnabled }}
<div
class="p-8 shadow-[0_1px_0_#c4c8ca] font-medium flex text-[#9c9c9c9c] items-center"
>
Expand Down
2 changes: 1 addition & 1 deletion kurl_proxy/assets/welcome.html
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@
<img src="/assets/images/check.svg" alt="check" />
<p class="text-sm font-medium">Secure the Admin Console</p>
</div>
{{if .IsMultinodeEnabled }}
{{if .IsMultiNodeEnabled }}
<div
class="p-4 flex gap-2 border border-gray-300 border-solid rounded-lg shadow-md"
>
Expand Down
8 changes: 4 additions & 4 deletions kurl_proxy/cmd/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -280,7 +280,7 @@ func getHttpServer(fingerprint string, acceptAnonymousUploads bool, assetsDir st
"AppIcon": appIcon,
"AppTitle": app.Spec.Title,
"IsEmbeddedCluster": isEmbeddedCluster(),
"IsMultinodeEnabled": isMultinodeEnabled(),
"IsMultiNodeEnabled": isMultiNodeEnabled(),
})
})
r.GET("/tls-warning", func(c *gin.Context) {
Expand Down Expand Up @@ -308,7 +308,7 @@ func getHttpServer(fingerprint string, acceptAnonymousUploads bool, assetsDir st
"AppIcon": appIcon,
"AppTitle": app.Spec.Title,
"IsEmbeddedCluster": isEmbeddedCluster(),
"IsMultinodeEnabled": isMultinodeEnabled(),
"IsMultiNodeEnabled": isMultiNodeEnabled(),
})
})
r.NoRoute(func(c *gin.Context) {
Expand Down Expand Up @@ -352,7 +352,7 @@ func getHttpsServer(upstream, dexUpstream *url.URL, tlsSecretName string, secret
"AppTitle": app.Spec.Title,
"App": app.Spec,
"IsEmbeddedCluster": isEmbeddedCluster(),
"IsMultinodeEnabled": isMultinodeEnabled(),
"IsMultiNodeEnabled": isMultiNodeEnabled(),
})
})

Expand Down Expand Up @@ -716,6 +716,6 @@ func isEmbeddedCluster() bool {
return os.Getenv("EMBEDDED_CLUSTER_ID") != ""
}

func isMultinodeEnabled() bool {
func isMultiNodeEnabled() bool {
return os.Getenv("IS_MULTI_NODE_ENABLED") == "true"
}
2 changes: 1 addition & 1 deletion pkg/api/handlers/types/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ type ResponseApp struct {
IsGeoaxisSupported bool `json:"isGeoaxisSupported"`
IsSemverRequired bool `json:"isSemverRequired"`
IsSupportBundleUploadSupported bool `json:"isSupportBundleUploadSupported"`
IsEmbeddedClusterMultinodeEnabled bool `json:"isEmbeddedClusterMultinodeEnabled"`
IsEmbeddedClusterMultiNodeEnabled bool `json:"isEmbeddedClusterMultiNodeEnabled"`
AllowRollback bool `json:"allowRollback"`
AllowSnapshots bool `json:"allowSnapshots"`
TargetKotsVersion string `json:"targetKotsVersion"`
Expand Down
2 changes: 1 addition & 1 deletion pkg/embeddedcluster/upgrade.go
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ func startClusterUpgrade(
newInstall.Spec.Config = &newcfg
newInstall.Spec.LicenseInfo = &embeddedclusterv1beta1.LicenseInfo{
IsDisasterRecoverySupported: license.Spec.IsDisasterRecoverySupported,
IsMultinodeEnabled: license.Spec.IsEmbeddedClusterMultinodeEnabled,
IsMultiNodeEnabled: license.Spec.IsEmbeddedClusterMultiNodeEnabled,
}

log.Printf("Starting cluster upgrade to version %s...", newcfg.Version)
Expand Down
2 changes: 1 addition & 1 deletion pkg/handlers/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -325,7 +325,7 @@ func responseAppFromApp(ctx context.Context, a *apptypes.App, kcb kubeclient.Kub
IsGeoaxisSupported: license.Spec.IsGeoaxisSupported,
IsSemverRequired: license.Spec.IsSemverRequired,
IsSupportBundleUploadSupported: license.Spec.IsSupportBundleUploadSupported,
IsEmbeddedClusterMultinodeEnabled: license.Spec.IsEmbeddedClusterMultinodeEnabled,
IsEmbeddedClusterMultiNodeEnabled: license.Spec.IsEmbeddedClusterMultiNodeEnabled,
AllowRollback: allowRollback,
AllowSnapshots: allowSnapshots,
TargetKotsVersion: targetKotsVersion,
Expand Down
4 changes: 2 additions & 2 deletions pkg/handlers/license.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ type LicenseResponse struct {
IsDisasterRecoverySupported bool `json:"isDisasterRecoverySupported"`
LastSyncedAt string `json:"lastSyncedAt"`
IsSupportBundleUploadSupported bool `json:"isSupportBundleUploadSupported"`
IsEmbeddedClusterMultinodeEnabled bool `json:"isEmbeddedClusterMultinodeEnabled"`
IsEmbeddedClusterMultiNodeEnabled bool `json:"isEmbeddedClusterMultiNodeEnabled"`
}

type SyncLicenseResponse struct {
Expand Down Expand Up @@ -698,7 +698,7 @@ func licenseResponseFromLicense(license *kotsv1beta1.License, app *apptypes.App)
IsDisasterRecoverySupported: license.Spec.IsDisasterRecoverySupported,
LastSyncedAt: app.LastLicenseSync,
IsSupportBundleUploadSupported: license.Spec.IsSupportBundleUploadSupported,
IsEmbeddedClusterMultinodeEnabled: license.Spec.IsEmbeddedClusterMultinodeEnabled,
IsEmbeddedClusterMultiNodeEnabled: license.Spec.IsEmbeddedClusterMultiNodeEnabled,
}

return &response, nil
Expand Down
4 changes: 2 additions & 2 deletions pkg/kotsutil/kots.go
Original file line number Diff line number Diff line change
Expand Up @@ -230,11 +230,11 @@ func (k *KotsKinds) DecryptConfigValues() error {
return nil
}

func (k *KotsKinds) IsMultinodeEnabled() bool {
func (k *KotsKinds) IsMultiNodeEnabled() bool {
if k == nil || k.License == nil {
return false
}
return k.License.Spec.IsEmbeddedClusterMultinodeEnabled
return k.License.Spec.IsEmbeddedClusterMultiNodeEnabled
}

func (k *KotsKinds) IsConfigurable() bool {
Expand Down
4 changes: 2 additions & 2 deletions pkg/license/signature.go
Original file line number Diff line number Diff line change
Expand Up @@ -164,8 +164,8 @@ func verifyLicenseData(outerLicense *kotsv1beta1.License, innerLicense *kotsv1be
if outerLicense.Spec.IsSupportBundleUploadSupported != innerLicense.Spec.IsSupportBundleUploadSupported {
return fmt.Errorf("\"IsSupportBundleUploadSupported\" field has changed to %t (license) from %t (within signature)", outerLicense.Spec.IsSupportBundleUploadSupported, innerLicense.Spec.IsSupportBundleUploadSupported)
}
if outerLicense.Spec.IsEmbeddedClusterMultinodeEnabled != innerLicense.Spec.IsEmbeddedClusterMultinodeEnabled {
return fmt.Errorf("\"IsEmbeddedClusterMultinodeEnabled\" field has changed to %t (license) from %t (within signature)", outerLicense.Spec.IsEmbeddedClusterMultinodeEnabled, innerLicense.Spec.IsEmbeddedClusterMultinodeEnabled)
if outerLicense.Spec.IsEmbeddedClusterMultiNodeEnabled != innerLicense.Spec.IsEmbeddedClusterMultiNodeEnabled {
return fmt.Errorf("\"IsEmbeddedClusterMultiNodeEnabled\" field has changed to %t (license) from %t (within signature)", outerLicense.Spec.IsEmbeddedClusterMultiNodeEnabled, innerLicense.Spec.IsEmbeddedClusterMultiNodeEnabled)
}
if outerLicense.Spec.IsSemverRequired != innerLicense.Spec.IsSemverRequired {
return fmt.Errorf("\"IsSemverRequired\" field has changed to %t (license) from %t (within signature)", outerLicense.Spec.IsSemverRequired, innerLicense.Spec.IsSemverRequired)
Expand Down
2 changes: 1 addition & 1 deletion pkg/store/kotsstore/version_store.go
Original file line number Diff line number Diff line change
Expand Up @@ -722,7 +722,7 @@ func (s *KOTSStore) upsertAppVersionRecordStatements(appID string, sequence int6

func determineDownstreamVersionStatus(s store.Store, a *apptypes.App, sequence int64, kotsKinds *kotsutil.KotsKinds, isInstall bool, isAutomated bool, skipPreflights bool) (types.DownstreamVersionStatus, error) {
// Check if we need to show cluster management
if util.IsEmbeddedCluster() && isInstall && !isAutomated && kotsKinds.IsMultinodeEnabled() {
if util.IsEmbeddedCluster() && isInstall && !isAutomated && kotsKinds.IsMultiNodeEnabled() {
return types.VersionPendingClusterManagement, nil
}

Expand Down
12 changes: 6 additions & 6 deletions pkg/store/kotsstore/version_store_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ func Test_determineDownstreamVersionStatus(t *testing.T) {
kotsKinds: &kotsutil.KotsKinds{
License: &kotsv1beta1.License{
Spec: kotsv1beta1.LicenseSpec{
IsEmbeddedClusterMultinodeEnabled: true,
IsEmbeddedClusterMultiNodeEnabled: true,
},
},
},
Expand All @@ -57,7 +57,7 @@ func Test_determineDownstreamVersionStatus(t *testing.T) {
kotsKinds: &kotsutil.KotsKinds{
License: &kotsv1beta1.License{
Spec: kotsv1beta1.LicenseSpec{
IsEmbeddedClusterMultinodeEnabled: false,
IsEmbeddedClusterMultiNodeEnabled: false,
},
},
Config: &kotsv1beta1.Config{
Expand Down Expand Up @@ -94,7 +94,7 @@ func Test_determineDownstreamVersionStatus(t *testing.T) {
kotsKinds: &kotsutil.KotsKinds{
License: &kotsv1beta1.License{
Spec: kotsv1beta1.LicenseSpec{
IsEmbeddedClusterMultinodeEnabled: true,
IsEmbeddedClusterMultiNodeEnabled: true,
},
},
Config: &kotsv1beta1.Config{
Expand Down Expand Up @@ -131,7 +131,7 @@ func Test_determineDownstreamVersionStatus(t *testing.T) {
kotsKinds: &kotsutil.KotsKinds{
License: &kotsv1beta1.License{
Spec: kotsv1beta1.LicenseSpec{
IsEmbeddedClusterMultinodeEnabled: false,
IsEmbeddedClusterMultiNodeEnabled: false,
},
},
},
Expand All @@ -149,7 +149,7 @@ func Test_determineDownstreamVersionStatus(t *testing.T) {
kotsKinds: &kotsutil.KotsKinds{
License: &kotsv1beta1.License{
Spec: kotsv1beta1.LicenseSpec{
IsEmbeddedClusterMultinodeEnabled: true,
IsEmbeddedClusterMultiNodeEnabled: true,
},
},
},
Expand Down Expand Up @@ -501,7 +501,7 @@ func Test_determineDownstreamVersionStatus(t *testing.T) {
kotsKinds: &kotsutil.KotsKinds{
License: &kotsv1beta1.License{
Spec: kotsv1beta1.LicenseSpec{
IsEmbeddedClusterMultinodeEnabled: true,
IsEmbeddedClusterMultiNodeEnabled: true,
},
},
Config: &kotsv1beta1.Config{
Expand Down
4 changes: 2 additions & 2 deletions pkg/template/license_context.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,8 @@ func (ctx licenseCtx) licenseFieldValue(name string) string {
return strconv.FormatBool(ctx.License.Spec.IsGitOpsSupported)
case "isSupportBundleUploadSupported":
return strconv.FormatBool(ctx.License.Spec.IsSupportBundleUploadSupported)
case "isEmbeddedClusterMultinodeEnabled":
return strconv.FormatBool(ctx.License.Spec.IsEmbeddedClusterMultinodeEnabled)
case "isEmbeddedClusterMultiNodeEnabled":
return strconv.FormatBool(ctx.License.Spec.IsEmbeddedClusterMultiNodeEnabled)
case "isIdentityServiceSupported":
return strconv.FormatBool(ctx.License.Spec.IsIdentityServiceSupported)
case "isGeoaxisSupported":
Expand Down
6 changes: 3 additions & 3 deletions pkg/template/license_context_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -235,13 +235,13 @@ func TestLicenseCtx_licenseFieldValue(t *testing.T) {
want: "true",
},
{
name: "built-in isEmbeddedClusterMultinodeEnabled",
name: "built-in isEmbeddedClusterMultiNodeEnabled",
License: &kotsv1beta1.License{
Spec: kotsv1beta1.LicenseSpec{
IsEmbeddedClusterMultinodeEnabled: true,
IsEmbeddedClusterMultiNodeEnabled: true,
},
},
fieldName: "isEmbeddedClusterMultinodeEnabled",
fieldName: "isEmbeddedClusterMultiNodeEnabled",
want: "true",
},
{
Expand Down
2 changes: 1 addition & 1 deletion web/src/Root.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -593,7 +593,7 @@ const Root = () => {
title: "Secure the Admin Console",
});

if (app?.isEmbeddedClusterMultinodeEnabled) {
if (app?.isEmbeddedClusterMultiNodeEnabled) {
steps.push({
id: "cluster",
title: "Configure the cluster",
Expand Down
4 changes: 2 additions & 2 deletions web/src/components/apps/AppLicense.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -473,9 +473,9 @@ const AppLicenseComponent = () => {
</span>
) : null}
{isEmbeddedCluster &&
appLicense?.isEmbeddedClusterMultinodeEnabled ? (
appLicense?.isEmbeddedClusterMultiNodeEnabled ? (
<span className="flex alignItems--center">
<span className="icon licenseMultinodeIcon" />
<span className="icon licenseMultiNodeIcon" />
Multi-node cluster enabled{" "}
</span>
) : null}
Expand Down
2 changes: 1 addition & 1 deletion web/src/components/apps/EmbeddedClusterManagement.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -524,7 +524,7 @@ const EmbeddedClusterManagement = ({
);
};

const isMultiNodeEnabled = app?.isEmbeddedClusterMultinodeEnabled;
const isMultiNodeEnabled = app?.isEmbeddedClusterMultiNodeEnabled;

return (
<div className="EmbeddedClusterManagement--wrapper container u-overflow--auto tw-font-sans tw-max-w-[1024px] tw-mx-auto tw-mt-6">
Expand Down
2 changes: 1 addition & 1 deletion web/src/scss/utilities/icons.scss
Original file line number Diff line number Diff line change
Expand Up @@ -920,7 +920,7 @@
height: 20px;
margin-right: 4px;
}
.icon.licenseMultinodeIcon {
.icon.licenseMultiNodeIcon {
background-position: -274px -839px;
width: 20px;
height: 20px;
Expand Down
4 changes: 2 additions & 2 deletions web/src/types/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ export type App = {
isIdentityServiceSupported: boolean;
isSemverRequired: boolean;
isSupportBundleUploadSupported: boolean;
isEmbeddedClusterMultinodeEnabled: boolean;
isEmbeddedClusterMultiNodeEnabled: boolean;
licenseType: string;
name: string;
namespace: string;
Expand All @@ -44,7 +44,7 @@ export type AppLicense = {
isSnapshotSupported: boolean;
isDisasterRecoverySupported: boolean;
isSupportBundleUploadSupported: boolean;
isEmbeddedClusterMultinodeEnabled: boolean;
isEmbeddedClusterMultiNodeEnabled: boolean;
lastSyncedAt: string;
licenseSequence: number;
licenseType: string;
Expand Down
Loading