@@ -14,7 +14,6 @@ import (
1414 "github.com/openshift/api/features"
1515 operatorv1 "github.com/openshift/api/operator/v1"
1616 routev1 "github.com/openshift/api/route/v1"
17- applyoperatorv1 "github.com/openshift/client-go/operator/applyconfigurations/operator/v1"
1817 "github.com/openshift/cluster-authentication-operator/bindata"
1918 "github.com/openshift/cluster-authentication-operator/pkg/controllers/common"
2019 "github.com/openshift/cluster-authentication-operator/pkg/controllers/configobservation/configobservercontroller"
@@ -60,10 +59,8 @@ import (
6059 certapiv1 "k8s.io/api/certificates/v1"
6160 "k8s.io/apimachinery/pkg/api/errors"
6261 metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
63- "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured"
6462 "k8s.io/apimachinery/pkg/fields"
6563 "k8s.io/apimachinery/pkg/labels"
66- "k8s.io/apimachinery/pkg/runtime"
6764 "k8s.io/apimachinery/pkg/runtime/schema"
6865 "k8s.io/apimachinery/pkg/selection"
6966 "k8s.io/apimachinery/pkg/util/sets"
@@ -827,37 +824,6 @@ func loadSystemCACertBundle() ([]byte, error) {
827824 return systemCABundle , nil
828825}
829826
830- func extractOperatorSpec (obj * unstructured.Unstructured , fieldManager string ) (* applyoperatorv1.OperatorSpecApplyConfiguration , error ) {
831- castObj := & operatorv1.Authentication {}
832- if err := runtime .DefaultUnstructuredConverter .FromUnstructured (obj .Object , castObj ); err != nil {
833- return nil , fmt .Errorf ("unable to convert to Authentication: %w" , err )
834- }
835- ret , err := applyoperatorv1 .ExtractAuthentication (castObj , fieldManager )
836- if err != nil {
837- return nil , fmt .Errorf ("unable to extract fields for %q: %w" , fieldManager , err )
838- }
839- if ret .Spec == nil {
840- return nil , nil
841- }
842- return & ret .Spec .OperatorSpecApplyConfiguration , nil
843- }
844-
845- func extractOperatorStatus (obj * unstructured.Unstructured , fieldManager string ) (* applyoperatorv1.OperatorStatusApplyConfiguration , error ) {
846- castObj := & operatorv1.Authentication {}
847- if err := runtime .DefaultUnstructuredConverter .FromUnstructured (obj .Object , castObj ); err != nil {
848- return nil , fmt .Errorf ("unable to convert to Authentication: %w" , err )
849- }
850- ret , err := applyoperatorv1 .ExtractAuthenticationStatus (castObj , fieldManager )
851- if err != nil {
852- return nil , fmt .Errorf ("unable to extract fields for %q: %w" , fieldManager , err )
853- }
854-
855- if ret .Status == nil {
856- return nil , nil
857- }
858- return & ret .Status .OperatorStatusApplyConfiguration , nil
859- }
860-
861827func oidcAvailable (authConfigChecker common.AuthConfigChecker ) bool {
862828 oidcAvailable , err := authConfigChecker .OIDCAvailable ()
863829 if err != nil {
0 commit comments