diff --git a/config/local/vmoperator/local_env_var_patch.yaml b/config/local/vmoperator/local_env_var_patch.yaml index fa2575a02..8460003a5 100644 --- a/config/local/vmoperator/local_env_var_patch.yaml +++ b/config/local/vmoperator/local_env_var_patch.yaml @@ -39,8 +39,6 @@ spec: value: "false" - name: FSS_WCP_SUPERVISOR_ASYNC_UPGRADE value: "false" - - name: FSS_WCP_SIMPLIFIED_ENABLEMENT - value: "false" # # Feature state switch flags beneath this line are enabled on main and diff --git a/config/wcp/vmoperator/manager_env_var_patch.yaml b/config/wcp/vmoperator/manager_env_var_patch.yaml index 3d1dd4ee8..430cee9a4 100644 --- a/config/wcp/vmoperator/manager_env_var_patch.yaml +++ b/config/wcp/vmoperator/manager_env_var_patch.yaml @@ -112,12 +112,6 @@ name: FSS_WCP_SUPERVISOR_ASYNC_UPGRADE value: "" -- op: add - path: /spec/template/spec/containers/0/env/- - value: - name: FSS_WCP_SIMPLIFIED_ENABLEMENT - value: "" - # # Feature state switch flags beneath this line are enabled on main and only # retained in this file because it is used by internal testing to determine the diff --git a/controllers/virtualmachinewebconsolerequest/v1alpha1/webconsolerequest_unit_test.go b/controllers/virtualmachinewebconsolerequest/v1alpha1/webconsolerequest_unit_test.go index d178e33ee..7a75d87aa 100644 --- a/controllers/virtualmachinewebconsolerequest/v1alpha1/webconsolerequest_unit_test.go +++ b/controllers/virtualmachinewebconsolerequest/v1alpha1/webconsolerequest_unit_test.go @@ -18,7 +18,6 @@ import ( vmopv1 "github.com/vmware-tanzu/vm-operator/api/v1alpha3" webconsolerequest "github.com/vmware-tanzu/vm-operator/controllers/virtualmachinewebconsolerequest/v1alpha1" appv1a1 "github.com/vmware-tanzu/vm-operator/external/appplatform/api/v1alpha1" - pkgcfg "github.com/vmware-tanzu/vm-operator/pkg/config" "github.com/vmware-tanzu/vm-operator/pkg/constants/testlabels" pkgctx "github.com/vmware-tanzu/vm-operator/pkg/context" providerfake "github.com/vmware-tanzu/vm-operator/pkg/providers/fake" @@ -146,14 +145,7 @@ func unitTestsReconcile() { Expect(wcrCtx.WebConsoleRequest.Labels).To(HaveKey(webconsolerequest.UUIDLabelKey)) }) - When("SimplifiedEnablement is enabled", func() { - JustBeforeEach(func() { - pkgcfg.UpdateContext(ctx, - func(config *pkgcfg.Config) { - config.Features.SimplifiedEnablement = true - }, - ) - }) + When("Web Console returns correct proxy address", func() { DescribeTable("DNS Names", func(apiServerDNSName []string, expectedProxy string) { diff --git a/controllers/virtualmachinewebconsolerequest/v1alpha2/webconsolerequest_unit_test.go b/controllers/virtualmachinewebconsolerequest/v1alpha2/webconsolerequest_unit_test.go index c916154cb..048d631cf 100644 --- a/controllers/virtualmachinewebconsolerequest/v1alpha2/webconsolerequest_unit_test.go +++ b/controllers/virtualmachinewebconsolerequest/v1alpha2/webconsolerequest_unit_test.go @@ -17,7 +17,6 @@ import ( vmopv1 "github.com/vmware-tanzu/vm-operator/api/v1alpha3" webconsolerequest "github.com/vmware-tanzu/vm-operator/controllers/virtualmachinewebconsolerequest/v1alpha2" appv1a1 "github.com/vmware-tanzu/vm-operator/external/appplatform/api/v1alpha1" - pkgcfg "github.com/vmware-tanzu/vm-operator/pkg/config" "github.com/vmware-tanzu/vm-operator/pkg/constants/testlabels" pkgctx "github.com/vmware-tanzu/vm-operator/pkg/context" providerfake "github.com/vmware-tanzu/vm-operator/pkg/providers/fake" @@ -136,14 +135,7 @@ func unitTestsReconcile() { }) }) - When("SimplifiedEnablement is enabled", func() { - JustBeforeEach(func() { - pkgcfg.UpdateContext(ctx, - func(config *pkgcfg.Config) { - config.Features.SimplifiedEnablement = true - }, - ) - }) + When("Web Console returns correct proxy address", func() { DescribeTable("DNS Names", func(apiServerDNSName []string, expectedProxy string) { diff --git a/pkg/config/config.go b/pkg/config/config.go index 62e6242ec..469a8eccc 100644 --- a/pkg/config/config.go +++ b/pkg/config/config.go @@ -147,7 +147,6 @@ type FeatureStates struct { VMIncrementalRestore bool // FSS_WCP_VMSERVICE_INCREMENTAL_RESTORE BringYourOwnEncryptionKey bool // FSS_WCP_VMSERVICE_BYOK SVAsyncUpgrade bool // FSS_WCP_SUPERVISOR_ASYNC_UPGRADE - SimplifiedEnablement bool // FSS_WCP_SIMPLIFIED_ENABLEMENT } type InstanceStorage struct { diff --git a/pkg/config/env.go b/pkg/config/env.go index 618ab2eb2..9675b4135 100644 --- a/pkg/config/env.go +++ b/pkg/config/env.go @@ -63,7 +63,6 @@ func FromEnv() Config { setBool(env.FSSVMImportNewNet, &config.Features.VMImportNewNet) setBool(env.FSSVMIncrementalRestore, &config.Features.VMIncrementalRestore) setBool(env.FSSBringYourOwnEncryptionKey, &config.Features.BringYourOwnEncryptionKey) - setBool(env.FSSSimplifiedEnablement, &config.Features.SimplifiedEnablement) setBool(env.FSSSVAsyncUpgrade, &config.Features.SVAsyncUpgrade) if !config.Features.SVAsyncUpgrade { diff --git a/pkg/config/env/env.go b/pkg/config/env/env.go index b9774dac4..93453f0cf 100644 --- a/pkg/config/env/env.go +++ b/pkg/config/env/env.go @@ -58,7 +58,6 @@ const ( FSSVMIncrementalRestore FSSBringYourOwnEncryptionKey FSSSVAsyncUpgrade - FSSSimplifiedEnablement _varNameEnd ) @@ -177,8 +176,6 @@ func (n VarName) String() string { return "FSS_WCP_VMSERVICE_BYOK" case FSSSVAsyncUpgrade: return "FSS_WCP_SUPERVISOR_ASYNC_UPGRADE" - case FSSSimplifiedEnablement: - return "FSS_WCP_SIMPLIFIED_ENABLEMENT" } panic("unknown environment variable") } diff --git a/pkg/config/env_test.go b/pkg/config/env_test.go index f610e34b1..33b633de1 100644 --- a/pkg/config/env_test.go +++ b/pkg/config/env_test.go @@ -101,7 +101,6 @@ var _ = Describe( Expect(os.Setenv("FSS_WCP_VMSERVICE_INCREMENTAL_RESTORE", "true")).To(Succeed()) Expect(os.Setenv("FSS_WCP_VMSERVICE_BYOK", "true")).To(Succeed()) Expect(os.Setenv("FSS_WCP_SUPERVISOR_ASYNC_UPGRADE", "false")).To(Succeed()) - Expect(os.Setenv("FSS_WCP_SIMPLIFIED_ENABLEMENT", "true")).To(Succeed()) Expect(os.Setenv("CREATE_VM_REQUEUE_DELAY", "125h")).To(Succeed()) Expect(os.Setenv("POWERED_ON_VM_HAS_IP_REQUEUE_DELAY", "126h")).To(Succeed()) }) @@ -151,7 +150,6 @@ var _ = Describe( BringYourOwnEncryptionKey: true, SVAsyncUpgrade: false, // Capability gate so tested below WorkloadDomainIsolation: true, - SimplifiedEnablement: true, }, CreateVMRequeueDelay: 125 * time.Hour, PoweredOnVMHasIPRequeueDelay: 126 * time.Hour, diff --git a/pkg/util/kube/proxyaddr/proxy_address.go b/pkg/util/kube/proxyaddr/proxy_address.go index c4c329176..1bb6054d8 100644 --- a/pkg/util/kube/proxyaddr/proxy_address.go +++ b/pkg/util/kube/proxyaddr/proxy_address.go @@ -12,7 +12,6 @@ import ( "sigs.k8s.io/controller-runtime/pkg/client" appv1a1 "github.com/vmware-tanzu/vm-operator/external/appplatform/api/v1alpha1" - pkgcfg "github.com/vmware-tanzu/vm-operator/pkg/config" ) const ( @@ -28,10 +27,6 @@ const ( // ProxyAddress first attempts to get the proxy address through the API Server DNS Names. // If that is unset, though, fall back to using the virtual IP. func ProxyAddress(ctx context.Context, r client.Client) (string, error) { - if !pkgcfg.FromContext(ctx).Features.SimplifiedEnablement { - return proxyAddressFromVirtualIP(ctx, r) - } - // Attempt to use the API Server DNS Names to get the proxy address. proxyAddress, err := proxyServiceDNSName(ctx, r) if err != nil { diff --git a/pkg/util/kube/proxyaddr/proxy_address_test.go b/pkg/util/kube/proxyaddr/proxy_address_test.go index b9a64c89a..6bb809c15 100644 --- a/pkg/util/kube/proxyaddr/proxy_address_test.go +++ b/pkg/util/kube/proxyaddr/proxy_address_test.go @@ -61,32 +61,6 @@ var _ = Describe("Test Proxy Address", func() { withFuncs, initialObjects...) }) - When("Simplified Enablement FSS is disabled", func() { - BeforeEach(func() { - api = &appv1a1.SupervisorProperties{ - ObjectMeta: metav1.ObjectMeta{ - Name: "supervisor-env-props", - Namespace: "vmware-system-supervisor-services", - }, - Spec: appv1a1.SupervisorPropertiesSpec{ - APIServerDNSNames: []string{apiServerDNSName}, - }, - } - ctx = pkgcfg.UpdateContext(ctx, func(config *pkgcfg.Config) { - config.Features.SimplifiedEnablement = false - }) - - initialObjects = []ctrlclient.Object{proxySvc, api} - }) - - It("Should always return the virtual IP", func() { - str, err := ProxyAddress(ctx, client) - Expect(err).ToNot(HaveOccurred()) - Expect(str).To(Equal(virtualIP)) - }) - - }) - When("API Server DNS Names is NOT set", func() { BeforeEach(func() { api = &appv1a1.SupervisorProperties{ @@ -98,9 +72,6 @@ var _ = Describe("Test Proxy Address", func() { APIServerDNSNames: []string{}, }, } - ctx = pkgcfg.UpdateContext(ctx, func(config *pkgcfg.Config) { - config.Features.SimplifiedEnablement = true - }) initialObjects = []ctrlclient.Object{proxySvc, api} }) @@ -124,9 +95,6 @@ var _ = Describe("Test Proxy Address", func() { APIServerDNSNames: []string{apiServerDNSName}, }, } - ctx = pkgcfg.UpdateContext(ctx, func(config *pkgcfg.Config) { - config.Features.SimplifiedEnablement = true - }) initialObjects = []ctrlclient.Object{proxySvc, api} })