Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added Ports to NodePort service-types in knative-serving #1541

Merged
merged 5 commits into from
Aug 28, 2023
Merged

Added Ports to NodePort service-types in knative-serving #1541

merged 5 commits into from
Aug 28, 2023

Conversation

eBeyond
Copy link
Contributor

@eBeyond eBeyond commented Aug 17, 2023

/lint

Fixes #1523

Proposed Changes

For the ServiceType NodePort it's now possible to add http-port and https-port. So the NodePorts of the service can be specified in the case that the standard isn't suitable.
Release Note

Added http-port and https-port for the ServiceType NodePort  (kourier config)

@linux-foundation-easycla
Copy link

linux-foundation-easycla bot commented Aug 17, 2023

CLA Signed

The committers listed above are authorized under a signed CLA.

@knative-prow
Copy link

knative-prow bot commented Aug 17, 2023

Welcome @eBeyond! It looks like this is your first PR to knative/operator 🎉

@knative-prow knative-prow bot requested review from houshengbo and matzew August 17, 2023 13:45
@knative-prow knative-prow bot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Aug 17, 2023
@knative-prow
Copy link

knative-prow bot commented Aug 17, 2023

Hi @eBeyond. Thanks for your PR.

I'm waiting for a knative member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

Copy link

@knative-prow knative-prow bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@eBeyond: 6 warnings.

In response to this:

/lint

Fixes #1523

Proposed Changes

For the ServiceType NodePort it's now possible to add http-port and https-port. So the NodePorts of the service can be specified in the case that the standard isn't suitable.
Release Note

Added http-port and https-port for the ServiceType NodePort  (kourier config)

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

HttpPort int32 `json:"http-port,omitempty"`

// HttpsPort specifies the port used in case of ServiceType = "NodePort" for https (encrypted) traffic
HttpsPort int32 `json:"https-port,omitempty"`
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Golint naming: struct field HttpsPort should be HTTPSPort. More info.

@@ -41,6 +41,12 @@ type KourierIngressConfiguration struct {
// ServiceType specifies the service type for kourier gateway.
ServiceType v1.ServiceType `json:"service-type,omitempty"`

// HttpPort specifies the port used in case of ServiceType = "NodePort" for http traffic
HttpPort int32 `json:"http-port,omitempty"`
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Golint naming: struct field HttpPort should be HTTPPort. More info.

verifyBootstrapVolumeName(t, &u, tt.expConfigMapName)
}
})
}
}

func verifyGatewayServiceTypeNodePortHttp(t *testing.T, u *unstructured.Unstructured, expHttpPort int32) {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Golint naming: func parameter expHttpPort should be expHTTPPort. More info.

}
}

func verifyGatewayServiceTypeNodePortHttps(t *testing.T, u *unstructured.Unstructured, expHttpsPort int32) {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Golint naming: func parameter expHttpsPort should be expHTTPSPort. More info.

expNamespace string
expServiceType string
expConfigMapName string
expNodePortsHttp int32
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Golint naming: struct field expNodePortsHttp should be expNodePortsHTTP. More info.

expServiceType string
expConfigMapName string
expNodePortsHttp int32
expNodePortsHttps int32
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Golint naming: struct field expNodePortsHttps should be expNodePortsHTTPS. More info.

@houshengbo houshengbo removed the needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. label Aug 18, 2023
@houshengbo
Copy link
Contributor

/ok-to-test

@knative-prow knative-prow bot added the ok-to-test Indicates a non-member PR verified by an org member that is safe to test. label Aug 18, 2023
@codecov
Copy link

codecov bot commented Aug 18, 2023

Codecov Report

Patch coverage: 100.00% and project coverage change: +0.14% 🎉

Comparison is base (ce3949f) 79.10% compared to head (ed34fab) 79.25%.
Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1541      +/-   ##
==========================================
+ Coverage   79.10%   79.25%   +0.14%     
==========================================
  Files          40       40              
  Lines        1809     1822      +13     
==========================================
+ Hits         1431     1444      +13     
  Misses        275      275              
  Partials      103      103              
Files Changed Coverage Δ
pkg/reconciler/knativeserving/ingress/kourier.go 79.06% <100.00%> (+3.72%) ⬆️

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@houshengbo
Copy link
Contributor

@eBeyond Plz fix all Golint naming issues.
You need to change the CRD as well, in order to add the fields.

@eBeyond
Copy link
Contributor Author

eBeyond commented Aug 24, 2023

Changed the Http/Https to HTTP/HTTPS as requested by the linter.
Added the fields to the CRD

@houshengbo
Copy link
Contributor

/test eventing-upgrade-tests

Copy link
Contributor

@houshengbo houshengbo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm
/approve

@knative-prow knative-prow bot added the lgtm Indicates that a PR is ready to be merged. label Aug 28, 2023
@knative-prow
Copy link

knative-prow bot commented Aug 28, 2023

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: eBeyond, houshengbo

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@knative-prow knative-prow bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Aug 28, 2023
@knative-prow knative-prow bot merged commit c4e2316 into knative:main Aug 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. lgtm Indicates that a PR is ready to be merged. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

The external Ports in kourier should be configurable. (change port/disable external ports)
2 participants