NETOBSERV-2174: check if LokiStack exists#1257
Conversation
|
@jotak: This pull request references NETOBSERV-2174 which is a valid jira issue. Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the bug to target the "4.19.0" version, but no target version was set. DetailsIn response to this:
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 openshift-eng/jira-lifecycle-plugin repository. |
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
New images:
They will expire after two weeks. To deploy this build: # Direct deployment, from operator repo
IMAGE=quay.io/netobserv/network-observability-operator:c693e20 make deploy
# Or using operator-sdk
operator-sdk run bundle quay.io/netobserv/network-observability-operator-bundle:v0.0.0-c693e20Or as a Catalog Source: apiVersion: operators.coreos.com/v1alpha1
kind: CatalogSource
metadata:
name: netobserv-dev
namespace: openshift-marketplace
spec:
sourceType: grpc
image: quay.io/netobserv/network-observability-operator-catalog:v0.0.0-c693e20
displayName: NetObserv development catalog
publisher: Me
updateStrategy:
registryPoll:
interval: 1m |
|
@jotak: This pull request references NETOBSERV-2174 which is a valid jira issue. Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the bug to target the "4.19.0" version, but no target version was set. DetailsIn response to this:
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 openshift-eng/jira-lifecycle-plugin repository. |
|
@jotak: This pull request references NETOBSERV-2174 which is a valid jira issue. Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the bug to target the "4.19.0" version, but no target version was set. DetailsIn response to this:
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 openshift-eng/jira-lifecycle-plugin repository. |
|
/ok-to-test |
|
New images:
They will expire after two weeks. To deploy this build: # Direct deployment, from operator repo
IMAGE=quay.io/netobserv/network-observability-operator:6c5ceff make deploy
# Or using operator-sdk
operator-sdk run bundle quay.io/netobserv/network-observability-operator-bundle:v0.0.0-6c5ceffOr as a Catalog Source: apiVersion: operators.coreos.com/v1alpha1
kind: CatalogSource
metadata:
name: netobserv-dev
namespace: openshift-marketplace
spec:
sourceType: grpc
image: quay.io/netobserv/network-observability-operator-catalog:v0.0.0-6c5ceff
displayName: NetObserv development catalog
publisher: Me
updateStrategy:
registryPoll:
interval: 1m |
|
New images:
They will expire after two weeks. To deploy this build: # Direct deployment, from operator repo
IMAGE=quay.io/netobserv/network-observability-operator:84bcb28 make deploy
# Or using operator-sdk
operator-sdk run bundle quay.io/netobserv/network-observability-operator-bundle:v0.0.0-84bcb28Or as a Catalog Source: apiVersion: operators.coreos.com/v1alpha1
kind: CatalogSource
metadata:
name: netobserv-dev
namespace: openshift-marketplace
spec:
sourceType: grpc
image: quay.io/netobserv/network-observability-operator-catalog:v0.0.0-84bcb28
displayName: NetObserv development catalog
publisher: Me
updateStrategy:
registryPoll:
interval: 1m |
|
New images:
They will expire after two weeks. To deploy this build: # Direct deployment, from operator repo
IMAGE=quay.io/netobserv/network-observability-operator:2993123 make deploy
# Or using operator-sdk
operator-sdk run bundle quay.io/netobserv/network-observability-operator-bundle:v0.0.0-2993123Or as a Catalog Source: apiVersion: operators.coreos.com/v1alpha1
kind: CatalogSource
metadata:
name: netobserv-dev
namespace: openshift-marketplace
spec:
sourceType: grpc
image: quay.io/netobserv/network-observability-operator-catalog:v0.0.0-2993123
displayName: NetObserv development catalog
publisher: Me
updateStrategy:
registryPoll:
interval: 1m |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1257 +/- ##
==========================================
- Coverage 62.70% 62.65% -0.06%
==========================================
Files 76 76
Lines 11551 11599 +48
==========================================
+ Hits 7243 7267 +24
- Misses 3845 3868 +23
- Partials 463 464 +1
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
|
/label qe-approved |
|
@jotak: This pull request references NETOBSERV-2174 which is a valid jira issue. Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the bug to target the "4.19.0" version, but no target version was set. DetailsIn response to this:
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 openshift-eng/jira-lifecycle-plugin repository. |
| if !helper.UseLoki(&fc.Spec) { | ||
| return metav1.Condition{ | ||
| Type: LokiIssue, | ||
| Reason: "Unused", | ||
| Status: metav1.ConditionUnknown, | ||
| Message: "Loki is disabled", | ||
| } | ||
| } | ||
| if fc.Spec.Loki.Mode != flowslatest.LokiModeLokiStack { | ||
| return metav1.Condition{ | ||
| Type: LokiIssue, | ||
| Reason: "Unused", | ||
| Status: metav1.ConditionUnknown, | ||
| Message: "Loki is not configured in LokiStack mode", | ||
| } | ||
| } |
There was a problem hiding this comment.
How does that reports in the conditions ? 🤔
LokiIssue - Unused - Unknown - Loki is disabled
LokiIssue - Unused - Unknown - Loki is not configured in LokiStack
Maybe we could rename LokiIssue to Loki to report all the states as these are not issues.
There was a problem hiding this comment.
I don't think because what matters here is that it's a condition that needs to be either TRUE or FALSE (or UNKNOWN). Just "Loki" being true or false doesn't make sense, whereas having LokiIssue true or false does make sense.
When the condition is true, users see in the Console "LokiIssue" so they know there's something to check. If it was just "Loki", that would be unclear. When the condition is false, LokiIssue isn't displayed in the condensed status view, so that's fine
There was a problem hiding this comment.
See my previous PR #1255 that was precisely about making conditions being "negative" so that they render better in the console
| return metav1.Condition{ | ||
| Type: LokiIssue, | ||
| Reason: "NoIssue", | ||
| Status: metav1.ConditionFalse, | ||
| } |
There was a problem hiding this comment.
Why not going one step further here checking LokiStack status and mode ?
There was a problem hiding this comment.
sounds good!
=> https://issues.redhat.com/browse/NETOBSERV-2189

Description
If configured LokiStack doesn't exist, it will be reported as a FlowCollector status condition.
Dependencies
PR is based on #1255 and #1258
Checklist
If you are not familiar with our processes or don't know what to answer in the list below, let us know in a comment: the maintainers will take care of that.