[COST-6491] Add ROS namespace queries - #635
Conversation
Reviewer's GuideAdds namespace-level resource optimization (ROS) metric support by defining new Prometheus queries, data structures, and report generation, along with corresponding test updates and Makefile adjustments. Sequence diagram for generating ROS namespace reportssequenceDiagram
participant Operator
participant PrometheusCollector
participant Prometheus
participant FileSystem
Operator->>PrometheusCollector: generateResourceOpimizationReports()
PrometheusCollector->>Prometheus: getQueryResults(rosNamespaceQueries)
Prometheus-->>PrometheusCollector: namespace metrics data
PrometheusCollector->>FileSystem: writeReport(ros-openshift-namespace-<month>.csv)
FileSystem-->>PrometheusCollector: report written
PrometheusCollector-->>Operator: return
Class diagram for new and updated ROS namespace metric typesclassDiagram
class rosNamespaceRow {
+dateTimes
+string Namespace
+string CPURequestSum
+string CPULimitSum
+string CPUUsageAvg
+string CPUUsageMax
+string CPUUsageMin
+string CPUThrottleAvg
+string CPUThrottleMax
+string CPUThrottleMin
+string MemoryRequestSum
+string MemoryLimitSum
+string MemoryUsageAvg
+string MemoryUsageMax
+string MemoryUsageMin
+string MemoryRSSUsageAvg
+string MemoryRSSUsageMax
+string MemoryRSSUsageMin
+string PodsRunningMax
+string PodsRunningAvg
+string PodsTotalMax
+string PodsTotalAvg
+csvHeader() []string
+csvRow() []string
+string() string
}
class resourceOptimizationRow {
+dateTimes
...
}
rosNamespaceRow --|> dateTimes
resourceOptimizationRow --|> dateTimes
Class diagram for new ROS namespace queries variableclassDiagram
class query {
+string Name
+string QueryString
+staticFields MetricKey
+saveQueryValue QueryValue
+[]model.LabelName RowKey
}
class querys {
+[]query
}
querys "1" -- "*" query : contains
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
…into cost-6491-ros-namespace-metrics
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #635 +/- ##
==========================================
+ Coverage 83.16% 83.34% +0.17%
==========================================
Files 16 16
Lines 3065 3152 +87
==========================================
+ Hits 2549 2627 +78
- Misses 431 437 +6
- Partials 85 88 +3
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report in Codecov by Sentry.
🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Hey @djnakabaale - I've reviewed your changes - here's some feedback:
- The rosNamespaceQueries block is extremely repetitive—consider generating the namespace query definitions programmatically or extracting the common logic into a helper to reduce boilerplate.
- generateResourceOpimizationReports now handles both container and namespace reports in one function—splitting it into two dedicated functions would improve readability and maintainability.
- Your tests duplicate the logic for loading namespace query fixtures in multiple places—extract that into a shared helper to keep the test setup DRY.
Prompt for AI Agents
Please address the comments from this code review:
## Overall Comments
- The rosNamespaceQueries block is extremely repetitive—consider generating the namespace query definitions programmatically or extracting the common logic into a helper to reduce boilerplate.
- generateResourceOpimizationReports now handles both container and namespace reports in one function—splitting it into two dedicated functions would improve readability and maintainability.
- Your tests duplicate the logic for loading namespace query fixtures in multiple places—extract that into a shared helper to keep the test setup DRY.
## Individual Comments
### Comment 1
<location> `internal/collector/collector.go:431` </location>
<code_context>
func generateResourceOpimizationReports(log gologr.Logger, c *PrometheusCollector, dirCfg *dirconfig.DirectoryConfig, nodeRows mappedCSVStruct, yearMonth string) error {
ts := c.TimeSeries.End
- log.Info(fmt.Sprintf("querying for resource-optimization for ts: %+v", ts))
</code_context>
<issue_to_address>
Typo in function name: 'generateResourceOpimizationReports' should be 'generateResourceOptimizationReports'.
Please correct the spelling in the function name to maintain consistency and avoid confusion.
Suggested implementation:
```golang
func generateResourceOptimizationReports(log gologr.Logger, c *PrometheusCollector, dirCfg *dirconfig.DirectoryConfig, nodeRows mappedCSVStruct, yearMonth string) error {
```
You must also update all call sites of `generateResourceOpimizationReports` to use the new name `generateResourceOptimizationReports` throughout the codebase.
</issue_to_address>
### Comment 2
<location> `internal/collector/types.go:525` </location>
<code_context>
+ PodsTotalAvg string `mapstructure:"pods-total-namespace-avg"`
+}
+
+func (rosNamespaceRow) csvHeader() []string {
+ return []string{
+ "report_period_start",
</code_context>
<issue_to_address>
Consider replacing the manual csvHeader and csvRow methods with a generic reflection-based approach using struct tags.
You can completely eliminate the hand-rolled `csvHeader`/`csvRow` methods by driving both from your existing `mapstructure` tags + a tiny bit of reflection. This keeps the field order (including your embedded `dateTimes`) and means you only ever list each column once:
```go
// csv.go (new!)
import (
"reflect"
"strings"
)
// buildCSVHeaders returns all non-empty “mapstructure” tags (flattening embedded structs)
func buildCSVHeaders(v interface{}) []string {
t := reflect.TypeOf(v)
if t.Kind() == reflect.Ptr { t = t.Elem() }
var hdr []string
for i := 0; i < t.NumField(); i++ {
f := t.Field(i)
if f.Anonymous && f.Type.Kind() == reflect.Struct {
// recurse into embedded structs
embedded := reflect.New(f.Type).Interface()
hdr = append(hdr, buildCSVHeaders(embedded)...)
continue
}
if tag := f.Tag.Get("mapstructure"); tag != "" {
hdr = append(hdr, tag)
}
}
return hdr
}
// buildCSVRow returns the string values of all fields tagged “mapstructure”
func buildCSVRow(v interface{}) []string {
val := reflect.ValueOf(v)
if val.Kind() == reflect.Ptr { val = val.Elem() }
t := val.Type()
var row []string
for i := 0; i < t.NumField(); i++ {
f := t.Field(i)
fv := val.Field(i)
if f.Anonymous && f.Type.Kind() == reflect.Struct {
row = append(row, buildCSVRow(fv.Interface())...)
continue
}
if f.Tag.Get("mapstructure") != "" {
row = append(row, fv.String())
}
}
return row
}
// stringifyCSV just joins with commas
func stringifyCSV(fields []string) string {
return strings.Join(fields, ",")
}
```
Then your `rosNamespaceRow` becomes just:
```go
type rosNamespaceRow struct {
*dateTimes
Namespace string `mapstructure:"namespace"`
CPURequestSum string `mapstructure:"cpu-request-namespace-sum"`
// … all your other fields with the same tags …
}
func (r rosNamespaceRow) csvHeader() []string { return buildCSVHeaders(r) }
func (r rosNamespaceRow) csvRow() []string { return buildCSVRow(r) }
func (r rosNamespaceRow) string() string { return stringifyCSV(r.csvRow()) }
```
You can apply the same two‐liner to every other `*Row` type and immediately delete 90+ lines of almost-identical slice literals.
</issue_to_address>Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
| PodsTotalAvg string `mapstructure:"pods-total-namespace-avg"` | ||
| } | ||
|
|
||
| func (rosNamespaceRow) csvHeader() []string { |
There was a problem hiding this comment.
issue (complexity): Consider replacing the manual csvHeader and csvRow methods with a generic reflection-based approach using struct tags.
You can completely eliminate the hand-rolled csvHeader/csvRow methods by driving both from your existing mapstructure tags + a tiny bit of reflection. This keeps the field order (including your embedded dateTimes) and means you only ever list each column once:
// csv.go (new!)
import (
"reflect"
"strings"
)
// buildCSVHeaders returns all non-empty “mapstructure” tags (flattening embedded structs)
func buildCSVHeaders(v interface{}) []string {
t := reflect.TypeOf(v)
if t.Kind() == reflect.Ptr { t = t.Elem() }
var hdr []string
for i := 0; i < t.NumField(); i++ {
f := t.Field(i)
if f.Anonymous && f.Type.Kind() == reflect.Struct {
// recurse into embedded structs
embedded := reflect.New(f.Type).Interface()
hdr = append(hdr, buildCSVHeaders(embedded)...)
continue
}
if tag := f.Tag.Get("mapstructure"); tag != "" {
hdr = append(hdr, tag)
}
}
return hdr
}
// buildCSVRow returns the string values of all fields tagged “mapstructure”
func buildCSVRow(v interface{}) []string {
val := reflect.ValueOf(v)
if val.Kind() == reflect.Ptr { val = val.Elem() }
t := val.Type()
var row []string
for i := 0; i < t.NumField(); i++ {
f := t.Field(i)
fv := val.Field(i)
if f.Anonymous && f.Type.Kind() == reflect.Struct {
row = append(row, buildCSVRow(fv.Interface())...)
continue
}
if f.Tag.Get("mapstructure") != "" {
row = append(row, fv.String())
}
}
return row
}
// stringifyCSV just joins with commas
func stringifyCSV(fields []string) string {
return strings.Join(fields, ",")
}Then your rosNamespaceRow becomes just:
type rosNamespaceRow struct {
*dateTimes
Namespace string `mapstructure:"namespace"`
CPURequestSum string `mapstructure:"cpu-request-namespace-sum"`
// … all your other fields with the same tags …
}
func (r rosNamespaceRow) csvHeader() []string { return buildCSVHeaders(r) }
func (r rosNamespaceRow) csvRow() []string { return buildCSVRow(r) }
func (r rosNamespaceRow) string() string { return stringifyCSV(r.csvRow()) }You can apply the same two‐liner to every other *Row type and immediately delete 90+ lines of almost-identical slice literals.
- fix typo in function name - add comment to get-token-and-cert cmd got make help - update local dev docs
b80e319 to
3309e01
Compare
* update whats new in 3.3.0 (#360) * update docs (#363) * fix make downstream (#365) * v3.3.0 bundle (#362) * Bump library/golang from 1.22.3 to 1.22.5 (#372) * Bump github.com/prometheus/common (#369) * Bump docker/build-push-action from 5 to 6 in the ci-dependencies group (#368) * [COST-5183] dont use csvReader.ReadAll to improve memory usage (#370) * update go in go.mod to 1.22 (#373) * Bump the testing-framework group with 2 updates (#374) * Bump github.com/onsi/gomega in the testing-framework group (#375) * Update badges (#384) * update license badge * clean up badges * remove license badge * Bump library/golang from 1.22.5 to 1.22.6 (#385) * update whats new in 3.3.1 (#388) * [COST-5377] update whats new in 3.3.1 * fix typo * make bundle for v3.3.1 (#389) * [COST-5409] Specify correct toolchain version number in go.mod (#394) * [COST-5409] Specify correct toolchain version number in go.mod * use mirco version * definitely use toolchain and not micro version * address non-constant format string in call to fmt.Errorf * Red Hat Konflux update koku-metrics-operator (#402) Signed-off-by: red-hat-konflux <konflux@no-reply.konflux-ci.dev> Co-authored-by: red-hat-konflux <konflux@no-reply.konflux-ci.dev> * [COST-1418] Report fields description (#192) * initial thoughts on report fields description * add link to queries and clean up * add note on label required for ros queries * clean up * add a lil organization * Update docs/report-fields-description.md --------- Co-authored-by: David <davidjnthn@gmail.com> Co-authored-by: Luke Couzens <lcouzens@redhat.com> * Red Hat Konflux purge koku-metrics-operator (#407) Signed-off-by: red-hat-konflux <konflux@no-reply.konflux-ci.dev> Co-authored-by: red-hat-konflux <konflux@no-reply.konflux-ci.dev> * Red Hat Konflux update koku-metrics-operator (#408) Signed-off-by: red-hat-konflux <konflux@no-reply.konflux-ci.dev> Co-authored-by: red-hat-konflux <konflux@no-reply.konflux-ci.dev> * Update Konflux references (#410) Signed-off-by: red-hat-konflux <126015336+red-hat-konflux[bot]@users.noreply.github.com> Co-authored-by: red-hat-konflux[bot] <126015336+red-hat-konflux[bot]@users.noreply.github.com> * Update Konflux references (#411) * Update Konflux references Signed-off-by: red-hat-konflux <126015336+red-hat-konflux[bot]@users.noreply.github.com> * Remove deprecated sbom-json-check --------- Signed-off-by: red-hat-konflux <126015336+red-hat-konflux[bot]@users.noreply.github.com> Co-authored-by: red-hat-konflux[bot] <126015336+red-hat-konflux[bot]@users.noreply.github.com> Co-authored-by: Sam Doran <github@samdoran.com> * Red Hat Konflux purge koku-metrics-operator (#412) Signed-off-by: red-hat-konflux <konflux@no-reply.konflux-ci.dev> Co-authored-by: red-hat-konflux <konflux@no-reply.konflux-ci.dev> * Red Hat Konflux update koku-metrics-operator (#422) Signed-off-by: red-hat-konflux <konflux@no-reply.konflux-ci.dev> Co-authored-by: red-hat-konflux <konflux@no-reply.konflux-ci.dev> * [COST-5381] Konflux: Enable multi-arch builds (#426) * enable multi-arch builds * initially trigger for when all changes * Update Konflux references (#427) Signed-off-by: red-hat-konflux <126015336+red-hat-konflux[bot]@users.noreply.github.com> Co-authored-by: red-hat-konflux[bot] <126015336+red-hat-konflux[bot]@users.noreply.github.com> * Bump the testing-framework group across 1 directory with 2 updates (#416) * Bump the prometheus group across 1 directory with 2 updates (#423) * Update Konflux references (#428) Signed-off-by: red-hat-konflux <126015336+red-hat-konflux[bot]@users.noreply.github.com> Co-authored-by: red-hat-konflux[bot] <126015336+red-hat-konflux[bot]@users.noreply.github.com> * [COST-5382] Konflux - prepare to add operator bundle component (#429) * [COST-5382] Konflux - prepare to add operator bundle component * wait to use konflux built images * update paths to bundle assets in dockerfile remove koku-metrics-operator older bundle copies * Red Hat Konflux update koku-metrics-operator-bundle (#431) Signed-off-by: red-hat-konflux <konflux@no-reply.konflux-ci.dev> Co-authored-by: red-hat-konflux <konflux@no-reply.konflux-ci.dev> * Update Konflux references (#430) Signed-off-by: red-hat-konflux <126015336+red-hat-konflux[bot]@users.noreply.github.com> Co-authored-by: red-hat-konflux[bot] <126015336+red-hat-konflux[bot]@users.noreply.github.com> * Update Konflux references (#435) Signed-off-by: red-hat-konflux <126015336+red-hat-konflux[bot]@users.noreply.github.com> Co-authored-by: red-hat-konflux[bot] <126015336+red-hat-konflux[bot]@users.noreply.github.com> * Update Konflux references (#438) Signed-off-by: red-hat-konflux <126015336+red-hat-konflux[bot]@users.noreply.github.com> Co-authored-by: red-hat-konflux[bot] <126015336+red-hat-konflux[bot]@users.noreply.github.com> * Update pre-commit hook golangci/golangci-lint to v1.61.0 (#437) Signed-off-by: red-hat-konflux <126015336+red-hat-konflux[bot]@users.noreply.github.com> Co-authored-by: red-hat-konflux[bot] <126015336+red-hat-konflux[bot]@users.noreply.github.com> Co-authored-by: David Nakabaale <devotee_rulers.0e@icloud.com> * Update Konflux references (#440) Signed-off-by: red-hat-konflux <126015336+red-hat-konflux[bot]@users.noreply.github.com> Co-authored-by: red-hat-konflux[bot] <126015336+red-hat-konflux[bot]@users.noreply.github.com> * Update Konflux references to e487185 (#441) Signed-off-by: red-hat-konflux <126015336+red-hat-konflux[bot]@users.noreply.github.com> Co-authored-by: red-hat-konflux[bot] <126015336+red-hat-konflux[bot]@users.noreply.github.com> * [COST-5382] konflux: update bundle pipeline and use brew registry (#434) * [COST-5534] Add renovate config (#443) * add renovate config to reduce konflux reference updates * fix typo * Update Konflux references (#442) Signed-off-by: red-hat-konflux <126015336+red-hat-konflux[bot]@users.noreply.github.com> Co-authored-by: red-hat-konflux[bot] <126015336+red-hat-konflux[bot]@users.noreply.github.com> * Update Konflux references (#445) Signed-off-by: red-hat-konflux <126015336+red-hat-konflux[bot]@users.noreply.github.com> Co-authored-by: red-hat-konflux[bot] <126015336+red-hat-konflux[bot]@users.noreply.github.com> * Bump github.com/prometheus/client_golang in the prometheus group (#444) * Update docker.io/library/golang Docker tag to v1.23.2 (#455) Signed-off-by: red-hat-konflux <126015336+red-hat-konflux[bot]@users.noreply.github.com> Co-authored-by: red-hat-konflux[bot] <126015336+red-hat-konflux[bot]@users.noreply.github.com> * Update Konflux references (#454) Signed-off-by: red-hat-konflux <126015336+red-hat-konflux[bot]@users.noreply.github.com> Co-authored-by: red-hat-konflux[bot] <126015336+red-hat-konflux[bot]@users.noreply.github.com> * Bump appleboy/ssh-action in the ci-dependencies group (#457) Bumps the ci-dependencies group with 1 update: [appleboy/ssh-action](https://github.com/appleboy/ssh-action). Updates `appleboy/ssh-action` from 1.0.3 to 1.1.0 - [Release notes](https://github.com/appleboy/ssh-action/releases) - [Changelog](https://github.com/appleboy/ssh-action/blob/master/.goreleaser.yaml) - [Commits](appleboy/ssh-action@v1.0.3...v1.1.0) --- updated-dependencies: - dependency-name: appleboy/ssh-action dependency-type: direct:production update-type: version-update:semver-minor dependency-group: ci-dependencies ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Bump github.com/prometheus/common in the prometheus group (#458) * Update Konflux references to 37b9187 (#461) Signed-off-by: red-hat-konflux <126015336+red-hat-konflux[bot]@users.noreply.github.com> Co-authored-by: red-hat-konflux[bot] <126015336+red-hat-konflux[bot]@users.noreply.github.com> * [COST-5544] Make leader election duration options configurable (#459) * [COST-5544] Make leader election duration options configurable * move utils to internal dir * move utils to internal dir * define leader-elect flag * Address feedback - move getEnv functions to main.go - drop enableLeaderElection var * add unit tests * include overriden values in log message * Update Konflux references (#464) Signed-off-by: red-hat-konflux <126015336+red-hat-konflux[bot]@users.noreply.github.com> Co-authored-by: red-hat-konflux[bot] <126015336+red-hat-konflux[bot]@users.noreply.github.com> * Update Konflux references (#468) Signed-off-by: red-hat-konflux <126015336+red-hat-konflux[bot]@users.noreply.github.com> Co-authored-by: red-hat-konflux[bot] <126015336+red-hat-konflux[bot]@users.noreply.github.com> * Bump github.com/prometheus/client_golang in the prometheus group (#466) * Bump github.com/prometheus/common in the prometheus group (#470) * Update Konflux references (#472) Signed-off-by: red-hat-konflux <126015336+red-hat-konflux[bot]@users.noreply.github.com> Co-authored-by: red-hat-konflux[bot] <126015336+red-hat-konflux[bot]@users.noreply.github.com> * update go toolchain version (#465) * update go toolchain version * add version label to dockerfile * fix version dockerfile * undo adding version label in this pr * [COST-5607] update whats new in 3.3.2 (#473) * update whats new in 3.3.2 * text update * add guidance on updating env variables * clean up * apply suggestion and add expected value format for leader election vars * text update - modify expected format and include default values * Update Konflux references (#475) Signed-off-by: red-hat-konflux <126015336+red-hat-konflux[bot]@users.noreply.github.com> Co-authored-by: red-hat-konflux[bot] <126015336+red-hat-konflux[bot]@users.noreply.github.com> * update features annotations (#476) * [COST-5631] bundle for v3.3.2 (#477) * [COST-5631] bundle for version koku-metrics-operator v3.3.2 * clean up make cmd * update docs * Update Konflux references (#483) Signed-off-by: red-hat-konflux <126015336+red-hat-konflux[bot]@users.noreply.github.com> Co-authored-by: red-hat-konflux[bot] <126015336+red-hat-konflux[bot]@users.noreply.github.com> * Update pre-commit hook golangci/golangci-lint to v1.62.0 (#485) Signed-off-by: red-hat-konflux <126015336+red-hat-konflux[bot]@users.noreply.github.com> Co-authored-by: red-hat-konflux[bot] <126015336+red-hat-konflux[bot]@users.noreply.github.com> * Bump appleboy/ssh-action in the ci-dependencies group Bumps the ci-dependencies group with 1 update: [appleboy/ssh-action](https://github.com/appleboy/ssh-action). Updates `appleboy/ssh-action` from 1.1.0 to 1.2.0 - [Release notes](https://github.com/appleboy/ssh-action/releases) - [Changelog](https://github.com/appleboy/ssh-action/blob/master/.goreleaser.yaml) - [Commits](appleboy/ssh-action@v1.1.0...v1.2.0) --- updated-dependencies: - dependency-name: appleboy/ssh-action dependency-type: direct:production update-type: version-update:semver-minor dependency-group: ci-dependencies ... Signed-off-by: dependabot[bot] <support@github.com> * Update docker.io/library/golang Docker tag to v1.23.3 (#484) Signed-off-by: red-hat-konflux <126015336+red-hat-konflux[bot]@users.noreply.github.com> Co-authored-by: red-hat-konflux[bot] <126015336+red-hat-konflux[bot]@users.noreply.github.com> * Update Konflux references (#491) Signed-off-by: red-hat-konflux <126015336+red-hat-konflux[bot]@users.noreply.github.com> Co-authored-by: red-hat-konflux[bot] <126015336+red-hat-konflux[bot]@users.noreply.github.com> * Update Konflux references (#492) Signed-off-by: red-hat-konflux <126015336+red-hat-konflux[bot]@users.noreply.github.com> Co-authored-by: red-hat-konflux[bot] <126015336+red-hat-konflux[bot]@users.noreply.github.com> * Update pre-commit hook golangci/golangci-lint to v1.62.2 (#497) Signed-off-by: red-hat-konflux <126015336+red-hat-konflux[bot]@users.noreply.github.com> Co-authored-by: red-hat-konflux[bot] <126015336+red-hat-konflux[bot]@users.noreply.github.com> * Update Konflux references (#500) Signed-off-by: red-hat-konflux <126015336+red-hat-konflux[bot]@users.noreply.github.com> Co-authored-by: red-hat-konflux[bot] <126015336+red-hat-konflux[bot]@users.noreply.github.com> * Bump github.com/prometheus/common in the prometheus group (#512) * Red Hat Konflux purge koku-metrics-operator-bundle (#516) Signed-off-by: red-hat-konflux <konflux@no-reply.konflux-ci.dev> Co-authored-by: red-hat-konflux <konflux@no-reply.konflux-ci.dev> * Red Hat Konflux purge koku-metrics-operator (#515) Signed-off-by: red-hat-konflux <konflux@no-reply.konflux-ci.dev> Co-authored-by: red-hat-konflux <konflux@no-reply.konflux-ci.dev> Co-authored-by: David Nakabaale <devotee_rulers.0e@icloud.com> * Bump library/golang from 1.23.3 to 1.23.4 (#506) * Full dependency update (#525) * upgrade go.mod to 1.23 * full dependency update * update controller-gen * CVE-2024-45338: update golang.org/x/net to v0.33.0 --------- Co-authored-by: David N <dnakabaa@redhat.com> Co-authored-by: David Nakabaale <devotee_rulers.0e@icloud.com> * Bump the testing-framework group across 1 directory with 2 updates (#530) * update community operator release doc (#507) * update community operator release doc * add note about when it will be released --------- Co-authored-by: David Nakabaale <devotee_rulers.0e@icloud.com> * COST-5898 ubuntu actions update (#538) * Bump appleboy/ssh-action in the ci-dependencies group across 1 directory (#553) * Bump the prometheus group across 1 directory with 2 updates (#551) * Bump github.com/google/go-cmp from 0.6.0 to 0.7.0 (#542) * Bump library/golang from 1.23.4 to 1.24.2 (#560) * update dependencies (#558) * update dependencies * bump go and golangci-lint versions * do not migrate to v2 golangci * remove golangci-lint update * update golangci-lint * undo golangci-lint udpate * codecov ignore testutils * more codecov exclude * codecov exclude mocks folder * [COST-5821] Add scope to access token request for service account auth (#564) * [cost-5821] Add scope to access token request for SA auth * clean up * clean up link to service account documentation * update scope value * Bump github.com/operator-framework/api (#565) Bumps the k8s-io-dependencies group with 1 update in the / directory: [github.com/operator-framework/api](https://github.com/operator-framework/api). Updates `github.com/operator-framework/api` from 0.27.0 to 0.30.0 - [Release notes](https://github.com/operator-framework/api/releases) - [Changelog](https://github.com/operator-framework/api/blob/master/RELEASE.md) - [Commits](operator-framework/api@v0.27.0...v0.30.0) --- updated-dependencies: - dependency-name: github.com/operator-framework/api dependency-version: 0.30.0 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: k8s-io-dependencies ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Bump golang.org/x/net from 0.33.0 to 0.36.0 in the go_modules group (#554) * Bump the testing-framework group with 2 updates (#556) * Bump the prometheus group across 1 directory with 2 updates (#566) * Bump github.com/onsi/gomega in the testing-framework group (#567) * [COST-5936] add operatorframework.io/initialization-resource annotation (#571) * [COST-5936] add operatorframework.io/initialization-resource annotation * remove namespace from metadata * [COST-6245] Add virtual machine metrics (#569) * [COST-6245] Add virtual machine metrics * filter cpu request units into separate columns * drop resources field * refine queries and update unittests * add queries to collect labels for vm pod and PVC * undo makefile change * include actual values for resource limits and requests * add query for vm labels * clean up * move QueryStrings into QueryMap remove labels for VM pods and PVCs * remove vm_persistentvolumeclaim_labels query * Bump the k8s-io-dependencies group with 4 updates (#568) * Bump library/golang from 1.24.2 to 1.24.3 (#570) * support golangci-lint v2 (#562) * support golangci-lint v2 * strings should not end with punctuation * remove .golangci.bck.yaml * remove redundant exlcusions * only remove path exlcusions * [COST-6334] Add resource_id col to VM report (#577) * [COST-5539] Replace KokuMetricsConfig with CostManagementMetricsConfig (#576) * replace KMC with CMMC * update to operator-sdk v1.39.2 * update Makefile * Bump github.com/prometheus/common in the prometheus group (#574) * Bump the k8s-io-dependencies group across 1 directory with 4 updates (#575) * [COST-6085] make operator FIPS compliant (#578) * [COST-6085] make operator FIPS compliant * use ARG instead of ENV for build-time-only vars * [COST-5805] Update docs with what's new in v4.0.0 (#581) * [COST-5805] Update docs with what's new in v4.0.0 * fix vm_guest_os_version column name in description doc * docs clean up * address feedback * more clean up * additional doc clean up --------- Co-authored-by: Cody Myers <cmyers@redhat.com> * Bump github.com/go-logr/logr from 1.4.2 to 1.4.3 (#579) * [COST-6095] bundle for koku metrics operator v4.0.0 (#585) * [COST-6006] Update upstream release docs (#586) * snap channel name update for s390x action (#589) * [COST-6402] exclude pod labels for non-running pods (#594) * Bump golangci/golangci-lint-action in the ci-dependencies group (#557) * Bump github.com/prometheus/common in the prometheus group (#617) * Bump the k8s-io-dependencies group across 1 directory with 4 updates (#629) * [COST-6562] - Rename ROS label (#633) * [COST-6562] - Rename ROS label * [COST-6579] update payload csv file names to reflect content (#636) * [COST-6491] Add ROS namespace queries (#635) * [COST-6491] Add ROS namespace queries * update ros container file prefix * address comments - fix typo in function name - add comment to get-token-and-cert cmd got make help - update local dev docs * [COST-6631] update column names in the ROS namespace report (#643) * Bump the k8s-io-dependencies group across 1 directory with 4 updates (#642) * Bump github.com/onsi/gomega in the testing-framework group (#658) * build: bump Go version from 1.24.3 to 1.24.4 (#663) * Bump github.com/prometheus/client_golang in the prometheus group (#661) * [COST-6515] docs: add v4.1.0 release notes to csv description (#664) * [COST-6516] create release bundle for version v4.1.0 (#665) * [COST-6668] Add descriptions for ROS namespace metrics report (#668) * docs: Add descriptions for ROS namespace metrics report * cleanup * [COST-6518] generate downstream code changes and bundle * add required bundle labels * clean up description --------- Signed-off-by: red-hat-konflux <126015336+red-hat-konflux[bot]@users.noreply.github.com> Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: Michael Skarbek <mskarbek@redhat.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: red-hat-konflux[bot] <126015336+red-hat-konflux[bot]@users.noreply.github.com> Co-authored-by: red-hat-konflux <konflux@no-reply.konflux-ci.dev> Co-authored-by: David <davidjnthn@gmail.com> Co-authored-by: Luke Couzens <lcouzens@redhat.com> Co-authored-by: Sam Doran <github@samdoran.com> Co-authored-by: Cody Myers <cmyers@redhat.com> Co-authored-by: Shivang Goswami <shivang.goswami@outlook.com>
* update whats new in 3.3.0 (#360) * update docs (#363) * fix make downstream (#365) * v3.3.0 bundle (#362) * Bump library/golang from 1.22.3 to 1.22.5 (#372) * Bump github.com/prometheus/common (#369) * Bump docker/build-push-action from 5 to 6 in the ci-dependencies group (#368) * [COST-5183] dont use csvReader.ReadAll to improve memory usage (#370) * update go in go.mod to 1.22 (#373) * Bump the testing-framework group with 2 updates (#374) * Bump github.com/onsi/gomega in the testing-framework group (#375) * Update badges (#384) * update license badge * clean up badges * remove license badge * Bump library/golang from 1.22.5 to 1.22.6 (#385) * update whats new in 3.3.1 (#388) * [COST-5377] update whats new in 3.3.1 * fix typo * make bundle for v3.3.1 (#389) * [COST-5409] Specify correct toolchain version number in go.mod (#394) * [COST-5409] Specify correct toolchain version number in go.mod * use mirco version * definitely use toolchain and not micro version * address non-constant format string in call to fmt.Errorf * Red Hat Konflux update koku-metrics-operator (#402) Signed-off-by: red-hat-konflux <konflux@no-reply.konflux-ci.dev> Co-authored-by: red-hat-konflux <konflux@no-reply.konflux-ci.dev> * [COST-1418] Report fields description (#192) * initial thoughts on report fields description * add link to queries and clean up * add note on label required for ros queries * clean up * add a lil organization * Update docs/report-fields-description.md --------- Co-authored-by: David <davidjnthn@gmail.com> Co-authored-by: Luke Couzens <lcouzens@redhat.com> * Red Hat Konflux purge koku-metrics-operator (#407) Signed-off-by: red-hat-konflux <konflux@no-reply.konflux-ci.dev> Co-authored-by: red-hat-konflux <konflux@no-reply.konflux-ci.dev> * Red Hat Konflux update koku-metrics-operator (#408) Signed-off-by: red-hat-konflux <konflux@no-reply.konflux-ci.dev> Co-authored-by: red-hat-konflux <konflux@no-reply.konflux-ci.dev> * Update Konflux references (#410) Signed-off-by: red-hat-konflux <126015336+red-hat-konflux[bot]@users.noreply.github.com> Co-authored-by: red-hat-konflux[bot] <126015336+red-hat-konflux[bot]@users.noreply.github.com> * Update Konflux references (#411) * Update Konflux references Signed-off-by: red-hat-konflux <126015336+red-hat-konflux[bot]@users.noreply.github.com> * Remove deprecated sbom-json-check --------- Signed-off-by: red-hat-konflux <126015336+red-hat-konflux[bot]@users.noreply.github.com> Co-authored-by: red-hat-konflux[bot] <126015336+red-hat-konflux[bot]@users.noreply.github.com> Co-authored-by: Sam Doran <github@samdoran.com> * Red Hat Konflux purge koku-metrics-operator (#412) Signed-off-by: red-hat-konflux <konflux@no-reply.konflux-ci.dev> Co-authored-by: red-hat-konflux <konflux@no-reply.konflux-ci.dev> * Red Hat Konflux update koku-metrics-operator (#422) Signed-off-by: red-hat-konflux <konflux@no-reply.konflux-ci.dev> Co-authored-by: red-hat-konflux <konflux@no-reply.konflux-ci.dev> * [COST-5381] Konflux: Enable multi-arch builds (#426) * enable multi-arch builds * initially trigger for when all changes * Update Konflux references (#427) Signed-off-by: red-hat-konflux <126015336+red-hat-konflux[bot]@users.noreply.github.com> Co-authored-by: red-hat-konflux[bot] <126015336+red-hat-konflux[bot]@users.noreply.github.com> * Bump the testing-framework group across 1 directory with 2 updates (#416) * Bump the prometheus group across 1 directory with 2 updates (#423) * Update Konflux references (#428) Signed-off-by: red-hat-konflux <126015336+red-hat-konflux[bot]@users.noreply.github.com> Co-authored-by: red-hat-konflux[bot] <126015336+red-hat-konflux[bot]@users.noreply.github.com> * [COST-5382] Konflux - prepare to add operator bundle component (#429) * [COST-5382] Konflux - prepare to add operator bundle component * wait to use konflux built images * update paths to bundle assets in dockerfile remove koku-metrics-operator older bundle copies * Red Hat Konflux update koku-metrics-operator-bundle (#431) Signed-off-by: red-hat-konflux <konflux@no-reply.konflux-ci.dev> Co-authored-by: red-hat-konflux <konflux@no-reply.konflux-ci.dev> * Update Konflux references (#430) Signed-off-by: red-hat-konflux <126015336+red-hat-konflux[bot]@users.noreply.github.com> Co-authored-by: red-hat-konflux[bot] <126015336+red-hat-konflux[bot]@users.noreply.github.com> * Update Konflux references (#435) Signed-off-by: red-hat-konflux <126015336+red-hat-konflux[bot]@users.noreply.github.com> Co-authored-by: red-hat-konflux[bot] <126015336+red-hat-konflux[bot]@users.noreply.github.com> * Update Konflux references (#438) Signed-off-by: red-hat-konflux <126015336+red-hat-konflux[bot]@users.noreply.github.com> Co-authored-by: red-hat-konflux[bot] <126015336+red-hat-konflux[bot]@users.noreply.github.com> * Update pre-commit hook golangci/golangci-lint to v1.61.0 (#437) Signed-off-by: red-hat-konflux <126015336+red-hat-konflux[bot]@users.noreply.github.com> Co-authored-by: red-hat-konflux[bot] <126015336+red-hat-konflux[bot]@users.noreply.github.com> Co-authored-by: David Nakabaale <devotee_rulers.0e@icloud.com> * Update Konflux references (#440) Signed-off-by: red-hat-konflux <126015336+red-hat-konflux[bot]@users.noreply.github.com> Co-authored-by: red-hat-konflux[bot] <126015336+red-hat-konflux[bot]@users.noreply.github.com> * Update Konflux references to e487185 (#441) Signed-off-by: red-hat-konflux <126015336+red-hat-konflux[bot]@users.noreply.github.com> Co-authored-by: red-hat-konflux[bot] <126015336+red-hat-konflux[bot]@users.noreply.github.com> * [COST-5382] konflux: update bundle pipeline and use brew registry (#434) * [COST-5534] Add renovate config (#443) * add renovate config to reduce konflux reference updates * fix typo * Update Konflux references (#442) Signed-off-by: red-hat-konflux <126015336+red-hat-konflux[bot]@users.noreply.github.com> Co-authored-by: red-hat-konflux[bot] <126015336+red-hat-konflux[bot]@users.noreply.github.com> * Update Konflux references (#445) Signed-off-by: red-hat-konflux <126015336+red-hat-konflux[bot]@users.noreply.github.com> Co-authored-by: red-hat-konflux[bot] <126015336+red-hat-konflux[bot]@users.noreply.github.com> * Bump github.com/prometheus/client_golang in the prometheus group (#444) * Update docker.io/library/golang Docker tag to v1.23.2 (#455) Signed-off-by: red-hat-konflux <126015336+red-hat-konflux[bot]@users.noreply.github.com> Co-authored-by: red-hat-konflux[bot] <126015336+red-hat-konflux[bot]@users.noreply.github.com> * Update Konflux references (#454) Signed-off-by: red-hat-konflux <126015336+red-hat-konflux[bot]@users.noreply.github.com> Co-authored-by: red-hat-konflux[bot] <126015336+red-hat-konflux[bot]@users.noreply.github.com> * Bump appleboy/ssh-action in the ci-dependencies group (#457) Bumps the ci-dependencies group with 1 update: [appleboy/ssh-action](https://github.com/appleboy/ssh-action). Updates `appleboy/ssh-action` from 1.0.3 to 1.1.0 - [Release notes](https://github.com/appleboy/ssh-action/releases) - [Changelog](https://github.com/appleboy/ssh-action/blob/master/.goreleaser.yaml) - [Commits](appleboy/ssh-action@v1.0.3...v1.1.0) --- updated-dependencies: - dependency-name: appleboy/ssh-action dependency-type: direct:production update-type: version-update:semver-minor dependency-group: ci-dependencies ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Bump github.com/prometheus/common in the prometheus group (#458) * Update Konflux references to 37b9187 (#461) Signed-off-by: red-hat-konflux <126015336+red-hat-konflux[bot]@users.noreply.github.com> Co-authored-by: red-hat-konflux[bot] <126015336+red-hat-konflux[bot]@users.noreply.github.com> * [COST-5544] Make leader election duration options configurable (#459) * [COST-5544] Make leader election duration options configurable * move utils to internal dir * move utils to internal dir * define leader-elect flag * Address feedback - move getEnv functions to main.go - drop enableLeaderElection var * add unit tests * include overriden values in log message * Update Konflux references (#464) Signed-off-by: red-hat-konflux <126015336+red-hat-konflux[bot]@users.noreply.github.com> Co-authored-by: red-hat-konflux[bot] <126015336+red-hat-konflux[bot]@users.noreply.github.com> * Update Konflux references (#468) Signed-off-by: red-hat-konflux <126015336+red-hat-konflux[bot]@users.noreply.github.com> Co-authored-by: red-hat-konflux[bot] <126015336+red-hat-konflux[bot]@users.noreply.github.com> * Bump github.com/prometheus/client_golang in the prometheus group (#466) * Bump github.com/prometheus/common in the prometheus group (#470) * Update Konflux references (#472) Signed-off-by: red-hat-konflux <126015336+red-hat-konflux[bot]@users.noreply.github.com> Co-authored-by: red-hat-konflux[bot] <126015336+red-hat-konflux[bot]@users.noreply.github.com> * update go toolchain version (#465) * update go toolchain version * add version label to dockerfile * fix version dockerfile * undo adding version label in this pr * [COST-5607] update whats new in 3.3.2 (#473) * update whats new in 3.3.2 * text update * add guidance on updating env variables * clean up * apply suggestion and add expected value format for leader election vars * text update - modify expected format and include default values * Update Konflux references (#475) Signed-off-by: red-hat-konflux <126015336+red-hat-konflux[bot]@users.noreply.github.com> Co-authored-by: red-hat-konflux[bot] <126015336+red-hat-konflux[bot]@users.noreply.github.com> * update features annotations (#476) * [COST-5631] bundle for v3.3.2 (#477) * [COST-5631] bundle for version koku-metrics-operator v3.3.2 * clean up make cmd * update docs * Update Konflux references (#483) Signed-off-by: red-hat-konflux <126015336+red-hat-konflux[bot]@users.noreply.github.com> Co-authored-by: red-hat-konflux[bot] <126015336+red-hat-konflux[bot]@users.noreply.github.com> * Update pre-commit hook golangci/golangci-lint to v1.62.0 (#485) Signed-off-by: red-hat-konflux <126015336+red-hat-konflux[bot]@users.noreply.github.com> Co-authored-by: red-hat-konflux[bot] <126015336+red-hat-konflux[bot]@users.noreply.github.com> * Bump appleboy/ssh-action in the ci-dependencies group Bumps the ci-dependencies group with 1 update: [appleboy/ssh-action](https://github.com/appleboy/ssh-action). Updates `appleboy/ssh-action` from 1.1.0 to 1.2.0 - [Release notes](https://github.com/appleboy/ssh-action/releases) - [Changelog](https://github.com/appleboy/ssh-action/blob/master/.goreleaser.yaml) - [Commits](appleboy/ssh-action@v1.1.0...v1.2.0) --- updated-dependencies: - dependency-name: appleboy/ssh-action dependency-type: direct:production update-type: version-update:semver-minor dependency-group: ci-dependencies ... Signed-off-by: dependabot[bot] <support@github.com> * Update docker.io/library/golang Docker tag to v1.23.3 (#484) Signed-off-by: red-hat-konflux <126015336+red-hat-konflux[bot]@users.noreply.github.com> Co-authored-by: red-hat-konflux[bot] <126015336+red-hat-konflux[bot]@users.noreply.github.com> * Update Konflux references (#491) Signed-off-by: red-hat-konflux <126015336+red-hat-konflux[bot]@users.noreply.github.com> Co-authored-by: red-hat-konflux[bot] <126015336+red-hat-konflux[bot]@users.noreply.github.com> * Update Konflux references (#492) Signed-off-by: red-hat-konflux <126015336+red-hat-konflux[bot]@users.noreply.github.com> Co-authored-by: red-hat-konflux[bot] <126015336+red-hat-konflux[bot]@users.noreply.github.com> * Update pre-commit hook golangci/golangci-lint to v1.62.2 (#497) Signed-off-by: red-hat-konflux <126015336+red-hat-konflux[bot]@users.noreply.github.com> Co-authored-by: red-hat-konflux[bot] <126015336+red-hat-konflux[bot]@users.noreply.github.com> * Update Konflux references (#500) Signed-off-by: red-hat-konflux <126015336+red-hat-konflux[bot]@users.noreply.github.com> Co-authored-by: red-hat-konflux[bot] <126015336+red-hat-konflux[bot]@users.noreply.github.com> * Bump github.com/prometheus/common in the prometheus group (#512) * Red Hat Konflux purge koku-metrics-operator-bundle (#516) Signed-off-by: red-hat-konflux <konflux@no-reply.konflux-ci.dev> Co-authored-by: red-hat-konflux <konflux@no-reply.konflux-ci.dev> * Red Hat Konflux purge koku-metrics-operator (#515) Signed-off-by: red-hat-konflux <konflux@no-reply.konflux-ci.dev> Co-authored-by: red-hat-konflux <konflux@no-reply.konflux-ci.dev> Co-authored-by: David Nakabaale <devotee_rulers.0e@icloud.com> * Bump library/golang from 1.23.3 to 1.23.4 (#506) * Full dependency update (#525) * upgrade go.mod to 1.23 * full dependency update * update controller-gen * CVE-2024-45338: update golang.org/x/net to v0.33.0 --------- Co-authored-by: David N <dnakabaa@redhat.com> Co-authored-by: David Nakabaale <devotee_rulers.0e@icloud.com> * Bump the testing-framework group across 1 directory with 2 updates (#530) * update community operator release doc (#507) * update community operator release doc * add note about when it will be released --------- Co-authored-by: David Nakabaale <devotee_rulers.0e@icloud.com> * COST-5898 ubuntu actions update (#538) * Bump appleboy/ssh-action in the ci-dependencies group across 1 directory (#553) * Bump the prometheus group across 1 directory with 2 updates (#551) * Bump github.com/google/go-cmp from 0.6.0 to 0.7.0 (#542) * Bump library/golang from 1.23.4 to 1.24.2 (#560) * update dependencies (#558) * update dependencies * bump go and golangci-lint versions * do not migrate to v2 golangci * remove golangci-lint update * update golangci-lint * undo golangci-lint udpate * codecov ignore testutils * more codecov exclude * codecov exclude mocks folder * [COST-5821] Add scope to access token request for service account auth (#564) * [cost-5821] Add scope to access token request for SA auth * clean up * clean up link to service account documentation * update scope value * Bump github.com/operator-framework/api (#565) Bumps the k8s-io-dependencies group with 1 update in the / directory: [github.com/operator-framework/api](https://github.com/operator-framework/api). Updates `github.com/operator-framework/api` from 0.27.0 to 0.30.0 - [Release notes](https://github.com/operator-framework/api/releases) - [Changelog](https://github.com/operator-framework/api/blob/master/RELEASE.md) - [Commits](operator-framework/api@v0.27.0...v0.30.0) --- updated-dependencies: - dependency-name: github.com/operator-framework/api dependency-version: 0.30.0 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: k8s-io-dependencies ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Bump golang.org/x/net from 0.33.0 to 0.36.0 in the go_modules group (#554) * Bump the testing-framework group with 2 updates (#556) * Bump the prometheus group across 1 directory with 2 updates (#566) * Bump github.com/onsi/gomega in the testing-framework group (#567) * [COST-5936] add operatorframework.io/initialization-resource annotation (#571) * [COST-5936] add operatorframework.io/initialization-resource annotation * remove namespace from metadata * [COST-6245] Add virtual machine metrics (#569) * [COST-6245] Add virtual machine metrics * filter cpu request units into separate columns * drop resources field * refine queries and update unittests * add queries to collect labels for vm pod and PVC * undo makefile change * include actual values for resource limits and requests * add query for vm labels * clean up * move QueryStrings into QueryMap remove labels for VM pods and PVCs * remove vm_persistentvolumeclaim_labels query * Bump the k8s-io-dependencies group with 4 updates (#568) * Bump library/golang from 1.24.2 to 1.24.3 (#570) * support golangci-lint v2 (#562) * support golangci-lint v2 * strings should not end with punctuation * remove .golangci.bck.yaml * remove redundant exlcusions * only remove path exlcusions * [COST-6334] Add resource_id col to VM report (#577) * [COST-5539] Replace KokuMetricsConfig with CostManagementMetricsConfig (#576) * replace KMC with CMMC * update to operator-sdk v1.39.2 * update Makefile * Bump github.com/prometheus/common in the prometheus group (#574) * Bump the k8s-io-dependencies group across 1 directory with 4 updates (#575) * [COST-6085] make operator FIPS compliant (#578) * [COST-6085] make operator FIPS compliant * use ARG instead of ENV for build-time-only vars * [COST-5805] Update docs with what's new in v4.0.0 (#581) * [COST-5805] Update docs with what's new in v4.0.0 * fix vm_guest_os_version column name in description doc * docs clean up * address feedback * more clean up * additional doc clean up --------- Co-authored-by: Cody Myers <cmyers@redhat.com> * Bump github.com/go-logr/logr from 1.4.2 to 1.4.3 (#579) * [COST-6095] bundle for koku metrics operator v4.0.0 (#585) * [COST-6006] Update upstream release docs (#586) * snap channel name update for s390x action (#589) * [COST-6402] exclude pod labels for non-running pods (#594) * Bump golangci/golangci-lint-action in the ci-dependencies group (#557) * Bump github.com/prometheus/common in the prometheus group (#617) * Bump the k8s-io-dependencies group across 1 directory with 4 updates (#629) * [COST-6562] - Rename ROS label (#633) * [COST-6562] - Rename ROS label * [COST-6579] update payload csv file names to reflect content (#636) * [COST-6491] Add ROS namespace queries (#635) * [COST-6491] Add ROS namespace queries * update ros container file prefix * address comments - fix typo in function name - add comment to get-token-and-cert cmd got make help - update local dev docs * [COST-6631] update column names in the ROS namespace report (#643) * Bump the k8s-io-dependencies group across 1 directory with 4 updates (#642) * Bump github.com/onsi/gomega in the testing-framework group (#658) * build: bump Go version from 1.24.3 to 1.24.4 (#663) * Bump github.com/prometheus/client_golang in the prometheus group (#661) * [COST-6515] docs: add v4.1.0 release notes to csv description (#664) * [COST-6516] create release bundle for version v4.1.0 (#665) * [COST-6668] Add descriptions for ROS namespace metrics report (#668) * docs: Add descriptions for ROS namespace metrics report * cleanup * [COST-6428] handle custom certs for proxy (#671) * fix: update Makefile and improve documentation (#685) * Bump the testing-framework group with 2 updates (#683) * Bump the ci-dependencies group across 1 directory with 3 updates (#700) * Bump the prometheus group with 2 updates (#699) * Bump the k8s-io-dependencies group across 1 directory with 5 updates (#693) * Bump the k8s-io-dependencies group across 1 directory with 5 updates Bumps the k8s-io-dependencies group with 2 updates in the / directory: [github.com/operator-framework/api](https://github.com/operator-framework/api) and [sigs.k8s.io/controller-runtime](https://github.com/kubernetes-sigs/controller-runtime). Updates `github.com/operator-framework/api` from 0.33.0 to 0.34.0 - [Release notes](https://github.com/operator-framework/api/releases) - [Changelog](https://github.com/operator-framework/api/blob/master/RELEASE.md) - [Commits](operator-framework/api@v0.33.0...v0.34.0) Updates `k8s.io/api` from 0.33.3 to 0.33.4 - [Commits](kubernetes/api@v0.33.3...v0.33.4) Updates `k8s.io/apimachinery` from 0.33.3 to 0.33.4 - [Commits](kubernetes/apimachinery@v0.33.3...v0.33.4) Updates `k8s.io/client-go` from 0.33.3 to 0.33.4 - [Changelog](https://github.com/kubernetes/client-go/blob/master/CHANGELOG.md) - [Commits](kubernetes/client-go@v0.33.3...v0.33.4) Updates `sigs.k8s.io/controller-runtime` from 0.21.0 to 0.22.0 - [Release notes](https://github.com/kubernetes-sigs/controller-runtime/releases) - [Changelog](https://github.com/kubernetes-sigs/controller-runtime/blob/main/RELEASE.md) - [Commits](kubernetes-sigs/controller-runtime@v0.21.0...v0.22.0) --- updated-dependencies: - dependency-name: github.com/operator-framework/api dependency-version: 0.34.0 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: k8s-io-dependencies - dependency-name: k8s.io/api dependency-version: 0.33.4 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: k8s-io-dependencies - dependency-name: k8s.io/apimachinery dependency-version: 0.33.4 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: k8s-io-dependencies - dependency-name: k8s.io/client-go dependency-version: 0.33.4 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: k8s-io-dependencies - dependency-name: sigs.k8s.io/controller-runtime dependency-version: 0.22.0 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: k8s-io-dependencies ... Signed-off-by: dependabot[bot] <support@github.com> * make manifests --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: dnakabaa <dnakabaa@redhat.com> * Bump github.com/onsi/ginkgo/v2 in the testing-framework group (#703) * Bump the k8s-io-dependencies group with 3 updates (#702) * [COST-6745] Add queries to gather GPU metrics for resource optimization (#705) * [COST-6745] Add queries to gather GPU metrics for ROS * update unit tests * add cpu_throttle_container_min to container metrics * [COST-6746] Add GPU columns descriptions for ROS container report (#707) * [COST-6746] Add GPU columns descriptions for ROS container report * add cpu_throttle_container_min description * fix ROS queries to properly support both old and current namespace labels for backwards compatibility (#708) * [COST-6819] add whats new in operator v4.2.0 to the CSV description (#710) * [COST-6819] add whats new in operator version 4.2.0 to the CSV description documentation * update doc * [COST-6849] generate upstream bundle (#711) * [COST-6852] generate downstream changes and bundle --------- Signed-off-by: red-hat-konflux <126015336+red-hat-konflux[bot]@users.noreply.github.com> Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: Michael Skarbek <mskarbek@redhat.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: red-hat-konflux[bot] <126015336+red-hat-konflux[bot]@users.noreply.github.com> Co-authored-by: red-hat-konflux <konflux@no-reply.konflux-ci.dev> Co-authored-by: David <davidjnthn@gmail.com> Co-authored-by: Luke Couzens <lcouzens@redhat.com> Co-authored-by: Sam Doran <github@samdoran.com> Co-authored-by: Cody Myers <cmyers@redhat.com> Co-authored-by: Shivang Goswami <shivang.goswami@outlook.com>
* update whats new in 3.3.0 (#360) * update docs (#363) * fix make downstream (#365) * v3.3.0 bundle (#362) * Bump library/golang from 1.22.3 to 1.22.5 (#372) * Bump github.com/prometheus/common (#369) * Bump docker/build-push-action from 5 to 6 in the ci-dependencies group (#368) * [COST-5183] dont use csvReader.ReadAll to improve memory usage (#370) * update go in go.mod to 1.22 (#373) * Bump the testing-framework group with 2 updates (#374) * Bump github.com/onsi/gomega in the testing-framework group (#375) * Update badges (#384) * update license badge * clean up badges * remove license badge * Bump library/golang from 1.22.5 to 1.22.6 (#385) * update whats new in 3.3.1 (#388) * [COST-5377] update whats new in 3.3.1 * fix typo * make bundle for v3.3.1 (#389) * [COST-5409] Specify correct toolchain version number in go.mod (#394) * [COST-5409] Specify correct toolchain version number in go.mod * use mirco version * definitely use toolchain and not micro version * address non-constant format string in call to fmt.Errorf * Red Hat Konflux update koku-metrics-operator (#402) Signed-off-by: red-hat-konflux <konflux@no-reply.konflux-ci.dev> Co-authored-by: red-hat-konflux <konflux@no-reply.konflux-ci.dev> * [COST-1418] Report fields description (#192) * initial thoughts on report fields description * add link to queries and clean up * add note on label required for ros queries * clean up * add a lil organization * Update docs/report-fields-description.md --------- Co-authored-by: David <davidjnthn@gmail.com> Co-authored-by: Luke Couzens <lcouzens@redhat.com> * Red Hat Konflux purge koku-metrics-operator (#407) Signed-off-by: red-hat-konflux <konflux@no-reply.konflux-ci.dev> Co-authored-by: red-hat-konflux <konflux@no-reply.konflux-ci.dev> * Red Hat Konflux update koku-metrics-operator (#408) Signed-off-by: red-hat-konflux <konflux@no-reply.konflux-ci.dev> Co-authored-by: red-hat-konflux <konflux@no-reply.konflux-ci.dev> * Update Konflux references (#410) Signed-off-by: red-hat-konflux <126015336+red-hat-konflux[bot]@users.noreply.github.com> Co-authored-by: red-hat-konflux[bot] <126015336+red-hat-konflux[bot]@users.noreply.github.com> * Update Konflux references (#411) * Update Konflux references Signed-off-by: red-hat-konflux <126015336+red-hat-konflux[bot]@users.noreply.github.com> * Remove deprecated sbom-json-check --------- Signed-off-by: red-hat-konflux <126015336+red-hat-konflux[bot]@users.noreply.github.com> Co-authored-by: red-hat-konflux[bot] <126015336+red-hat-konflux[bot]@users.noreply.github.com> Co-authored-by: Sam Doran <github@samdoran.com> * Red Hat Konflux purge koku-metrics-operator (#412) Signed-off-by: red-hat-konflux <konflux@no-reply.konflux-ci.dev> Co-authored-by: red-hat-konflux <konflux@no-reply.konflux-ci.dev> * Red Hat Konflux update koku-metrics-operator (#422) Signed-off-by: red-hat-konflux <konflux@no-reply.konflux-ci.dev> Co-authored-by: red-hat-konflux <konflux@no-reply.konflux-ci.dev> * [COST-5381] Konflux: Enable multi-arch builds (#426) * enable multi-arch builds * initially trigger for when all changes * Update Konflux references (#427) Signed-off-by: red-hat-konflux <126015336+red-hat-konflux[bot]@users.noreply.github.com> Co-authored-by: red-hat-konflux[bot] <126015336+red-hat-konflux[bot]@users.noreply.github.com> * Bump the testing-framework group across 1 directory with 2 updates (#416) * Bump the prometheus group across 1 directory with 2 updates (#423) * Update Konflux references (#428) Signed-off-by: red-hat-konflux <126015336+red-hat-konflux[bot]@users.noreply.github.com> Co-authored-by: red-hat-konflux[bot] <126015336+red-hat-konflux[bot]@users.noreply.github.com> * [COST-5382] Konflux - prepare to add operator bundle component (#429) * [COST-5382] Konflux - prepare to add operator bundle component * wait to use konflux built images * update paths to bundle assets in dockerfile remove koku-metrics-operator older bundle copies * Red Hat Konflux update koku-metrics-operator-bundle (#431) Signed-off-by: red-hat-konflux <konflux@no-reply.konflux-ci.dev> Co-authored-by: red-hat-konflux <konflux@no-reply.konflux-ci.dev> * Update Konflux references (#430) Signed-off-by: red-hat-konflux <126015336+red-hat-konflux[bot]@users.noreply.github.com> Co-authored-by: red-hat-konflux[bot] <126015336+red-hat-konflux[bot]@users.noreply.github.com> * Update Konflux references (#435) Signed-off-by: red-hat-konflux <126015336+red-hat-konflux[bot]@users.noreply.github.com> Co-authored-by: red-hat-konflux[bot] <126015336+red-hat-konflux[bot]@users.noreply.github.com> * Update Konflux references (#438) Signed-off-by: red-hat-konflux <126015336+red-hat-konflux[bot]@users.noreply.github.com> Co-authored-by: red-hat-konflux[bot] <126015336+red-hat-konflux[bot]@users.noreply.github.com> * Update pre-commit hook golangci/golangci-lint to v1.61.0 (#437) Signed-off-by: red-hat-konflux <126015336+red-hat-konflux[bot]@users.noreply.github.com> Co-authored-by: red-hat-konflux[bot] <126015336+red-hat-konflux[bot]@users.noreply.github.com> Co-authored-by: David Nakabaale <devotee_rulers.0e@icloud.com> * Update Konflux references (#440) Signed-off-by: red-hat-konflux <126015336+red-hat-konflux[bot]@users.noreply.github.com> Co-authored-by: red-hat-konflux[bot] <126015336+red-hat-konflux[bot]@users.noreply.github.com> * Update Konflux references to e487185 (#441) Signed-off-by: red-hat-konflux <126015336+red-hat-konflux[bot]@users.noreply.github.com> Co-authored-by: red-hat-konflux[bot] <126015336+red-hat-konflux[bot]@users.noreply.github.com> * [COST-5382] konflux: update bundle pipeline and use brew registry (#434) * [COST-5534] Add renovate config (#443) * add renovate config to reduce konflux reference updates * fix typo * Update Konflux references (#442) Signed-off-by: red-hat-konflux <126015336+red-hat-konflux[bot]@users.noreply.github.com> Co-authored-by: red-hat-konflux[bot] <126015336+red-hat-konflux[bot]@users.noreply.github.com> * Update Konflux references (#445) Signed-off-by: red-hat-konflux <126015336+red-hat-konflux[bot]@users.noreply.github.com> Co-authored-by: red-hat-konflux[bot] <126015336+red-hat-konflux[bot]@users.noreply.github.com> * Bump github.com/prometheus/client_golang in the prometheus group (#444) * Update docker.io/library/golang Docker tag to v1.23.2 (#455) Signed-off-by: red-hat-konflux <126015336+red-hat-konflux[bot]@users.noreply.github.com> Co-authored-by: red-hat-konflux[bot] <126015336+red-hat-konflux[bot]@users.noreply.github.com> * Update Konflux references (#454) Signed-off-by: red-hat-konflux <126015336+red-hat-konflux[bot]@users.noreply.github.com> Co-authored-by: red-hat-konflux[bot] <126015336+red-hat-konflux[bot]@users.noreply.github.com> * Bump appleboy/ssh-action in the ci-dependencies group (#457) Bumps the ci-dependencies group with 1 update: [appleboy/ssh-action](https://github.com/appleboy/ssh-action). Updates `appleboy/ssh-action` from 1.0.3 to 1.1.0 - [Release notes](https://github.com/appleboy/ssh-action/releases) - [Changelog](https://github.com/appleboy/ssh-action/blob/master/.goreleaser.yaml) - [Commits](appleboy/ssh-action@v1.0.3...v1.1.0) --- updated-dependencies: - dependency-name: appleboy/ssh-action dependency-type: direct:production update-type: version-update:semver-minor dependency-group: ci-dependencies ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Bump github.com/prometheus/common in the prometheus group (#458) * Update Konflux references to 37b9187 (#461) Signed-off-by: red-hat-konflux <126015336+red-hat-konflux[bot]@users.noreply.github.com> Co-authored-by: red-hat-konflux[bot] <126015336+red-hat-konflux[bot]@users.noreply.github.com> * [COST-5544] Make leader election duration options configurable (#459) * [COST-5544] Make leader election duration options configurable * move utils to internal dir * move utils to internal dir * define leader-elect flag * Address feedback - move getEnv functions to main.go - drop enableLeaderElection var * add unit tests * include overriden values in log message * Update Konflux references (#464) Signed-off-by: red-hat-konflux <126015336+red-hat-konflux[bot]@users.noreply.github.com> Co-authored-by: red-hat-konflux[bot] <126015336+red-hat-konflux[bot]@users.noreply.github.com> * Update Konflux references (#468) Signed-off-by: red-hat-konflux <126015336+red-hat-konflux[bot]@users.noreply.github.com> Co-authored-by: red-hat-konflux[bot] <126015336+red-hat-konflux[bot]@users.noreply.github.com> * Bump github.com/prometheus/client_golang in the prometheus group (#466) * Bump github.com/prometheus/common in the prometheus group (#470) * Update Konflux references (#472) Signed-off-by: red-hat-konflux <126015336+red-hat-konflux[bot]@users.noreply.github.com> Co-authored-by: red-hat-konflux[bot] <126015336+red-hat-konflux[bot]@users.noreply.github.com> * update go toolchain version (#465) * update go toolchain version * add version label to dockerfile * fix version dockerfile * undo adding version label in this pr * [COST-5607] update whats new in 3.3.2 (#473) * update whats new in 3.3.2 * text update * add guidance on updating env variables * clean up * apply suggestion and add expected value format for leader election vars * text update - modify expected format and include default values * Update Konflux references (#475) Signed-off-by: red-hat-konflux <126015336+red-hat-konflux[bot]@users.noreply.github.com> Co-authored-by: red-hat-konflux[bot] <126015336+red-hat-konflux[bot]@users.noreply.github.com> * update features annotations (#476) * [COST-5631] bundle for v3.3.2 (#477) * [COST-5631] bundle for version koku-metrics-operator v3.3.2 * clean up make cmd * update docs * Update Konflux references (#483) Signed-off-by: red-hat-konflux <126015336+red-hat-konflux[bot]@users.noreply.github.com> Co-authored-by: red-hat-konflux[bot] <126015336+red-hat-konflux[bot]@users.noreply.github.com> * Update pre-commit hook golangci/golangci-lint to v1.62.0 (#485) Signed-off-by: red-hat-konflux <126015336+red-hat-konflux[bot]@users.noreply.github.com> Co-authored-by: red-hat-konflux[bot] <126015336+red-hat-konflux[bot]@users.noreply.github.com> * Bump appleboy/ssh-action in the ci-dependencies group Bumps the ci-dependencies group with 1 update: [appleboy/ssh-action](https://github.com/appleboy/ssh-action). Updates `appleboy/ssh-action` from 1.1.0 to 1.2.0 - [Release notes](https://github.com/appleboy/ssh-action/releases) - [Changelog](https://github.com/appleboy/ssh-action/blob/master/.goreleaser.yaml) - [Commits](appleboy/ssh-action@v1.1.0...v1.2.0) --- updated-dependencies: - dependency-name: appleboy/ssh-action dependency-type: direct:production update-type: version-update:semver-minor dependency-group: ci-dependencies ... Signed-off-by: dependabot[bot] <support@github.com> * Update docker.io/library/golang Docker tag to v1.23.3 (#484) Signed-off-by: red-hat-konflux <126015336+red-hat-konflux[bot]@users.noreply.github.com> Co-authored-by: red-hat-konflux[bot] <126015336+red-hat-konflux[bot]@users.noreply.github.com> * Update Konflux references (#491) Signed-off-by: red-hat-konflux <126015336+red-hat-konflux[bot]@users.noreply.github.com> Co-authored-by: red-hat-konflux[bot] <126015336+red-hat-konflux[bot]@users.noreply.github.com> * Update Konflux references (#492) Signed-off-by: red-hat-konflux <126015336+red-hat-konflux[bot]@users.noreply.github.com> Co-authored-by: red-hat-konflux[bot] <126015336+red-hat-konflux[bot]@users.noreply.github.com> * Update pre-commit hook golangci/golangci-lint to v1.62.2 (#497) Signed-off-by: red-hat-konflux <126015336+red-hat-konflux[bot]@users.noreply.github.com> Co-authored-by: red-hat-konflux[bot] <126015336+red-hat-konflux[bot]@users.noreply.github.com> * Update Konflux references (#500) Signed-off-by: red-hat-konflux <126015336+red-hat-konflux[bot]@users.noreply.github.com> Co-authored-by: red-hat-konflux[bot] <126015336+red-hat-konflux[bot]@users.noreply.github.com> * Bump github.com/prometheus/common in the prometheus group (#512) * Red Hat Konflux purge koku-metrics-operator-bundle (#516) Signed-off-by: red-hat-konflux <konflux@no-reply.konflux-ci.dev> Co-authored-by: red-hat-konflux <konflux@no-reply.konflux-ci.dev> * Red Hat Konflux purge koku-metrics-operator (#515) Signed-off-by: red-hat-konflux <konflux@no-reply.konflux-ci.dev> Co-authored-by: red-hat-konflux <konflux@no-reply.konflux-ci.dev> Co-authored-by: David Nakabaale <devotee_rulers.0e@icloud.com> * Bump library/golang from 1.23.3 to 1.23.4 (#506) * Full dependency update (#525) * upgrade go.mod to 1.23 * full dependency update * update controller-gen * CVE-2024-45338: update golang.org/x/net to v0.33.0 --------- Co-authored-by: David N <dnakabaa@redhat.com> Co-authored-by: David Nakabaale <devotee_rulers.0e@icloud.com> * Bump the testing-framework group across 1 directory with 2 updates (#530) * update community operator release doc (#507) * update community operator release doc * add note about when it will be released --------- Co-authored-by: David Nakabaale <devotee_rulers.0e@icloud.com> * COST-5898 ubuntu actions update (#538) * Bump appleboy/ssh-action in the ci-dependencies group across 1 directory (#553) * Bump the prometheus group across 1 directory with 2 updates (#551) * Bump github.com/google/go-cmp from 0.6.0 to 0.7.0 (#542) * Bump library/golang from 1.23.4 to 1.24.2 (#560) * update dependencies (#558) * update dependencies * bump go and golangci-lint versions * do not migrate to v2 golangci * remove golangci-lint update * update golangci-lint * undo golangci-lint udpate * codecov ignore testutils * more codecov exclude * codecov exclude mocks folder * [COST-5821] Add scope to access token request for service account auth (#564) * [cost-5821] Add scope to access token request for SA auth * clean up * clean up link to service account documentation * update scope value * Bump github.com/operator-framework/api (#565) Bumps the k8s-io-dependencies group with 1 update in the / directory: [github.com/operator-framework/api](https://github.com/operator-framework/api). Updates `github.com/operator-framework/api` from 0.27.0 to 0.30.0 - [Release notes](https://github.com/operator-framework/api/releases) - [Changelog](https://github.com/operator-framework/api/blob/master/RELEASE.md) - [Commits](operator-framework/api@v0.27.0...v0.30.0) --- updated-dependencies: - dependency-name: github.com/operator-framework/api dependency-version: 0.30.0 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: k8s-io-dependencies ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Bump golang.org/x/net from 0.33.0 to 0.36.0 in the go_modules group (#554) * Bump the testing-framework group with 2 updates (#556) * Bump the prometheus group across 1 directory with 2 updates (#566) * Bump github.com/onsi/gomega in the testing-framework group (#567) * [COST-5936] add operatorframework.io/initialization-resource annotation (#571) * [COST-5936] add operatorframework.io/initialization-resource annotation * remove namespace from metadata * [COST-6245] Add virtual machine metrics (#569) * [COST-6245] Add virtual machine metrics * filter cpu request units into separate columns * drop resources field * refine queries and update unittests * add queries to collect labels for vm pod and PVC * undo makefile change * include actual values for resource limits and requests * add query for vm labels * clean up * move QueryStrings into QueryMap remove labels for VM pods and PVCs * remove vm_persistentvolumeclaim_labels query * Bump the k8s-io-dependencies group with 4 updates (#568) * Bump library/golang from 1.24.2 to 1.24.3 (#570) * support golangci-lint v2 (#562) * support golangci-lint v2 * strings should not end with punctuation * remove .golangci.bck.yaml * remove redundant exlcusions * only remove path exlcusions * [COST-6334] Add resource_id col to VM report (#577) * [COST-5539] Replace KokuMetricsConfig with CostManagementMetricsConfig (#576) * replace KMC with CMMC * update to operator-sdk v1.39.2 * update Makefile * Bump github.com/prometheus/common in the prometheus group (#574) * Bump the k8s-io-dependencies group across 1 directory with 4 updates (#575) * [COST-6085] make operator FIPS compliant (#578) * [COST-6085] make operator FIPS compliant * use ARG instead of ENV for build-time-only vars * [COST-5805] Update docs with what's new in v4.0.0 (#581) * [COST-5805] Update docs with what's new in v4.0.0 * fix vm_guest_os_version column name in description doc * docs clean up * address feedback * more clean up * additional doc clean up --------- Co-authored-by: Cody Myers <cmyers@redhat.com> * Bump github.com/go-logr/logr from 1.4.2 to 1.4.3 (#579) * [COST-6095] bundle for koku metrics operator v4.0.0 (#585) * [COST-6006] Update upstream release docs (#586) * snap channel name update for s390x action (#589) * [COST-6402] exclude pod labels for non-running pods (#594) * Bump golangci/golangci-lint-action in the ci-dependencies group (#557) * Bump github.com/prometheus/common in the prometheus group (#617) * Bump the k8s-io-dependencies group across 1 directory with 4 updates (#629) * [COST-6562] - Rename ROS label (#633) * [COST-6562] - Rename ROS label * [COST-6579] update payload csv file names to reflect content (#636) * [COST-6491] Add ROS namespace queries (#635) * [COST-6491] Add ROS namespace queries * update ros container file prefix * address comments - fix typo in function name - add comment to get-token-and-cert cmd got make help - update local dev docs * [COST-6631] update column names in the ROS namespace report (#643) * Bump the k8s-io-dependencies group across 1 directory with 4 updates (#642) * Bump github.com/onsi/gomega in the testing-framework group (#658) * build: bump Go version from 1.24.3 to 1.24.4 (#663) * Bump github.com/prometheus/client_golang in the prometheus group (#661) * [COST-6515] docs: add v4.1.0 release notes to csv description (#664) * [COST-6516] create release bundle for version v4.1.0 (#665) * [COST-6668] Add descriptions for ROS namespace metrics report (#668) * docs: Add descriptions for ROS namespace metrics report * cleanup * [COST-6518] generate downstream code changes and bundle * add required bundle labels * clean up description --------- Signed-off-by: red-hat-konflux <126015336+red-hat-konflux[bot]@users.noreply.github.com> Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: Michael Skarbek <mskarbek@redhat.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: red-hat-konflux[bot] <126015336+red-hat-konflux[bot]@users.noreply.github.com> Co-authored-by: red-hat-konflux <konflux@no-reply.konflux-ci.dev> Co-authored-by: David <davidjnthn@gmail.com> Co-authored-by: Luke Couzens <lcouzens@redhat.com> Co-authored-by: Sam Doran <github@samdoran.com> Co-authored-by: Cody Myers <cmyers@redhat.com> Co-authored-by: Shivang Goswami <shivang.goswami@outlook.com>
Jira Ticket
COST-6491
Description
This change will enable gathering and reporting namespace metrics for resource optimization.
Testing instructions
Prerequisites:
1. Prepare the operator image
Checkout feature branch
Build and push the operator to your quay repo.Replace
<USERNAME>with your Quay.io username and<TAG>with your desired image tag2. Deploy the operator to your OpenShift cluster
login into your cluster
create a koku-metrics-operator namespace
enable ROS for the namespace
oc label namespace koku-metrics-operator cost_management_optimizations="true"Pull the image to make sure its available on your machine
Deploy the operator
3. Configure metrics collection
Copy the yaml below to create a costmanagementmetricsconfig.yaml file
deploy the configuration
4. Verify setrics collection
You should see logs on querying ros metrics and writing results to files similar to below:
Additionally retrieve the reports and inspect the reports gathered by following the instructions on downloading reports from the operator.
Summary by Sourcery
Add namespace-level resource optimization (ROS) queries and reporting
New Features:
Build:
Tests:
Summary by Sourcery
Add namespace-level resource optimization queries and reporting in the metrics collector and update CI build script.
New Features:
Enhancements:
Build:
Tests: