@@ -11,14 +11,12 @@ import (
1111 "github.com/stackrox/acs-fleet-manager/fleetshard/config"
1212 "github.com/stackrox/acs-fleet-manager/fleetshard/pkg/central/cloudprovider"
1313 "github.com/stackrox/acs-fleet-manager/fleetshard/pkg/central/cloudprovider/awsclient"
14- "github.com/stackrox/acs-fleet-manager/fleetshard/pkg/central/operator"
1514 "github.com/stackrox/acs-fleet-manager/fleetshard/pkg/central/postgres"
1615 centralReconciler "github.com/stackrox/acs-fleet-manager/fleetshard/pkg/central/reconciler"
1716 "github.com/stackrox/acs-fleet-manager/fleetshard/pkg/cipher"
1817 "github.com/stackrox/acs-fleet-manager/fleetshard/pkg/cluster"
1918 "github.com/stackrox/acs-fleet-manager/fleetshard/pkg/fleetshardmetrics"
2019 "github.com/stackrox/acs-fleet-manager/fleetshard/pkg/k8s"
21- "github.com/stackrox/acs-fleet-manager/fleetshard/pkg/util"
2220 "github.com/stackrox/acs-fleet-manager/internal/dinosaur/pkg/api/private"
2321 fmAPI "github.com/stackrox/acs-fleet-manager/pkg/client/fleetmanager"
2422 fleetmanager "github.com/stackrox/acs-fleet-manager/pkg/client/fleetmanager/impl"
@@ -38,8 +36,6 @@ type reconcilerRegistry map[string]*centralReconciler.CentralReconciler
3836
3937var reconciledCentralCountCache int32
4038
41- var lastOperatorHash [16 ]byte
42-
4339var backoff = wait.Backoff {
4440 Duration : 1 * time .Second ,
4541 Factor : 1.5 ,
@@ -57,7 +53,6 @@ type Runtime struct {
5753 k8sClient ctrlClient.Client
5854 dbProvisionClient cloudprovider.DBClient
5955 statusResponseCh chan private.DataPlaneCentralStatus
60- operatorManager * operator.ACSOperatorManager
6156 secretCipher cipher.Cipher
6257 encryptionKeyGenerator cipher.KeyGenerator
6358 addonService cluster.AddonService
@@ -93,7 +88,6 @@ func NewRuntime(ctx context.Context, config *config.Config, k8sClient ctrlClient
9388 }
9489 }
9590
96- operatorManager := operator .NewACSOperatorManager (k8sClient )
9791 secretCipher , err := cipher .NewCipher (config )
9892 if err != nil {
9993 return nil , fmt .Errorf ("creating secretCipher: %w" , err )
@@ -113,7 +107,6 @@ func NewRuntime(ctx context.Context, config *config.Config, k8sClient ctrlClient
113107 clusterID : config .ClusterID ,
114108 dbProvisionClient : dbProvisionClient ,
115109 reconcilers : make (reconcilerRegistry ),
116- operatorManager : operatorManager ,
117110 secretCipher : secretCipher , // pragma: allowlist secret
118111 encryptionKeyGenerator : encryptionKeyGen ,
119112 addonService : addonService ,
@@ -286,28 +279,6 @@ func (r *Runtime) deleteStaleReconcilers(list *private.ManagedCentralList) {
286279 }
287280}
288281
289- func (r * Runtime ) upgradeOperator (list private.ManagedCentralList ) error {
290- ctx := context .Background ()
291- operators := operator .FromAPIResponse (list .RhacsOperators )
292-
293- operatorHash , err := util .MD5SumFromJSONStruct (operators )
294- if err != nil {
295- return fmt .Errorf ("Creating MD5 operatorHash for operator. %w" , err )
296- }
297- if lastOperatorHash == operatorHash {
298- return nil
299- }
300- lastOperatorHash = operatorHash
301-
302- err = r .operatorManager .InstallOrUpgrade (ctx , operators )
303- if err != nil {
304- lastOperatorHash = [16 ]byte {}
305- return fmt .Errorf ("ensuring initial operator installation failed: %w" , err )
306- }
307-
308- return nil
309- }
310-
311282func (r * Runtime ) routesAvailable () bool {
312283 available , err := k8s .IsRoutesResourceEnabled (r .k8sClient )
313284 if err != nil {
0 commit comments