cf_get_events icon indicating copy to clipboard operation
cf_get_events copied to clipboard

Filtered reports by labels

Open npintaux opened this issue 5 years ago • 1 comments

Having separate foundations for dev/test and prod is a general recommendations. Yet, there are sometimes some dependencies that make it difficult to have iso-functional environments. Some customers do therefore deploy some test applications in production before deploying them as genuine "production" workloads.

The BCR tool should be able to highlight workloads that are considered as "genuine" production workloads vs. the ones that are used for test purposes only.

Proposal: use the PAS "labels" feature to tag Spaces as "Prod" (label should be configurable). An org should be able to contain several Spaces labeled as "Prod". BCR tool should report on AIs deployed in spaces labeled "Prod" only, as well as a full report for all AIs deployed in a given foundation.

cf bcr --monthly --ai --si --label="Prod"

npintaux avatar Jun 11 '19 15:06 npintaux

That is a very good use case.

cf bcr --monthly will ignore label as the PCF usage service that creates monthly aggregation has no label awareness

The label would thus only work for the "then current" reporting with cf bcr --monthly --ai --si --label="Prod" and include only the Prod Spaces

I am thinking about a `--includeSpace=" and also an "--excludeSpace" so that

  • you can also have both reports
  • the option can later evolve for Org level space if someone else wants Label at that level

Else we would need to decide if an Org level label would take precedence above Space level label ie what do you expect from myOrg // Prod Space A // no label Space B // Prod and from myOrg // Dev Space A // Prod Space B // no label

alexvasseur avatar Jun 13 '19 16:06 alexvasseur