diff --git a/install/installer/pkg/components/server/configmap.go b/install/installer/pkg/components/server/configmap.go index 167d7bbed57074..c80b164495119c 100644 --- a/install/installer/pkg/components/server/configmap.go +++ b/install/installer/pkg/components/server/configmap.go @@ -163,6 +163,14 @@ func configmap(ctx *common.RenderContext) ([]runtime.Object, error) { return nil }) + defaultFeatureFlags := []NamedWorkspaceFeatureFlag{} + _ = ctx.WithExperimental(func(cfg *experimental.Config) error { + if cfg.Workspace != nil && cfg.Workspace.EnableProtectedSecrets { + defaultFeatureFlags = append(defaultFeatureFlags, NamedWorkspaceFeatureProtectedSecrets) + } + return nil + }) + // todo(sje): all these values are configurable scfg := ConfigSerialized{ Version: ctx.VersionManifest.Version, @@ -176,7 +184,7 @@ func configmap(ctx *common.RenderContext) ([]runtime.Object, error) { WorkspaceDefaults: WorkspaceDefaults{ WorkspaceImage: workspaceImage, PreviewFeatureFlags: []NamedWorkspaceFeatureFlag{}, - DefaultFeatureFlags: []NamedWorkspaceFeatureFlag{}, + DefaultFeatureFlags: defaultFeatureFlags, TimeoutDefault: ctx.Config.Workspace.TimeoutDefault, TimeoutExtended: ctx.Config.Workspace.TimeoutExtended, }, diff --git a/install/installer/pkg/components/server/types.go b/install/installer/pkg/components/server/types.go index d44ba33131c391..26d8edadd67452 100644 --- a/install/installer/pkg/components/server/types.go +++ b/install/installer/pkg/components/server/types.go @@ -148,6 +148,7 @@ type NamedWorkspaceFeatureFlag string const ( NamedWorkspaceFeatureFlagFullWorkspaceBackup NamedWorkspaceFeatureFlag = "full_workspace_backup" + NamedWorkspaceFeatureProtectedSecrets NamedWorkspaceFeatureFlag = "protected_secrets" ) type WorkspaceClassCategory string diff --git a/install/installer/pkg/config/v1/experimental/experimental.go b/install/installer/pkg/config/v1/experimental/experimental.go index 16746da15890ec..f71798d151f888 100644 --- a/install/installer/pkg/config/v1/experimental/experimental.go +++ b/install/installer/pkg/config/v1/experimental/experimental.go @@ -119,6 +119,8 @@ type WorkspaceConfig struct { // Deprecated UsageReportBucketName string `json:"usageReportBucketName"` } `json:"contentService"` + + EnableProtectedSecrets bool `json:"enableProtectedSecrets"` } type PersistentVolumeClaim struct {