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

Set the IntegrationConditionServiceNotAvailableReason only when the service trait is disabled #1149

Closed
aldettinger opened this issue Dec 16, 2019 · 2 comments
Milestone

Comments

@aldettinger
Copy link
Contributor

aldettinger commented Dec 16, 2019

In the context of #1142, the TestApplyPrometheusTraitWithServiceDoesNotSucceed test shows that the IntegrationConditionServiceNotAvailableReason could be set while the service trait is enabled.

@lburgazzoli
Copy link
Contributor

Not sure about that as the reason is also used to signal errors or other conditions for which the service cannot be enabled, see

if t.Auto == nil || *t.Auto {
sources, err := kubernetes.ResolveIntegrationSources(t.ctx, t.client, e.Integration, e.Resources)
if err != nil {
e.Integration.Status.SetCondition(
v1.IntegrationConditionServiceAvailable,
corev1.ConditionFalse,
v1.IntegrationConditionServiceNotAvailableReason,
err.Error(),
)
return false, err
}
meta := metadata.ExtractAll(e.CamelCatalog, sources)
if !meta.RequiresHTTPService {
e.Integration.Status.SetCondition(
v1.IntegrationConditionServiceAvailable,
corev1.ConditionFalse,
v1.IntegrationConditionServiceNotAvailableReason,
"no http service required",
)
return false, nil
}
}

@aldettinger
Copy link
Contributor Author

Indeed, we could imagine that the aborted service trait configuration cases mentioned above would not be covered then. Stepping back a bit, it looks that the implicit assumption that only the service trait is creating the service is respected at this stage. So I'm gonna close this issue, feel free to re-open if I missed something.

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

No branches or pull requests

3 participants