Skip to content

Commit

Permalink
chore: renames IngressGatewaySpec type to GatewaySpec
Browse files Browse the repository at this point in the history
Original name is confusing as it does not actually define anything
related to the ingress. It is configuring Istio Gateway resource which
is, in case of Model Serving, attached to ingress service.

This change makes the change of the golang type, but not publicly
exposed `ingressGateway` config defined for KServe component.
  • Loading branch information
bartoszmajsak committed Jul 29, 2024
1 parent df92280 commit 3d3e6c9
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 14 deletions.
2 changes: 1 addition & 1 deletion apis/infrastructure/v1/serverless_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,5 @@ type ServingSpec struct {
Name string `json:"name,omitempty"`
// IngressGateway allows to customize some parameters for the Istio Ingress Gateway
// that is bound to KNative-Serving.
IngressGateway IngressGatewaySpec `json:"ingressGateway,omitempty"`
IngressGateway GatewaySpec `json:"ingressGateway,omitempty"`
}
6 changes: 3 additions & 3 deletions apis/infrastructure/v1/servicemesh_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,15 +30,15 @@ type ControlPlaneSpec struct {
MetricsCollection string `json:"metricsCollection,omitempty"`
}

// IngressGatewaySpec represents the configuration of the Ingress Gateways.
type IngressGatewaySpec struct {
// GatewaySpec represents the configuration of the Ingress Gateways.
type GatewaySpec struct {
// Domain specifies the DNS name for intercepting ingress requests coming from
// outside the cluster. Most likely, you will want to use a wildcard name,
// like *.example.com. If not set, the domain of the OpenShift Ingress is used.
// If you choose to generate a certificate, this is the domain used for the certificate request.
Domain string `json:"domain,omitempty"`
// Certificate specifies configuration of the TLS certificate securing communications of
// the for Ingress Gateway.
// the for gateway.
Certificate CertificateSpec `json:"certificate,omitempty"`
}

Expand Down
8 changes: 4 additions & 4 deletions apis/infrastructure/v1/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,7 @@ spec:
certificate:
description: Certificate specifies configuration of
the TLS certificate securing communications of the
for Ingress Gateway.
for gateway.
properties:
secretName:
description: SecretName specifies the name of
Expand Down
2 changes: 1 addition & 1 deletion tests/e2e/dsc_creation_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -348,7 +348,7 @@ func (tc *testContext) validateDSC() error {
expServingSpec := infrav1.ServingSpec{
ManagementState: operatorv1.Managed,
Name: "knative-serving",
IngressGateway: infrav1.IngressGatewaySpec{
IngressGateway: infrav1.GatewaySpec{
Certificate: infrav1.CertificateSpec{
Type: infrav1.OpenshiftDefaultIngress,
},
Expand Down
8 changes: 4 additions & 4 deletions tests/integration/features/serverless_feature_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ var _ = Describe("Serverless feature", func() {
It("should set default value when value is empty in the DSCI", func(ctx context.Context) {
// given
serving := infrav1.ServingSpec{
IngressGateway: infrav1.IngressGatewaySpec{
IngressGateway: infrav1.GatewaySpec{
Certificate: infrav1.CertificateSpec{
SecretName: "",
},
Expand All @@ -199,7 +199,7 @@ var _ = Describe("Serverless feature", func() {
It("should use user value when set in the DSCI", func(ctx context.Context) {
// given
serving := infrav1.ServingSpec{
IngressGateway: infrav1.IngressGatewaySpec{
IngressGateway: infrav1.GatewaySpec{
Certificate: infrav1.CertificateSpec{
SecretName: "top-secret-service",
},
Expand All @@ -224,7 +224,7 @@ var _ = Describe("Serverless feature", func() {
Expect(envTestClient.Create(ctx, osIngressResource)).To(Succeed())

serving := infrav1.ServingSpec{
IngressGateway: infrav1.IngressGatewaySpec{
IngressGateway: infrav1.GatewaySpec{
Domain: "",
},
}
Expand All @@ -240,7 +240,7 @@ var _ = Describe("Serverless feature", func() {
It("should use user value when set in the DSCI", func(ctx context.Context) {
// given
serving := infrav1.ServingSpec{
IngressGateway: infrav1.IngressGatewaySpec{
IngressGateway: infrav1.GatewaySpec{
Domain: fixtures.TestDomainFooCom,
},
}
Expand Down

0 comments on commit 3d3e6c9

Please sign in to comment.