-
Notifications
You must be signed in to change notification settings - Fork 706
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
Add operator resources to the application list #1591
Conversation
dashboard/src/actions/operators.ts
Outdated
return async dispatch => { | ||
dispatch(requestCSVs()); | ||
try { | ||
const csvs = await Operators.getCSVs(namespace); | ||
const sortedCSVs = csvs.sort((o1, o2) => (o1.metadata.name > o2.metadata.name ? 1 : -1)); | ||
dispatch(receiveCSVs(sortedCSVs)); | ||
return csvs; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't this be returning sortedCSVs
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
right, in this case is not relevant but yes, we can use sortedCSVs
dashboard/src/actions/operators.ts
Outdated
const name = parsedCRD[0]; | ||
const group = parsedCRD.slice(1).join("."); | ||
try { | ||
const resourceGroup = await Kube.getAPIGroup(group); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That is unexpected, that the extra request is required (you'd think the resource group would be available on the csv, but shrug)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes, it was a bit frustrating when I realized that info is missing from the CSV...
wait, double checking, there is actually a version
field that can be used as groupVersion 🤦♂️
icon={icon} | ||
info={`${resource.kind} v${csv?.spec.version || "-"}`} | ||
tag1Content={resource.metadata.namespace} | ||
tag2Content="operator" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I noticed in the screenshot, that we have this "operator" tag for operators, but none for charts. Wondering if rather than adding a tag, we could/should differentiate some other way. Not sure how though - the tag is fine for now.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes, for the moment this tag is used for the charts to specify the status of the release (deployed/failed/...) but we need a better way of differentiating between charts or operators
Description of the change
Include the Operator instances in the Application list view:
In order to obtain the resources of a namespace:
3. Since the apiVersion of the CR is not included in the CSV, we need to obtain that information querying the K8s API for the CR APIGroup.Applicable issues