nicolaferraro commented on a change in pull request #1478:
URL: https://github.com/apache/camel-k/pull/1478#discussion_r433171169
##########
File path: pkg/trait/prometheus.go
##########
@@ -121,10 +121,13 @@ func (t *prometheusTrait) Apply(e *Environment) (err
error) {
options := []string{strconv.Itoa(t.Port),
path.Join(prometheusJmxExporterConfigMountPath,
prometheusJmxExporterConfigFileName)}
container.Args = append(container.Args,
"-javaagent:dependencies/io.prometheus.jmx.jmx_prometheus_javaagent-0.3.1.jar="+strings.Join(options,
":"))
- // Add the container port
- containerPort := t.getContainerPort()
- container.Ports = append(container.Ports, *containerPort)
- condition.Message = fmt.Sprintf("%s(%s/%d)", container.Name,
containerPort.Name, containerPort.ContainerPort)
+ // Skip declaring the Prometheus port when Knative is enabled,
+ // as only one container port is supported.
+ if e.DetermineProfile() != v1.TraitProfileKnative {
Review comment:
Not sure about this. Knative profile means that knative is present in
the cluster, while the integration is not automatically exposed as Knative
service (e.g. think to timer to log). Should we check the actual controller
type?
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]