Added support for Gateway API v1beta1

Signed-off-by: Christoph Grotz <grotz@google.com>
This commit is contained in:
Christoph Grotz
2022-11-22 15:51:16 +01:00
parent 82ff90ce26
commit e015a409fe
34 changed files with 3810 additions and 19 deletions
+2 -2
View File
@@ -20,7 +20,7 @@ import (
"fmt"
"time"
"github.com/fluxcd/flagger/pkg/apis/gatewayapi/v1alpha2"
"github.com/fluxcd/flagger/pkg/apis/gatewayapi/v1beta1"
istiov1alpha3 "github.com/fluxcd/flagger/pkg/apis/istio/v1alpha3"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/util/intstr"
@@ -148,7 +148,7 @@ type CanaryService struct {
// Gateways that the HTTPRoute needs to attach itself to.
// Must be specified while using the Gateway API as a provider.
// +optional
GatewayRefs []v1alpha2.ParentReference `json:"gatewayRefs,omitempty"`
GatewayRefs []v1beta1.ParentReference `json:"gatewayRefs,omitempty"`
// Hosts attached to the generated Istio virtual service or Gateway API HTTPRoute.
// Defaults to the service name
@@ -22,7 +22,7 @@ limitations under the License.
package v1beta1
import (
v1alpha2 "github.com/fluxcd/flagger/pkg/apis/gatewayapi/v1alpha2"
gatewayapiv1beta1 "github.com/fluxcd/flagger/pkg/apis/gatewayapi/v1beta1"
v1alpha3 "github.com/fluxcd/flagger/pkg/apis/istio/v1alpha3"
v1 "k8s.io/api/core/v1"
runtime "k8s.io/apimachinery/pkg/runtime"
@@ -369,7 +369,7 @@ func (in *CanaryService) DeepCopyInto(out *CanaryService) {
}
if in.GatewayRefs != nil {
in, out := &in.GatewayRefs, &out.GatewayRefs
*out = make([]v1alpha2.ParentReference, len(*in))
*out = make([]gatewayapiv1beta1.ParentReference, len(*in))
for i := range *in {
(*in)[i].DeepCopyInto(&(*out)[i])
}