Code Monkey home page Code Monkey logo

Comments (16)

rhuss avatar rhuss commented on May 28, 2024

Currently this is hard coded, but ideally we would expect the application.properties for and the spring boot dependencies for the targetPort.

The service port is also hard coded to be == targetPort, but I agree that probably doesnt make much sense. Guess we can go for 80 (or make some simple heuristic mappings like '8080' --> '80', '8443' --> '443' etc.).

from fabric8-maven-plugin.

jstrachan avatar jstrachan commented on May 28, 2024

agreed. I like the idea of the defaults being something like '8080' --> '80', '8443' --> '443'

from fabric8-maven-plugin.

jimmidyson avatar jimmidyson commented on May 28, 2024

👍 to 80/443 mappings. Important for simple, clean URLs.

from fabric8-maven-plugin.

rhuss avatar rhuss commented on May 28, 2024

i'll take that. The idea is to have a static default mapping like

8080 -> 80
8081 -> 80
8181 -> 80
8443 -> 443
....

This would be used if a port is autodetected via a Enricher as an Docker image exposed port and used when it creates a default service. To override this the user then can either add a service definition directly so that no default service gets created or uses a configuration for the enricher when creating the default object:

<customizer>
   <default.service.port.8080>81</default.service.port>
</customizer>

The hope is, that the amount of configuration for Enrichers (those who either create k8s default resources or enrich labels and annotations) and Customizers (those who auto-create images based on detected maven dependencies) is kept small.

Anything more complicated should go either in the plugin configuration (which has an XML schema) or into external Docker and YAML files (the alternative way to configure stuff).

from fabric8-maven-plugin.

jstrachan avatar jstrachan commented on May 28, 2024

BTW I think I fixed this for 80/8080 - but didn't add the configurable mapping file

from fabric8-maven-plugin.

stale avatar stale commented on May 28, 2024

This issue has been automatically marked as stale because it has not had any activity since 90 days. It will be closed if no further activity occurs within 7 days. Thank you for your contributions!

from fabric8-maven-plugin.

rhuss avatar rhuss commented on May 28, 2024

I still think that might be a valuable addition. I.e. to tune the default service enricher that it kind of normalizes the access to the pods behind to well known and accepted ports.

from fabric8-maven-plugin.

stale avatar stale commented on May 28, 2024

This issue has been automatically marked as stale because it has not had any activity since 90 days. It will be closed if no further activity occurs within 7 days. Thank you for your contributions!

from fabric8-maven-plugin.

stale avatar stale commented on May 28, 2024

This issue has been automatically marked as stale because it has not had any activity since 90 days. It will be closed if no further activity occurs within 7 days. Thank you for your contributions!

from fabric8-maven-plugin.

rhuss avatar rhuss commented on May 28, 2024

@rohanKanojia @dev-gaur Anything you like to pick up ? Should be a quick win and helpful for edge cases.

from fabric8-maven-plugin.

devang-gaur avatar devang-gaur commented on May 28, 2024

@rhuss On it

from fabric8-maven-plugin.

devang-gaur avatar devang-gaur commented on May 28, 2024

@rhuss what if the user doesn't want to normalize their port mappings on purpose ?

from fabric8-maven-plugin.

devang-gaur avatar devang-gaur commented on May 28, 2024

Should I add a normalizePorts property for xml configuration ?

from fabric8-maven-plugin.

devang-gaur avatar devang-gaur commented on May 28, 2024

@rohanKanojia @lordofthejars thoughts ?

from fabric8-maven-plugin.

rhuss avatar rhuss commented on May 28, 2024

@rhuss what if the user doesn't want to normalize their port mappings on purpose ?

I think then he should configure the port mappings explicitly and don't use the enricher.

from fabric8-maven-plugin.

rhuss avatar rhuss commented on May 28, 2024

in general, enricher should carry as little configuration as needed, delegating for more advanced configuration options to XML/fragments. Enrichers are expressing our opinionated way to do things, a single enricher not a swiss army knife.

from fabric8-maven-plugin.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.