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

Fix: allow different service and container port #6477

Merged
merged 1 commit into from
Mar 15, 2024

Conversation

Kolossi
Copy link
Contributor

@Kolossi Kolossi commented Mar 13, 2024

Description of your changes

copilot:all

This PR allows specifying a different port and containerPort to be used by the service created by a webservice component.

It also allows the gateway trait to use an existing service (in the usecase, the one created by the webservice) rather than creating one.

I have:

  • Read and followed KubeVela's contribution process.
  • Related Docs updated properly. In a new feature or configuration option, an update to the documentation is necessary.
  • Run make reviewable to ensure this PR is ready for review.
  • Added backport release-x.y labels to auto-backport this PR if necessary.

How has this code been tested

I've used this locally, and have taken care that this is a non-breaking change is new properties are not used.

Special notes for your reviewer

An example usecase is a dotnet workload in the webservice container where dotnet serves on port 5000, but the service is to be exposed for port 80 requests. Currently there is no way to achieve this with the standard component/traits.

Copy link

codecov bot commented Mar 13, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 65.56%. Comparing base (1a001e5) to head (a1bb051).

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #6477      +/-   ##
==========================================
+ Coverage   65.54%   65.56%   +0.02%     
==========================================
  Files         183      183              
  Lines       23891    23891              
==========================================
+ Hits        15659    15665       +6     
+ Misses       6648     6645       -3     
+ Partials     1584     1581       -3     
Flag Coverage Δ
core-unittests 55.36% <ø> (+0.04%) ⬆️
e2e-multicluster-test 31.12% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

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

Signed-off-by: kolossi <github@kolossi.co.uk>
@Kolossi Kolossi force-pushed the containerport_optionalservice branch from 973711c to a1bb051 Compare March 14, 2024 19:35
@wonderflow wonderflow merged commit 4e16b04 into kubevela:master Mar 15, 2024
22 of 23 checks passed
@Kolossi Kolossi deleted the containerport_optionalservice branch March 15, 2024 21:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants