@@ -613,59 +613,7 @@ func (k *K8sClient) GetHTTPRoute(namespace, name string) (map[string]interface{}
613613 return obj .Object , nil
614614}
615615
616- // AIGatewayRoute CRUD operations
617- func (k * K8sClient ) CreateAIGatewayRoute (namespace string , route map [string ]interface {}) error {
618- ctx := context .Background ()
619-
620- // Convert to unstructured
621- obj := & unstructured.Unstructured {
622- Object : route ,
623- }
624- obj .SetGroupVersionKind (AIGatewayRouteGVR .GroupVersion ().WithKind ("AIGatewayRoute" ))
625-
626- // Create the AIGatewayRoute
627- _ , err := k .dynamicClient .Resource (AIGatewayRouteGVR ).Namespace (namespace ).Create (ctx , obj , metav1.CreateOptions {})
628- if err != nil {
629- k .logError ("CreateAIGatewayRoute" , err )
630- return fmt .Errorf ("failed to create AIGatewayRoute: %w" , err )
631- }
632-
633- return nil
634- }
635-
636- func (k * K8sClient ) UpdateAIGatewayRoute (namespace , name string , route map [string ]interface {}) error {
637- ctx := context .Background ()
638-
639- // Convert to unstructured
640- obj := & unstructured.Unstructured {
641- Object : route ,
642- }
643- obj .SetGroupVersionKind (AIGatewayRouteGVR .GroupVersion ().WithKind ("AIGatewayRoute" ))
644- obj .SetName (name )
645- obj .SetNamespace (namespace )
646-
647- // Update the AIGatewayRoute
648- _ , err := k .dynamicClient .Resource (AIGatewayRouteGVR ).Namespace (namespace ).Update (ctx , obj , metav1.UpdateOptions {})
649- if err != nil {
650- k .logError ("UpdateAIGatewayRoute" , err )
651- return fmt .Errorf ("failed to update AIGatewayRoute: %w" , err )
652- }
653-
654- return nil
655- }
656-
657- func (k * K8sClient ) DeleteAIGatewayRoute (namespace , name string ) error {
658- ctx := context .Background ()
659-
660- // Delete the AIGatewayRoute
661- err := k .dynamicClient .Resource (AIGatewayRouteGVR ).Namespace (namespace ).Delete (ctx , name , metav1.DeleteOptions {})
662- if err != nil {
663- k .logError ("DeleteAIGatewayRoute" , err )
664- return fmt .Errorf ("failed to delete AIGatewayRoute: %w" , err )
665- }
666-
667- return nil
668- }
616+ // Removed duplicate AIGatewayRoute CRUD operations - using comprehensive versions later in file
669617
670618func (k * K8sClient ) GetAIGatewayRoute (namespace , name string ) (map [string ]interface {}, error ) {
671619 ctx := context .Background ()
@@ -680,59 +628,7 @@ func (k *K8sClient) GetAIGatewayRoute(namespace, name string) (map[string]interf
680628 return obj .Object , nil
681629}
682630
683- // BackendTrafficPolicy CRUD operations
684- func (k * K8sClient ) CreateBackendTrafficPolicy (namespace string , policy map [string ]interface {}) error {
685- ctx := context .Background ()
686-
687- // Convert to unstructured
688- obj := & unstructured.Unstructured {
689- Object : policy ,
690- }
691- obj .SetGroupVersionKind (BackendTrafficPolicyGVR .GroupVersion ().WithKind ("BackendTrafficPolicy" ))
692-
693- // Create the BackendTrafficPolicy
694- _ , err := k .dynamicClient .Resource (BackendTrafficPolicyGVR ).Namespace (namespace ).Create (ctx , obj , metav1.CreateOptions {})
695- if err != nil {
696- k .logError ("CreateBackendTrafficPolicy" , err )
697- return fmt .Errorf ("failed to create BackendTrafficPolicy: %w" , err )
698- }
699-
700- return nil
701- }
702-
703- func (k * K8sClient ) UpdateBackendTrafficPolicy (namespace , name string , policy map [string ]interface {}) error {
704- ctx := context .Background ()
705-
706- // Convert to unstructured
707- obj := & unstructured.Unstructured {
708- Object : policy ,
709- }
710- obj .SetGroupVersionKind (BackendTrafficPolicyGVR .GroupVersion ().WithKind ("BackendTrafficPolicy" ))
711- obj .SetName (name )
712- obj .SetNamespace (namespace )
713-
714- // Update the BackendTrafficPolicy
715- _ , err := k .dynamicClient .Resource (BackendTrafficPolicyGVR ).Namespace (namespace ).Update (ctx , obj , metav1.UpdateOptions {})
716- if err != nil {
717- k .logError ("UpdateBackendTrafficPolicy" , err )
718- return fmt .Errorf ("failed to update BackendTrafficPolicy: %w" , err )
719- }
720-
721- return nil
722- }
723-
724- func (k * K8sClient ) DeleteBackendTrafficPolicy (namespace , name string ) error {
725- ctx := context .Background ()
726-
727- // Delete the BackendTrafficPolicy
728- err := k .dynamicClient .Resource (BackendTrafficPolicyGVR ).Namespace (namespace ).Delete (ctx , name , metav1.DeleteOptions {})
729- if err != nil {
730- k .logError ("DeleteBackendTrafficPolicy" , err )
731- return fmt .Errorf ("failed to delete BackendTrafficPolicy: %w" , err )
732- }
733-
734- return nil
735- }
631+ // Removed duplicate BackendTrafficPolicy CRUD operations - using comprehensive versions later in file
736632
737633func (k * K8sClient ) GetBackendTrafficPolicy (namespace , name string ) (map [string ]interface {}, error ) {
738634 ctx := context .Background ()
0 commit comments