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 7cfbae0
Show file tree
Hide file tree
Showing 7 changed files with 29 additions and 30 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"`
}
12 changes: 6 additions & 6 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 {
// 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.
// GatewaySpec represents the configuration of the Ingress Gateways.
type GatewaySpec struct {
// Domain specifies the host name for intercepting incoming requests
// 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 All @@ -272,13 +272,12 @@ spec:
type: string
type: object
domain:
description: 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.
description: Domain specifies the host name for intercepting
incoming requests 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.
type: string
type: object
managementState:
Expand Down
12 changes: 6 additions & 6 deletions docs/api-overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -373,7 +373,7 @@ an Istio Gateway.


_Appears in:_
- [IngressGatewaySpec](#ingressgatewayspec)
- [GatewaySpec](#gatewayspec)

| Field | Description | Default | Validation |
| --- | --- | --- | --- |
Expand Down Expand Up @@ -483,11 +483,11 @@ _Appears in:_
| `release` _[Release](#release)_ | Version and release type | | |


#### IngressGatewaySpec
#### GatewaySpec



IngressGatewaySpec represents the configuration of the Ingress Gateways.
GatewaySpec represents the configuration of the Ingress Gateways.



Expand All @@ -496,8 +496,8 @@ _Appears in:_

| Field | Description | Default | Validation |
| --- | --- | --- | --- |
| `domain` _string_ | Domain specifies the DNS name for intercepting ingress requests coming from<br />outside the cluster. Most likely, you will want to use a wildcard name,<br />like *.example.com. If not set, the domain of the OpenShift Ingress is used.<br />If you choose to generate a certificate, this is the domain used for the certificate request. | | |
| `certificate` _[CertificateSpec](#certificatespec)_ | Certificate specifies configuration of the TLS certificate securing communications of<br />the for Ingress Gateway. | | |
| `domain` _string_ | Domain specifies the host name for intercepting incoming requests<br />Most likely, you will want to use a wildcard name, like *.example.com.<br />If not set, the domain of the OpenShift Ingress is used.<br />If you choose to generate a certificate, this is the domain used for the certificate request. | | |
| `certificate` _[CertificateSpec](#certificatespec)_ | Certificate specifies configuration of the TLS certificate securing communications of<br />the for gateway. | | |


#### ServiceMeshSpec
Expand Down Expand Up @@ -534,7 +534,7 @@ _Appears in:_
| --- | --- | --- | --- |
| `managementState` _[ManagementState](#managementstate)_ | | Managed | Enum: [Managed Unmanaged Removed] <br /> |
| `name` _string_ | Name specifies the name of the KNativeServing resource that is going to be<br />created to instruct the KNative Operator to deploy KNative serving components.<br />This resource is created in the "knative-serving" namespace. | knative-serving | |
| `ingressGateway` _[IngressGatewaySpec](#ingressgatewayspec)_ | IngressGateway allows to customize some parameters for the Istio Ingress Gateway<br />that is bound to KNative-Serving. | | |
| `ingressGateway` _[GatewaySpec](#gatewayspec)_ | IngressGateway allows to customize some parameters for the Istio Ingress Gateway<br />that is bound to KNative-Serving. | | |



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 7cfbae0

Please sign in to comment.