From c41366baa5bc57897f22f6e087cf7f4bb6dbd361 Mon Sep 17 00:00:00 2001 From: maskarb Date: Thu, 30 May 2024 14:58:43 -0400 Subject: [PATCH] make downstream v3.3.0 --- Makefile | 4 +- PROJECT | 6 +- api/v1beta1/groupversion_info.go | 6 +- api/v1beta1/metricsconfig_types.go | 198 +- api/v1beta1/zz_generated.deepcopy.go | 38 +- ...hift.io_costmanagementmetricsconfigs.yaml} | 227 +-- config/crd/kustomization.yaml | 6 +- ...tion_in_costmanagementmetricsconfigs.yaml} | 2 +- ...hook_in_costmanagementmetricsconfigs.yaml} | 2 +- config/default/kustomization.yaml | 6 +- config/default/manager_webhook_patch.yaml | 2 +- config/manager/manager.yaml | 6 +- ...trics-operator.clusterserviceversion.yaml} | 23 +- config/manifests/kustomization.yaml | 5 +- ...stmanagementmetricsconfig_editor_role.yaml | 24 + ...stmanagementmetricsconfig_viewer_role.yaml | 20 + .../rbac/kokumetricsconfig_editor_role.yaml | 24 - .../rbac/kokumetricsconfig_viewer_role.yaml | 20 - config/rbac/role.yaml | 10 +- config/samples/air-gapped.yaml | 6 +- ..._v1beta1_costmanagementmetricsconfig.yaml} | 6 +- config/samples/kustomization.yaml | 2 +- config/scorecard/bases/config.yaml | 7 - config/scorecard/kustomization.yaml | 17 - config/scorecard/patches/basic.config.yaml | 10 - config/scorecard/patches/olm.config.yaml | 20 - config/webhook/service.yaml | 2 +- docs/cr-example.md | 6 +- docs/csv-description.md | 74 +- docs/faq.md | 24 +- docs/generate-downstream.md | 4 +- docs/local-development.md | 12 +- docs/release-testing.md | 18 +- docs/releasing.md | 22 +- .../kokumetricsconfig_controller.go | 10 +- internal/crhchttp/http_cloud_dot_redhat.go | 2 +- internal/packaging/packaging.go | 2 +- koku-metrics-operator/0.9.0/Dockerfile | 14 - ...s-cfg.openshift.io_kokumetricsconfigs.yaml | 400 ----- ...etrics-operator.clusterserviceversion.yaml | 369 ---- .../0.9.0/metadata/annotations.yaml | 10 - koku-metrics-operator/0.9.1/Dockerfile | 14 - ...s-cfg.openshift.io_kokumetricsconfigs.yaml | 400 ----- ...etrics-operator.clusterserviceversion.yaml | 363 ---- .../0.9.1/metadata/annotations.yaml | 10 - koku-metrics-operator/0.9.2/Dockerfile | 14 - ...s-cfg.openshift.io_kokumetricsconfigs.yaml | 794 --------- ...etrics-operator.clusterserviceversion.yaml | 449 ----- .../0.9.2/metadata/annotations.yaml | 10 - koku-metrics-operator/0.9.3/Dockerfile | 14 - ...s-cfg.openshift.io_kokumetricsconfigs.yaml | 1587 ----------------- ...etrics-operator.clusterserviceversion.yaml | 485 ----- .../0.9.3/metadata/annotations.yaml | 10 - koku-metrics-operator/0.9.4/Dockerfile | 14 - ...s-cfg.openshift.io_kokumetricsconfigs.yaml | 1587 ----------------- ...etrics-operator.clusterserviceversion.yaml | 455 ----- .../0.9.4/metadata/annotations.yaml | 10 - koku-metrics-operator/0.9.5/Dockerfile | 14 - ...s-cfg.openshift.io_kokumetricsconfigs.yaml | 804 --------- ...etrics-operator.clusterserviceversion.yaml | 455 ----- .../0.9.5/metadata/annotations.yaml | 10 - koku-metrics-operator/0.9.6/Dockerfile | 14 - ...s-cfg.openshift.io_kokumetricsconfigs.yaml | 804 --------- ...etrics-operator.clusterserviceversion.yaml | 456 ----- .../0.9.6/metadata/annotations.yaml | 10 - koku-metrics-operator/0.9.7/Dockerfile | 14 - ...s-cfg.openshift.io_kokumetricsconfigs.yaml | 804 --------- ...etrics-operator.clusterserviceversion.yaml | 456 ----- .../0.9.7/metadata/annotations.yaml | 10 - koku-metrics-operator/0.9.8/Dockerfile | 14 - ...s-cfg.openshift.io_kokumetricsconfigs.yaml | 833 --------- ...etrics-operator.clusterserviceversion.yaml | 456 ----- .../0.9.8/metadata/annotations.yaml | 10 - koku-metrics-operator/1.1.1/Dockerfile | 21 - ...s-cfg.openshift.io_kokumetricsconfigs.yaml | 825 --------- ...etrics-operator.clusterserviceversion.yaml | 469 ----- .../1.1.1/metadata/annotations.yaml | 15 - .../1.1.1/tests/scorecard/config.yaml | 28 - koku-metrics-operator/1.1.2/Dockerfile | 21 - ...s-cfg.openshift.io_kokumetricsconfigs.yaml | 825 --------- ...etrics-operator.clusterserviceversion.yaml | 469 ----- .../1.1.2/metadata/annotations.yaml | 15 - .../1.1.2/tests/scorecard/config.yaml | 28 - koku-metrics-operator/1.1.3/Dockerfile | 21 - ...s-cfg.openshift.io_kokumetricsconfigs.yaml | 825 --------- ...etrics-operator.clusterserviceversion.yaml | 469 ----- .../1.1.3/metadata/annotations.yaml | 15 - .../1.1.3/tests/scorecard/config.yaml | 28 - koku-metrics-operator/1.1.4/Dockerfile | 21 - ...s-cfg.openshift.io_kokumetricsconfigs.yaml | 840 --------- ...etrics-operator.clusterserviceversion.yaml | 469 ----- .../1.1.4/metadata/annotations.yaml | 15 - .../1.1.4/tests/scorecard/config.yaml | 28 - koku-metrics-operator/1.1.5/Dockerfile | 21 - ...s-cfg.openshift.io_kokumetricsconfigs.yaml | 840 --------- ...etrics-operator.clusterserviceversion.yaml | 471 ----- .../1.1.5/metadata/annotations.yaml | 15 - .../1.1.5/tests/scorecard/config.yaml | 40 - koku-metrics-operator/1.1.6/Dockerfile | 21 - ...s-cfg.openshift.io_kokumetricsconfigs.yaml | 842 --------- ...etrics-operator.clusterserviceversion.yaml | 491 ----- .../1.1.6/metadata/annotations.yaml | 15 - .../1.1.6/tests/scorecard/config.yaml | 28 - koku-metrics-operator/1.1.7/Dockerfile | 21 - ...s-cfg.openshift.io_kokumetricsconfigs.yaml | 842 --------- ...etrics-operator.clusterserviceversion.yaml | 471 ----- .../1.1.7/metadata/annotations.yaml | 15 - .../1.1.7/tests/scorecard/config.yaml | 28 - koku-metrics-operator/1.1.8/Dockerfile | 21 - ...s-cfg.openshift.io_kokumetricsconfigs.yaml | 842 --------- ...etrics-operator.clusterserviceversion.yaml | 474 ----- .../1.1.8/metadata/annotations.yaml | 15 - .../1.1.8/tests/scorecard/config.yaml | 40 - koku-metrics-operator/1.1.9/Dockerfile | 21 - ...s-cfg.openshift.io_kokumetricsconfigs.yaml | 842 --------- ...etrics-operator.clusterserviceversion.yaml | 474 ----- .../1.1.9/metadata/annotations.yaml | 15 - .../1.1.9/tests/scorecard/config.yaml | 40 - koku-metrics-operator/1.2.0/Dockerfile | 21 - ...s-cfg.openshift.io_kokumetricsconfigs.yaml | 842 --------- ...etrics-operator.clusterserviceversion.yaml | 474 ----- .../1.2.0/metadata/annotations.yaml | 15 - .../1.2.0/tests/scorecard/config.yaml | 40 - koku-metrics-operator/2.0.0/Dockerfile | 21 - ...s-cfg.openshift.io_kokumetricsconfigs.yaml | 968 ---------- ...etrics-operator.clusterserviceversion.yaml | 515 ------ .../2.0.0/metadata/annotations.yaml | 15 - .../2.0.0/tests/scorecard/config.yaml | 40 - koku-metrics-operator/3.0.0/Dockerfile | 21 - ...s-cfg.openshift.io_kokumetricsconfigs.yaml | 972 ---------- ...etrics-operator.clusterserviceversion.yaml | 520 ------ .../3.0.0/metadata/annotations.yaml | 15 - .../3.0.0/tests/scorecard/config.yaml | 40 - koku-metrics-operator/3.0.1/Dockerfile | 21 - ...s-cfg.openshift.io_kokumetricsconfigs.yaml | 1052 ----------- ...etrics-operator.clusterserviceversion.yaml | 520 ------ .../3.0.1/metadata/annotations.yaml | 15 - .../3.0.1/tests/scorecard/config.yaml | 40 - koku-metrics-operator/3.1.0/Dockerfile | 21 - ...s-cfg.openshift.io_kokumetricsconfigs.yaml | 1067 ----------- ...etrics-operator.clusterserviceversion.yaml | 543 ------ .../3.1.0/metadata/annotations.yaml | 15 - .../3.1.0/tests/scorecard/config.yaml | 40 - koku-metrics-operator/3.2.0/Dockerfile | 21 - ...s-cfg.openshift.io_kokumetricsconfigs.yaml | 1056 ----------- ...etrics-operator.clusterserviceversion.yaml | 604 ------- .../3.2.0/metadata/annotations.yaml | 17 - .../3.2.0/tests/scorecard/config.yaml | 40 - koku-metrics-operator/3.2.1/Dockerfile | 21 - ...s-cfg.openshift.io_kokumetricsconfigs.yaml | 1056 ----------- ...etrics-operator.clusterserviceversion.yaml | 606 ------- .../3.2.1/metadata/annotations.yaml | 16 - .../3.2.1/tests/scorecard/config.yaml | 40 - koku-metrics-operator/ci.yaml | 7 - 154 files changed, 411 insertions(+), 36364 deletions(-) rename config/crd/bases/{koku-metrics-cfg.openshift.io_kokumetricsconfigs.yaml => costmanagement-metrics-cfg.openshift.io_costmanagementmetricsconfigs.yaml} (85%) rename config/crd/patches/{cainjection_in_kokumetricsconfigs.yaml => cainjection_in_costmanagementmetricsconfigs.yaml} (77%) rename config/crd/patches/{webhook_in_kokumetricsconfigs.yaml => webhook_in_costmanagementmetricsconfigs.yaml} (88%) rename config/manifests/bases/{koku-metrics-operator.clusterserviceversion.yaml => costmanagement-metrics-operator.clusterserviceversion.yaml} (92%) create mode 100644 config/rbac/costmanagementmetricsconfig_editor_role.yaml create mode 100644 config/rbac/costmanagementmetricsconfig_viewer_role.yaml delete mode 100644 config/rbac/kokumetricsconfig_editor_role.yaml delete mode 100644 config/rbac/kokumetricsconfig_viewer_role.yaml rename config/samples/{koku-metrics-cfg_v1beta1_kokumetricsconfig.yaml => costmanagement-metrics-cfg_v1beta1_costmanagementmetricsconfig.yaml} (75%) delete mode 100644 config/scorecard/bases/config.yaml delete mode 100644 config/scorecard/kustomization.yaml delete mode 100644 config/scorecard/patches/basic.config.yaml delete mode 100644 config/scorecard/patches/olm.config.yaml delete mode 100644 koku-metrics-operator/0.9.0/Dockerfile delete mode 100644 koku-metrics-operator/0.9.0/manifests/koku-metrics-cfg.openshift.io_kokumetricsconfigs.yaml delete mode 100644 koku-metrics-operator/0.9.0/manifests/koku-metrics-operator.clusterserviceversion.yaml delete mode 100644 koku-metrics-operator/0.9.0/metadata/annotations.yaml delete mode 100644 koku-metrics-operator/0.9.1/Dockerfile delete mode 100644 koku-metrics-operator/0.9.1/manifests/koku-metrics-cfg.openshift.io_kokumetricsconfigs.yaml delete mode 100644 koku-metrics-operator/0.9.1/manifests/koku-metrics-operator.clusterserviceversion.yaml delete mode 100644 koku-metrics-operator/0.9.1/metadata/annotations.yaml delete mode 100644 koku-metrics-operator/0.9.2/Dockerfile delete mode 100644 koku-metrics-operator/0.9.2/manifests/koku-metrics-cfg.openshift.io_kokumetricsconfigs.yaml delete mode 100644 koku-metrics-operator/0.9.2/manifests/koku-metrics-operator.clusterserviceversion.yaml delete mode 100644 koku-metrics-operator/0.9.2/metadata/annotations.yaml delete mode 100644 koku-metrics-operator/0.9.3/Dockerfile delete mode 100644 koku-metrics-operator/0.9.3/manifests/koku-metrics-cfg.openshift.io_kokumetricsconfigs.yaml delete mode 100644 koku-metrics-operator/0.9.3/manifests/koku-metrics-operator.clusterserviceversion.yaml delete mode 100644 koku-metrics-operator/0.9.3/metadata/annotations.yaml delete mode 100644 koku-metrics-operator/0.9.4/Dockerfile delete mode 100644 koku-metrics-operator/0.9.4/manifests/koku-metrics-cfg.openshift.io_kokumetricsconfigs.yaml delete mode 100644 koku-metrics-operator/0.9.4/manifests/koku-metrics-operator.clusterserviceversion.yaml delete mode 100644 koku-metrics-operator/0.9.4/metadata/annotations.yaml delete mode 100644 koku-metrics-operator/0.9.5/Dockerfile delete mode 100644 koku-metrics-operator/0.9.5/manifests/koku-metrics-cfg.openshift.io_kokumetricsconfigs.yaml delete mode 100644 koku-metrics-operator/0.9.5/manifests/koku-metrics-operator.clusterserviceversion.yaml delete mode 100644 koku-metrics-operator/0.9.5/metadata/annotations.yaml delete mode 100644 koku-metrics-operator/0.9.6/Dockerfile delete mode 100644 koku-metrics-operator/0.9.6/manifests/koku-metrics-cfg.openshift.io_kokumetricsconfigs.yaml delete mode 100644 koku-metrics-operator/0.9.6/manifests/koku-metrics-operator.clusterserviceversion.yaml delete mode 100644 koku-metrics-operator/0.9.6/metadata/annotations.yaml delete mode 100644 koku-metrics-operator/0.9.7/Dockerfile delete mode 100644 koku-metrics-operator/0.9.7/manifests/koku-metrics-cfg.openshift.io_kokumetricsconfigs.yaml delete mode 100644 koku-metrics-operator/0.9.7/manifests/koku-metrics-operator.clusterserviceversion.yaml delete mode 100644 koku-metrics-operator/0.9.7/metadata/annotations.yaml delete mode 100644 koku-metrics-operator/0.9.8/Dockerfile delete mode 100644 koku-metrics-operator/0.9.8/manifests/koku-metrics-cfg.openshift.io_kokumetricsconfigs.yaml delete mode 100644 koku-metrics-operator/0.9.8/manifests/koku-metrics-operator.clusterserviceversion.yaml delete mode 100644 koku-metrics-operator/0.9.8/metadata/annotations.yaml delete mode 100644 koku-metrics-operator/1.1.1/Dockerfile delete mode 100644 koku-metrics-operator/1.1.1/manifests/koku-metrics-cfg.openshift.io_kokumetricsconfigs.yaml delete mode 100644 koku-metrics-operator/1.1.1/manifests/koku-metrics-operator.clusterserviceversion.yaml delete mode 100644 koku-metrics-operator/1.1.1/metadata/annotations.yaml delete mode 100644 koku-metrics-operator/1.1.1/tests/scorecard/config.yaml delete mode 100644 koku-metrics-operator/1.1.2/Dockerfile delete mode 100644 koku-metrics-operator/1.1.2/manifests/koku-metrics-cfg.openshift.io_kokumetricsconfigs.yaml delete mode 100644 koku-metrics-operator/1.1.2/manifests/koku-metrics-operator.clusterserviceversion.yaml delete mode 100644 koku-metrics-operator/1.1.2/metadata/annotations.yaml delete mode 100644 koku-metrics-operator/1.1.2/tests/scorecard/config.yaml delete mode 100644 koku-metrics-operator/1.1.3/Dockerfile delete mode 100644 koku-metrics-operator/1.1.3/manifests/koku-metrics-cfg.openshift.io_kokumetricsconfigs.yaml delete mode 100644 koku-metrics-operator/1.1.3/manifests/koku-metrics-operator.clusterserviceversion.yaml delete mode 100644 koku-metrics-operator/1.1.3/metadata/annotations.yaml delete mode 100644 koku-metrics-operator/1.1.3/tests/scorecard/config.yaml delete mode 100644 koku-metrics-operator/1.1.4/Dockerfile delete mode 100644 koku-metrics-operator/1.1.4/manifests/koku-metrics-cfg.openshift.io_kokumetricsconfigs.yaml delete mode 100644 koku-metrics-operator/1.1.4/manifests/koku-metrics-operator.clusterserviceversion.yaml delete mode 100644 koku-metrics-operator/1.1.4/metadata/annotations.yaml delete mode 100644 koku-metrics-operator/1.1.4/tests/scorecard/config.yaml delete mode 100644 koku-metrics-operator/1.1.5/Dockerfile delete mode 100644 koku-metrics-operator/1.1.5/manifests/koku-metrics-cfg.openshift.io_kokumetricsconfigs.yaml delete mode 100644 koku-metrics-operator/1.1.5/manifests/koku-metrics-operator.clusterserviceversion.yaml delete mode 100644 koku-metrics-operator/1.1.5/metadata/annotations.yaml delete mode 100644 koku-metrics-operator/1.1.5/tests/scorecard/config.yaml delete mode 100644 koku-metrics-operator/1.1.6/Dockerfile delete mode 100644 koku-metrics-operator/1.1.6/manifests/koku-metrics-cfg.openshift.io_kokumetricsconfigs.yaml delete mode 100644 koku-metrics-operator/1.1.6/manifests/koku-metrics-operator.clusterserviceversion.yaml delete mode 100644 koku-metrics-operator/1.1.6/metadata/annotations.yaml delete mode 100644 koku-metrics-operator/1.1.6/tests/scorecard/config.yaml delete mode 100644 koku-metrics-operator/1.1.7/Dockerfile delete mode 100644 koku-metrics-operator/1.1.7/manifests/koku-metrics-cfg.openshift.io_kokumetricsconfigs.yaml delete mode 100644 koku-metrics-operator/1.1.7/manifests/koku-metrics-operator.clusterserviceversion.yaml delete mode 100644 koku-metrics-operator/1.1.7/metadata/annotations.yaml delete mode 100644 koku-metrics-operator/1.1.7/tests/scorecard/config.yaml delete mode 100644 koku-metrics-operator/1.1.8/Dockerfile delete mode 100644 koku-metrics-operator/1.1.8/manifests/koku-metrics-cfg.openshift.io_kokumetricsconfigs.yaml delete mode 100644 koku-metrics-operator/1.1.8/manifests/koku-metrics-operator.clusterserviceversion.yaml delete mode 100644 koku-metrics-operator/1.1.8/metadata/annotations.yaml delete mode 100644 koku-metrics-operator/1.1.8/tests/scorecard/config.yaml delete mode 100644 koku-metrics-operator/1.1.9/Dockerfile delete mode 100644 koku-metrics-operator/1.1.9/manifests/koku-metrics-cfg.openshift.io_kokumetricsconfigs.yaml delete mode 100644 koku-metrics-operator/1.1.9/manifests/koku-metrics-operator.clusterserviceversion.yaml delete mode 100644 koku-metrics-operator/1.1.9/metadata/annotations.yaml delete mode 100644 koku-metrics-operator/1.1.9/tests/scorecard/config.yaml delete mode 100644 koku-metrics-operator/1.2.0/Dockerfile delete mode 100644 koku-metrics-operator/1.2.0/manifests/koku-metrics-cfg.openshift.io_kokumetricsconfigs.yaml delete mode 100644 koku-metrics-operator/1.2.0/manifests/koku-metrics-operator.clusterserviceversion.yaml delete mode 100644 koku-metrics-operator/1.2.0/metadata/annotations.yaml delete mode 100644 koku-metrics-operator/1.2.0/tests/scorecard/config.yaml delete mode 100644 koku-metrics-operator/2.0.0/Dockerfile delete mode 100644 koku-metrics-operator/2.0.0/manifests/koku-metrics-cfg.openshift.io_kokumetricsconfigs.yaml delete mode 100644 koku-metrics-operator/2.0.0/manifests/koku-metrics-operator.clusterserviceversion.yaml delete mode 100644 koku-metrics-operator/2.0.0/metadata/annotations.yaml delete mode 100644 koku-metrics-operator/2.0.0/tests/scorecard/config.yaml delete mode 100644 koku-metrics-operator/3.0.0/Dockerfile delete mode 100644 koku-metrics-operator/3.0.0/manifests/koku-metrics-cfg.openshift.io_kokumetricsconfigs.yaml delete mode 100644 koku-metrics-operator/3.0.0/manifests/koku-metrics-operator.clusterserviceversion.yaml delete mode 100644 koku-metrics-operator/3.0.0/metadata/annotations.yaml delete mode 100644 koku-metrics-operator/3.0.0/tests/scorecard/config.yaml delete mode 100644 koku-metrics-operator/3.0.1/Dockerfile delete mode 100644 koku-metrics-operator/3.0.1/manifests/koku-metrics-cfg.openshift.io_kokumetricsconfigs.yaml delete mode 100644 koku-metrics-operator/3.0.1/manifests/koku-metrics-operator.clusterserviceversion.yaml delete mode 100644 koku-metrics-operator/3.0.1/metadata/annotations.yaml delete mode 100644 koku-metrics-operator/3.0.1/tests/scorecard/config.yaml delete mode 100644 koku-metrics-operator/3.1.0/Dockerfile delete mode 100644 koku-metrics-operator/3.1.0/manifests/koku-metrics-cfg.openshift.io_kokumetricsconfigs.yaml delete mode 100644 koku-metrics-operator/3.1.0/manifests/koku-metrics-operator.clusterserviceversion.yaml delete mode 100644 koku-metrics-operator/3.1.0/metadata/annotations.yaml delete mode 100644 koku-metrics-operator/3.1.0/tests/scorecard/config.yaml delete mode 100644 koku-metrics-operator/3.2.0/Dockerfile delete mode 100644 koku-metrics-operator/3.2.0/manifests/koku-metrics-cfg.openshift.io_kokumetricsconfigs.yaml delete mode 100644 koku-metrics-operator/3.2.0/manifests/koku-metrics-operator.clusterserviceversion.yaml delete mode 100644 koku-metrics-operator/3.2.0/metadata/annotations.yaml delete mode 100644 koku-metrics-operator/3.2.0/tests/scorecard/config.yaml delete mode 100644 koku-metrics-operator/3.2.1/Dockerfile delete mode 100644 koku-metrics-operator/3.2.1/manifests/koku-metrics-cfg.openshift.io_kokumetricsconfigs.yaml delete mode 100644 koku-metrics-operator/3.2.1/manifests/koku-metrics-operator.clusterserviceversion.yaml delete mode 100644 koku-metrics-operator/3.2.1/metadata/annotations.yaml delete mode 100644 koku-metrics-operator/3.2.1/tests/scorecard/config.yaml delete mode 100644 koku-metrics-operator/ci.yaml diff --git a/Makefile b/Makefile index 5be2c9c68..c5696c38b 100644 --- a/Makefile +++ b/Makefile @@ -3,8 +3,8 @@ # To re-generate a bundle for another specific version without changing the standard setup, you can: # - use the VERSION as arg of the bundle target (e.g make bundle VERSION=0.0.2) # - use environment variables to overwrite this value (e.g export VERSION=0.0.2) -PREVIOUS_VERSION ?= 3.2.0 -VERSION ?= 3.2.1 +PREVIOUS_VERSION ?= 3.2.1 +VERSION ?= 3.3.0 MIN_KUBE_VERSION = 1.24.0 MIN_OCP_VERSION = 4.12 diff --git a/PROJECT b/PROJECT index 478fb1ae3..b3d93ae6a 100644 --- a/PROJECT +++ b/PROJECT @@ -4,7 +4,7 @@ layout: plugins: manifests.sdk.operatorframework.io/v2: {} scorecard.sdk.operatorframework.io/v2: {} -projectName: koku-metrics-operator +projectName: costmanagement-metrics-operator repo: github.com/project-koku/koku-metrics-operator resources: - api: @@ -12,8 +12,8 @@ resources: namespaced: true controller: true domain: openshift.io - group: koku-metrics-cfg - kind: KokuMetricsConfig + group: costmanagement-metrics-cfg + kind: CostManagementMetricsConfig path: github.com/project-koku/koku-metrics-operator/api/v1beta1 version: v1beta1 version: "3" diff --git a/api/v1beta1/groupversion_info.go b/api/v1beta1/groupversion_info.go index 388a28634..b552da3b7 100644 --- a/api/v1beta1/groupversion_info.go +++ b/api/v1beta1/groupversion_info.go @@ -3,9 +3,9 @@ // SPDX-License-Identifier: Apache-2.0 // -// Package v1beta1 contains API Schema definitions for the koku-metrics-cfg v1beta1 API group +// Package v1beta1 contains API Schema definitions for the costmanagement-metrics-cfg v1beta1 API group // +kubebuilder:object:generate=true -// +groupName=koku-metrics-cfg.openshift.io +// +groupName=costmanagement-metrics-cfg.openshift.io package v1beta1 import ( @@ -17,7 +17,7 @@ import ( var ( // NamePrefix is the prefix used to distinguish upstream and downstream operators - NamePrefix = "koku" + NamePrefix = "costmanagement" // GroupVersion is group version used to register these objects GroupVersion = schema.GroupVersion{Group: fmt.Sprintf("%s-metrics-cfg.openshift.io", NamePrefix), Version: "v1beta1"} diff --git a/api/v1beta1/metricsconfig_types.go b/api/v1beta1/metricsconfig_types.go index bd0b33a7a..19f950797 100644 --- a/api/v1beta1/metricsconfig_types.go +++ b/api/v1beta1/metricsconfig_types.go @@ -95,10 +95,10 @@ type EmbeddedPersistentVolumeClaim struct { Spec corev1.PersistentVolumeClaimSpec `json:"spec,omitempty" protobuf:"bytes,2,opt,name=spec"` } -// AuthenticationSpec defines the desired state of Authentication object in the KokuMetricsConfigSpec. +// AuthenticationSpec defines the desired state of Authentication object in the CostManagementMetricsConfigSpec. type AuthenticationSpec struct { - // AuthType is a field of KokuMetricsConfig to represent the authentication type to be used basic, service-account or token. + // AuthType is a field of CostManagementMetricsConfig to represent the authentication type to be used basic, service-account or token. // Valid values are: // - "basic" (deprecated) : Enables authentication using user and password from authentication secret. // - "service-account" : Enables authentication using client_id and client_secret from the secret containing service account information. @@ -106,105 +106,105 @@ type AuthenticationSpec struct { // +kubebuilder:default="token" AuthType AuthenticationType `json:"type"` - // AuthenticationSecretName is a field of KokuMetricsConfig to represent the secret with the user and password used for uploads. + // AuthenticationSecretName is a field of CostManagementMetricsConfig to represent the secret with the user and password used for uploads. // +optional AuthenticationSecretName string `json:"secret_name,omitempty"` // FOR DEVELOPMENT ONLY. - // TokenURL is a field of KokuMetricsConfig to represent the endpoint used to obtain the service account token. + // TokenURL is a field of CostManagementMetricsConfig to represent the endpoint used to obtain the service account token. // The default is `https://sso.redhat.com/auth/realms/redhat-external/protocol/openid-connect/token`. // +kubebuilder:default=`https://sso.redhat.com/auth/realms/redhat-external/protocol/openid-connect/token` TokenURL string `json:"token_url,omitempty"` } -// PackagingSpec defines the desired state of the Packaging object in the KokuMetricsConfigSpec. +// PackagingSpec defines the desired state of the Packaging object in the CostManagementMetricsConfigSpec. type PackagingSpec struct { - // MaxSize is a field of KokuMetricsConfig to represent the max file size in megabytes that will be compressed for upload to Ingress. + // MaxSize is a field of CostManagementMetricsConfig to represent the max file size in megabytes that will be compressed for upload to Ingress. // The default is 100. // +kubebuilder:validation:Minimum=1 // +kubebuilder:validation:Maximum=100 // +kubebuilder:default=100 MaxSize int64 `json:"max_size_MB"` - // MaxReports is a field of KokuMetricsConfig to represent the maximum number of reports to store. + // MaxReports is a field of CostManagementMetricsConfig to represent the maximum number of reports to store. // The default is 30 reports which corresponds to approximately 7 days worth of data given the other default values. // +kubebuilder:validation:Minimum=1 // +kubebuilder:default=30 MaxReports int64 `json:"max_reports_to_store"` } -// UploadSpec defines the desired state of Authentication object in the KokuMetricsConfigSpec. +// UploadSpec defines the desired state of Authentication object in the CostManagementMetricsConfigSpec. type UploadSpec struct { // FOR DEVELOPMENT ONLY. - // IngressAPIPath is a field of KokuMetricsConfig to represent the path of the Ingress API service. + // IngressAPIPath is a field of CostManagementMetricsConfig to represent the path of the Ingress API service. // The default is `/api/ingress/v1/upload`. // +kubebuilder:default=`/api/ingress/v1/upload` IngressAPIPath string `json:"ingress_path"` - // UploadWait is a field of KokuMetricsConfig to represent the time to wait before sending an upload. + // UploadWait is a field of CostManagementMetricsConfig to represent the time to wait before sending an upload. // +optional // +kubebuilder:validation:Minimum=0 UploadWait *int64 `json:"upload_wait,omitempty"` - // UploadCycle is a field of KokuMetricsConfig to represent the number of minutes between each upload schedule. + // UploadCycle is a field of CostManagementMetricsConfig to represent the number of minutes between each upload schedule. // The default is 360 min (6 hours). // +kubebuilder:validation:Minimum=0 // +kubebuilder:default=360 UploadCycle *int64 `json:"upload_cycle"` - // UploadToggle is a field of KokuMetricsConfig to represent if the operator is installed in a restricted-network. + // UploadToggle is a field of CostManagementMetricsConfig to represent if the operator is installed in a restricted-network. // If `false`, the operator will not upload to console.redhat.com or check/create sources. // The default is true. // +kubebuilder:default=true UploadToggle *bool `json:"upload_toggle"` - // ValidateCert is a field of KokuMetricsConfig to represent if the Ingress endpoint must be certificate validated. + // ValidateCert is a field of CostManagementMetricsConfig to represent if the Ingress endpoint must be certificate validated. // +kubebuilder:default=true ValidateCert *bool `json:"validate_cert"` } -// PrometheusSpec defines the desired state of PrometheusConfig object in the KokuMetricsConfigSpec. +// PrometheusSpec defines the desired state of PrometheusConfig object in the CostManagementMetricsConfigSpec. type PrometheusSpec struct { - // ContextTimeout is a field of KokuMetricsConfig to represent how long a query to prometheus should run in seconds before timing out. + // ContextTimeout is a field of CostManagementMetricsConfig to represent how long a query to prometheus should run in seconds before timing out. // The default is 120 seconds. // +kubebuilder:validation:Minimum=10 // +kubebuilder:validation:Maximum=180 // +kubebuilder:default=120 ContextTimeout *int64 `json:"context_timeout,omitempty"` - // CollectPreviousData is a field of KokuMetricsConfig to represent whether or not the operator will gather previous data upon KokuMetricsConfig - // creation. This toggle only changes operator behavior when a new KokuMetricsConfig is created. When `true`, the operator will gather all + // CollectPreviousData is a field of CostManagementMetricsConfig to represent whether or not the operator will gather previous data upon CostManagementMetricsConfig + // creation. This toggle only changes operator behavior when a new CostManagementMetricsConfig is created. When `true`, the operator will gather all // existing Prometheus data for the current month. The default is true. // +kubebuilder:default=true CollectPreviousData *bool `json:"collect_previous_data,omitempty"` - // DisableMetricsCollectionCostManagement is a field of KokuMetricsConfig to represent whether or not the operator will generate + // DisableMetricsCollectionCostManagement is a field of CostManagementMetricsConfig to represent whether or not the operator will generate // reports for cost-management metrics. The default is false. // +kubebuilder:default=false DisableMetricsCollectionCostManagement *bool `json:"disable_metrics_collection_cost_management,omitempty"` - // DisableMetricsCollectionResourceOptimization is a field of KokuMetricsConfig to represent whether or not the operator will generate + // DisableMetricsCollectionResourceOptimization is a field of CostManagementMetricsConfig to represent whether or not the operator will generate // reports for resource-optimization metrics. The default is false. // +kubebuilder:default=false DisableMetricsCollectionResourceOptimization *bool `json:"disable_metrics_collection_resource_optimization,omitempty"` // FOR DEVELOPMENT ONLY. - // SvcAddress is a field of KokuMetricsConfig to represent the thanos-querier address. + // SvcAddress is a field of CostManagementMetricsConfig to represent the thanos-querier address. // The default is `https://thanos-querier.openshift-monitoring.svc:9091`. // +kubebuilder:default=`https://thanos-querier.openshift-monitoring.svc:9091` SvcAddress string `json:"service_address"` // FOR DEVELOPMENT ONLY. - // SkipTLSVerification is a field of KokuMetricsConfig to represent if the thanos-querier endpoint must be certificate validated. + // SkipTLSVerification is a field of CostManagementMetricsConfig to represent if the thanos-querier endpoint must be certificate validated. // The default is false. // +kubebuilder:default=false SkipTLSVerification *bool `json:"skip_tls_verification"` } -// CloudDotRedHatSourceSpec defines the desired state of CloudDotRedHatSource object in the KokuMetricsConfigSpec. +// CloudDotRedHatSourceSpec defines the desired state of CloudDotRedHatSource object in the CostManagementMetricsConfigSpec. type CloudDotRedHatSourceSpec struct { // FOR DEVELOPMENT ONLY. @@ -228,143 +228,143 @@ type CloudDotRedHatSourceSpec struct { CheckCycle *int64 `json:"check_cycle"` } -// KokuMetricsConfigSpec defines the desired state of KokuMetricsConfig. -type KokuMetricsConfigSpec struct { +// CostManagementMetricsConfigSpec defines the desired state of CostManagementMetricsConfig. +type CostManagementMetricsConfigSpec struct { // +kubebuilder:validation:preserveUnknownFields=false - // ClusterID is a field of KokuMetricsConfig to represent the cluster UUID. Normally this value should not be + // ClusterID is a field of CostManagementMetricsConfig to represent the cluster UUID. Normally this value should not be // specified. Only set this value if the clusterID cannot be obtained from the ClusterVersion. // +optional ClusterID string `json:"clusterID,omitempty"` - // ClusterVersion is a field of KokuMetricsConfig to represent the cluster version. Normally this value should not be + // ClusterVersion is a field of CostManagementMetricsConfig to represent the cluster version. Normally this value should not be // specified. Only set this value if the clusterVersion cannot be obtained from the ClusterVersion. // +optional ClusterVersion string `json:"clusterVersion,omitempty"` // FOR DEVELOPMENT ONLY. - // APIURL is a field of KokuMetricsConfig to represent the url of the API endpoint for service interaction. + // APIURL is a field of CostManagementMetricsConfig to represent the url of the API endpoint for service interaction. // The default is `https://console.redhat.com`. // +kubebuilder:default=`https://console.redhat.com` APIURL string `json:"api_url,omitempty"` - // Authentication is a field of KokuMetricsConfig to represent the authentication object. + // Authentication is a field of CostManagementMetricsConfig to represent the authentication object. Authentication AuthenticationSpec `json:"authentication"` - //Packaging is a field of KokuMetricsConfig to represent the packaging object. + //Packaging is a field of CostManagementMetricsConfig to represent the packaging object. Packaging PackagingSpec `json:"packaging"` - // Upload is a field of KokuMetricsConfig to represent the upload object. + // Upload is a field of CostManagementMetricsConfig to represent the upload object. Upload UploadSpec `json:"upload"` - // PrometheusConfig is a field of KokuMetricsConfig to represent the configuration of Prometheus connection. + // PrometheusConfig is a field of CostManagementMetricsConfig to represent the configuration of Prometheus connection. PrometheusConfig PrometheusSpec `json:"prometheus_config"` // source represents the desired integration on console.redhat.com. Source CloudDotRedHatSourceSpec `json:"source"` - // VolumeClaimTemplate is a field of KokuMetricsConfig to represent a PVC template. + // VolumeClaimTemplate is a field of CostManagementMetricsConfig to represent a PVC template. VolumeClaimTemplate *EmbeddedPersistentVolumeClaim `json:"volume_claim_template,omitempty"` } -// AuthenticationStatus defines the desired state of Authentication object in the KokuMetricsConfigStatus. +// AuthenticationStatus defines the desired state of Authentication object in the CostManagementMetricsConfigStatus. type AuthenticationStatus struct { - // AuthType is a field of KokuMetricsConfig to represent the authentication type to be used basic, service-account or token. + // AuthType is a field of CostManagementMetricsConfig to represent the authentication type to be used basic, service-account or token. AuthType AuthenticationType `json:"type,omitempty"` - // AuthenticationSecretName is a field of KokuMetricsConfig to represent the secret with the user and password used for uploads. + // AuthenticationSecretName is a field of CostManagementMetricsConfig to represent the secret with the user and password used for uploads. AuthenticationSecretName string `json:"secret_name,omitempty"` - // AuthenticationCredentialsFound is a field of KokuMetricsConfig to represent if used for uploads were found. + // AuthenticationCredentialsFound is a field of CostManagementMetricsConfig to represent if used for uploads were found. AuthenticationCredentialsFound *bool `json:"credentials_found,omitempty"` - // ValidBasicAuth is a field of KokuMetricsConfig to represent if the given basic auth credentials are valid. + // ValidBasicAuth is a field of CostManagementMetricsConfig to represent if the given basic auth credentials are valid. ValidBasicAuth *bool `json:"valid_basic_auth,omitempty"` - // AuthErrorMessage is a field of KokuMetricsConfig to represent an `invalid credentials` error message. + // AuthErrorMessage is a field of CostManagementMetricsConfig to represent an `invalid credentials` error message. AuthErrorMessage string `json:"error,omitempty"` - // LastVerificationTime is a field of KokuMetricsConfig to represent the last time credentials were verified. + // LastVerificationTime is a field of CostManagementMetricsConfig to represent the last time credentials were verified. // +nullable LastVerificationTime *metav1.Time `json:"last_credential_verification_time,omitempty"` - // TokenURL is a field of KokuMetricsConfig to represent the url used to generate a service account token. + // TokenURL is a field of CostManagementMetricsConfig to represent the url used to generate a service account token. TokenURL string `json:"token_url,omitempty"` - // DeprecationNotice is a field of KokuMetricsConfig to represent a deprecation notice. + // DeprecationNotice is a field of CostManagementMetricsConfig to represent a deprecation notice. DeprecationNotice string `json:"deprecation_notice,omitempty"` } -// PackagingStatus defines the observed state of the Packing object in the KokuMetricsConfigStatus. +// PackagingStatus defines the observed state of the Packing object in the CostManagementMetricsConfigStatus. type PackagingStatus struct { - // LastSuccessfulPackagingTime is a field of KokuMetricsConfig that shows the time of the last successful file packaging. + // LastSuccessfulPackagingTime is a field of CostManagementMetricsConfig that shows the time of the last successful file packaging. // +nullable LastSuccessfulPackagingTime metav1.Time `json:"last_successful_packaging_time,omitempty"` - // MaxReports is a field of KokuMetricsConfig to represent the maximum number of reports to store. + // MaxReports is a field of CostManagementMetricsConfig to represent the maximum number of reports to store. MaxReports *int64 `json:"max_reports_to_store,omitempty"` - // MaxSize is a field of KokuMetricsConfig to represent the max file size in megabytes that will be compressed for upload to Ingress. + // MaxSize is a field of CostManagementMetricsConfig to represent the max file size in megabytes that will be compressed for upload to Ingress. MaxSize *int64 `json:"max_size_MB,omitempty"` - // PackagedFiles is a field of KokuMetricsConfig to represent the list of file packages in storage. + // PackagedFiles is a field of CostManagementMetricsConfig to represent the list of file packages in storage. PackagedFiles []string `json:"packaged_files,omitempty"` - // PackagingError is a field of KokuMetricsConfig to represent the error encountered packaging the reports. + // PackagingError is a field of CostManagementMetricsConfig to represent the error encountered packaging the reports. PackagingError string `json:"error,omitempty"` - // ReportCount is a field of KokuMetricsConfig to represent the number of reports in storage. + // ReportCount is a field of CostManagementMetricsConfig to represent the number of reports in storage. ReportCount *int64 `json:"number_reports_stored,omitempty"` } -// UploadStatus defines the observed state of Upload object in the KokuMetricsConfigStatus. +// UploadStatus defines the observed state of Upload object in the CostManagementMetricsConfigStatus. type UploadStatus struct { - // IngressAPIPath is a field of KokuMetricsConfig to represent the path of the Ingress API service. + // IngressAPIPath is a field of CostManagementMetricsConfig to represent the path of the Ingress API service. // +optional IngressAPIPath string `json:"ingress_path,omitempty"` - // UploadToggle is a field of KokuMetricsConfig to represent if the operator should upload to console.redhat.com. + // UploadToggle is a field of CostManagementMetricsConfig to represent if the operator should upload to console.redhat.com. // The default is true UploadToggle *bool `json:"upload,omitempty"` - // UploadWait is a field of KokuMetricsConfig to represent the time to wait before sending an upload. + // UploadWait is a field of CostManagementMetricsConfig to represent the time to wait before sending an upload. UploadWait *int64 `json:"upload_wait,omitempty"` - // UploadCycle is a field of KokuMetricsConfig to represent the number of minutes between each upload schedule. + // UploadCycle is a field of CostManagementMetricsConfig to represent the number of minutes between each upload schedule. // The default is 360 min (6 hours). UploadCycle *int64 `json:"upload_cycle,omitempty"` - // UploadError is a field of KokuMetricsConfigStatus to represent the error encountered uploading reports. + // UploadError is a field of CostManagementMetricsConfigStatus to represent the error encountered uploading reports. // +optional UploadError string `json:"error,omitempty"` - // LastUploadStatus is a field of KokuMetricsConfig that shows the http status of the last upload. + // LastUploadStatus is a field of CostManagementMetricsConfig that shows the http status of the last upload. LastUploadStatus string `json:"last_upload_status,omitempty"` - // LastPayloadName is a field of KokuMetricsConfig that shows the name of the last payload file. + // LastPayloadName is a field of CostManagementMetricsConfig that shows the name of the last payload file. LastPayloadName string `json:"last_payload_name,omitempty"` - // LastPayloadManifest is a field of KokuMetricsConfig that shows the manifestID of the last payload. + // LastPayloadManifest is a field of CostManagementMetricsConfig that shows the manifestID of the last payload. LastPayloadManifestID string `json:"last_payload_manifest_id,omitempty"` - // LastPayloadRequestID is a field of KokuMetricsConfig that shows the insights request id of the last payload. + // LastPayloadRequestID is a field of CostManagementMetricsConfig that shows the insights request id of the last payload. LastPayloadRequestID string `json:"last_payload_request_id,omitempty"` - // LastPayloadFiles is a field of KokuMetricsConfig to represent the list of files in the last payload that was sent. + // LastPayloadFiles is a field of CostManagementMetricsConfig to represent the list of files in the last payload that was sent. LastPayloadFiles []string `json:"last_payload_files,omitempty"` - // LastSuccessfulUploadTime is a field of KokuMetricsConfig that shows the time of the last successful upload. + // LastSuccessfulUploadTime is a field of CostManagementMetricsConfig that shows the time of the last successful upload. // +nullable LastSuccessfulUploadTime metav1.Time `json:"last_successful_upload_time,omitempty"` - // ValidateCert is a field of KokuMetricsConfig to represent if the Ingress endpoint must be certificate validated. + // ValidateCert is a field of CostManagementMetricsConfig to represent if the Ingress endpoint must be certificate validated. ValidateCert *bool `json:"validate_cert,omitempty"` } -// CloudDotRedHatSourceStatus defines the observed state of CloudDotRedHatSource object in the KokuMetricsConfigStatus. +// CloudDotRedHatSourceStatus defines the observed state of CloudDotRedHatSource object in the CostManagementMetricsConfigStatus. type CloudDotRedHatSourceStatus struct { // sources_path is the prefix of the Sources API on console.redhat.com. @@ -400,40 +400,40 @@ type CloudDotRedHatSourceStatus struct { // PrometheusStatus defines the status for querying prometheus. type PrometheusStatus struct { - // PrometheusConfigured is a field of KokuMetricsConfigStatus to represent if the operator is configured to connect to prometheus. + // PrometheusConfigured is a field of CostManagementMetricsConfigStatus to represent if the operator is configured to connect to prometheus. PrometheusConfigured bool `json:"prometheus_configured"` - // ConfigError is a field of KokuMetricsConfigStatus to represent errors during prometheus configuration. + // ConfigError is a field of CostManagementMetricsConfigStatus to represent errors during prometheus configuration. ConfigError string `json:"configuration_error,omitempty"` - // PrometheusConnected is a field of KokuMetricsConfigStatus to represent if prometheus can be queried. + // PrometheusConnected is a field of CostManagementMetricsConfigStatus to represent if prometheus can be queried. PrometheusConnected bool `json:"prometheus_connected"` - // ContextTimeout is a field of KokuMetricsConfigState to represent how long a query to prometheus should run in seconds before timing out. + // ContextTimeout is a field of CostManagementMetricsConfigState to represent how long a query to prometheus should run in seconds before timing out. ContextTimeout *int64 `json:"context_timeout,omitempty"` - // ConnectionError is a field of KokuMetricsConfigStatus to represent errors during prometheus test query. + // ConnectionError is a field of CostManagementMetricsConfigStatus to represent errors during prometheus test query. ConnectionError string `json:"prometheus_connection_error,omitempty"` - // LastQueryStartTime is a field of KokuMetricsConfigStatus to represent the last time queries were started. + // LastQueryStartTime is a field of CostManagementMetricsConfigStatus to represent the last time queries were started. // +nullable LastQueryStartTime metav1.Time `json:"last_query_start_time,omitempty"` - // LastQuerySuccessTime is a field of KokuMetricsConfigStatus to represent the last time queries were successful. + // LastQuerySuccessTime is a field of CostManagementMetricsConfigStatus to represent the last time queries were successful. // +nullable LastQuerySuccessTime metav1.Time `json:"last_query_success_time,omitempty"` - // PreviousDataCollected is a field of KokuMetricsConfigStatus to represent whether or not the operator gathered the available Prometheus - // data upon KokuMetricsConfig creation. + // PreviousDataCollected is a field of CostManagementMetricsConfigStatus to represent whether or not the operator gathered the available Prometheus + // data upon CostManagementMetricsConfig creation. // +kubebuilder:default=false PreviousDataCollected bool `json:"previous_data_collected,omitempty"` - // DisabledMetricsCollectionCostManagement is a field of KokuMetricsConfigStatus to represent whether or not collecting + // DisabledMetricsCollectionCostManagement is a field of CostManagementMetricsConfigStatus to represent whether or not collecting // cost-management metrics is disabled. The default is false. // +kubebuilder:default=false DisabledMetricsCollectionCostManagement *bool `json:"disabled_metrics_collection_cost_management,omitempty"` - // DisabledMetricsCollectionResourceOptimization is a field of KokuMetricsConfigStatus to represent whether or not collecting + // DisabledMetricsCollectionResourceOptimization is a field of CostManagementMetricsConfigStatus to represent whether or not collecting // resource-optimization metrics is disabled. The default is true. // +kubebuilder:default=true DisabledMetricsCollectionResourceOptimization *bool `json:"disabled_metrics_collection_resource_optimization,omitempty"` @@ -441,23 +441,23 @@ type PrometheusStatus struct { // SvcAddress is the internal thanos-querier address. SvcAddress string `json:"service_address,omitempty"` - // SkipTLSVerification is a field of KokuMetricsConfigStatus to represent if the thanos-querier endpoint must be certificate validated. + // SkipTLSVerification is a field of CostManagementMetricsConfigStatus to represent if the thanos-querier endpoint must be certificate validated. SkipTLSVerification *bool `json:"skip_tls_verification,omitempty"` } // ReportsStatus defines the status for generating reports. type ReportsStatus struct { - // ReportMonth is a field of KokuMetricsConfigStatus to represent the month for which reports are being generated. + // ReportMonth is a field of CostManagementMetricsConfigStatus to represent the month for which reports are being generated. ReportMonth string `json:"report_month,omitempty"` - // LastHourQueried is a field of KokuMetricsConfigStatus to represent the time range for which metrics were last queried. + // LastHourQueried is a field of CostManagementMetricsConfigStatus to represent the time range for which metrics were last queried. LastHourQueried string `json:"last_hour_queried,omitempty"` - // DataCollected is a field of KokuMetricsConfigStatus to represent whether or not data was collected for the last query. + // DataCollected is a field of CostManagementMetricsConfigStatus to represent whether or not data was collected for the last query. DataCollected bool `json:"data_collected,omitempty"` - // DataCollectionMessage is a field of KokuMetricsConfigStatus to represent a message associated with the data_collected status. + // DataCollectionMessage is a field of CostManagementMetricsConfigStatus to represent a message associated with the data_collected status. DataCollectionMessage string `json:"data_collection_message,omitempty"` } @@ -471,31 +471,31 @@ type StorageStatus struct { VolumeMounted bool `json:"volume_mounted,omitempty"` } -// KokuMetricsConfigStatus defines the observed state of KokuMetricsConfig. -type KokuMetricsConfigStatus struct { +// CostManagementMetricsConfigStatus defines the observed state of CostManagementMetricsConfig. +type CostManagementMetricsConfigStatus struct { // INSERT ADDITIONAL STATUS FIELD - define observed state of cluster // Important: Run "make" to regenerate code after modifying this file - // ClusterID is a field of KokuMetricsConfig to represent the cluster UUID. + // ClusterID is a field of CostManagementMetricsConfig to represent the cluster UUID. ClusterID string `json:"clusterID,omitempty"` - // ClusterVersion is a field of KokuMetricsConfig to represent the cluster version. + // ClusterVersion is a field of CostManagementMetricsConfig to represent the cluster version. ClusterVersion string `json:"clusterVersion,omitempty"` - // APIURL is a field of KokuMetricsConfig to represent the url of the API endpoint for service interaction. + // APIURL is a field of CostManagementMetricsConfig to represent the url of the API endpoint for service interaction. // +optional APIURL string `json:"api_url,omitempty"` - // Authentication is a field of KokuMetricsConfig to represent the authentication status. + // Authentication is a field of CostManagementMetricsConfig to represent the authentication status. Authentication AuthenticationStatus `json:"authentication,omitempty"` - // Packaging is a field of KokuMetricsConfig to represent the packaging status + // Packaging is a field of CostManagementMetricsConfig to represent the packaging status Packaging PackagingStatus `json:"packaging,omitempty"` - // Upload is a field of KokuMetricsConfig to represent the upload object. + // Upload is a field of CostManagementMetricsConfig to represent the upload object. Upload UploadStatus `json:"upload,omitempty"` - // OperatorCommit is a field of KokuMetricsConfig that shows the commit hash of the operator. + // OperatorCommit is a field of CostManagementMetricsConfig that shows the commit hash of the operator. OperatorCommit string `json:"operator_commit,omitempty"` // Prometheus represents the status of premetheus queries. @@ -511,7 +511,7 @@ type KokuMetricsConfigStatus struct { // Storage is a field Storage StorageStatus `json:"storage,omitempty"` - // PersistentVolumeClaim is a field of KokuMetricsConfig to represent a PVC. + // PersistentVolumeClaim is a field of CostManagementMetricsConfig to represent a PVC. PersistentVolumeClaim *EmbeddedPersistentVolumeClaim `json:"persistent_volume_claim,omitempty"` } @@ -520,33 +520,33 @@ type KokuMetricsConfigStatus struct { // +kubebuilder:storageversion // +kubebuilder:resource:scope=Namespaced -// KokuMetricsConfig is the Schema for the kokumetricsconfig API -type KokuMetricsConfig struct { +// CostManagementMetricsConfig is the Schema for the costmanagementmetricsconfig API +type CostManagementMetricsConfig struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` - Spec KokuMetricsConfigSpec `json:"spec"` - Status KokuMetricsConfigStatus `json:"status,omitempty"` + Spec CostManagementMetricsConfigSpec `json:"spec"` + Status CostManagementMetricsConfigStatus `json:"status,omitempty"` } // +kubebuilder:object:root=true -// KokuMetricsConfigList contains a list of KokuMetricsConfig -type KokuMetricsConfigList struct { +// CostManagementMetricsConfigList contains a list of CostManagementMetricsConfig +type CostManagementMetricsConfigList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` - Items []KokuMetricsConfig `json:"items"` + Items []CostManagementMetricsConfig `json:"items"` } func init() { - SchemeBuilder.Register(&KokuMetricsConfig{}, &KokuMetricsConfigList{}) + SchemeBuilder.Register(&CostManagementMetricsConfig{}, &CostManagementMetricsConfigList{}) } // +kubebuilder:object:generate:=false -type MetricsConfig = KokuMetricsConfig +type MetricsConfig = CostManagementMetricsConfig // +kubebuilder:object:generate:=false -type MetricsConfigSpec = KokuMetricsConfigSpec +type MetricsConfigSpec = CostManagementMetricsConfigSpec // +kubebuilder:object:generate:=false -type MetricsConfigStatus = KokuMetricsConfigStatus +type MetricsConfigStatus = CostManagementMetricsConfigStatus diff --git a/api/v1beta1/zz_generated.deepcopy.go b/api/v1beta1/zz_generated.deepcopy.go index d20247b31..725628e77 100644 --- a/api/v1beta1/zz_generated.deepcopy.go +++ b/api/v1beta1/zz_generated.deepcopy.go @@ -159,7 +159,7 @@ func (in *EmbeddedPersistentVolumeClaim) DeepCopy() *EmbeddedPersistentVolumeCla } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *KokuMetricsConfig) DeepCopyInto(out *KokuMetricsConfig) { +func (in *CostManagementMetricsConfig) DeepCopyInto(out *CostManagementMetricsConfig) { *out = *in out.TypeMeta = in.TypeMeta in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) @@ -167,18 +167,18 @@ func (in *KokuMetricsConfig) DeepCopyInto(out *KokuMetricsConfig) { in.Status.DeepCopyInto(&out.Status) } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KokuMetricsConfig. -func (in *KokuMetricsConfig) DeepCopy() *KokuMetricsConfig { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CostManagementMetricsConfig. +func (in *CostManagementMetricsConfig) DeepCopy() *CostManagementMetricsConfig { if in == nil { return nil } - out := new(KokuMetricsConfig) + out := new(CostManagementMetricsConfig) in.DeepCopyInto(out) return out } // DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *KokuMetricsConfig) DeepCopyObject() runtime.Object { +func (in *CostManagementMetricsConfig) DeepCopyObject() runtime.Object { if c := in.DeepCopy(); c != nil { return c } @@ -186,31 +186,31 @@ func (in *KokuMetricsConfig) DeepCopyObject() runtime.Object { } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *KokuMetricsConfigList) DeepCopyInto(out *KokuMetricsConfigList) { +func (in *CostManagementMetricsConfigList) DeepCopyInto(out *CostManagementMetricsConfigList) { *out = *in out.TypeMeta = in.TypeMeta in.ListMeta.DeepCopyInto(&out.ListMeta) if in.Items != nil { in, out := &in.Items, &out.Items - *out = make([]KokuMetricsConfig, len(*in)) + *out = make([]CostManagementMetricsConfig, len(*in)) for i := range *in { (*in)[i].DeepCopyInto(&(*out)[i]) } } } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KokuMetricsConfigList. -func (in *KokuMetricsConfigList) DeepCopy() *KokuMetricsConfigList { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CostManagementMetricsConfigList. +func (in *CostManagementMetricsConfigList) DeepCopy() *CostManagementMetricsConfigList { if in == nil { return nil } - out := new(KokuMetricsConfigList) + out := new(CostManagementMetricsConfigList) in.DeepCopyInto(out) return out } // DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *KokuMetricsConfigList) DeepCopyObject() runtime.Object { +func (in *CostManagementMetricsConfigList) DeepCopyObject() runtime.Object { if c := in.DeepCopy(); c != nil { return c } @@ -218,7 +218,7 @@ func (in *KokuMetricsConfigList) DeepCopyObject() runtime.Object { } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *KokuMetricsConfigSpec) DeepCopyInto(out *KokuMetricsConfigSpec) { +func (in *CostManagementMetricsConfigSpec) DeepCopyInto(out *CostManagementMetricsConfigSpec) { *out = *in out.Authentication = in.Authentication out.Packaging = in.Packaging @@ -232,18 +232,18 @@ func (in *KokuMetricsConfigSpec) DeepCopyInto(out *KokuMetricsConfigSpec) { } } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KokuMetricsConfigSpec. -func (in *KokuMetricsConfigSpec) DeepCopy() *KokuMetricsConfigSpec { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CostManagementMetricsConfigSpec. +func (in *CostManagementMetricsConfigSpec) DeepCopy() *CostManagementMetricsConfigSpec { if in == nil { return nil } - out := new(KokuMetricsConfigSpec) + out := new(CostManagementMetricsConfigSpec) in.DeepCopyInto(out) return out } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *KokuMetricsConfigStatus) DeepCopyInto(out *KokuMetricsConfigStatus) { +func (in *CostManagementMetricsConfigStatus) DeepCopyInto(out *CostManagementMetricsConfigStatus) { *out = *in in.Authentication.DeepCopyInto(&out.Authentication) in.Packaging.DeepCopyInto(&out.Packaging) @@ -259,12 +259,12 @@ func (in *KokuMetricsConfigStatus) DeepCopyInto(out *KokuMetricsConfigStatus) { } } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KokuMetricsConfigStatus. -func (in *KokuMetricsConfigStatus) DeepCopy() *KokuMetricsConfigStatus { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CostManagementMetricsConfigStatus. +func (in *CostManagementMetricsConfigStatus) DeepCopy() *CostManagementMetricsConfigStatus { if in == nil { return nil } - out := new(KokuMetricsConfigStatus) + out := new(CostManagementMetricsConfigStatus) in.DeepCopyInto(out) return out } diff --git a/config/crd/bases/koku-metrics-cfg.openshift.io_kokumetricsconfigs.yaml b/config/crd/bases/costmanagement-metrics-cfg.openshift.io_costmanagementmetricsconfigs.yaml similarity index 85% rename from config/crd/bases/koku-metrics-cfg.openshift.io_kokumetricsconfigs.yaml rename to config/crd/bases/costmanagement-metrics-cfg.openshift.io_costmanagementmetricsconfigs.yaml index 72cba6798..48ebc0f4d 100644 --- a/config/crd/bases/koku-metrics-cfg.openshift.io_kokumetricsconfigs.yaml +++ b/config/crd/bases/costmanagement-metrics-cfg.openshift.io_costmanagementmetricsconfigs.yaml @@ -4,20 +4,21 @@ kind: CustomResourceDefinition metadata: annotations: controller-gen.kubebuilder.io/version: v0.14.0 - name: kokumetricsconfigs.koku-metrics-cfg.openshift.io + name: costmanagementmetricsconfigs.costmanagement-metrics-cfg.openshift.io spec: - group: koku-metrics-cfg.openshift.io + group: costmanagement-metrics-cfg.openshift.io names: - kind: KokuMetricsConfig - listKind: KokuMetricsConfigList - plural: kokumetricsconfigs - singular: kokumetricsconfig + kind: CostManagementMetricsConfig + listKind: CostManagementMetricsConfigList + plural: costmanagementmetricsconfigs + singular: costmanagementmetricsconfig scope: Namespaced versions: - name: v1beta1 schema: openAPIV3Schema: - description: KokuMetricsConfig is the Schema for the kokumetricsconfig API + description: CostManagementMetricsConfig is the Schema for the costmanagementmetricsconfig + API properties: apiVersion: description: |- @@ -37,21 +38,22 @@ spec: metadata: type: object spec: - description: KokuMetricsConfigSpec defines the desired state of KokuMetricsConfig. + description: CostManagementMetricsConfigSpec defines the desired state + of CostManagementMetricsConfig. properties: api_url: default: https://console.redhat.com description: |- FOR DEVELOPMENT ONLY. - APIURL is a field of KokuMetricsConfig to represent the url of the API endpoint for service interaction. + APIURL is a field of CostManagementMetricsConfig to represent the url of the API endpoint for service interaction. The default is `https://console.redhat.com`. type: string authentication: - description: Authentication is a field of KokuMetricsConfig to represent - the authentication object. + description: Authentication is a field of CostManagementMetricsConfig + to represent the authentication object. properties: secret_name: - description: AuthenticationSecretName is a field of KokuMetricsConfig + description: AuthenticationSecretName is a field of CostManagementMetricsConfig to represent the secret with the user and password used for uploads. type: string @@ -59,13 +61,13 @@ spec: default: https://sso.redhat.com/auth/realms/redhat-external/protocol/openid-connect/token description: |- FOR DEVELOPMENT ONLY. - TokenURL is a field of KokuMetricsConfig to represent the endpoint used to obtain the service account token. + TokenURL is a field of CostManagementMetricsConfig to represent the endpoint used to obtain the service account token. The default is `https://sso.redhat.com/auth/realms/redhat-external/protocol/openid-connect/token`. type: string type: default: token description: |- - AuthType is a field of KokuMetricsConfig to represent the authentication type to be used basic, service-account or token. + AuthType is a field of CostManagementMetricsConfig to represent the authentication type to be used basic, service-account or token. Valid values are: - "basic" (deprecated) : Enables authentication using user and password from authentication secret. - "service-account" : Enables authentication using client_id and client_secret from the secret containing service account information. @@ -80,22 +82,22 @@ spec: type: object clusterID: description: |- - ClusterID is a field of KokuMetricsConfig to represent the cluster UUID. Normally this value should not be + ClusterID is a field of CostManagementMetricsConfig to represent the cluster UUID. Normally this value should not be specified. Only set this value if the clusterID cannot be obtained from the ClusterVersion. type: string clusterVersion: description: |- - ClusterVersion is a field of KokuMetricsConfig to represent the cluster version. Normally this value should not be + ClusterVersion is a field of CostManagementMetricsConfig to represent the cluster version. Normally this value should not be specified. Only set this value if the clusterVersion cannot be obtained from the ClusterVersion. type: string packaging: - description: Packaging is a field of KokuMetricsConfig to represent - the packaging object. + description: Packaging is a field of CostManagementMetricsConfig to + represent the packaging object. properties: max_reports_to_store: default: 30 description: |- - MaxReports is a field of KokuMetricsConfig to represent the maximum number of reports to store. + MaxReports is a field of CostManagementMetricsConfig to represent the maximum number of reports to store. The default is 30 reports which corresponds to approximately 7 days worth of data given the other default values. format: int64 minimum: 1 @@ -103,7 +105,7 @@ spec: max_size_MB: default: 100 description: |- - MaxSize is a field of KokuMetricsConfig to represent the max file size in megabytes that will be compressed for upload to Ingress. + MaxSize is a field of CostManagementMetricsConfig to represent the max file size in megabytes that will be compressed for upload to Ingress. The default is 100. format: int64 maximum: 100 @@ -114,20 +116,20 @@ spec: - max_size_MB type: object prometheus_config: - description: PrometheusConfig is a field of KokuMetricsConfig to represent - the configuration of Prometheus connection. + description: PrometheusConfig is a field of CostManagementMetricsConfig + to represent the configuration of Prometheus connection. properties: collect_previous_data: default: true description: |- - CollectPreviousData is a field of KokuMetricsConfig to represent whether or not the operator will gather previous data upon KokuMetricsConfig - creation. This toggle only changes operator behavior when a new KokuMetricsConfig is created. When `true`, the operator will gather all + CollectPreviousData is a field of CostManagementMetricsConfig to represent whether or not the operator will gather previous data upon CostManagementMetricsConfig + creation. This toggle only changes operator behavior when a new CostManagementMetricsConfig is created. When `true`, the operator will gather all existing Prometheus data for the current month. The default is true. type: boolean context_timeout: default: 120 description: |- - ContextTimeout is a field of KokuMetricsConfig to represent how long a query to prometheus should run in seconds before timing out. + ContextTimeout is a field of CostManagementMetricsConfig to represent how long a query to prometheus should run in seconds before timing out. The default is 120 seconds. format: int64 maximum: 180 @@ -136,27 +138,27 @@ spec: disable_metrics_collection_cost_management: default: false description: |- - DisableMetricsCollectionCostManagement is a field of KokuMetricsConfig to represent whether or not the operator will generate + DisableMetricsCollectionCostManagement is a field of CostManagementMetricsConfig to represent whether or not the operator will generate reports for cost-management metrics. The default is false. type: boolean disable_metrics_collection_resource_optimization: default: false description: |- - DisableMetricsCollectionResourceOptimization is a field of KokuMetricsConfig to represent whether or not the operator will generate + DisableMetricsCollectionResourceOptimization is a field of CostManagementMetricsConfig to represent whether or not the operator will generate reports for resource-optimization metrics. The default is false. type: boolean service_address: default: https://thanos-querier.openshift-monitoring.svc:9091 description: |- FOR DEVELOPMENT ONLY. - SvcAddress is a field of KokuMetricsConfig to represent the thanos-querier address. + SvcAddress is a field of CostManagementMetricsConfig to represent the thanos-querier address. The default is `https://thanos-querier.openshift-monitoring.svc:9091`. type: string skip_tls_verification: default: false description: |- FOR DEVELOPMENT ONLY. - SkipTLSVerification is a field of KokuMetricsConfig to represent if the thanos-querier endpoint must be certificate validated. + SkipTLSVerification is a field of CostManagementMetricsConfig to represent if the thanos-querier endpoint must be certificate validated. The default is false. type: boolean required: @@ -196,20 +198,20 @@ spec: - sources_path type: object upload: - description: Upload is a field of KokuMetricsConfig to represent the - upload object. + description: Upload is a field of CostManagementMetricsConfig to represent + the upload object. properties: ingress_path: default: /api/ingress/v1/upload description: |- FOR DEVELOPMENT ONLY. - IngressAPIPath is a field of KokuMetricsConfig to represent the path of the Ingress API service. + IngressAPIPath is a field of CostManagementMetricsConfig to represent the path of the Ingress API service. The default is `/api/ingress/v1/upload`. type: string upload_cycle: default: 360 description: |- - UploadCycle is a field of KokuMetricsConfig to represent the number of minutes between each upload schedule. + UploadCycle is a field of CostManagementMetricsConfig to represent the number of minutes between each upload schedule. The default is 360 min (6 hours). format: int64 minimum: 0 @@ -217,20 +219,20 @@ spec: upload_toggle: default: true description: |- - UploadToggle is a field of KokuMetricsConfig to represent if the operator is installed in a restricted-network. + UploadToggle is a field of CostManagementMetricsConfig to represent if the operator is installed in a restricted-network. If `false`, the operator will not upload to console.redhat.com or check/create sources. The default is true. type: boolean upload_wait: - description: UploadWait is a field of KokuMetricsConfig to represent - the time to wait before sending an upload. + description: UploadWait is a field of CostManagementMetricsConfig + to represent the time to wait before sending an upload. format: int64 minimum: 0 type: integer validate_cert: default: true - description: ValidateCert is a field of KokuMetricsConfig to represent - if the Ingress endpoint must be certificate validated. + description: ValidateCert is a field of CostManagementMetricsConfig + to represent if the Ingress endpoint must be certificate validated. type: boolean required: - ingress_path @@ -239,8 +241,8 @@ spec: - validate_cert type: object volume_claim_template: - description: VolumeClaimTemplate is a field of KokuMetricsConfig to - represent a PVC template. + description: VolumeClaimTemplate is a field of CostManagementMetricsConfig + to represent a PVC template. properties: apiVersion: description: |- @@ -494,108 +496,109 @@ spec: - upload type: object status: - description: KokuMetricsConfigStatus defines the observed state of KokuMetricsConfig. + description: CostManagementMetricsConfigStatus defines the observed state + of CostManagementMetricsConfig. properties: api_url: - description: APIURL is a field of KokuMetricsConfig to represent the - url of the API endpoint for service interaction. + description: APIURL is a field of CostManagementMetricsConfig to represent + the url of the API endpoint for service interaction. type: string authentication: - description: Authentication is a field of KokuMetricsConfig to represent - the authentication status. + description: Authentication is a field of CostManagementMetricsConfig + to represent the authentication status. properties: credentials_found: - description: AuthenticationCredentialsFound is a field of KokuMetricsConfig + description: AuthenticationCredentialsFound is a field of CostManagementMetricsConfig to represent if used for uploads were found. type: boolean deprecation_notice: - description: DeprecationNotice is a field of KokuMetricsConfig + description: DeprecationNotice is a field of CostManagementMetricsConfig to represent a deprecation notice. type: string error: - description: AuthErrorMessage is a field of KokuMetricsConfig + description: AuthErrorMessage is a field of CostManagementMetricsConfig to represent an `invalid credentials` error message. type: string last_credential_verification_time: - description: LastVerificationTime is a field of KokuMetricsConfig + description: LastVerificationTime is a field of CostManagementMetricsConfig to represent the last time credentials were verified. format: date-time nullable: true type: string secret_name: - description: AuthenticationSecretName is a field of KokuMetricsConfig + description: AuthenticationSecretName is a field of CostManagementMetricsConfig to represent the secret with the user and password used for uploads. type: string token_url: - description: TokenURL is a field of KokuMetricsConfig to represent - the url used to generate a service account token. + description: TokenURL is a field of CostManagementMetricsConfig + to represent the url used to generate a service account token. type: string type: - description: AuthType is a field of KokuMetricsConfig to represent - the authentication type to be used basic, service-account or - token. + description: AuthType is a field of CostManagementMetricsConfig + to represent the authentication type to be used basic, service-account + or token. enum: - token - basic - service-account type: string valid_basic_auth: - description: ValidBasicAuth is a field of KokuMetricsConfig to - represent if the given basic auth credentials are valid. + description: ValidBasicAuth is a field of CostManagementMetricsConfig + to represent if the given basic auth credentials are valid. type: boolean type: object clusterID: - description: ClusterID is a field of KokuMetricsConfig to represent - the cluster UUID. + description: ClusterID is a field of CostManagementMetricsConfig to + represent the cluster UUID. type: string clusterVersion: - description: ClusterVersion is a field of KokuMetricsConfig to represent - the cluster version. + description: ClusterVersion is a field of CostManagementMetricsConfig + to represent the cluster version. type: string operator_commit: - description: OperatorCommit is a field of KokuMetricsConfig that shows - the commit hash of the operator. + description: OperatorCommit is a field of CostManagementMetricsConfig + that shows the commit hash of the operator. type: string packaging: - description: Packaging is a field of KokuMetricsConfig to represent - the packaging status + description: Packaging is a field of CostManagementMetricsConfig to + represent the packaging status properties: error: - description: PackagingError is a field of KokuMetricsConfig to - represent the error encountered packaging the reports. + description: PackagingError is a field of CostManagementMetricsConfig + to represent the error encountered packaging the reports. type: string last_successful_packaging_time: - description: LastSuccessfulPackagingTime is a field of KokuMetricsConfig + description: LastSuccessfulPackagingTime is a field of CostManagementMetricsConfig that shows the time of the last successful file packaging. format: date-time nullable: true type: string max_reports_to_store: - description: MaxReports is a field of KokuMetricsConfig to represent - the maximum number of reports to store. + description: MaxReports is a field of CostManagementMetricsConfig + to represent the maximum number of reports to store. format: int64 type: integer max_size_MB: - description: MaxSize is a field of KokuMetricsConfig to represent - the max file size in megabytes that will be compressed for upload - to Ingress. + description: MaxSize is a field of CostManagementMetricsConfig + to represent the max file size in megabytes that will be compressed + for upload to Ingress. format: int64 type: integer number_reports_stored: - description: ReportCount is a field of KokuMetricsConfig to represent - the number of reports in storage. + description: ReportCount is a field of CostManagementMetricsConfig + to represent the number of reports in storage. format: int64 type: integer packaged_files: - description: PackagedFiles is a field of KokuMetricsConfig to - represent the list of file packages in storage. + description: PackagedFiles is a field of CostManagementMetricsConfig + to represent the list of file packages in storage. items: type: string type: array type: object persistent_volume_claim: - description: PersistentVolumeClaim is a field of KokuMetricsConfig + description: PersistentVolumeClaim is a field of CostManagementMetricsConfig to represent a PVC. properties: apiVersion: @@ -846,11 +849,11 @@ spec: description: Prometheus represents the status of premetheus queries. properties: configuration_error: - description: ConfigError is a field of KokuMetricsConfigStatus + description: ConfigError is a field of CostManagementMetricsConfigStatus to represent errors during prometheus configuration. type: string context_timeout: - description: ContextTimeout is a field of KokuMetricsConfigState + description: ContextTimeout is a field of CostManagementMetricsConfigState to represent how long a query to prometheus should run in seconds before timing out. format: int64 @@ -858,23 +861,23 @@ spec: disabled_metrics_collection_cost_management: default: false description: |- - DisabledMetricsCollectionCostManagement is a field of KokuMetricsConfigStatus to represent whether or not collecting + DisabledMetricsCollectionCostManagement is a field of CostManagementMetricsConfigStatus to represent whether or not collecting cost-management metrics is disabled. The default is false. type: boolean disabled_metrics_collection_resource_optimization: default: true description: |- - DisabledMetricsCollectionResourceOptimization is a field of KokuMetricsConfigStatus to represent whether or not collecting + DisabledMetricsCollectionResourceOptimization is a field of CostManagementMetricsConfigStatus to represent whether or not collecting resource-optimization metrics is disabled. The default is true. type: boolean last_query_start_time: - description: LastQueryStartTime is a field of KokuMetricsConfigStatus + description: LastQueryStartTime is a field of CostManagementMetricsConfigStatus to represent the last time queries were started. format: date-time nullable: true type: string last_query_success_time: - description: LastQuerySuccessTime is a field of KokuMetricsConfigStatus + description: LastQuerySuccessTime is a field of CostManagementMetricsConfigStatus to represent the last time queries were successful. format: date-time nullable: true @@ -882,26 +885,26 @@ spec: previous_data_collected: default: false description: |- - PreviousDataCollected is a field of KokuMetricsConfigStatus to represent whether or not the operator gathered the available Prometheus - data upon KokuMetricsConfig creation. + PreviousDataCollected is a field of CostManagementMetricsConfigStatus to represent whether or not the operator gathered the available Prometheus + data upon CostManagementMetricsConfig creation. type: boolean prometheus_configured: - description: PrometheusConfigured is a field of KokuMetricsConfigStatus + description: PrometheusConfigured is a field of CostManagementMetricsConfigStatus to represent if the operator is configured to connect to prometheus. type: boolean prometheus_connected: - description: PrometheusConnected is a field of KokuMetricsConfigStatus + description: PrometheusConnected is a field of CostManagementMetricsConfigStatus to represent if prometheus can be queried. type: boolean prometheus_connection_error: - description: ConnectionError is a field of KokuMetricsConfigStatus + description: ConnectionError is a field of CostManagementMetricsConfigStatus to represent errors during prometheus test query. type: string service_address: description: SvcAddress is the internal thanos-querier address. type: string skip_tls_verification: - description: SkipTLSVerification is a field of KokuMetricsConfigStatus + description: SkipTLSVerification is a field of CostManagementMetricsConfigStatus to represent if the thanos-querier endpoint must be certificate validated. type: boolean @@ -913,20 +916,20 @@ spec: description: Reports represents the status of report generation. properties: data_collected: - description: DataCollected is a field of KokuMetricsConfigStatus + description: DataCollected is a field of CostManagementMetricsConfigStatus to represent whether or not data was collected for the last query. type: boolean data_collection_message: - description: DataCollectionMessage is a field of KokuMetricsConfigStatus + description: DataCollectionMessage is a field of CostManagementMetricsConfigStatus to represent a message associated with the data_collected status. type: string last_hour_queried: - description: LastHourQueried is a field of KokuMetricsConfigStatus + description: LastHourQueried is a field of CostManagementMetricsConfigStatus to represent the time range for which metrics were last queried. type: string report_month: - description: ReportMonth is a field of KokuMetricsConfigStatus + description: ReportMonth is a field of CostManagementMetricsConfigStatus to represent the month for which reports are being generated. type: string type: object @@ -981,65 +984,65 @@ spec: type: string type: object upload: - description: Upload is a field of KokuMetricsConfig to represent the - upload object. + description: Upload is a field of CostManagementMetricsConfig to represent + the upload object. properties: error: - description: UploadError is a field of KokuMetricsConfigStatus + description: UploadError is a field of CostManagementMetricsConfigStatus to represent the error encountered uploading reports. type: string ingress_path: - description: IngressAPIPath is a field of KokuMetricsConfig to - represent the path of the Ingress API service. + description: IngressAPIPath is a field of CostManagementMetricsConfig + to represent the path of the Ingress API service. type: string last_payload_files: - description: LastPayloadFiles is a field of KokuMetricsConfig + description: LastPayloadFiles is a field of CostManagementMetricsConfig to represent the list of files in the last payload that was sent. items: type: string type: array last_payload_manifest_id: - description: LastPayloadManifest is a field of KokuMetricsConfig + description: LastPayloadManifest is a field of CostManagementMetricsConfig that shows the manifestID of the last payload. type: string last_payload_name: - description: LastPayloadName is a field of KokuMetricsConfig that - shows the name of the last payload file. + description: LastPayloadName is a field of CostManagementMetricsConfig + that shows the name of the last payload file. type: string last_payload_request_id: - description: LastPayloadRequestID is a field of KokuMetricsConfig + description: LastPayloadRequestID is a field of CostManagementMetricsConfig that shows the insights request id of the last payload. type: string last_successful_upload_time: - description: LastSuccessfulUploadTime is a field of KokuMetricsConfig + description: LastSuccessfulUploadTime is a field of CostManagementMetricsConfig that shows the time of the last successful upload. format: date-time nullable: true type: string last_upload_status: - description: LastUploadStatus is a field of KokuMetricsConfig + description: LastUploadStatus is a field of CostManagementMetricsConfig that shows the http status of the last upload. type: string upload: description: |- - UploadToggle is a field of KokuMetricsConfig to represent if the operator should upload to console.redhat.com. + UploadToggle is a field of CostManagementMetricsConfig to represent if the operator should upload to console.redhat.com. The default is true type: boolean upload_cycle: description: |- - UploadCycle is a field of KokuMetricsConfig to represent the number of minutes between each upload schedule. + UploadCycle is a field of CostManagementMetricsConfig to represent the number of minutes between each upload schedule. The default is 360 min (6 hours). format: int64 type: integer upload_wait: - description: UploadWait is a field of KokuMetricsConfig to represent - the time to wait before sending an upload. + description: UploadWait is a field of CostManagementMetricsConfig + to represent the time to wait before sending an upload. format: int64 type: integer validate_cert: - description: ValidateCert is a field of KokuMetricsConfig to represent - if the Ingress endpoint must be certificate validated. + description: ValidateCert is a field of CostManagementMetricsConfig + to represent if the Ingress endpoint must be certificate validated. type: boolean type: object type: object diff --git a/config/crd/kustomization.yaml b/config/crd/kustomization.yaml index 841cdc918..4bc3c1871 100644 --- a/config/crd/kustomization.yaml +++ b/config/crd/kustomization.yaml @@ -2,18 +2,18 @@ # since it depends on service name and namespace that are out of this kustomize package. # It should be run by config/default resources: -- bases/koku-metrics-cfg.openshift.io_kokumetricsconfigs.yaml +- bases/costmanagement-metrics-cfg.openshift.io_costmanagementmetricsconfigs.yaml # +kubebuilder:scaffold:crdkustomizeresource # patchesStrategicMerge: # [WEBHOOK] To enable webhook, uncomment all the sections with [WEBHOOK] prefix. # patches here are for enabling the conversion webhook for each CRD -# - patches/webhook_in_kokumetricsconfigs.yaml +# - patches/webhook_in_costmanagementmetricsconfigs.yaml # +kubebuilder:scaffold:crdkustomizewebhookpatch # [CA injection] To enable webhook, uncomment all the sections with [CA injection] prefix. # patches here are for enabling the CA injection for each CRD -# - patches/cainjection_in_kokumetricsconfigs.yaml +# - patches/cainjection_in_costmanagementmetricsconfigs.yaml # +kubebuilder:scaffold:crdkustomizecainjectionpatch # the following config is for teaching kustomize how to do kustomization for CRDs. diff --git a/config/crd/patches/cainjection_in_kokumetricsconfigs.yaml b/config/crd/patches/cainjection_in_costmanagementmetricsconfigs.yaml similarity index 77% rename from config/crd/patches/cainjection_in_kokumetricsconfigs.yaml rename to config/crd/patches/cainjection_in_costmanagementmetricsconfigs.yaml index 7f1c8de1e..0bfee9eb3 100644 --- a/config/crd/patches/cainjection_in_kokumetricsconfigs.yaml +++ b/config/crd/patches/cainjection_in_costmanagementmetricsconfigs.yaml @@ -5,4 +5,4 @@ kind: CustomResourceDefinition metadata: annotations: service.beta.openshift.io/inject-cabundle: "true" - name: kokumetricsconfigs.koku-metrics-cfg.openshift.io + name: costmanagementmetricsconfigs.costmanagement-metrics-cfg.openshift.io diff --git a/config/crd/patches/webhook_in_kokumetricsconfigs.yaml b/config/crd/patches/webhook_in_costmanagementmetricsconfigs.yaml similarity index 88% rename from config/crd/patches/webhook_in_kokumetricsconfigs.yaml rename to config/crd/patches/webhook_in_costmanagementmetricsconfigs.yaml index 0c7ccfa20..bacb40621 100644 --- a/config/crd/patches/webhook_in_kokumetricsconfigs.yaml +++ b/config/crd/patches/webhook_in_costmanagementmetricsconfigs.yaml @@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1beta1 kind: CustomResourceDefinition metadata: - name: kokumetricsconfigs.koku-metrics-cfg.openshift.io + name: costmanagementmetricsconfigs.costmanagement-metrics-cfg.openshift.io spec: conversion: strategy: Webhook diff --git a/config/default/kustomization.yaml b/config/default/kustomization.yaml index 4c2d2d4cd..21e1c196d 100644 --- a/config/default/kustomization.yaml +++ b/config/default/kustomization.yaml @@ -1,16 +1,16 @@ # Adds namespace to all resources. -namespace: koku-metrics-operator +namespace: costmanagement-metrics-operator # Value of this field is prepended to the # names of all resources, e.g. a deployment named # "wordpress" becomes "alices-wordpress". # Note that it should also match with the prefix (text before '-') of the namespace # field above. -namePrefix: koku-metrics- +namePrefix: costmanagement-metrics- # Labels to add to all resources and selectors. commonLabels: - app: koku-metrics-operator + app: costmanagement-metrics-operator apiVersion: kustomize.config.k8s.io/v1beta1 kind: Kustomization diff --git a/config/default/manager_webhook_patch.yaml b/config/default/manager_webhook_patch.yaml index d80616eb0..4059f912a 100644 --- a/config/default/manager_webhook_patch.yaml +++ b/config/default/manager_webhook_patch.yaml @@ -20,4 +20,4 @@ spec: - name: cert secret: defaultMode: 420 - secretName: koku-metrics-webhook-service + secretName: costmanagement-metrics-webhook-service diff --git a/config/manager/manager.yaml b/config/manager/manager.yaml index dc93b3bbf..4caf57c10 100644 --- a/config/manager/manager.yaml +++ b/config/manager/manager.yaml @@ -83,8 +83,8 @@ spec: - ALL terminationMessagePolicy: FallbackToLogsOnError volumeMounts: - - mountPath: /tmp/koku-metrics-operator-reports - name: koku-metrics-operator-reports + - mountPath: /tmp/costmanagement-metrics-operator-reports + name: costmanagement-metrics-operator-reports securityContext: runAsNonRoot: true seccompProfile: @@ -92,4 +92,4 @@ spec: serviceAccountName: controller-manager terminationGracePeriodSeconds: 10 volumes: - - name: koku-metrics-operator-reports + - name: costmanagement-metrics-operator-reports diff --git a/config/manifests/bases/koku-metrics-operator.clusterserviceversion.yaml b/config/manifests/bases/costmanagement-metrics-operator.clusterserviceversion.yaml similarity index 92% rename from config/manifests/bases/koku-metrics-operator.clusterserviceversion.yaml rename to config/manifests/bases/costmanagement-metrics-operator.clusterserviceversion.yaml index adf9723a0..8cb40fa70 100644 --- a/config/manifests/bases/koku-metrics-operator.clusterserviceversion.yaml +++ b/config/manifests/bases/costmanagement-metrics-operator.clusterserviceversion.yaml @@ -17,11 +17,11 @@ metadata: features.operators.openshift.io/token-auth-aws: "false" features.operators.openshift.io/token-auth-azure: "false" features.operators.openshift.io/token-auth-gcp: "false" - operatorframework.io/suggested-namespace: koku-metrics-operator + operatorframework.io/suggested-namespace: costmanagement-metrics-operator operators.openshift.io/infrastructure-features: '["disconnected", "proxy-aware"]' operators.operatorframework.io/builder: operator-sdk-v1.33.0 operators.operatorframework.io/project_layout: go.kubebuilder.io/v4 - repository: https://github.com/project-koku/koku-metrics-operator + repository: https://github.com/project-costmanagement/costmanagement-metrics-operator support: Cost Management labels: operatorframework.io/arch.amd64: supported @@ -29,19 +29,20 @@ metadata: operatorframework.io/arch.ppc64le: supported operatorframework.io/arch.s390x: supported operatorframework.io/os.linux: supported - name: koku-metrics-operator.v0.0.0 + name: costmanagement-metrics-operator.v0.0.0 namespace: placeholder spec: apiservicedefinitions: {} customresourcedefinitions: owned: - - description: KokuMetricsConfig is the Schema for the kokumetricsconfig API - displayName: Koku Metrics Config - kind: KokuMetricsConfig - name: kokumetricsconfigs.koku-metrics-cfg.openshift.io + - description: CostManagementMetricsConfig is the Schema for the costmanagementmetricsconfig + API + displayName: Cost Management Metrics Config + kind: CostManagementMetricsConfig + name: costmanagementmetricsconfigs.costmanagement-metrics-cfg.openshift.io version: v1beta1 description: placeholder - displayName: Koku Metrics Operator + displayName: CostManagement Metrics Operator icon: - base64data: PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4KPCEtLSBHZW5lcmF0b3I6IEFkb2JlIElsbHVzdHJhdG9yIDIyLjEuMC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OTY3MzUtMC45NzY4MjE5LDEuNDc0NDQxNS0wLjk3NjgyMTksMi40NjUwODc5YzAsMC42ODY1NTQsMC4yMzAzOTI1LDEuMzM2MjEyMiwwLjY5MTE0NjksMS45NDkwMzU2CgkJCWMwLjQ1NjE2MTUsMC42MTI4MjM1LDEuMDMyMTE5OCwxLjAzMjExOTgsMS43MTg2NTg0LDEuMjYyNDk2OUwxNzQuMjgwNjM5NiwxODUuODczNjExNXoiLz4KCTwvZz4KPC9nPgo8L3N2Zz4K mediatype: image/svg+xml @@ -64,8 +65,8 @@ spec: - usage - monitor links: - - name: Koku Metrics Operator source code repository - url: https://github.com/project-koku/koku-metrics-operator + - name: CostManagement Metrics Operator source code repository + url: https://github.com/project-costmanagement/costmanagement-metrics-operator maintainers: - email: costmanagement@redhat.com name: costmanagement @@ -75,5 +76,5 @@ spec: name: Red Hat relatedImages: - image: "" - name: koku-metrics-operator + name: costmanagement-metrics-operator version: 0.0.0 diff --git a/config/manifests/kustomization.yaml b/config/manifests/kustomization.yaml index 63ca74d72..386c6a623 100644 --- a/config/manifests/kustomization.yaml +++ b/config/manifests/kustomization.yaml @@ -1,4 +1,3 @@ resources: -- ../default -- ../samples -- ../scorecard + - ../default + - ../samples diff --git a/config/rbac/costmanagementmetricsconfig_editor_role.yaml b/config/rbac/costmanagementmetricsconfig_editor_role.yaml new file mode 100644 index 000000000..e19cc0655 --- /dev/null +++ b/config/rbac/costmanagementmetricsconfig_editor_role.yaml @@ -0,0 +1,24 @@ +# permissions for end users to edit costmanagementmetricsconfigs. +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: + name: costmanagementmetricsconfig-editor-role +rules: +- apiGroups: + - costmanagement-metrics-cfg.openshift.io + resources: + - costmanagementmetricsconfigs + verbs: + - create + - delete + - get + - list + - patch + - update + - watch +- apiGroups: + - costmanagement-metrics-cfg.openshift.io + resources: + - costmanagementmetricsconfigs/status + verbs: + - get diff --git a/config/rbac/costmanagementmetricsconfig_viewer_role.yaml b/config/rbac/costmanagementmetricsconfig_viewer_role.yaml new file mode 100644 index 000000000..d7f9f33f5 --- /dev/null +++ b/config/rbac/costmanagementmetricsconfig_viewer_role.yaml @@ -0,0 +1,20 @@ +# permissions for end users to view costmanagementmetricsconfigs. +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: + name: costmanagementmetricscfg-viewer-role +rules: +- apiGroups: + - costmanagement-metrics-cfg.openshift.io + resources: + - costmanagementmetricsconfigs + verbs: + - get + - list + - watch +- apiGroups: + - costmanagement-metrics-cfg.openshift.io + resources: + - costmanagementmetricsconfigs/status + verbs: + - get diff --git a/config/rbac/kokumetricsconfig_editor_role.yaml b/config/rbac/kokumetricsconfig_editor_role.yaml deleted file mode 100644 index 01d187db9..000000000 --- a/config/rbac/kokumetricsconfig_editor_role.yaml +++ /dev/null @@ -1,24 +0,0 @@ -# permissions for end users to edit kokumetricsconfigs. -apiVersion: rbac.authorization.k8s.io/v1 -kind: ClusterRole -metadata: - name: kokumetricsconfig-editor-role -rules: -- apiGroups: - - koku-metrics-cfg.openshift.io - resources: - - kokumetricsconfigs - verbs: - - create - - delete - - get - - list - - patch - - update - - watch -- apiGroups: - - koku-metrics-cfg.openshift.io - resources: - - kokumetricsconfigs/status - verbs: - - get diff --git a/config/rbac/kokumetricsconfig_viewer_role.yaml b/config/rbac/kokumetricsconfig_viewer_role.yaml deleted file mode 100644 index e03a1ce6a..000000000 --- a/config/rbac/kokumetricsconfig_viewer_role.yaml +++ /dev/null @@ -1,20 +0,0 @@ -# permissions for end users to view kokumetricsconfigs. -apiVersion: rbac.authorization.k8s.io/v1 -kind: ClusterRole -metadata: - name: kokumetricscfg-viewer-role -rules: -- apiGroups: - - koku-metrics-cfg.openshift.io - resources: - - kokumetricsconfigs - verbs: - - get - - list - - watch -- apiGroups: - - koku-metrics-cfg.openshift.io - resources: - - kokumetricsconfigs/status - verbs: - - get diff --git a/config/rbac/role.yaml b/config/rbac/role.yaml index 054221a18..92a2a66da 100644 --- a/config/rbac/role.yaml +++ b/config/rbac/role.yaml @@ -47,7 +47,7 @@ apiVersion: rbac.authorization.k8s.io/v1 kind: Role metadata: name: manager-role - namespace: koku-metrics-operator + namespace: costmanagement-metrics-operator rules: - apiGroups: - apps @@ -79,9 +79,9 @@ rules: - update - watch - apiGroups: - - koku-metrics-cfg.openshift.io + - costmanagement-metrics-cfg.openshift.io resources: - - kokumetricsconfigs + - costmanagementmetricsconfigs verbs: - create - delete @@ -91,9 +91,9 @@ rules: - update - watch - apiGroups: - - koku-metrics-cfg.openshift.io + - costmanagement-metrics-cfg.openshift.io resources: - - kokumetricsconfigs/status + - costmanagementmetricsconfigs/status verbs: - get - patch diff --git a/config/samples/air-gapped.yaml b/config/samples/air-gapped.yaml index e5b2f563b..ade857107 100644 --- a/config/samples/air-gapped.yaml +++ b/config/samples/air-gapped.yaml @@ -1,7 +1,7 @@ -apiVersion: koku-metrics-cfg.openshift.io/v1beta1 -kind: KokuMetricsConfig +apiVersion: costmanagement-metrics-cfg.openshift.io/v1beta1 +kind: CostManagementMetricsConfig metadata: - name: kokumetricscfg-sample-air-gapped + name: costmanagementmetricscfg-sample-air-gapped spec: authentication: {} packaging: diff --git a/config/samples/koku-metrics-cfg_v1beta1_kokumetricsconfig.yaml b/config/samples/costmanagement-metrics-cfg_v1beta1_costmanagementmetricsconfig.yaml similarity index 75% rename from config/samples/koku-metrics-cfg_v1beta1_kokumetricsconfig.yaml rename to config/samples/costmanagement-metrics-cfg_v1beta1_costmanagementmetricsconfig.yaml index d294b15b0..ed53bfff5 100644 --- a/config/samples/koku-metrics-cfg_v1beta1_kokumetricsconfig.yaml +++ b/config/samples/costmanagement-metrics-cfg_v1beta1_costmanagementmetricsconfig.yaml @@ -1,7 +1,7 @@ -apiVersion: koku-metrics-cfg.openshift.io/v1beta1 -kind: KokuMetricsConfig +apiVersion: costmanagement-metrics-cfg.openshift.io/v1beta1 +kind: CostManagementMetricsConfig metadata: - name: kokumetricscfg-sample-v1beta1 + name: costmanagementmetricscfg-sample-v1beta1 spec: authentication: type: token diff --git a/config/samples/kustomization.yaml b/config/samples/kustomization.yaml index 67e3dc9d5..85f961128 100644 --- a/config/samples/kustomization.yaml +++ b/config/samples/kustomization.yaml @@ -1,3 +1,3 @@ ## This file is auto-generated, do not modify ## resources: -- koku-metrics-cfg_v1beta1_kokumetricsconfig.yaml +- costmanagement-metrics-cfg_v1beta1_costmanagementmetricsconfig.yaml diff --git a/config/scorecard/bases/config.yaml b/config/scorecard/bases/config.yaml deleted file mode 100644 index c77047841..000000000 --- a/config/scorecard/bases/config.yaml +++ /dev/null @@ -1,7 +0,0 @@ -apiVersion: scorecard.operatorframework.io/v1alpha3 -kind: Configuration -metadata: - name: config -stages: -- parallel: true - tests: [] diff --git a/config/scorecard/kustomization.yaml b/config/scorecard/kustomization.yaml deleted file mode 100644 index 61ceb4d78..000000000 --- a/config/scorecard/kustomization.yaml +++ /dev/null @@ -1,17 +0,0 @@ -resources: -- bases/config.yaml -apiVersion: kustomize.config.k8s.io/v1beta1 -kind: Kustomization -patches: -- path: patches/basic.config.yaml - target: - group: scorecard.operatorframework.io - kind: Configuration - name: config - version: v1alpha3 -- path: patches/olm.config.yaml - target: - group: scorecard.operatorframework.io - kind: Configuration - name: config - version: v1alpha3 diff --git a/config/scorecard/patches/basic.config.yaml b/config/scorecard/patches/basic.config.yaml deleted file mode 100644 index bf75b8fa5..000000000 --- a/config/scorecard/patches/basic.config.yaml +++ /dev/null @@ -1,10 +0,0 @@ -- op: add - path: /stages/0/tests/- - value: - entrypoint: - - scorecard-test - - basic-check-spec - image: quay.io/operator-framework/scorecard-test:v1.10.1 - labels: - suite: basic - test: basic-check-spec-test diff --git a/config/scorecard/patches/olm.config.yaml b/config/scorecard/patches/olm.config.yaml deleted file mode 100644 index ee85a44a7..000000000 --- a/config/scorecard/patches/olm.config.yaml +++ /dev/null @@ -1,20 +0,0 @@ -- op: add - path: /stages/0/tests/- - value: - entrypoint: - - scorecard-test - - olm-bundle-validation - image: quay.io/operator-framework/scorecard-test:v1.10.1 - labels: - suite: olm - test: olm-bundle-validation-test -- op: add - path: /stages/0/tests/- - value: - entrypoint: - - scorecard-test - - olm-crds-have-validation - image: quay.io/operator-framework/scorecard-test:v1.10.1 - labels: - suite: olm - test: olm-crds-have-validation-test diff --git a/config/webhook/service.yaml b/config/webhook/service.yaml index 4f124964a..6e7b218f0 100644 --- a/config/webhook/service.yaml +++ b/config/webhook/service.yaml @@ -5,7 +5,7 @@ metadata: name: webhook-service namespace: operator annotations: - service.beta.openshift.io/serving-cert-secret-name: koku-metrics-webhook-service + service.beta.openshift.io/serving-cert-secret-name: costmanagement-metrics-webhook-service spec: ports: - port: 443 diff --git a/docs/cr-example.md b/docs/cr-example.md index 2ebce3a96..82ca8945b 100644 --- a/docs/cr-example.md +++ b/docs/cr-example.md @@ -1,10 +1,10 @@ The following shows a complete CR and gives a brief description of each spec field. Every `spec` field is optional. ``` -apiVersion: koku-metrics-cfg.openshift.io/v1beta1 -kind: KokuMetricsConfig +apiVersion: costmanagement-metrics-cfg.openshift.io/v1beta1 +kind: CostManagementMetricsConfig metadata: - name: kokumetricsconfig-sample + name: costmanagementmetricsconfig-sample spec: api_url: string # default=https://console.redhat.com, the url of the API endpoint for service interaction clusterID: string # The cluster ID -> the reconciler finds this value if not supplied diff --git a/docs/csv-description.md b/docs/csv-description.md index cf7170eec..ec5879c31 100644 --- a/docs/csv-description.md +++ b/docs/csv-description.md @@ -1,22 +1,22 @@ -# Koku Metrics Operator +# CostManagement Metrics Operator ## Introduction -The `koku-metrics-operator` is a component of the [cost managment](https://access.redhat.com/documentation/en-us/cost_management_service) service for Openshift. The operator runs on the latest supported versions of Openshift. This operator obtains OpenShift usage data by querying Prometheus every hour to create metric reports that it uploads to Cost Management at [console.redhat.com](https://console.redhat.com) to be processed. For more information, reach out to . +The `costmanagement-metrics-operator` is a component of the [cost managment](https://access.redhat.com/documentation/en-us/cost_management_service) service for Openshift. The operator runs on the latest supported versions of Openshift. This operator obtains OpenShift usage data by querying Prometheus every hour to create metric reports that it uploads to Cost Management at [console.redhat.com](https://console.redhat.com) to be processed. For more information, reach out to . This operator is capable of functioning within a disconnected/restricted network (aka air-gapped mode). In this mode, the operator will store the packaged reports for manual retrieval instead of being uploaded to Cost Management. Documentation for installing an operator within a restricted network can be found [here](https://docs.openshift.com/container-platform/latest/operators/admin/olm-restricted-networks.html). ## Features and Capabilities #### Metrics collection: -The Koku Metrics Operator (`koku-metrics-operator`) collects the metrics required for Cost Management by: +The CostManagement Metrics Operator (`costmanagement-metrics-operator`) collects the metrics required for Cost Management by: * Querying Prometheus to gather the necessary metrics for Cost Management. * Writing the results of Prometheus queries to CSV report files. * Packaging the CSV report files into tarballs. #### Additional Capabilities: * Resource Optimization metrics collection. -* The operator can be configured to gather all previous data within the configured retention period or a maximum of 90 days. The default data collection period is the 14 previous days. This setting is only applicable to newly created KokuMetricsConfigs. +* The operator can be configured to gather all previous data within the configured retention period or a maximum of 90 days. The default data collection period is the 14 previous days. This setting is only applicable to newly created CostManagementMetricsConfigs. * The operator can be configured to automatically upload the packaged reports to Cost Management through Red Hat Insights Ingress service. * The operator can create an integration in console.redhat.com. An integration is required for Cost Management to process the uploaded packages. -* PersistentVolumeClaim (PVC) configuration: The KokuMetricsConfig CR can accept a PVC definition and the operator will create and mount the PVC. If one is not provided, a default PVC will be created. +* PersistentVolumeClaim (PVC) configuration: The CostManagementMetricsConfig CR can accept a PVC definition and the operator will create and mount the PVC. If one is not provided, a default PVC will be created. * Restricted network installation: this operator can function on a restricted network. In this mode, the operator stores the packaged reports for manual retrieval. ## New in v3.3.0: @@ -42,14 +42,14 @@ The Koku Metrics Operator (`koku-metrics-operator`) collects the metrics require ## New in v2.0.0: * Adds metrics and report generation for resource optimization. This feature will collect additional usage metrics and create a new report in the payload. These metrics are enabled by default, but can be disabled by setting `disable_metrics_collection_resource_optimization` to `true`. -* Collect all available Prometheus data upon CR creation. This feature only applies to newly created KokuMetricsConfigs. The operator will check the monitoring stack configuration in the `openshift-monitoring` namespace. The operator will use the `retention` period set in the `cluster-monitoring-config` ConfigMap if defined, up to a maximum of 90 days. Otherwise it will fall back to collecting 14 days of data, if available. This data collection may be disabled by setting `collect_previous_data` to `false`. Turning this feature off results in the operator collecting metrics from the time the KokuMetricsConfig is created, forward. +* Collect all available Prometheus data upon CR creation. This feature only applies to newly created CostManagementMetricsConfigs. The operator will check the monitoring stack configuration in the `openshift-monitoring` namespace. The operator will use the `retention` period set in the `cluster-monitoring-config` ConfigMap if defined, up to a maximum of 90 days. Otherwise it will fall back to collecting 14 days of data, if available. This data collection may be disabled by setting `collect_previous_data` to `false`. Turning this feature off results in the operator collecting metrics from the time the CostManagementMetricsConfig is created, forward. ## Limitations and Pre-Requisites #### Limitations (Potential for metrics data loss) -* An integration **must** exist in console.redhat.com for an uploaded payload to be processed by Cost Management. The operator sends the payload to the Red Hat Insights Ingress service which usually returns successfully, but the operator does not currently confirm with Cost Management that the payload was processed. After Ingress accepts the uploaded payload, it is deleted from the operator. If the data within the payload is not processed, a gap will be introduced in the usage metrics. Data may be recollected by deleting the `KokuMetricsConfig`, creating a new `KokuMetricsConfig`, and setting `collect_previous_data: true`. This re-collection of data will gather all data stored in Prometheus, up to 90 days. +* An integration **must** exist in console.redhat.com for an uploaded payload to be processed by Cost Management. The operator sends the payload to the Red Hat Insights Ingress service which usually returns successfully, but the operator does not currently confirm with Cost Management that the payload was processed. After Ingress accepts the uploaded payload, it is deleted from the operator. If the data within the payload is not processed, a gap will be introduced in the usage metrics. Data may be recollected by deleting the `CostManagementMetricsConfig`, creating a new `CostManagementMetricsConfig`, and setting `collect_previous_data: true`. This re-collection of data will gather all data stored in Prometheus, up to 90 days. **Note** The following limitations are specific to operators configured to run in a restricted network: -* The `koku-metrics-operator` will not be able to generate new reports if the PVC storage is full. If this occurs, the reports must be manually deleted from the PVC so that the operator can function as normal. +* The `costmanagement-metrics-operator` will not be able to generate new reports if the PVC storage is full. If this occurs, the reports must be manually deleted from the PVC so that the operator can function as normal. * The default report retention is 30 reports (about one week's worth of data). The reports must be manually downloaded and uploaded to console.redhat.com every week, or they will be deleted and the data will be lost. #### Storage configuration prerequisite @@ -59,7 +59,7 @@ The operator will attempt to create and use the following PVC when installed: apiVersion: v1 kind: PersistentVolumeClaim metadata: - name: koku-metrics-operator-data + name: costmanagement-metrics-operator-data spec: accessModes: - ReadWriteOnce @@ -67,13 +67,13 @@ The operator will attempt to create and use the following PVC when installed: requests: storage: 10Gi -If a different PVC should be utilized, a valid PVC should be specified in the KokuMetricsConfig CR as described in the appropriate section below. The PVC to be used may exist already, or the operator will attempt to create it. +If a different PVC should be utilized, a valid PVC should be specified in the CostManagementMetricsConfig CR as described in the appropriate section below. The PVC to be used may exist already, or the operator will attempt to create it. To use the default specification, the follow assumptions must be met: 1. A default StorageClass is defined. 2. Dynamic provisioning for that default StorageClass is enabled. -If these assumptions are not met, the operator will not deploy correctly. In these cases, storage must be manually configured. After configuring storage, a valid PVC template should be supplied in the `volume_claim_template` spec of the KokuMetricsConfig CR. +If these assumptions are not met, the operator will not deploy correctly. In these cases, storage must be manually configured. After configuring storage, a valid PVC template should be supplied in the `volume_claim_template` spec of the CostManagementMetricsConfig CR. ## Configurable parameters: * `authentication`: @@ -83,7 +83,7 @@ If these assumptions are not met, the operator will not deploy correctly. In the * `max_reports_to_store: 30` -> The number of reports to store when configured in air-gapped mode. The default is 30, with a minimum of 1 and no maximum. When the operator is not configured in air-gapped mode, this parameter has no effect. Reports are removed as soon as they are uploaded. * `max_size: 100` -> The maximum size for packaged files in Megabytes prior to compression. The default is 100, with a minimum of 1 and maximum of 100. * `prometheus_config`: - * `collect_previous_data: true` -> Toggle for collecting all available data in Prometheus **upon KokuMetricsConfig creation** (This parameter will start to appear in KokuMetricsConfigs that were created prior to v2.0.0 but will not have any effect unless the KokuMetricsConfig is deleted and recreated). The default is `true`. The operator will first look for a `retention` period in the `cluster-monitoring-config` ConfigMap in the `openshift-monitoring` namespace and gather data over this time period up to a maximum of 90 days. If this configuration is not set, the default is 14 days. (New in v2.0.0) + * `collect_previous_data: true` -> Toggle for collecting all available data in Prometheus **upon CostManagementMetricsConfig creation** (This parameter will start to appear in CostManagementMetricsConfigs that were created prior to v2.0.0 but will not have any effect unless the CostManagementMetricsConfig is deleted and recreated). The default is `true`. The operator will first look for a `retention` period in the `cluster-monitoring-config` ConfigMap in the `openshift-monitoring` namespace and gather data over this time period up to a maximum of 90 days. If this configuration is not set, the default is 14 days. (New in v2.0.0) * `disable_metrics_collection_cost_management: false` -> Toggle for disabling the collection of metrics for Cost Management. The default is false. (New in v2.0.0) * `disable_metrics_collection_resource_optimization: false` -> Toggle for disabling the collection of metrics for Resource Optimization. The default is false. (New in v2.0.0) * `context_timeout: 120` -> The time in seconds before Prometheus queries timeout due to exceeding context timeout. The default is 120, with a minimum of 10 and maximum of 180. @@ -97,19 +97,19 @@ If these assumptions are not met, the operator will not deploy correctly. In the * `upload_wait` -> The amount of time (in seconds) to pause before uploading a payload. The default is a random number between 0 and 35. This is used to decrease service load, but may be set to `0` if desired. * `volume_claim_template` -> see the "Storage configuration prerequisite" section above. -## Configure the koku-metrics-operator -**Note** There are separate instructions for configuring the `koku-metrics-operator` to run in a restricted network. +## Configure the costmanagement-metrics-operator +**Note** There are separate instructions for configuring the `costmanagement-metrics-operator` to run in a restricted network. ##### Configure authentication The default authentication for the operator is `token`. No further steps are required to configure token authentication. If `basic` (deprecated) or `service-account` is the preferred authentication method, a Secret which holds the credentials must be created: -1. On the left navigation pane, select `Workloads` -> `Secrets` -> select Project: `koku-metrics-operator` -> `Create` -> `Key/Value Secret` +1. On the left navigation pane, select `Workloads` -> `Secrets` -> select Project: `costmanagement-metrics-operator` -> `Create` -> `Key/Value Secret` 2. Give the Secret a name and add 2 keys (all lowercase) for the respective authentication type. The values for these keys correspond to console.redhat.com credentials: * basic auth (deprecated): `username` and `password` * service-account auth: `client_id` and `client_secret` 3. Select `Create`. -##### Create the KokuMetricsConfig -Configure the koku-metrics-operator by creating a `KokuMetricsConfig`. -1. On the left navigation pane, select `Operators` -> `Installed Operators` -> `koku-metrics-operator` -> `KokuMetricsConfig` -> `Create Instance`. +##### Create the CostManagementMetricsConfig +Configure the costmanagement-metrics-operator by creating a `CostManagementMetricsConfig`. +1. On the left navigation pane, select `Operators` -> `Installed Operators` -> `costmanagement-metrics-operator` -> `CostManagementMetricsConfig` -> `Create Instance`. 2. For `basic` (deprecated) or `service-account` authentication, edit the following values in the spec: * Replace `authentication: type:` with `basic` or `service-account`. * Add the `secret_name` field under `authentication`, and set it equal to the name of the authentication Secret that was created above. The spec should look similar to the following: @@ -128,13 +128,13 @@ Configure the koku-metrics-operator by creating a `KokuMetricsConfig`. type: service-account ``` -3. To configure the koku-metrics-operator to create a cost management integration, edit the following values in the `source` field: +3. To configure the costmanagement-metrics-operator to create a cost management integration, edit the following values in the `source` field: * Replace the `name` field value with the preferred name of the integration to be created. * Replace the `create_source` field value with `true`. **Note:** if the integration already exists, replace the empty string value of the `name` field with the existing name, and leave `create_source` as false. This will allow the operator to confirm that the integration exists. -4. If not specified, the operator will create a default PersistentVolumeClaim called `koku-metrics-operator-data` with 10Gi of storage. To configure the koku-metrics-operator to use or create a different PVC, edit the following in the spec: +4. If not specified, the operator will create a default PersistentVolumeClaim called `costmanagement-metrics-operator-data` with 10Gi of storage. To configure the costmanagement-metrics-operator to use or create a different PVC, edit the following in the spec: * Add the desired configuration to the `volume_claim_template` field in the spec: ``` @@ -156,15 +156,15 @@ Configure the koku-metrics-operator by creating a `KokuMetricsConfig`. # Restricted Network Usage (disconnected/air-gapped mode) ## Installation -To install the `koku-metrics-operator` in a restricted network, follow the [olm documentation](https://docs.openshift.com/container-platform/latest/operators/admin/olm-restricted-networks.html). The operator is found in the `community-operators` Catalog in the `registry.redhat.io/redhat/community-operator-index:latest` Index. If pruning the index before pushing to the mirrored registry, keep the `koku-metrics-operator` package. +To install the `costmanagement-metrics-operator` in a restricted network, follow the [olm documentation](https://docs.openshift.com/container-platform/latest/operators/admin/olm-restricted-networks.html). The operator is found in the `community-operators` Catalog in the `registry.redhat.io/redhat/community-operator-index:latest` Index. If pruning the index before pushing to the mirrored registry, keep the `costmanagement-metrics-operator` package. Within a restricted network, the operator queries prometheus to gather the necessary usage metrics, writes the query results to CSV files, and packages the reports for storage in the PVC. These reports then need to be manually downloaded from the cluster and uploaded to [console.redhat.com](https://console.redhat.com). -## Configure the koku-metrics-operator for a restricted network -##### Create the KokuMetricsConfig -Configure the koku-metrics-operator by creating a `KokuMetricsConfig`. -1. On the left navigation pane, select `Operators` -> `Installed Operators` -> `koku-metrics-operator` -> `KokuMetricsConfig` -> `Create Instance`. -2. Specify the desired storage. If not specified, the operator will create a default Persistent Volume Claim called `koku-metrics-operator-data` with 10Gi of storage. To configure the koku-metrics-operator to use or create a different PVC, edit the following in the spec: +## Configure the costmanagement-metrics-operator for a restricted network +##### Create the CostManagementMetricsConfig +Configure the costmanagement-metrics-operator by creating a `CostManagementMetricsConfig`. +1. On the left navigation pane, select `Operators` -> `Installed Operators` -> `costmanagement-metrics-operator` -> `CostManagementMetricsConfig` -> `Create Instance`. +2. Specify the desired storage. If not specified, the operator will create a default Persistent Volume Claim called `costmanagement-metrics-operator-data` with 10Gi of storage. To configure the costmanagement-metrics-operator to use or create a different PVC, edit the following in the spec: * Add the desired configuration to the `volume_claim_template` field in the spec (below is only a template. Any _valid_ `PersistentVolumeClaim` may be defined here): ``` @@ -204,7 +204,7 @@ Configure the koku-metrics-operator by creating a `KokuMetricsConfig`. 5. Select `Create`. ## Download reports from the Operator & clean up the PVC -If the `koku-metrics-operator` is configured to run in a restricted network, the metric reports will not automatically upload to cost managment. Instead, they need to be manually copied from the PVC for upload to [console.redhat.com](https://console.redhat.com). The default configuration saves one week of reports which means the process of downloading and uploading reports should be repeated weekly to prevent loss of metrics data. To download the reports, complete the following steps: +If the `costmanagement-metrics-operator` is configured to run in a restricted network, the metric reports will not automatically upload to cost managment. Instead, they need to be manually copied from the PVC for upload to [console.redhat.com](https://console.redhat.com). The default configuration saves one week of reports which means the process of downloading and uploading reports should be repeated weekly to prevent loss of metrics data. To download the reports, complete the following steps: 1. Create the following Pod, ensuring the `claimName` matches the PVC containing the report data: ``` @@ -212,34 +212,34 @@ If the `koku-metrics-operator` is configured to run in a restricted network, the apiVersion: v1 metadata: name: volume-shell - namespace: koku-metrics-operator + namespace: costmanagement-metrics-operator labels: - app: koku-metrics-operator + app: costmanagement-metrics-operator spec: volumes: - - name: koku-metrics-operator-reports + - name: costmanagement-metrics-operator-reports persistentVolumeClaim: - claimName: koku-metrics-operator-data + claimName: costmanagement-metrics-operator-data containers: - name: volume-shell image: busybox command: ['sleep', 'infinity'] volumeMounts: - - name: koku-metrics-operator-reports - mountPath: /tmp/koku-metrics-operator-reports + - name: costmanagement-metrics-operator-reports + mountPath: /tmp/costmanagement-metrics-operator-reports ``` 2. Use rsync to copy all of the files ready for upload from the PVC to a local folder: ``` - $ oc rsync volume-shell:/tmp/koku-metrics-operator-reports/upload local/path/to/save/folder + $ oc rsync volume-shell:/tmp/costmanagement-metrics-operator-reports/upload local/path/to/save/folder ``` 3. Once confirming that the files have been successfully copied, use rsh to connect to the pod and delete the contents of the upload folder so that they are no longer in storage: ``` $ oc rsh volume-shell - $ rm /tmp/koku-metrics-operator-reports/upload/* + $ rm /tmp/costmanagement-metrics-operator-reports/upload/* ``` 4. (Optional) Delete the pod that was used to connect to the PVC: @@ -249,10 +249,10 @@ If the `koku-metrics-operator` is configured to run in a restricted network, the ``` ## Create an Integration -In a restricted network, the `koku-metrics-operator` cannot automatically create an integration. This process must be done manually. In the console.redhat.com platform, open the [Integrations menu](https://console.redhat.com/settings/integrations/) to begin adding an OpenShift integration to Cost Management: +In a restricted network, the `costmanagement-metrics-operator` cannot automatically create an integration. This process must be done manually. In the console.redhat.com platform, open the [Integrations menu](https://console.redhat.com/settings/integrations/) to begin adding an OpenShift integration to Cost Management: Prerequisites: -* The cluster identifier which can be found in the KokuMetricsConfig CR, the cluster Overview page, or the cluster Help > About. +* The cluster identifier which can be found in the CostManagementMetricsConfig CR, the cluster Overview page, or the cluster Help > About. Creating an integration: 1. Navigate to the Integrations menu diff --git a/docs/faq.md b/docs/faq.md index 27c6f40e4..8131cf569 100644 --- a/docs/faq.md +++ b/docs/faq.md @@ -3,25 +3,25 @@ ## Our operator is stuck upgrading from v0.9.4 to v0.9.5. How can we force the upgrade? 1. Log into the cluster via the CLI -2. Update the KokuMetricsConfig from v1alpha1 to v1beta1 +2. Update the CostManagementMetricsConfig from v1alpha1 to v1beta1 ``` - $ oc get kokumetricsconfigs (this step is to get the name of the CR. If you know it, this step can be skipped) + $ oc get costmanagementmetricsconfigs (this step is to get the name of the CR. If you know it, this step can be skipped) NAME AGE - kokumetricscfg-sample 41m - $ oc get kokumetricsconfigs kokumetricscfg-sample -o json > tmp.json + costmanagementmetricscfg-sample 41m + $ oc get costmanagementmetricsconfigs costmanagementmetricscfg-sample -o json > tmp.json $ head -3 tmp.json { - "apiVersion": "koku-metrics-cfg.openshift.io/v1beta1", <--------- ensure that this says `v1beta1`. Update if needed. - "kind": "KokuMetricsConfig", + "apiVersion": "costmanagement-metrics-cfg.openshift.io/v1beta1", <--------- ensure that this says `v1beta1`. Update if needed. + "kind": "CostManagementMetricsConfig", $ oc apply -f tmp.json Warning: oc apply should be used on resource created by either oc create --save-config or oc apply - kokumetricsconfig.koku-metrics-cfg.openshift.io/kokumetricscfg-sample configured + costmanagementmetricsconfig.costmanagement-metrics-cfg.openshift.io/costmanagementmetricscfg-sample configured ``` **Note**: apply the tmp.json even if you did not make changes to the file. -3. Verify that the KokuMetricsConfig CustomResourceDefinition contains the v1alpha1 and v1beta1 in the storedVersions status: +3. Verify that the CostManagementMetricsConfig CustomResourceDefinition contains the v1alpha1 and v1beta1 in the storedVersions status: ``` - $ oc get crd kokumetricsconfigs.koku-metrics-cfg.openshift.io -o jsonpath='{.status.storedVersions}{"\n"}' + $ oc get crd costmanagementmetricsconfigs.costmanagement-metrics-cfg.openshift.io -o jsonpath='{.status.storedVersions}{"\n"}' [v1alpha1 v1beta1] ``` 4. In a second terminal window, open a proxy to the cluster (you can choose any open port number): @@ -31,12 +31,12 @@ ``` 5. Back in the first terminal, update the status of the CRD to remove the v1alpha1: ``` - $ curl -X PATCH -H 'Content-Type: application/strategic-merge-patch+json' --data '{"status":{"storedVersions":["v1beta1"]}}' localhost:9000/apis/apiextensions.k8s.io/v1/customresourcedefinitions/kokumetricsconfigs.koku-metrics-cfg.openshift.io/status + $ curl -X PATCH -H 'Content-Type: application/strategic-merge-patch+json' --data '{"status":{"storedVersions":["v1beta1"]}}' localhost:9000/apis/apiextensions.k8s.io/v1/customresourcedefinitions/costmanagementmetricsconfigs.costmanagement-metrics-cfg.openshift.io/status ``` 6. Verify that the CRD status only contains v1beta1: ``` - $ oc get crd kokumetricsconfigs.koku-metrics-cfg.openshift.io -o jsonpath='{.status.storedVersions}{"\n"}' + $ oc get crd costmanagementmetricsconfigs.costmanagement-metrics-cfg.openshift.io -o jsonpath='{.status.storedVersions}{"\n"}' [v1beta1] ``` -7. Uninstall the operator and reinstall from OperatorHub. This should be installed in the same namespace in which it was previously installed. Ensure that the old CR appears under KokuMetricsConfigs. +7. Uninstall the operator and reinstall from OperatorHub. This should be installed in the same namespace in which it was previously installed. Ensure that the old CR appears under CostManagementMetricsConfigs. 8. Close the proxy to the cluster. \ No newline at end of file diff --git a/docs/generate-downstream.md b/docs/generate-downstream.md index a91940e40..2f6104302 100644 --- a/docs/generate-downstream.md +++ b/docs/generate-downstream.md @@ -1,4 +1,4 @@ -**Prerequisite:** +**Prerequisite:** * rename ([install with Homebrew on OSX](https://formulae.brew.sh/formula/rename#default)) **Steps:** @@ -7,7 +7,7 @@ ``` git fetch origin git switch --no-track -c downstream-vX.Y.Z origin/main - git push downstream-vX.Y.Z + git push ``` 2. Branch `downstream-vX.Y.Z` so we can make the updates for the downstream code: diff --git a/docs/local-development.md b/docs/local-development.md index 7b7a3c6de..52db4b49f 100644 --- a/docs/local-development.md +++ b/docs/local-development.md @@ -5,7 +5,7 @@ * Access to a supported version of an Openshift cluster * [Red Hat OpenShift Local](https://access.redhat.com/documentation/en-us/red_hat_openshift_local/2.31/html/getting_started_guide/installing) can be used if the monitoring stack is enabled. * A cluster can also be provisioned [here](https://demo.redhat.com/catalog) -* A clone of [koku-metrics-operator](https://github.com/project-koku/koku-metrics-operator) +* A clone of [costmanagement-metrics-operator](https://github.com/project-costmanagement/costmanagement-metrics-operator) * [Go 1.13 or greater](https://golang.org/doc/install) * [Openshift-CLI](https://docs.openshift.com/container-platform/4.5/cli_reference/openshift_cli/getting-started-cli.html) (preferably a version that matches your Openshift cluster version) * [kubebuilder](https://book.kubebuilder.io/quick-start.html#installation) @@ -16,11 +16,11 @@ ## Running the operator locally -1. Log into your OCP cluster from a terminal, create an `koku-metrics-operator` namespace, and switch to the new namespace: +1. Log into your OCP cluster from a terminal, create an `costmanagement-metrics-operator` namespace, and switch to the new namespace: ``` $ oc login --token= --server= - $ oc new-project koku-metrics-operator + $ oc new-project costmanagement-metrics-operator ``` 2. Build the manager binary: @@ -41,7 +41,7 @@ $ oc apply -f testing/sa.yaml ``` -5. The `token` and `service-ca.crt` need to be copied from one of the created `koku-metrics-manager-role-token-*` secrets. +5. The `token` and `service-ca.crt` need to be copied from one of the created `costmanagement-metrics-manager-role-token-*` secrets. A make command exists to help: ``` @@ -62,7 +62,7 @@ This will place the `token` and `service-ca.crt` in the `testing` directory. To At this point, you will see the operator spin up in your terminal. After a few seconds, you should see something similar to the following output: ``` - 2020-10-21T09:31:37.195-0400 INFO controller-runtime.controller Starting workers {"controller": "kokumetricsconfig", "worker count": 1} + 2020-10-21T09:31:37.195-0400 INFO controller-runtime.controller Starting workers {"controller": "costmanagementmetricsconfig", "worker count": 1} ``` The operator is running but is not doing any work. We need to create a CR. @@ -71,7 +71,7 @@ This will place the `token` and `service-ca.crt` in the `testing` directory. To ``` $ make deploy-local-cr AUTH=basic USER= PASS= ``` - This command uses the CR defined in `config/samples/koku-metrics-cfg_v1beta1_kokumetricsconfig.yaml`, adds an external prometheus route, disables TLS verification for the prometheus route, adds the authentication spec, and creates a CR in `testing/koku-metrics-cfg_v1beta1_kokumetricsconfig.yaml`. The command then deploys this CR to the cluster. + This command uses the CR defined in `config/samples/costmanagement-metrics-cfg_v1beta1_costmanagementmetricsconfig.yaml`, adds an external prometheus route, disables TLS verification for the prometheus route, adds the authentication spec, and creates a CR in `testing/costmanagement-metrics-cfg_v1beta1_costmanagementmetricsconfig.yaml`. The command then deploys this CR to the cluster. After this CR has been created in the cluster, reconciliation will begin. diff --git a/docs/release-testing.md b/docs/release-testing.md index c12d8cc30..d837a27cf 100644 --- a/docs/release-testing.md +++ b/docs/release-testing.md @@ -10,7 +10,7 @@ Reference: https://sdk.operatorframework.io/docs/olm-integration/tutorial-bundle OpenShift comes with OLM enabled, so the "Enable OLM" steps can be omitted. Testing an upgrade is composed of the following general steps: -1. Create a namespace (koku-metrics-operator). +1. Create a namespace (costmanagement-metrics-operator). 1. Install the previous bundle (make bundle-deploy-previous). 1. Generate the new controller image, and push to Quay. 1. Generate the new bundle. @@ -29,17 +29,17 @@ Testing an upgrade is composed of the following general steps: 1. Create the namespace in the cluster and deploy the previous bundle: ```sh - $ oc new-project koku-metrics-operator + $ oc new-project costmanagement-metrics-operator $ make bundle-deploy-previous ``` - Check the `koku-metrics-operator` namespace and ensure the previous version deployed correctly. Create a KokuMetricsConfig so that the PVC is created and data is collected, if available. + Check the `costmanagement-metrics-operator` namespace and ensure the previous version deployed correctly. Create a CostManagementMetricsConfig so that the PVC is created and data is collected, if available. 1. Generate the new controller image, and push to your Quay repo: ```sh $ USERNAME= $ VERSION= - $ make docker-buildx IMG=quay.io/$USERNAME/koku-metrics-operator:v$VERSION + $ make docker-buildx IMG=quay.io/$USERNAME/costmanagement-metrics-operator:v$VERSION ``` 1. Generate the new bundle: @@ -47,21 +47,21 @@ Testing an upgrade is composed of the following general steps: Run the following command to generate the bundle: ```sh - $ docker pull quay.io/$USERNAME/koku-metrics-operator:v$VERSION - $ make bundle CHANNELS=alpha,beta DEFAULT_CHANNEL=beta IMG=quay.io/$USERNAME/koku-metrics-operator:v$VERSION + $ docker pull quay.io/$USERNAME/costmanagement-metrics-operator:v$VERSION + $ make bundle CHANNELS=alpha,beta DEFAULT_CHANNEL=beta IMG=quay.io/$USERNAME/costmanagement-metrics-operator:v$VERSION ``` - This will generate a new `$VERSION` bundle inside of the `koku-metrics-operator` directory within the repository. + This will generate a new `$VERSION` bundle inside of the `costmanagement-metrics-operator` directory within the repository. 1. Build the bundle image and push to Quay: ```sh - $ make bundle-build BUNDLE_IMG=quay.io/$USERNAME/koku-metrics-operator-bundle:v$VERSION bundle-push + $ make bundle-build BUNDLE_IMG=quay.io/$USERNAME/costmanagement-metrics-operator-bundle:v$VERSION bundle-push ``` 1. Once the bundle is available in Quay, deploy it to your cluster: ```sh - $ make bundle-deploy-upgrade BUNDLE_IMG=quay.io/$USERNAME/koku-metrics-operator-bundle:v$VERSION + $ make bundle-deploy-upgrade BUNDLE_IMG=quay.io/$USERNAME/costmanagement-metrics-operator-bundle:v$VERSION ``` 1. Observe the installed operator, and ensure it upgrades automatically. diff --git a/docs/releasing.md b/docs/releasing.md index 85cbbd225..9dea6eaf4 100644 --- a/docs/releasing.md +++ b/docs/releasing.md @@ -1,10 +1,10 @@ -## Releasing a new version of the koku-metrics-operator +## Releasing a new version of the costmanagement-metrics-operator Before releasing a new version of the operator, testing should be performed as described [here](release-testing.md). ### Create a github release and push the operator image -Create a GitHub release that corresponds with the operator release version. The [previous releases](https://github.com/project-koku/koku-metrics-operator/releases) can be used as a template. +Create a GitHub release that corresponds with the operator release version. The [previous releases](https://github.com/project-costmanagement/costmanagement-metrics-operator/releases) can be used as a template. Update the release version at the top of the `Makefile` to match the release version of the operator: @@ -13,7 +13,7 @@ Update the release version at the top of the `Makefile` to match the release ver VERSION ?= ``` -> After creating the GitHub release/tag, a Quay hook should pull the image. Check the [quay repo](https://quay.io/repository/project-koku/koku-metrics-operator?tab=tags) and ensure the new tag was pulled. If the tag does not exist, the following should be run to build and push the image: +> After creating the GitHub release/tag, a Quay hook should pull the image. Check the [quay repo](https://quay.io/repository/project-costmanagement/costmanagement-metrics-operator?tab=tags) and ensure the new tag was pulled. If the tag does not exist, the following should be run to build and push the image: > ``` > make docker-build > make docker-push @@ -25,25 +25,25 @@ Run the following command to generate the release bundle: ``` make bundle CHANNELS=alpha,beta DEFAULT_CHANNEL=beta ``` -This will generate a new `` bundle inside of the `koku-metrics-operator` directory within the repository. +This will generate a new `` bundle inside of the `costmanagement-metrics-operator` directory within the repository. -Once the release bundle has been generated, fork & clone the [community-operators-prod repository](https://github.com/redhat-openshift-ecosystem/community-operators-prod/tree/main). Create a branch, and copy the generated bundle to the `community-operators-prod/operators/koku-metrics-operator/` directory in your cloned fork. +Once the release bundle has been generated, fork & clone the [community-operators-prod repository](https://github.com/redhat-openshift-ecosystem/community-operators-prod/tree/main). Create a branch, and copy the generated bundle to the `community-operators-prod/operators/costmanagement-metrics-operator/` directory in your cloned fork. For example, if the bundle was generated for a `1.0.0` release, the directory structure would look like the following: ``` -koku-metrics-operator/ +costmanagement-metrics-operator/ ├── 0.9.0 │ ├── manifests -│ │ ├── koku-metrics-cfg.openshift.io_kokumetricsconfigs.yaml -│ │ └── koku-metrics-operator.clusterserviceversion.yaml +│ │ ├── costmanagement-metrics-cfg.openshift.io_costmanagementmetricsconfigs.yaml +│ │ └── costmanagement-metrics-operator.clusterserviceversion.yaml │ ├── metadata │ │ └── annotations.yaml │ └── Dockerfile ├── 1.0.0 │ ├── manifests -│ │ ├── koku-metrics-cfg.v1.0.0.openshift.io_kokumetricsconfigs.yaml -│ │ └── koku-metrics-operator.v1.0.0.clusterserviceversion.yaml +│ │ ├── costmanagement-metrics-cfg.v1.0.0.openshift.io_costmanagementmetricsconfigs.yaml +│ │ └── costmanagement-metrics-operator.v1.0.0.clusterserviceversion.yaml │ ├── metadata │ │ └── annotations.yaml │ └── Dockerfile @@ -57,4 +57,4 @@ git commit -s -m "" git push origin branch ``` -After completing the above steps, bump the version in the Makefile (e.g. `VERSION ?= +1`). This will prevent accidental builds and pushes for a version that has already been released. The generated release bundle and the bumped Makefile version should be committed to the `koku-metrics-operator` repo. +After completing the above steps, bump the version in the Makefile (e.g. `VERSION ?= +1`). This will prevent accidental builds and pushes for a version that has already been released. The generated release bundle and the bumped Makefile version should be committed to the `costmanagement-metrics-operator` repo. diff --git a/internal/controller/kokumetricsconfig_controller.go b/internal/controller/kokumetricsconfig_controller.go index 3ba9f02a3..281369e19 100644 --- a/internal/controller/kokumetricsconfig_controller.go +++ b/internal/controller/kokumetricsconfig_controller.go @@ -721,15 +721,15 @@ func (r *MetricsConfigReconciler) setAuthAndUpload(ctx context.Context, cr *metr return nil } -// +kubebuilder:rbac:groups=koku-metrics-cfg.openshift.io,namespace=koku-metrics-operator,resources=kokumetricsconfigs,verbs=get;list;watch;create;update;patch;delete -// +kubebuilder:rbac:groups=koku-metrics-cfg.openshift.io,namespace=koku-metrics-operator,resources=kokumetricsconfigs/status,verbs=get;update;patch -// +kubebuilder:rbac:groups=operators.coreos.com,namespace=koku-metrics-operator,resources=clusterserviceversions,verbs=get;list;watch;update;patch +// +kubebuilder:rbac:groups=costmanagement-metrics-cfg.openshift.io,namespace=costmanagement-metrics-operator,resources=costmanagementmetricsconfigs,verbs=get;list;watch;create;update;patch;delete +// +kubebuilder:rbac:groups=costmanagement-metrics-cfg.openshift.io,namespace=costmanagement-metrics-operator,resources=costmanagementmetricsconfigs/status,verbs=get;update;patch +// +kubebuilder:rbac:groups=operators.coreos.com,namespace=costmanagement-metrics-operator,resources=clusterserviceversions,verbs=get;list;watch;update;patch // +kubebuilder:rbac:groups=config.openshift.io,resources=clusterversions,verbs=get;list;watch // +kubebuilder:rbac:groups=core,resources=namespaces,verbs=get;list;watch // +kubebuilder:rbac:groups=core,resources=secrets,verbs=get // +kubebuilder:rbac:groups=core,resources=configmaps,verbs=get;list;watch -// +kubebuilder:rbac:groups=core,namespace=koku-metrics-operator,resources=pods;services;services/finalizers;endpoints;persistentvolumeclaims;events;configmaps;secrets;serviceaccounts,verbs=create;delete;get;list;patch;update;watch -// +kubebuilder:rbac:groups=apps,namespace=koku-metrics-operator,resources=deployments,verbs=get;list;patch;watch +// +kubebuilder:rbac:groups=core,namespace=costmanagement-metrics-operator,resources=pods;services;services/finalizers;endpoints;persistentvolumeclaims;events;configmaps;secrets;serviceaccounts,verbs=create;delete;get;list;patch;update;watch +// +kubebuilder:rbac:groups=apps,namespace=costmanagement-metrics-operator,resources=deployments,verbs=get;list;patch;watch // +kubebuilder:rbac:groups=monitoring.coreos.com,resources=prometheuses/api,verbs=get;create;update // Reconcile Process the MetricsConfig custom resource based on changes or requeue diff --git a/internal/crhchttp/http_cloud_dot_redhat.go b/internal/crhchttp/http_cloud_dot_redhat.go index 812f4343e..473b228c8 100644 --- a/internal/crhchttp/http_cloud_dot_redhat.go +++ b/internal/crhchttp/http_cloud_dot_redhat.go @@ -30,7 +30,7 @@ import ( // Client is an http.Client var Client HTTPClient -var cacerts = "/etc/ssl/certs/ca-certificates.crt" +var cacerts = "/etc/ssl/certs/ca-bundle.crt" var log = logr.Log.WithName("crc_http") // DefaultTransport is a copy from the golang http package diff --git a/internal/packaging/packaging.go b/internal/packaging/packaging.go index c2b44dcea..f862656f2 100644 --- a/internal/packaging/packaging.go +++ b/internal/packaging/packaging.go @@ -71,7 +71,7 @@ var ( ErrNoReports = errors.New("reports not found") // Set boolean on whether community or certified - isCertified bool = false + isCertified bool = true log = logr.Log.WithName("packaging") ) diff --git a/koku-metrics-operator/0.9.0/Dockerfile b/koku-metrics-operator/0.9.0/Dockerfile deleted file mode 100644 index 3fd1414ef..000000000 --- a/koku-metrics-operator/0.9.0/Dockerfile +++ /dev/null @@ -1,14 +0,0 @@ -FROM scratch - -LABEL operators.operatorframework.io.bundle.mediatype.v1=registry+v1 -LABEL operators.operatorframework.io.bundle.manifests.v1=manifests/ -LABEL operators.operatorframework.io.bundle.metadata.v1=metadata/ -LABEL operators.operatorframework.io.bundle.package.v1=koku-metrics-operator -LABEL operators.operatorframework.io.bundle.channels.v1=alpha -LABEL operators.operatorframework.io.bundle.channel.default.v1=alpha -LABEL operators.operatorframework.io.metrics.project_layout=go.kubebuilder.io/v2 -LABEL operators.operatorframework.io.metrics.mediatype.v1=metrics+v1 -LABEL operators.operatorframework.io.metrics.builder=operator-sdk-v0.19.2 - -COPY manifests /manifests/ -COPY metadata /metadata/ diff --git a/koku-metrics-operator/0.9.0/manifests/koku-metrics-cfg.openshift.io_kokumetricsconfigs.yaml b/koku-metrics-operator/0.9.0/manifests/koku-metrics-cfg.openshift.io_kokumetricsconfigs.yaml deleted file mode 100644 index d98a2afa1..000000000 --- a/koku-metrics-operator/0.9.0/manifests/koku-metrics-cfg.openshift.io_kokumetricsconfigs.yaml +++ /dev/null @@ -1,400 +0,0 @@ -apiVersion: apiextensions.k8s.io/v1 -kind: CustomResourceDefinition -metadata: - annotations: - controller-gen.kubebuilder.io/version: v0.3.0 - creationTimestamp: null - name: kokumetricsconfigs.koku-metrics-cfg.openshift.io -spec: - group: koku-metrics-cfg.openshift.io - names: - kind: KokuMetricsConfig - listKind: KokuMetricsConfigList - plural: kokumetricsconfigs - singular: kokumetricsconfig - scope: Namespaced - versions: - - name: v1alpha1 - schema: - openAPIV3Schema: - description: KokuMetricsConfig is the Schema for the kokumetricsconfig API - properties: - apiVersion: - description: 'APIVersion defines the versioned schema of this representation - of an object. Servers should convert recognized schemas to the latest - internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' - type: string - kind: - description: 'Kind is a string value representing the REST resource this - object represents. Servers may infer this from the endpoint the client - submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' - type: string - metadata: - type: object - spec: - description: KokuMetricsConfigSpec defines the desired state of KokuMetricsConfig. - properties: - api_url: - default: https://cloud.redhat.com - description: FOR DEVELOPMENT ONLY. APIURL is a field of KokuMetricsConfig - to represent the url of the API endpoint for service interaction. - The default is `https://cloud.redhat.com`. - type: string - authentication: - description: Authentication is a field of KokuMetricsConfig to represent - the authentication object. - properties: - secret_name: - description: AuthenticationSecretName is a field of KokuMetricsConfig - to represent the secret with the user and password used for - uploads. - type: string - type: - default: token - description: 'AuthType is a field of KokuMetricsConfig to represent - the authentication type to be used basic or token. Valid values - are: - "basic" : Enables authentication using user and password - from authentication secret. - "token" (default): Uses cluster - token for authentication.' - enum: - - token - - basic - type: string - required: - - type - type: object - clusterID: - description: ClusterID is a field of KokuMetricsConfig to represent - the cluster UUID. Normally this value should not be specified. Only - set this value if the clusterID cannot be obtained from the ClusterVersion. - type: string - packaging: - description: Packaging is a field of KokuMetricsConfig to represent - the packaging object - properties: - max_size_MB: - default: 100 - description: MaxSize is a field of KokuMetricsConfig to represent - the max file size in megabytes that will be compressed for upload - to Ingress. The default is 100. - format: int64 - maximum: 100 - minimum: 1 - type: integer - required: - - max_size_MB - type: object - prometheus_config: - description: PrometheusConfig is a field of KokuMetricsConfig to represent - the configuration of Prometheus connection. - properties: - service_address: - default: https://thanos-querier.openshift-monitoring.svc:9091 - description: FOR DEVELOPMENT ONLY. SvcAddress is a field of KokuMetricsConfig - to represent the thanos-querier address. The default is `https://thanos-querier.openshift-monitoring.svc:9091`. - type: string - skip_tls_verification: - default: false - description: FOR DEVELOPMENT ONLY. SkipTLSVerification is a field - of KokuMetricsConfig to represent if the thanos-querier endpoint - must be certificate validated. The default is false. - type: boolean - required: - - service_address - - skip_tls_verification - type: object - source: - description: Source is a field of KokuMetricsConfig to represent the - desired source on cloud.redhat.com. - properties: - check_cycle: - default: 1440 - description: CheckCycle is a field of KokuMetricsConfig to represent - the number of minutes between each source check schedule The - default is 1440 min (24 hours). - format: int64 - minimum: 0 - type: integer - create_source: - default: false - description: CreateSource is a field of KokuMetricsConfigSpec - to represent if the source should be created if not found. - type: boolean - name: - description: SourceName is a field of KokuMetricsConfigSpec to - represent the source name on cloud.redhat.com. - type: string - sources_path: - default: /api/sources/v1.0/ - description: FOR DEVELOPMENT ONLY. SourcesAPIPath is a field of - KokuMetricsConfig to represent the path of the Sources API service. - The default is `/api/sources/v1.0/`. - type: string - required: - - check_cycle - - create_source - - sources_path - type: object - upload: - description: Upload is a field of KokuMetricsConfig to represent the - upload object. - properties: - ingress_path: - default: /api/ingress/v1/upload - description: FOR DEVELOPMENT ONLY. IngressAPIPath is a field of - KokuMetricsConfig to represent the path of the Ingress API service. - The default is `/api/ingress/v1/upload`. - type: string - upload_cycle: - default: 360 - description: UploadCycle is a field of KokuMetricsConfig to represent - the number of minutes between each upload schedule. The default - is 360 min (6 hours). - format: int64 - minimum: 0 - type: integer - upload_toggle: - default: true - description: UploadToggle is a field of KokuMetricsConfig to represent - if the operator should upload to cloud.redhat.com. The default - is true. - type: boolean - upload_wait: - description: UploadWait is a field of KokuMetricsConfig to represent - the time to wait before sending an upload. - format: int64 - minimum: 0 - type: integer - validate_cert: - default: true - description: ValidateCert is a field of KokuMetricsConfig to represent - if the Ingress endpoint must be certificate validated. - type: boolean - required: - - ingress_path - - upload_cycle - - upload_toggle - - validate_cert - type: object - required: - - authentication - - packaging - - prometheus_config - - source - - upload - type: object - status: - description: KokuMetricsConfigStatus defines the observed state of KokuMetricsConfig. - properties: - api_url: - description: APIURL is a field of KokuMetricsConfig to represent the - url of the API endpoint for service interaction. - type: string - authentication: - description: Authentication is a field of KokuMetricsConfig to represent - the authentication status. - properties: - credentials_found: - description: AuthenticationCredentialsFound is a field of KokuMetricsConfig - to represent if used for uploads were found. - type: boolean - secret_name: - description: AuthenticationSecretName is a field of KokuMetricsConfig - to represent the secret with the user and password used for - uploads. - type: string - type: - description: AuthType is a field of KokuMetricsConfig to represent - the authentication type to be used basic or token. - enum: - - token - - basic - type: string - type: object - clusterID: - description: ClusterID is a field of KokuMetricsConfig to represent - the cluster UUID. - type: string - operator_commit: - description: OperatorCommit is a field of KokuMetricsConfig that shows - the commit hash of the operator. - type: string - packaging: - description: Packaging is a field of KokuMetricsConfig to represent - the packaging status - properties: - error: - description: PackagingError is a field of KokuMetricsConfigStatus - to represent the error encountered packaging the reports. - type: string - max_size_MB: - description: MaxSize is a field of KokuMetricsConfig to represent - the max file size in megabytes that will be compressed for upload - to Ingress. The default is 100. - format: int64 - type: integer - type: object - prometheus: - description: Prometheus represents the status of premetheus queries. - properties: - configuration_error: - description: ConfigError is a field of KokuMetricsConfigStatus - to represent errors during prometheus configuration. - type: string - last_query_start_time: - description: LastQueryStartTime is a field of KokuMetricsConfigStatus - to represent the last time queries were started. - format: date-time - nullable: true - type: string - last_query_success_time: - description: LastQuerySuccessTime is a field of KokuMetricsConfigStatus - to represent the last time queries were successful. - format: date-time - nullable: true - type: string - prometheus_configured: - description: PrometheusConfigured is a field of KokuMetricsConfigStatus - to represent if the operator is configured to connect to prometheus. - type: boolean - prometheus_connected: - description: PrometheusConnected is a field of KokuMetricsConfigStatus - to represent if prometheus can be queried. - type: boolean - prometheus_connection_error: - description: ConnectionError is a field of KokuMetricsConfigStatus - to represent errors during prometheus test query. - type: string - service_address: - description: SvcAddress is the internal thanos-querier address. - type: string - skip_tls_verification: - description: SkipTLSVerification is a field of KokuMetricsConfigStatus - to represent if the thanos-querier endpoint must be certificate - validated. - type: boolean - required: - - prometheus_configured - - prometheus_connected - type: object - reports: - description: Reports represents the status of report generation. - properties: - data_collected: - description: DataCollected is a field of KokuMetricsConfigStatus - to represent whether or not data was collected for the last - query. - type: boolean - data_collection_message: - description: DataCollectionMessage is a field of KokuMetricsConfigStatus - to represent a message associated with the data_collected status. - type: string - last_hour_queried: - description: LastHourQueried is a field of KokuMetricsConfigStatus - to represent the time range for which metrics were last queried. - type: string - report_month: - description: ReportMonth is a field of KokuMetricsConfigStatus - to represent the month for which reports are being generated. - type: string - type: object - source: - description: Source is a field of KokuMetricsConfig to represent the - observed state of the source on cloud.redhat.com. - properties: - check_cycle: - description: CheckCycle is a field of KokuMetricsConfig to represent - the number of minutes between each source check schedule. The - default is 1440 min (24 hours). - format: int64 - type: integer - create_source: - description: CreateSource is a field of KokuMetricsConfigStatus - to represent if the source should be created if not found. - type: boolean - error: - description: SourceError is a field of KokuMetricsConfigStatus - to represent the error encountered creating the source. - type: string - last_check_time: - description: LastSourceCheckTime is a field of KokuMetricsConfig - that shows the time that the last check was attempted. - format: date-time - nullable: true - type: string - name: - description: SourceName is a field of KokuMetricsConfigStatus - to represent the source name on cloud.redhat.com. - type: string - source_defined: - description: SourceDefined is a field of KokuMetricsConfigStatus - to represent if the source exists as defined on cloud.redhat.com. - type: boolean - sources_path: - description: SourcesAPIPath is a field of KokuMetricsConfig to - represent the path of the Sources API service. - type: string - type: object - upload: - description: Upload is a field of KokuMetricsConfig to represent the - upload object. - properties: - error: - description: UploadError is a field of KokuMetricsConfigStatus - to represent the error encountered uploading reports. - type: string - ingress_path: - description: IngressAPIPath is a field of KokuMetricsConfig to - represent the path of the Ingress API service. - type: string - last_successful_upload_time: - description: LastSuccessfulUploadTime is a field of KokuMetricsConfig - that shows the time of the last successful upload. - format: date-time - nullable: true - type: string - last_upload_status: - description: LastUploadStatus is a field of KokuMetricsConfig - that shows the http status of the last upload. - type: string - last_upload_time: - description: LastUploadTime is a field of KokuMetricsConfig that - shows the time that the last upload was attempted. - format: date-time - nullable: true - type: string - upload: - description: UploadToggle is a field of KokuMetricsConfig to represent - if the operator should upload to cloud.redhat.com. The default - is true - type: boolean - upload_cycle: - description: UploadCycle is a field of KokuMetricsConfig to represent - the number of minutes between each upload schedule. The default - is 360 min (6 hours). - format: int64 - type: integer - upload_wait: - description: UploadWait is a field of KokuMetricsConfig to represent - the time to wait before sending an upload. - format: int64 - type: integer - validate_cert: - description: ValidateCert is a field of KokuMetricsConfig to represent - if the Ingress endpoint must be certificate validated. - type: boolean - type: object - type: object - required: - - spec - type: object - served: true - storage: true - subresources: - status: {} -status: - acceptedNames: - kind: "" - plural: "" - conditions: [] - storedVersions: [] diff --git a/koku-metrics-operator/0.9.0/manifests/koku-metrics-operator.clusterserviceversion.yaml b/koku-metrics-operator/0.9.0/manifests/koku-metrics-operator.clusterserviceversion.yaml deleted file mode 100644 index cab9afef5..000000000 --- a/koku-metrics-operator/0.9.0/manifests/koku-metrics-operator.clusterserviceversion.yaml +++ /dev/null @@ -1,369 +0,0 @@ -apiVersion: operators.coreos.com/v1alpha1 -kind: ClusterServiceVersion -metadata: - annotations: - alm-examples: |- - [ - { - "apiVersion": "koku-metrics-cfg.openshift.io/v1alpha1", - "kind": "KokuMetricsConfig", - "metadata": { - "name": "kokumetricscfg-sample" - }, - "spec": { - "authentication": { - "type": "token" - }, - "packaging": { - "max_size_MB": 100 - }, - "prometheus_config": {}, - "source": { - "check_cycle": 1440, - "create_source": false, - "name": "INSERT-SOURCE-NAME" - }, - "upload": { - "upload_cycle": 360, - "upload_toggle": true - } - } - } - ] - capabilities: Basic Install - categories: Monitoring - certified: "false" - containerImage: quay.io/project-koku/koku-metrics-operator:v0.9.0 - createdAt: "2020-12-14T18:59:19Z" - description: A Golang-based OpenShift Operator that generates and uploads OpenShift - usage metrics to cost management. - operatorframework.io/suggested-namespace: koku-metrics-operator - operators.operatorframework.io/builder: operator-sdk-v0.19.2 - operators.operatorframework.io/project_layout: go.kubebuilder.io/v2 - repository: https://github.com/project-koku/koku-metrics-operator - support: Cost Managment - name: koku-metrics-operator.v0.9.0 - namespace: koku-metrics-operator -spec: - apiservicedefinitions: {} - customresourcedefinitions: - owned: - - description: KokuMetricsConfig is the Schema for the kokumetricsconfig API - kind: KokuMetricsConfig - name: kokumetricsconfigs.koku-metrics-cfg.openshift.io - version: v1alpha1 - description: |- - # v0.9.0-alpha Koku Metrics Operator (Unsupported) - ## Introduction - The `koku-metrics-operator` is an OpenShift Operator used to obtain OpenShift usage data and upload it to [cost managment](https://access.redhat.com/documentation/en-us/openshift_container_platform/4.5/html/getting_started_with_cost_management/assembly_introduction_cost_management). The Operator queries Prometheus to create metric reports, which are then packaged and uploaded to cost management at [cloud.redhat.com](https://cloud.redhat.com). For more information, reach out to . - ## Features and Capabilities - The Koku Metrics Operator (`koku-metrics-operator`) collects the metrics required for cost management by: - * Querying Prometheus to create reports specific to cost management. - * Packaging these reports as a tarball which is uploaded to cost management through cloud.redhat.com. - * The operator is also capable of creating a source in cloud.redhat.com. A source is required for cost management to process the upload. - #### Limitations (Potential for metrics data loss) - * Report storage is not backed by a PersitentVolume. If the operator is redeployed, a gap may be introduced in the usage metrics. - * A source **must** exist in cloud.redhat.com for an uploaded payload to be processed by cost management. The operator sends the payload to the Red Hat Insights Ingress service which usually returns successfully, but the operator does not currently confirm with cost management that the payload was processed. After Ingress accepts the uploaded payload, the payload is removed from the operator and is gone forever. If the data within the payload is not processed, a gap will be introduced in the usage metrics. - ## Installation - The operator must be installed in the `koku-metrics-operator` namespace. The namespace can be created through either the UI or CLI: - #### Namespace creation: - ##### UI - 1. On the left navigation pane, select `Administration` -> `Namespaces` -> `Create Namespace`. - 2. Name the namespace `koku-metrics-operator`. - 3. Select `Create`. - ##### CLI - 1. Run the following via the CLI to create and use the `koku-metrics-operator` project: - ``` - oc new-project koku-metrics-operator - ``` - #### Operator installation: - Ensure that the operator is installed into the `koku-metrics-operator` namespace. - - ## Configure the koku-metrics-operator - The operator can be configured through either the UI or CLI: - #### Configure through the UI - ##### Configure authentication - The default authentication for the operator is `token`. No further steps are required to configure token authentication. If `basic` is the preferred authentication method, a Secret must be created which holds username and password credentials: - 1. On the left navigation pane, select `Workloads` -> `Secrets` -> select Project: `koku-metrics-operator` -> `Create` -> `Key/Value Secret` - 2. Give the Secret a name and add 2 keys: `username` and `password` (all lowercase). The values for these keys correspond to cloud.redhat.com credentials. - 3. Select `Create`. - ##### Create the KokuMetricsConfig - Configure the koku-metrics-operator by creating a `KokuMetricsConfig`. - 1. On the left navigation pane, select `Operators` -> `Installed Operators` -> `koku-metrics-operator` -> `KokuMetricsConfig` -> `Create Instance`. - 2. For `basic` authentication, edit the following values in the spec: - * Replace `authentication: type:` with `basic`. - * Add the`secret_name` field under `authentication`, and set it equal to the name of the authentication Secret that was created above. The spec should look similar to the following: - - ``` - authentication: - secret_name: SECRET-NAME - type: basic - ``` - - 3. To configure the koku-metrics-operator to create a cost management source, edit the following values in the `source` field: - * Replace `INSERT-SOURCE-NAME` with the preferred name of the source to be created. - * Replace the `create_source` field value with `true`. - - **Note:** if the source already exists, replace `INSERT-SOURCE-NAME` with the existing name, and leave `create_source` as false. This will allow the operator to confirm the source exists. - 4. Select `Create`. - - #### Configure through the CLI - ##### Configure authentication - The default configuration method for the operator to create sources and upload to [cloud.redhat.com](https://cloud.redhat.com/) is `token`. No further steps are required for configuring `token` authentication. If `basic` is the preferred authentication method, a Secret must be created which holds username and password credentials: - 1. Copy the following into a file called `auth-secret.yaml`: - - ``` - kind: Secret - apiVersion: v1 - metadata: - name: authentication-secret - namespace: koku-metrics-operator - data: - username: >- - Y2xvdWQucmVkaGF0LmNvbSB1c2VybmFtZQ== - password: >- - Y2xvdWQucmVkaGF0LmNvbSBwYXNzd29yZA== - ``` - - 2. Replace the metadata.name with the preferred name for the authentication secret. - 3. Replace the `username` and `password` values with the base64-encoded username and password credentials for logging into cloud.redhat.com. - 4. Deploy the secret to the `koku-metrics-operator` namespace: - ``` - $ oc create -f auth-secret.yaml - ``` - - **Note:** The name of the secret should match the `spec: authentication: secret_name` set in the KokuMetricsConfig that is going to be configured in the next steps. - - ##### Create the KokuMetricsConfig - Configure the koku-metrics-operator by creating a `KokuMetricsConfig`. - 1. Copy the following `KokuMetricsConfig` resource template and save it to a file called `kokumetricsconfig.yaml`: - - ``` - apiVersion: koku-metrics-cfg.openshift.io/v1alpha1 - kind: KokuMetricsConfig - metadata: - name: kokumetricscfg-sample - spec: - authentication: - type: token - packaging: - max_size_MB: 100 - prometheus_config: {} - source: - check_cycle: 1440, - create_source: false, - name: INSERT-SOURCE-NAME - upload: - upload_cycle: 360, - upload_toggle: true - ``` - - 2. To configure the operator to use `basic` authentication, edit the following values in the `kokumetricsconfig.yaml` file: - * Replace `authentication: type:` with `basic`. - * Add a field called `secret_name` to the authentication field in the spec and set it equal to the name of the authentication secret that was created earlier. The authentication spec should look similar to the following: - - ``` - authentication: - secret_name: SECRET-NAME - type: basic - ``` - - 3. To configure the koku-metrics-operator to create a cost management source, edit the following values in the `kokumetricsconfig.yaml` file: - * Replace `INSERT-SOURCE-NAME` with the preferred name of the source to be created. - * Replace `create_source` field value with `true`. - - **Note:** if the source already exists, replace `INSERT-SOURCE-NAME` with the existing name, and leave `create_source` as false. This will allow the operator to confirm the source exists. - 4. Deploy the `KokuMetricsConfig` resource: - ``` - $ oc create -f kokumetricsconfig.yaml - ``` - - The koku-metrics-operator will now create, package, and upload OpenShift usage reports to cost management. - displayName: Koku Metrics Operator - icon: - - base64data: PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4KPCEtLSBHZW5lcmF0b3I6IEFkb2JlIElsbHVzdHJhdG9yIDIyLjEuMCwgU1ZHIEV4cG9ydCBQbHVnLUluIC4gU1ZHIFZlcnNpb246IDYuMDAgQnVpbGQgMCkgIC0tPgo8c3ZnIHZlcnNpb249IjEuMSIgaWQ9IkxheWVyXzEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4IgoJIHZpZXdCb3g9IjAgMCAzMDAgMzAwIiBzdHlsZT0iZW5hYmxlLWJhY2tncm91bmQ6bmV3IDAgMCAzMDAgMzAwOyIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSI+CjxzdHlsZSB0eXBlPSJ0ZXh0L2NzcyI+Cgkuc3Qwe2ZpbGw6I0VFMDAwMDt9Cjwvc3R5bGU+Cjx0aXRsZT5Db3N0LWljb248L3RpdGxlPgo8ZGVzYz5DcmVhdGVkIHdpdGggU2tldGNoLjwvZGVzYz4KPGc+Cgk8Z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MywwLjcyMzQxOTIsMC44NDMyMDA3LDAuODAxNzQyNiwxLjM3NzY4NTUKCQkJYzAuMDczNzE1MiwwLjUzNDUwMDEtMC4xMTUyMDM5LDAuOTkwNjQ2NC0wLjU3MTM1MDEsMS4zNzMwNzc0bC0zLjg5ODA4NjUsNC4wMTMyNzUxCgkJCWMtMC4zMDg3MTU4LDAuMjMwMzkyNS0wLjY2ODEwNjEsMC4zODI0MzEtMS4wOTIwMTA1LDAuNDU2MTYxNWMtMC40MTkyOTYzLDAuMDc4MzIzNC0wLjgyMDE1OTksMC0xLjIwMjU5MDktMC4yMjU3NjkKCQkJYy0xLjE0MjcxNTUtMC44NDMyMDA3LTIuNDQyMDc3Ni0xLjI2MjQ5NjktMy44OTgwODY1LTEuMjYyNDk2OWgtNy42NzYzNjExYy0wLjkxNjkxNTksMC0xLjcwMDIyNTgsMC4zMjI1MjUtMi4zNDk4OTkzLDAuOTcyMjEzNwoJCQljLTAuNjQ5Njg4NywwLjY0OTY3MzUtMC45NzY4MjE5LDEuNDc0NDQxNS0wLjk3NjgyMTksMi40NjUwODc5YzAsMC42ODY1NTQsMC4yMzAzOTI1LDEuMzM2MjEyMiwwLjY5MTE0NjksMS45NDkwMzU2CgkJCWMwLjQ1NjE2MTUsMC42MTI4MjM1LDEuMDMyMTE5OCwxLjAzMjExOTgsMS43MTg2NTg0LDEuMjYyNDk2OUwxNzQuMjgwNjM5NiwxODUuODczNjExNXoiLz4KCTwvZz4KPC9nPgo8L3N2Zz4K - mediatype: image/svg+xml - install: - spec: - clusterPermissions: - - rules: - - apiGroups: - - authorization.k8s.io - resources: - - subjectaccessreviews - - tokenreviews - verbs: - - create - - apiGroups: - - config.openshift.io - resources: - - clusterversions - verbs: - - get - - list - - watch - - apiGroups: - - config.openshift.io - resources: - - networks - - proxies - verbs: - - get - - list - - apiGroups: - - "" - resources: - - namespaces - verbs: - - get - - list - - watch - - apiGroups: - - "" - resources: - - secrets - - serviceaccounts - verbs: - - list - - watch - - apiGroups: - - koku-metrics-cfg.openshift.io - resources: - - kokumetricsconfigs - verbs: - - create - - delete - - get - - list - - patch - - update - - watch - - apiGroups: - - koku-metrics-cfg.openshift.io - resources: - - kokumetricsconfigs/status - verbs: - - get - - patch - - update - serviceAccountName: koku-metrics-manager-role - deployments: - - name: koku-metrics-controller-manager - spec: - replicas: 1 - selector: - matchLabels: - control-plane: controller-manager - strategy: {} - template: - metadata: - labels: - control-plane: controller-manager - spec: - containers: - - args: - - --secure-listen-address=0.0.0.0:8443 - - --upstream=http://127.0.0.1:8080/ - - --logtostderr=true - - --v=10 - image: gcr.io/kubebuilder/kube-rbac-proxy:v0.5.0 - name: kube-rbac-proxy - ports: - - containerPort: 8443 - name: https - resources: {} - - args: - - --metrics-addr=127.0.0.1:8080 - - --enable-leader-election - command: - - /manager - image: quay.io/project-koku/koku-metrics-operator:v0.9.0 - name: manager - resources: - limits: - cpu: 500m - memory: 500Mi - requests: - cpu: 100m - memory: 20Mi - terminationMessagePolicy: FallbackToLogsOnError - volumeMounts: - - mountPath: /tmp/koku-metrics-operator-reports - name: koku-metrics-operator-reports - serviceAccountName: koku-metrics-manager-role - terminationGracePeriodSeconds: 10 - volumes: - - name: koku-metrics-operator-reports - permissions: - - rules: - - apiGroups: - - "" - resources: - - configmaps - verbs: - - get - - list - - watch - - create - - update - - patch - - delete - - apiGroups: - - "" - resources: - - configmaps/status - verbs: - - get - - update - - patch - - apiGroups: - - "" - resources: - - events - verbs: - - create - - patch - serviceAccountName: koku-metrics-leader-election-role - - rules: - - apiGroups: - - "" - resources: - - configmaps - - endpoints - - events - - persistentvolumeclaims - - pods - - secrets - - services - - services/finalizers - verbs: - - create - - delete - - get - - list - - patch - - update - - watch - serviceAccountName: koku-metrics-manager-role - strategy: deployment - installModes: - - supported: true - type: OwnNamespace - - supported: true - type: SingleNamespace - - supported: false - type: MultiNamespace - - supported: false - type: AllNamespaces - keywords: - - cost - - management - - usage - - monitor - maintainers: - - email: cost-mgmt@redhat.com - name: cost-mgmt - maturity: alpha - provider: - name: Red Hat - version: 0.9.0 diff --git a/koku-metrics-operator/0.9.0/metadata/annotations.yaml b/koku-metrics-operator/0.9.0/metadata/annotations.yaml deleted file mode 100644 index 60a27e61d..000000000 --- a/koku-metrics-operator/0.9.0/metadata/annotations.yaml +++ /dev/null @@ -1,10 +0,0 @@ -annotations: - operators.operatorframework.io.bundle.channel.default.v1: alpha - operators.operatorframework.io.bundle.channels.v1: alpha - operators.operatorframework.io.bundle.manifests.v1: manifests/ - operators.operatorframework.io.bundle.mediatype.v1: registry+v1 - operators.operatorframework.io.bundle.metadata.v1: metadata/ - operators.operatorframework.io.bundle.package.v1: koku-metrics-operator - operators.operatorframework.io.metrics.builder: operator-sdk-v0.19.2 - operators.operatorframework.io.metrics.mediatype.v1: metrics+v1 - operators.operatorframework.io.metrics.project_layout: go.kubebuilder.io/v2 diff --git a/koku-metrics-operator/0.9.1/Dockerfile b/koku-metrics-operator/0.9.1/Dockerfile deleted file mode 100644 index 4ea9db7a6..000000000 --- a/koku-metrics-operator/0.9.1/Dockerfile +++ /dev/null @@ -1,14 +0,0 @@ -FROM scratch - -LABEL operators.operatorframework.io.bundle.mediatype.v1=registry+v1 -LABEL operators.operatorframework.io.bundle.manifests.v1=manifests/ -LABEL operators.operatorframework.io.bundle.metadata.v1=metadata/ -LABEL operators.operatorframework.io.bundle.package.v1=koku-metrics-operator -LABEL operators.operatorframework.io.bundle.channels.v1=alpha -LABEL operators.operatorframework.io.bundle.channel.default.v1=alpha -LABEL operators.operatorframework.io.metrics.mediatype.v1=metrics+v1 -LABEL operators.operatorframework.io.metrics.builder=operator-sdk-v0.19.2 -LABEL operators.operatorframework.io.metrics.project_layout=go.kubebuilder.io/v2 - -COPY manifests /manifests/ -COPY metadata /metadata/ diff --git a/koku-metrics-operator/0.9.1/manifests/koku-metrics-cfg.openshift.io_kokumetricsconfigs.yaml b/koku-metrics-operator/0.9.1/manifests/koku-metrics-cfg.openshift.io_kokumetricsconfigs.yaml deleted file mode 100644 index d98a2afa1..000000000 --- a/koku-metrics-operator/0.9.1/manifests/koku-metrics-cfg.openshift.io_kokumetricsconfigs.yaml +++ /dev/null @@ -1,400 +0,0 @@ -apiVersion: apiextensions.k8s.io/v1 -kind: CustomResourceDefinition -metadata: - annotations: - controller-gen.kubebuilder.io/version: v0.3.0 - creationTimestamp: null - name: kokumetricsconfigs.koku-metrics-cfg.openshift.io -spec: - group: koku-metrics-cfg.openshift.io - names: - kind: KokuMetricsConfig - listKind: KokuMetricsConfigList - plural: kokumetricsconfigs - singular: kokumetricsconfig - scope: Namespaced - versions: - - name: v1alpha1 - schema: - openAPIV3Schema: - description: KokuMetricsConfig is the Schema for the kokumetricsconfig API - properties: - apiVersion: - description: 'APIVersion defines the versioned schema of this representation - of an object. Servers should convert recognized schemas to the latest - internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' - type: string - kind: - description: 'Kind is a string value representing the REST resource this - object represents. Servers may infer this from the endpoint the client - submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' - type: string - metadata: - type: object - spec: - description: KokuMetricsConfigSpec defines the desired state of KokuMetricsConfig. - properties: - api_url: - default: https://cloud.redhat.com - description: FOR DEVELOPMENT ONLY. APIURL is a field of KokuMetricsConfig - to represent the url of the API endpoint for service interaction. - The default is `https://cloud.redhat.com`. - type: string - authentication: - description: Authentication is a field of KokuMetricsConfig to represent - the authentication object. - properties: - secret_name: - description: AuthenticationSecretName is a field of KokuMetricsConfig - to represent the secret with the user and password used for - uploads. - type: string - type: - default: token - description: 'AuthType is a field of KokuMetricsConfig to represent - the authentication type to be used basic or token. Valid values - are: - "basic" : Enables authentication using user and password - from authentication secret. - "token" (default): Uses cluster - token for authentication.' - enum: - - token - - basic - type: string - required: - - type - type: object - clusterID: - description: ClusterID is a field of KokuMetricsConfig to represent - the cluster UUID. Normally this value should not be specified. Only - set this value if the clusterID cannot be obtained from the ClusterVersion. - type: string - packaging: - description: Packaging is a field of KokuMetricsConfig to represent - the packaging object - properties: - max_size_MB: - default: 100 - description: MaxSize is a field of KokuMetricsConfig to represent - the max file size in megabytes that will be compressed for upload - to Ingress. The default is 100. - format: int64 - maximum: 100 - minimum: 1 - type: integer - required: - - max_size_MB - type: object - prometheus_config: - description: PrometheusConfig is a field of KokuMetricsConfig to represent - the configuration of Prometheus connection. - properties: - service_address: - default: https://thanos-querier.openshift-monitoring.svc:9091 - description: FOR DEVELOPMENT ONLY. SvcAddress is a field of KokuMetricsConfig - to represent the thanos-querier address. The default is `https://thanos-querier.openshift-monitoring.svc:9091`. - type: string - skip_tls_verification: - default: false - description: FOR DEVELOPMENT ONLY. SkipTLSVerification is a field - of KokuMetricsConfig to represent if the thanos-querier endpoint - must be certificate validated. The default is false. - type: boolean - required: - - service_address - - skip_tls_verification - type: object - source: - description: Source is a field of KokuMetricsConfig to represent the - desired source on cloud.redhat.com. - properties: - check_cycle: - default: 1440 - description: CheckCycle is a field of KokuMetricsConfig to represent - the number of minutes between each source check schedule The - default is 1440 min (24 hours). - format: int64 - minimum: 0 - type: integer - create_source: - default: false - description: CreateSource is a field of KokuMetricsConfigSpec - to represent if the source should be created if not found. - type: boolean - name: - description: SourceName is a field of KokuMetricsConfigSpec to - represent the source name on cloud.redhat.com. - type: string - sources_path: - default: /api/sources/v1.0/ - description: FOR DEVELOPMENT ONLY. SourcesAPIPath is a field of - KokuMetricsConfig to represent the path of the Sources API service. - The default is `/api/sources/v1.0/`. - type: string - required: - - check_cycle - - create_source - - sources_path - type: object - upload: - description: Upload is a field of KokuMetricsConfig to represent the - upload object. - properties: - ingress_path: - default: /api/ingress/v1/upload - description: FOR DEVELOPMENT ONLY. IngressAPIPath is a field of - KokuMetricsConfig to represent the path of the Ingress API service. - The default is `/api/ingress/v1/upload`. - type: string - upload_cycle: - default: 360 - description: UploadCycle is a field of KokuMetricsConfig to represent - the number of minutes between each upload schedule. The default - is 360 min (6 hours). - format: int64 - minimum: 0 - type: integer - upload_toggle: - default: true - description: UploadToggle is a field of KokuMetricsConfig to represent - if the operator should upload to cloud.redhat.com. The default - is true. - type: boolean - upload_wait: - description: UploadWait is a field of KokuMetricsConfig to represent - the time to wait before sending an upload. - format: int64 - minimum: 0 - type: integer - validate_cert: - default: true - description: ValidateCert is a field of KokuMetricsConfig to represent - if the Ingress endpoint must be certificate validated. - type: boolean - required: - - ingress_path - - upload_cycle - - upload_toggle - - validate_cert - type: object - required: - - authentication - - packaging - - prometheus_config - - source - - upload - type: object - status: - description: KokuMetricsConfigStatus defines the observed state of KokuMetricsConfig. - properties: - api_url: - description: APIURL is a field of KokuMetricsConfig to represent the - url of the API endpoint for service interaction. - type: string - authentication: - description: Authentication is a field of KokuMetricsConfig to represent - the authentication status. - properties: - credentials_found: - description: AuthenticationCredentialsFound is a field of KokuMetricsConfig - to represent if used for uploads were found. - type: boolean - secret_name: - description: AuthenticationSecretName is a field of KokuMetricsConfig - to represent the secret with the user and password used for - uploads. - type: string - type: - description: AuthType is a field of KokuMetricsConfig to represent - the authentication type to be used basic or token. - enum: - - token - - basic - type: string - type: object - clusterID: - description: ClusterID is a field of KokuMetricsConfig to represent - the cluster UUID. - type: string - operator_commit: - description: OperatorCommit is a field of KokuMetricsConfig that shows - the commit hash of the operator. - type: string - packaging: - description: Packaging is a field of KokuMetricsConfig to represent - the packaging status - properties: - error: - description: PackagingError is a field of KokuMetricsConfigStatus - to represent the error encountered packaging the reports. - type: string - max_size_MB: - description: MaxSize is a field of KokuMetricsConfig to represent - the max file size in megabytes that will be compressed for upload - to Ingress. The default is 100. - format: int64 - type: integer - type: object - prometheus: - description: Prometheus represents the status of premetheus queries. - properties: - configuration_error: - description: ConfigError is a field of KokuMetricsConfigStatus - to represent errors during prometheus configuration. - type: string - last_query_start_time: - description: LastQueryStartTime is a field of KokuMetricsConfigStatus - to represent the last time queries were started. - format: date-time - nullable: true - type: string - last_query_success_time: - description: LastQuerySuccessTime is a field of KokuMetricsConfigStatus - to represent the last time queries were successful. - format: date-time - nullable: true - type: string - prometheus_configured: - description: PrometheusConfigured is a field of KokuMetricsConfigStatus - to represent if the operator is configured to connect to prometheus. - type: boolean - prometheus_connected: - description: PrometheusConnected is a field of KokuMetricsConfigStatus - to represent if prometheus can be queried. - type: boolean - prometheus_connection_error: - description: ConnectionError is a field of KokuMetricsConfigStatus - to represent errors during prometheus test query. - type: string - service_address: - description: SvcAddress is the internal thanos-querier address. - type: string - skip_tls_verification: - description: SkipTLSVerification is a field of KokuMetricsConfigStatus - to represent if the thanos-querier endpoint must be certificate - validated. - type: boolean - required: - - prometheus_configured - - prometheus_connected - type: object - reports: - description: Reports represents the status of report generation. - properties: - data_collected: - description: DataCollected is a field of KokuMetricsConfigStatus - to represent whether or not data was collected for the last - query. - type: boolean - data_collection_message: - description: DataCollectionMessage is a field of KokuMetricsConfigStatus - to represent a message associated with the data_collected status. - type: string - last_hour_queried: - description: LastHourQueried is a field of KokuMetricsConfigStatus - to represent the time range for which metrics were last queried. - type: string - report_month: - description: ReportMonth is a field of KokuMetricsConfigStatus - to represent the month for which reports are being generated. - type: string - type: object - source: - description: Source is a field of KokuMetricsConfig to represent the - observed state of the source on cloud.redhat.com. - properties: - check_cycle: - description: CheckCycle is a field of KokuMetricsConfig to represent - the number of minutes between each source check schedule. The - default is 1440 min (24 hours). - format: int64 - type: integer - create_source: - description: CreateSource is a field of KokuMetricsConfigStatus - to represent if the source should be created if not found. - type: boolean - error: - description: SourceError is a field of KokuMetricsConfigStatus - to represent the error encountered creating the source. - type: string - last_check_time: - description: LastSourceCheckTime is a field of KokuMetricsConfig - that shows the time that the last check was attempted. - format: date-time - nullable: true - type: string - name: - description: SourceName is a field of KokuMetricsConfigStatus - to represent the source name on cloud.redhat.com. - type: string - source_defined: - description: SourceDefined is a field of KokuMetricsConfigStatus - to represent if the source exists as defined on cloud.redhat.com. - type: boolean - sources_path: - description: SourcesAPIPath is a field of KokuMetricsConfig to - represent the path of the Sources API service. - type: string - type: object - upload: - description: Upload is a field of KokuMetricsConfig to represent the - upload object. - properties: - error: - description: UploadError is a field of KokuMetricsConfigStatus - to represent the error encountered uploading reports. - type: string - ingress_path: - description: IngressAPIPath is a field of KokuMetricsConfig to - represent the path of the Ingress API service. - type: string - last_successful_upload_time: - description: LastSuccessfulUploadTime is a field of KokuMetricsConfig - that shows the time of the last successful upload. - format: date-time - nullable: true - type: string - last_upload_status: - description: LastUploadStatus is a field of KokuMetricsConfig - that shows the http status of the last upload. - type: string - last_upload_time: - description: LastUploadTime is a field of KokuMetricsConfig that - shows the time that the last upload was attempted. - format: date-time - nullable: true - type: string - upload: - description: UploadToggle is a field of KokuMetricsConfig to represent - if the operator should upload to cloud.redhat.com. The default - is true - type: boolean - upload_cycle: - description: UploadCycle is a field of KokuMetricsConfig to represent - the number of minutes between each upload schedule. The default - is 360 min (6 hours). - format: int64 - type: integer - upload_wait: - description: UploadWait is a field of KokuMetricsConfig to represent - the time to wait before sending an upload. - format: int64 - type: integer - validate_cert: - description: ValidateCert is a field of KokuMetricsConfig to represent - if the Ingress endpoint must be certificate validated. - type: boolean - type: object - type: object - required: - - spec - type: object - served: true - storage: true - subresources: - status: {} -status: - acceptedNames: - kind: "" - plural: "" - conditions: [] - storedVersions: [] diff --git a/koku-metrics-operator/0.9.1/manifests/koku-metrics-operator.clusterserviceversion.yaml b/koku-metrics-operator/0.9.1/manifests/koku-metrics-operator.clusterserviceversion.yaml deleted file mode 100644 index 8ca4b7087..000000000 --- a/koku-metrics-operator/0.9.1/manifests/koku-metrics-operator.clusterserviceversion.yaml +++ /dev/null @@ -1,363 +0,0 @@ -apiVersion: operators.coreos.com/v1alpha1 -kind: ClusterServiceVersion -metadata: - annotations: - alm-examples: |- - [ - { - "apiVersion": "koku-metrics-cfg.openshift.io/v1alpha1", - "kind": "KokuMetricsConfig", - "metadata": { - "name": "kokumetricscfg-sample" - }, - "spec": { - "authentication": { - "type": "token" - }, - "packaging": { - "max_size_MB": 100 - }, - "prometheus_config": {}, - "source": { - "check_cycle": 1440, - "create_source": false, - "name": "INSERT-SOURCE-NAME" - }, - "upload": { - "upload_cycle": 360, - "upload_toggle": true - } - } - } - ] - capabilities: Seamless Upgrades - categories: Monitoring - certified: "false" - containerImage: quay.io/project-koku/koku-metrics-operator:v0.9.1 - createdAt: "2021-01-08T15:08:27Z" - description: A Golang-based OpenShift Operator that generates and uploads OpenShift - usage metrics to cost management. - operatorframework.io/suggested-namespace: koku-metrics-operator - operators.operatorframework.io/builder: operator-sdk-v0.19.2 - operators.operatorframework.io/project_layout: go.kubebuilder.io/v2 - repository: https://github.com/project-koku/koku-metrics-operator - support: Cost Managment - name: koku-metrics-operator.v0.9.1 - namespace: koku-metrics-operator -spec: - apiservicedefinitions: {} - customresourcedefinitions: - owned: - - description: KokuMetricsConfig is the Schema for the kokumetricsconfig API - kind: KokuMetricsConfig - name: kokumetricsconfigs.koku-metrics-cfg.openshift.io - version: v1alpha1 - description: |- - # v0.9.1-alpha Koku Metrics Operator (Unsupported) - ## Introduction - The `koku-metrics-operator` is an OpenShift Operator used to obtain OpenShift usage data and upload it to [cost managment](https://access.redhat.com/documentation/en-us/openshift_container_platform/4.5/html/getting_started_with_cost_management/assembly_introduction_cost_management). The Operator queries Prometheus to create metric reports, which are then packaged and uploaded to cost management at [cloud.redhat.com](https://cloud.redhat.com). For more information, reach out to . - ## Features and Capabilities - The Koku Metrics Operator (`koku-metrics-operator`) collects the metrics required for cost management by: - * Querying Prometheus to create reports specific to cost management. - * Packaging these reports as a tarball which is uploaded to cost management through cloud.redhat.com. - * The operator is also capable of creating a source in cloud.redhat.com. A source is required for cost management to process the upload. - #### Limitations (Potential for metrics data loss) - * Report storage is not backed by a PersitentVolume. If the operator is redeployed, a gap may be introduced in the usage metrics. - * A source **must** exist in cloud.redhat.com for an uploaded payload to be processed by cost management. The operator sends the payload to the Red Hat Insights Ingress service which usually returns successfully, but the operator does not currently confirm with cost management that the payload was processed. After Ingress accepts the uploaded payload, the payload is removed from the operator and is gone forever. If the data within the payload is not processed, a gap will be introduced in the usage metrics. - ## Installation - The operator must be installed in the `koku-metrics-operator` namespace. Installing the operator through OperatorHub will create the namespace automatically, or it can be created through either the UI or CLI: - #### Namespace creation: - ##### UI - 1. On the left navigation pane, select `Administration` -> `Namespaces` -> `Create Namespace`. - 2. Name the namespace `koku-metrics-operator`. - 3. Select `Create`. - ##### CLI - 1. Run the following via the CLI to create and use the `koku-metrics-operator` project: - ``` - oc new-project koku-metrics-operator - ``` - #### Operator installation: - Ensure that the operator is installed into the `koku-metrics-operator` namespace. - - ## Configure the koku-metrics-operator - The operator can be configured through either the UI or CLI: - #### Configure through the UI - ##### Configure authentication - The default authentication for the operator is `token`. No further steps are required to configure token authentication. If `basic` is the preferred authentication method, a Secret must be created which holds username and password credentials: - 1. On the left navigation pane, select `Workloads` -> `Secrets` -> select Project: `koku-metrics-operator` -> `Create` -> `Key/Value Secret` - 2. Give the Secret a name and add 2 keys: `username` and `password` (all lowercase). The values for these keys correspond to cloud.redhat.com credentials. - 3. Select `Create`. - ##### Create the KokuMetricsConfig - Configure the koku-metrics-operator by creating a `KokuMetricsConfig`. - 1. On the left navigation pane, select `Operators` -> `Installed Operators` -> `koku-metrics-operator` -> `KokuMetricsConfig` -> `Create Instance`. - 2. For `basic` authentication, edit the following values in the spec: - * Replace `authentication: type:` with `basic`. - * Add the`secret_name` field under `authentication`, and set it equal to the name of the authentication Secret that was created above. The spec should look similar to the following: - - ``` - authentication: - secret_name: SECRET-NAME - type: basic - ``` - - 3. To configure the koku-metrics-operator to create a cost management source, edit the following values in the `source` field: - * Replace `INSERT-SOURCE-NAME` with the preferred name of the source to be created. - * Replace the `create_source` field value with `true`. - - **Note:** if the source already exists, replace `INSERT-SOURCE-NAME` with the existing name, and leave `create_source` as false. This will allow the operator to confirm the source exists. - 4. Select `Create`. - - #### Configure through the CLI - ##### Configure authentication - The default configuration method for the operator to create sources and upload to [cloud.redhat.com](https://cloud.redhat.com/) is `token`. No further steps are required for configuring `token` authentication. If `basic` is the preferred authentication method, a Secret must be created which holds username and password credentials: - 1. Copy the following into a file called `auth-secret.yaml`: - - ``` - kind: Secret - apiVersion: v1 - metadata: - name: authentication-secret - namespace: koku-metrics-operator - data: - username: >- - Y2xvdWQucmVkaGF0LmNvbSB1c2VybmFtZQ== - password: >- - Y2xvdWQucmVkaGF0LmNvbSBwYXNzd29yZA== - ``` - - 2. Replace the metadata.name with the preferred name for the authentication secret. - 3. Replace the `username` and `password` values with the base64-encoded username and password credentials for logging into cloud.redhat.com. - 4. Deploy the secret to the `koku-metrics-operator` namespace: - ``` - $ oc create -f auth-secret.yaml - ``` - - **Note:** The name of the secret should match the `spec: authentication: secret_name` set in the KokuMetricsConfig that is going to be configured in the next steps. - - ##### Create the KokuMetricsConfig - Configure the koku-metrics-operator by creating a `KokuMetricsConfig`. - 1. Copy the following `KokuMetricsConfig` resource template and save it to a file called `kokumetricsconfig.yaml`: - - ``` - apiVersion: koku-metrics-cfg.openshift.io/v1alpha1 - kind: KokuMetricsConfig - metadata: - name: kokumetricscfg-sample - spec: - authentication: - type: token - packaging: - max_size_MB: 100 - prometheus_config: {} - source: - check_cycle: 1440, - create_source: false, - name: INSERT-SOURCE-NAME - upload: - upload_cycle: 360, - upload_toggle: true - ``` - - 2. To configure the operator to use `basic` authentication, edit the following values in the `kokumetricsconfig.yaml` file: - * Replace `authentication: type:` with `basic`. - * Add a field called `secret_name` to the authentication field in the spec and set it equal to the name of the authentication secret that was created earlier. The authentication spec should look similar to the following: - - ``` - authentication: - secret_name: SECRET-NAME - type: basic - ``` - - 3. To configure the koku-metrics-operator to create a cost management source, edit the following values in the `kokumetricsconfig.yaml` file: - * Replace `INSERT-SOURCE-NAME` with the preferred name of the source to be created. - * Replace `create_source` field value with `true`. - - **Note:** if the source already exists, replace `INSERT-SOURCE-NAME` with the existing name, and leave `create_source` as false. This will allow the operator to confirm the source exists. - 4. Deploy the `KokuMetricsConfig` resource: - ``` - $ oc create -f kokumetricsconfig.yaml - ``` - - The koku-metrics-operator will now create, package, and upload OpenShift usage reports to cost management. - displayName: Koku Metrics Operator - icon: - - base64data: PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4KPCEtLSBHZW5lcmF0b3I6IEFkb2JlIElsbHVzdHJhdG9yIDIyLjEuMCwgU1ZHIEV4cG9ydCBQbHVnLUluIC4gU1ZHIFZlcnNpb246IDYuMDAgQnVpbGQgMCkgIC0tPgo8c3ZnIHZlcnNpb249IjEuMSIgaWQ9IkxheWVyXzEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4IgoJIHZpZXdCb3g9IjAgMCAzMDAgMzAwIiBzdHlsZT0iZW5hYmxlLWJhY2tncm91bmQ6bmV3IDAgMCAzMDAgMzAwOyIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSI+CjxzdHlsZSB0eXBlPSJ0ZXh0L2NzcyI+Cgkuc3Qwe2ZpbGw6I0VFMDAwMDt9Cjwvc3R5bGU+Cjx0aXRsZT5Db3N0LWljb248L3RpdGxlPgo8ZGVzYz5DcmVhdGVkIHdpdGggU2tldGNoLjwvZGVzYz4KPGc+Cgk8Zz4KCQk8cGF0aCBjbGFzcz0ic3QwIiBkPSJNMjM5LjAzNzAzMzEsMTE3LjI3NTE3N2MtMy4yNjU4MDgxLTQxLjk4OTA1MTgtMzguMjU2NjgzMy03NC42NDcyMDE1LTgxLjE3ODgzMy03NC42NDcyMDE1CgkJCWMtMjcuNTI2MTUzNiwwLTUzLjE4NjEyNjcsMTMuOTk2MzQ5My02OC4xMTU1NzAxLDM3LjMyMzYwMDhjLTEuODY2MTgwNCwwLTMuNzMyMzUzMi0wLjQ2NjU0NTEtNi4wNjUwNzg3LTAuNDY2NTQ1MQoJCQljLTM0LjUyNDMzMDEsMC02Mi45ODM1Nzc3LD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44NDMyMDA3LTIuNDQyMDc3Ni0xLjI2MjQ5NjktMy44OTgwODY1LTEuMjYyNDk2OWgtNy42NzYzNjExYy0wLjkxNjkxNTksMC0xLjcwMDIyNTgsMC4zMjI1MjUtMi4zNDk4OTkzLDAuOTcyMjEzNwoJCQljLTAuNjQ5Njg4NywwLjY0OTY3MzUtMC45NzY4MjE5LDEuNDc0NDQxNS0wLjk3NjgyMTksMi40NjUwODc5YzAsMC42ODY1NTQsMC4yMzAzOTI1LDEuMzM2MjEyMiwwLjY5MTE0NjksMS45NDkwMzU2CgkJCWMwLjQ1NjE2MTUsMC42MTI4MjM1LDEuMDMyMTE5OCwxLjAzMjExOTgsMS43MTg2NTg0LDEuMjYyNDk2OUwxNzQuMjgwNjM5NiwxODUuODczNjExNXoiLz4KCTwvZz4KPC9nPgo8L3N2Zz4K - mediatype: image/svg+xml - install: - spec: - clusterPermissions: - - rules: - - apiGroups: - - config.openshift.io - resources: - - clusterversions - verbs: - - get - - list - - watch - - apiGroups: - - "" - resources: - - namespaces - verbs: - - get - - list - - watch - - apiGroups: - - "" - resources: - - secrets - verbs: - - get - serviceAccountName: koku-metrics-manager-role - deployments: - - name: koku-metrics-controller-manager - spec: - replicas: 1 - selector: - matchLabels: - control-plane: controller-manager - strategy: {} - template: - metadata: - labels: - control-plane: controller-manager - spec: - containers: - - args: - - --secure-listen-address=0.0.0.0:8443 - - --upstream=http://127.0.0.1:8080/ - - --logtostderr=true - - --v=10 - image: gcr.io/kubebuilder/kube-rbac-proxy:v0.5.0 - name: kube-rbac-proxy - ports: - - containerPort: 8443 - name: https - resources: {} - - args: - - --metrics-addr=127.0.0.1:8080 - - --enable-leader-election - command: - - /manager - image: quay.io/project-koku/koku-metrics-operator:v0.9.1 - name: manager - resources: - limits: - cpu: 500m - memory: 500Mi - requests: - cpu: 100m - memory: 20Mi - terminationMessagePolicy: FallbackToLogsOnError - volumeMounts: - - mountPath: /tmp/koku-metrics-operator-reports - name: koku-metrics-operator-reports - serviceAccountName: koku-metrics-manager-role - terminationGracePeriodSeconds: 10 - volumes: - - name: koku-metrics-operator-reports - permissions: - - rules: - - apiGroups: - - "" - resources: - - configmaps - verbs: - - get - - list - - watch - - create - - update - - patch - - delete - - apiGroups: - - "" - resources: - - configmaps/status - verbs: - - get - - update - - patch - - apiGroups: - - "" - resources: - - events - verbs: - - create - - patch - serviceAccountName: koku-metrics-leader-election-role - - rules: - - apiGroups: - - apps - resources: - - deployments - verbs: - - get - - list - - patch - - watch - - apiGroups: - - "" - resources: - - configmaps - - endpoints - - events - - persistentvolumeclaims - - pods - - secrets - - serviceaccounts - - services - - services/finalizers - verbs: - - create - - delete - - get - - list - - patch - - update - - watch - - apiGroups: - - koku-metrics-cfg.openshift.io - resources: - - kokumetricsconfigs - verbs: - - create - - delete - - get - - list - - patch - - update - - watch - - apiGroups: - - koku-metrics-cfg.openshift.io - resources: - - kokumetricsconfigs/status - verbs: - - get - - patch - - update - serviceAccountName: koku-metrics-manager-role - strategy: deployment - installModes: - - supported: true - type: OwnNamespace - - supported: true - type: SingleNamespace - - supported: false - type: MultiNamespace - - supported: false - type: AllNamespaces - keywords: - - cost - - management - - usage - - monitor - maintainers: - - email: cost-mgmt@redhat.com - name: cost-mgmt - maturity: alpha - provider: - name: Red Hat - replaces: koku-metrics-operator.v0.9.0 - version: 0.9.1 diff --git a/koku-metrics-operator/0.9.1/metadata/annotations.yaml b/koku-metrics-operator/0.9.1/metadata/annotations.yaml deleted file mode 100644 index 60a27e61d..000000000 --- a/koku-metrics-operator/0.9.1/metadata/annotations.yaml +++ /dev/null @@ -1,10 +0,0 @@ -annotations: - operators.operatorframework.io.bundle.channel.default.v1: alpha - operators.operatorframework.io.bundle.channels.v1: alpha - operators.operatorframework.io.bundle.manifests.v1: manifests/ - operators.operatorframework.io.bundle.mediatype.v1: registry+v1 - operators.operatorframework.io.bundle.metadata.v1: metadata/ - operators.operatorframework.io.bundle.package.v1: koku-metrics-operator - operators.operatorframework.io.metrics.builder: operator-sdk-v0.19.2 - operators.operatorframework.io.metrics.mediatype.v1: metrics+v1 - operators.operatorframework.io.metrics.project_layout: go.kubebuilder.io/v2 diff --git a/koku-metrics-operator/0.9.2/Dockerfile b/koku-metrics-operator/0.9.2/Dockerfile deleted file mode 100644 index 794f515d1..000000000 --- a/koku-metrics-operator/0.9.2/Dockerfile +++ /dev/null @@ -1,14 +0,0 @@ -FROM scratch - -LABEL operators.operatorframework.io.bundle.mediatype.v1=registry+v1 -LABEL operators.operatorframework.io.bundle.manifests.v1=manifests/ -LABEL operators.operatorframework.io.bundle.metadata.v1=metadata/ -LABEL operators.operatorframework.io.bundle.package.v1=koku-metrics-operator -LABEL operators.operatorframework.io.bundle.channels.v1=alpha -LABEL operators.operatorframework.io.bundle.channel.default.v1=alpha -LABEL operators.operatorframework.io.metrics.mediatype.v1=metrics+v1 -LABEL operators.operatorframework.io.metrics.builder=operator-sdk-v0.19.4 -LABEL operators.operatorframework.io.metrics.project_layout=go.kubebuilder.io/v2 - -COPY manifests /manifests/ -COPY metadata /metadata/ diff --git a/koku-metrics-operator/0.9.2/manifests/koku-metrics-cfg.openshift.io_kokumetricsconfigs.yaml b/koku-metrics-operator/0.9.2/manifests/koku-metrics-cfg.openshift.io_kokumetricsconfigs.yaml deleted file mode 100644 index bf6070852..000000000 --- a/koku-metrics-operator/0.9.2/manifests/koku-metrics-cfg.openshift.io_kokumetricsconfigs.yaml +++ /dev/null @@ -1,794 +0,0 @@ -apiVersion: apiextensions.k8s.io/v1 -kind: CustomResourceDefinition -metadata: - annotations: - controller-gen.kubebuilder.io/version: v0.3.0 - creationTimestamp: null - name: kokumetricsconfigs.koku-metrics-cfg.openshift.io -spec: - group: koku-metrics-cfg.openshift.io - names: - kind: KokuMetricsConfig - listKind: KokuMetricsConfigList - plural: kokumetricsconfigs - singular: kokumetricsconfig - scope: Namespaced - versions: - - name: v1alpha1 - schema: - openAPIV3Schema: - description: KokuMetricsConfig is the Schema for the kokumetricsconfig API - properties: - apiVersion: - description: 'APIVersion defines the versioned schema of this representation - of an object. Servers should convert recognized schemas to the latest - internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' - type: string - kind: - description: 'Kind is a string value representing the REST resource this - object represents. Servers may infer this from the endpoint the client - submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' - type: string - metadata: - type: object - spec: - description: KokuMetricsConfigSpec defines the desired state of KokuMetricsConfig. - properties: - api_url: - default: https://cloud.redhat.com - description: FOR DEVELOPMENT ONLY. APIURL is a field of KokuMetricsConfig - to represent the url of the API endpoint for service interaction. - The default is `https://cloud.redhat.com`. - type: string - authentication: - description: Authentication is a field of KokuMetricsConfig to represent - the authentication object. - properties: - secret_name: - description: AuthenticationSecretName is a field of KokuMetricsConfig - to represent the secret with the user and password used for - uploads. - type: string - type: - default: token - description: 'AuthType is a field of KokuMetricsConfig to represent - the authentication type to be used basic or token. Valid values - are: - "basic" : Enables authentication using user and password - from authentication secret. - "token" (default): Uses cluster - token for authentication.' - enum: - - token - - basic - type: string - required: - - type - type: object - clusterID: - description: ClusterID is a field of KokuMetricsConfig to represent - the cluster UUID. Normally this value should not be specified. Only - set this value if the clusterID cannot be obtained from the ClusterVersion. - type: string - packaging: - description: Packaging is a field of KokuMetricsConfig to represent - the packaging object. - properties: - max_reports_to_store: - default: 30 - description: MaxReports is a field of KokuMetricsConfig to represent - the maximum number of reports to store. The default is 30 reports - which corresponds to approximately 7 days worth of data given - the other default values. - format: int64 - minimum: 1 - type: integer - max_size_MB: - default: 100 - description: MaxSize is a field of KokuMetricsConfig to represent - the max file size in megabytes that will be compressed for upload - to Ingress. The default is 100. - format: int64 - maximum: 100 - minimum: 1 - type: integer - required: - - max_reports_to_store - - max_size_MB - type: object - prometheus_config: - description: PrometheusConfig is a field of KokuMetricsConfig to represent - the configuration of Prometheus connection. - properties: - service_address: - default: https://thanos-querier.openshift-monitoring.svc:9091 - description: FOR DEVELOPMENT ONLY. SvcAddress is a field of KokuMetricsConfig - to represent the thanos-querier address. The default is `https://thanos-querier.openshift-monitoring.svc:9091`. - type: string - skip_tls_verification: - default: false - description: FOR DEVELOPMENT ONLY. SkipTLSVerification is a field - of KokuMetricsConfig to represent if the thanos-querier endpoint - must be certificate validated. The default is false. - type: boolean - required: - - service_address - - skip_tls_verification - type: object - source: - description: Source is a field of KokuMetricsConfig to represent the - desired source on cloud.redhat.com. - properties: - check_cycle: - default: 1440 - description: CheckCycle is a field of KokuMetricsConfig to represent - the number of minutes between each source check schedule The - default is 1440 min (24 hours). - format: int64 - minimum: 0 - type: integer - create_source: - default: false - description: CreateSource is a field of KokuMetricsConfigSpec - to represent if the source should be created if not found. - type: boolean - name: - description: SourceName is a field of KokuMetricsConfigSpec to - represent the source name on cloud.redhat.com. - type: string - sources_path: - default: /api/sources/v1.0/ - description: FOR DEVELOPMENT ONLY. SourcesAPIPath is a field of - KokuMetricsConfig to represent the path of the Sources API service. - The default is `/api/sources/v1.0/`. - type: string - required: - - check_cycle - - create_source - - sources_path - type: object - upload: - description: Upload is a field of KokuMetricsConfig to represent the - upload object. - properties: - ingress_path: - default: /api/ingress/v1/upload - description: FOR DEVELOPMENT ONLY. IngressAPIPath is a field of - KokuMetricsConfig to represent the path of the Ingress API service. - The default is `/api/ingress/v1/upload`. - type: string - upload_cycle: - default: 360 - description: UploadCycle is a field of KokuMetricsConfig to represent - the number of minutes between each upload schedule. The default - is 360 min (6 hours). - format: int64 - minimum: 0 - type: integer - upload_toggle: - default: true - description: UploadToggle is a field of KokuMetricsConfig to represent - if the operator should upload to cloud.redhat.com. The default - is true. - type: boolean - upload_wait: - description: UploadWait is a field of KokuMetricsConfig to represent - the time to wait before sending an upload. - format: int64 - minimum: 0 - type: integer - validate_cert: - default: true - description: ValidateCert is a field of KokuMetricsConfig to represent - if the Ingress endpoint must be certificate validated. - type: boolean - required: - - ingress_path - - upload_cycle - - upload_toggle - - validate_cert - type: object - volume_claim_template: - description: VolumeClaimTemplate is a field of KokuMetricsConfig to - represent a PVC template. - properties: - apiVersion: - description: 'APIVersion defines the versioned schema of this - representation of an object. Servers should convert recognized - schemas to the latest internal value, and may reject unrecognized - values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' - type: string - kind: - description: 'Kind is a string value representing the REST resource - this object represents. Servers may infer this from the endpoint - the client submits requests to. Cannot be updated. In CamelCase. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' - type: string - metadata: - description: EmbeddedMetadata contains metadata relevant to an - EmbeddedResource. - properties: - annotations: - additionalProperties: - type: string - description: 'Annotations is an unstructured key value map - stored with a resource that may be set by external tools - to store and retrieve arbitrary metadata. They are not queryable - and should be preserved when modifying objects. More info: - http://kubernetes.io/docs/user-guide/annotations' - type: object - labels: - additionalProperties: - type: string - description: 'Map of string keys and values that can be used - to organize and categorize (scope and select) objects. May - match selectors of replication controllers and services. - More info: http://kubernetes.io/docs/user-guide/labels' - type: object - name: - description: 'Name must be unique within a namespace. Is required - when creating resources, although some resources may allow - a client to request the generation of an appropriate name - automatically. Name is primarily intended for creation idempotence - and configuration definition. Cannot be updated. More info: - http://kubernetes.io/docs/user-guide/identifiers#names' - type: string - type: object - spec: - description: 'Spec defines the desired characteristics of a volume - requested by a pod author. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims' - properties: - accessModes: - description: 'AccessModes contains the desired access modes - the volume should have. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes-1' - items: - type: string - type: array - dataSource: - description: 'This field can be used to specify either: * - An existing VolumeSnapshot object (snapshot.storage.k8s.io/VolumeSnapshot - - Beta) * An existing PVC (PersistentVolumeClaim) * An existing - custom resource/object that implements data population (Alpha) - In order to use VolumeSnapshot object types, the appropriate - feature gate must be enabled (VolumeSnapshotDataSource or - AnyVolumeDataSource) If the provisioner or an external controller - can support the specified data source, it will create a - new volume based on the contents of the specified data source. - If the specified data source is not supported, the volume - will not be created and the failure will be reported as - an event. In the future, we plan to support more data source - types and the behavior of the provisioner may change.' - properties: - apiGroup: - description: APIGroup is the group for the resource being - referenced. If APIGroup is not specified, the specified - Kind must be in the core API group. For any other third-party - types, APIGroup is required. - type: string - kind: - description: Kind is the type of resource being referenced - type: string - name: - description: Name is the name of resource being referenced - type: string - required: - - kind - - name - type: object - resources: - description: 'Resources represents the minimum resources the - volume should have. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources' - properties: - limits: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - description: 'Limits describes the maximum amount of compute - resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/' - type: object - requests: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - description: 'Requests describes the minimum amount of - compute resources required. If Requests is omitted for - a container, it defaults to Limits if that is explicitly - specified, otherwise to an implementation-defined value. - More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/' - type: object - type: object - selector: - description: A label query over volumes to consider for binding. - properties: - matchExpressions: - description: matchExpressions is a list of label selector - requirements. The requirements are ANDed. - items: - description: A label selector requirement is a selector - that contains values, a key, and an operator that - relates the key and values. - properties: - key: - description: key is the label key that the selector - applies to. - type: string - operator: - description: operator represents a key's relationship - to a set of values. Valid operators are In, NotIn, - Exists and DoesNotExist. - type: string - values: - description: values is an array of string values. - If the operator is In or NotIn, the values array - must be non-empty. If the operator is Exists or - DoesNotExist, the values array must be empty. - This array is replaced during a strategic merge - patch. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - description: matchLabels is a map of {key,value} pairs. - A single {key,value} in the matchLabels map is equivalent - to an element of matchExpressions, whose key field is - "key", the operator is "In", and the values array contains - only "value". The requirements are ANDed. - type: object - type: object - storageClassName: - description: 'Name of the StorageClass required by the claim. - More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#class-1' - type: string - volumeMode: - description: volumeMode defines what type of volume is required - by the claim. Value of Filesystem is implied when not included - in claim spec. - type: string - volumeName: - description: VolumeName is the binding reference to the PersistentVolume - backing this claim. - type: string - type: object - type: object - required: - - authentication - - packaging - - prometheus_config - - source - - upload - type: object - status: - description: KokuMetricsConfigStatus defines the observed state of KokuMetricsConfig. - properties: - api_url: - description: APIURL is a field of KokuMetricsConfig to represent the - url of the API endpoint for service interaction. - type: string - authentication: - description: Authentication is a field of KokuMetricsConfig to represent - the authentication status. - properties: - credentials_found: - description: AuthenticationCredentialsFound is a field of KokuMetricsConfig - to represent if used for uploads were found. - type: boolean - secret_name: - description: AuthenticationSecretName is a field of KokuMetricsConfig - to represent the secret with the user and password used for - uploads. - type: string - type: - description: AuthType is a field of KokuMetricsConfig to represent - the authentication type to be used basic or token. - enum: - - token - - basic - type: string - type: object - clusterID: - description: ClusterID is a field of KokuMetricsConfig to represent - the cluster UUID. - type: string - operator_commit: - description: OperatorCommit is a field of KokuMetricsConfig that shows - the commit hash of the operator. - type: string - packaging: - description: Packaging is a field of KokuMetricsConfig to represent - the packaging status - properties: - error: - description: PackagingError is a field of KokuMetricsConfig to - represent the error encountered packaging the reports. - type: string - last_successful_packaging_time: - description: LastSuccessfulPackagingTime is a field of KokuMetricsConfig - that shows the time of the last successful file packaging. - format: date-time - nullable: true - type: string - max_reports_to_store: - description: MaxReports is a field of KokuMetricsConfig to represent - the maximum number of reports to store. - format: int64 - type: integer - max_size_MB: - description: MaxSize is a field of KokuMetricsConfig to represent - the max file size in megabytes that will be compressed for upload - to Ingress. - format: int64 - type: integer - number_reports_stored: - description: ReportCount is a field of KokuMetricsConfig to represent - the number of reports in storage. - format: int64 - type: integer - packaged_files: - description: PackagedFiles is a field of KokuMetricsConfig to - represent the list of file packages in storage. - items: - type: string - type: array - type: object - persistent_volume_claim: - description: PersistentVolumeClaim is a field of KokuMetricsConfig - to represent a PVC. - properties: - apiVersion: - description: 'APIVersion defines the versioned schema of this - representation of an object. Servers should convert recognized - schemas to the latest internal value, and may reject unrecognized - values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' - type: string - kind: - description: 'Kind is a string value representing the REST resource - this object represents. Servers may infer this from the endpoint - the client submits requests to. Cannot be updated. In CamelCase. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' - type: string - metadata: - description: EmbeddedMetadata contains metadata relevant to an - EmbeddedResource. - properties: - annotations: - additionalProperties: - type: string - description: 'Annotations is an unstructured key value map - stored with a resource that may be set by external tools - to store and retrieve arbitrary metadata. They are not queryable - and should be preserved when modifying objects. More info: - http://kubernetes.io/docs/user-guide/annotations' - type: object - labels: - additionalProperties: - type: string - description: 'Map of string keys and values that can be used - to organize and categorize (scope and select) objects. May - match selectors of replication controllers and services. - More info: http://kubernetes.io/docs/user-guide/labels' - type: object - name: - description: 'Name must be unique within a namespace. Is required - when creating resources, although some resources may allow - a client to request the generation of an appropriate name - automatically. Name is primarily intended for creation idempotence - and configuration definition. Cannot be updated. More info: - http://kubernetes.io/docs/user-guide/identifiers#names' - type: string - type: object - spec: - description: 'Spec defines the desired characteristics of a volume - requested by a pod author. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims' - properties: - accessModes: - description: 'AccessModes contains the desired access modes - the volume should have. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes-1' - items: - type: string - type: array - dataSource: - description: 'This field can be used to specify either: * - An existing VolumeSnapshot object (snapshot.storage.k8s.io/VolumeSnapshot - - Beta) * An existing PVC (PersistentVolumeClaim) * An existing - custom resource/object that implements data population (Alpha) - In order to use VolumeSnapshot object types, the appropriate - feature gate must be enabled (VolumeSnapshotDataSource or - AnyVolumeDataSource) If the provisioner or an external controller - can support the specified data source, it will create a - new volume based on the contents of the specified data source. - If the specified data source is not supported, the volume - will not be created and the failure will be reported as - an event. In the future, we plan to support more data source - types and the behavior of the provisioner may change.' - properties: - apiGroup: - description: APIGroup is the group for the resource being - referenced. If APIGroup is not specified, the specified - Kind must be in the core API group. For any other third-party - types, APIGroup is required. - type: string - kind: - description: Kind is the type of resource being referenced - type: string - name: - description: Name is the name of resource being referenced - type: string - required: - - kind - - name - type: object - resources: - description: 'Resources represents the minimum resources the - volume should have. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources' - properties: - limits: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - description: 'Limits describes the maximum amount of compute - resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/' - type: object - requests: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - description: 'Requests describes the minimum amount of - compute resources required. If Requests is omitted for - a container, it defaults to Limits if that is explicitly - specified, otherwise to an implementation-defined value. - More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/' - type: object - type: object - selector: - description: A label query over volumes to consider for binding. - properties: - matchExpressions: - description: matchExpressions is a list of label selector - requirements. The requirements are ANDed. - items: - description: A label selector requirement is a selector - that contains values, a key, and an operator that - relates the key and values. - properties: - key: - description: key is the label key that the selector - applies to. - type: string - operator: - description: operator represents a key's relationship - to a set of values. Valid operators are In, NotIn, - Exists and DoesNotExist. - type: string - values: - description: values is an array of string values. - If the operator is In or NotIn, the values array - must be non-empty. If the operator is Exists or - DoesNotExist, the values array must be empty. - This array is replaced during a strategic merge - patch. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - description: matchLabels is a map of {key,value} pairs. - A single {key,value} in the matchLabels map is equivalent - to an element of matchExpressions, whose key field is - "key", the operator is "In", and the values array contains - only "value". The requirements are ANDed. - type: object - type: object - storageClassName: - description: 'Name of the StorageClass required by the claim. - More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#class-1' - type: string - volumeMode: - description: volumeMode defines what type of volume is required - by the claim. Value of Filesystem is implied when not included - in claim spec. - type: string - volumeName: - description: VolumeName is the binding reference to the PersistentVolume - backing this claim. - type: string - type: object - type: object - prometheus: - description: Prometheus represents the status of premetheus queries. - properties: - configuration_error: - description: ConfigError is a field of KokuMetricsConfigStatus - to represent errors during prometheus configuration. - type: string - last_query_start_time: - description: LastQueryStartTime is a field of KokuMetricsConfigStatus - to represent the last time queries were started. - format: date-time - nullable: true - type: string - last_query_success_time: - description: LastQuerySuccessTime is a field of KokuMetricsConfigStatus - to represent the last time queries were successful. - format: date-time - nullable: true - type: string - prometheus_configured: - description: PrometheusConfigured is a field of KokuMetricsConfigStatus - to represent if the operator is configured to connect to prometheus. - type: boolean - prometheus_connected: - description: PrometheusConnected is a field of KokuMetricsConfigStatus - to represent if prometheus can be queried. - type: boolean - prometheus_connection_error: - description: ConnectionError is a field of KokuMetricsConfigStatus - to represent errors during prometheus test query. - type: string - service_address: - description: SvcAddress is the internal thanos-querier address. - type: string - skip_tls_verification: - description: SkipTLSVerification is a field of KokuMetricsConfigStatus - to represent if the thanos-querier endpoint must be certificate - validated. - type: boolean - required: - - prometheus_configured - - prometheus_connected - type: object - reports: - description: Reports represents the status of report generation. - properties: - data_collected: - description: DataCollected is a field of KokuMetricsConfigStatus - to represent whether or not data was collected for the last - query. - type: boolean - data_collection_message: - description: DataCollectionMessage is a field of KokuMetricsConfigStatus - to represent a message associated with the data_collected status. - type: string - last_hour_queried: - description: LastHourQueried is a field of KokuMetricsConfigStatus - to represent the time range for which metrics were last queried. - type: string - report_month: - description: ReportMonth is a field of KokuMetricsConfigStatus - to represent the month for which reports are being generated. - type: string - type: object - source: - description: Source is a field of KokuMetricsConfig to represent the - observed state of the source on cloud.redhat.com. - properties: - check_cycle: - description: CheckCycle is a field of KokuMetricsConfig to represent - the number of minutes between each source check schedule. The - default is 1440 min (24 hours). - format: int64 - type: integer - create_source: - description: CreateSource is a field of KokuMetricsConfigStatus - to represent if the source should be created if not found. - type: boolean - error: - description: SourceError is a field of KokuMetricsConfigStatus - to represent the error encountered creating the source. - type: string - last_check_time: - description: LastSourceCheckTime is a field of KokuMetricsConfig - that shows the time that the last check was attempted. - format: date-time - nullable: true - type: string - name: - description: SourceName is a field of KokuMetricsConfigStatus - to represent the source name on cloud.redhat.com. - type: string - source_defined: - description: SourceDefined is a field of KokuMetricsConfigStatus - to represent if the source exists as defined on cloud.redhat.com. - type: boolean - sources_path: - description: SourcesAPIPath is a field of KokuMetricsConfig to - represent the path of the Sources API service. - type: string - type: object - storage: - description: Storage is a field - properties: - volume_mounted: - description: VolumeMounted is a bool to indicate if storage volume - was mounted. - type: boolean - volume_type: - description: VolumeType is the string representation of the volume - type. - type: string - type: object - upload: - description: Upload is a field of KokuMetricsConfig to represent the - upload object. - properties: - error: - description: UploadError is a field of KokuMetricsConfigStatus - to represent the error encountered uploading reports. - type: string - ingress_path: - description: IngressAPIPath is a field of KokuMetricsConfig to - represent the path of the Ingress API service. - type: string - last_successful_upload_time: - description: LastSuccessfulUploadTime is a field of KokuMetricsConfig - that shows the time of the last successful upload. - format: date-time - nullable: true - type: string - last_upload_status: - description: LastUploadStatus is a field of KokuMetricsConfig - that shows the http status of the last upload. - type: string - last_upload_time: - description: LastUploadTime is a field of KokuMetricsConfig that - shows the time that the last upload was attempted. - format: date-time - nullable: true - type: string - upload: - description: UploadToggle is a field of KokuMetricsConfig to represent - if the operator should upload to cloud.redhat.com. The default - is true - type: boolean - upload_cycle: - description: UploadCycle is a field of KokuMetricsConfig to represent - the number of minutes between each upload schedule. The default - is 360 min (6 hours). - format: int64 - type: integer - upload_wait: - description: UploadWait is a field of KokuMetricsConfig to represent - the time to wait before sending an upload. - format: int64 - type: integer - validate_cert: - description: ValidateCert is a field of KokuMetricsConfig to represent - if the Ingress endpoint must be certificate validated. - type: boolean - type: object - type: object - required: - - spec - type: object - served: true - storage: true - subresources: - status: {} -status: - acceptedNames: - kind: "" - plural: "" - conditions: [] - storedVersions: [] diff --git a/koku-metrics-operator/0.9.2/manifests/koku-metrics-operator.clusterserviceversion.yaml b/koku-metrics-operator/0.9.2/manifests/koku-metrics-operator.clusterserviceversion.yaml deleted file mode 100644 index a4f9caf17..000000000 --- a/koku-metrics-operator/0.9.2/manifests/koku-metrics-operator.clusterserviceversion.yaml +++ /dev/null @@ -1,449 +0,0 @@ -apiVersion: operators.coreos.com/v1alpha1 -kind: ClusterServiceVersion -metadata: - annotations: - alm-examples: |- - [ - { - "apiVersion": "koku-metrics-cfg.openshift.io/v1alpha1", - "kind": "KokuMetricsConfig", - "metadata": { - "name": "kokumetricscfg-sample" - }, - "spec": { - "authentication": { - "type": "token" - }, - "packaging": { - "max_size_MB": 100 - }, - "prometheus_config": {}, - "source": { - "check_cycle": 1440, - "create_source": false, - "name": "INSERT-SOURCE-NAME" - }, - "upload": { - "upload_cycle": 360, - "upload_toggle": true - } - } - } - ] - capabilities: Seamless Upgrades - categories: Monitoring - certified: "false" - containerImage: quay.io/project-koku/koku-metrics-operator:v0.9.2 - createdAt: "2021-01-28T14:12:57Z" - description: A Golang-based OpenShift Operator that generates and uploads OpenShift - usage metrics to cost management. - operatorframework.io/suggested-namespace: koku-metrics-operator - operators.openshift.io/infrastructure-features: '["Disconnected"]' - operators.operatorframework.io/builder: operator-sdk-v0.19.4 - operators.operatorframework.io/project_layout: go.kubebuilder.io/v2 - repository: https://github.com/project-koku/koku-metrics-operator - support: Cost Managment - name: koku-metrics-operator.v0.9.2 - namespace: koku-metrics-operator -spec: - apiservicedefinitions: {} - customresourcedefinitions: - owned: - - description: KokuMetricsConfig is the Schema for the kokumetricsconfig API - kind: KokuMetricsConfig - name: kokumetricsconfigs.koku-metrics-cfg.openshift.io - version: v1alpha1 - description: |- - # v0.9.2-alpha Koku Metrics Operator (Unsupported) - ## Introduction - The `koku-metrics-operator` is an OpenShift Operator used to collect OpenShift usage data and upload it to [cost managment](https://access.redhat.com/documentation/en-us/openshift_container_platform/4.5/html/getting_started_with_cost_management/assembly_introduction_cost_management). The operator queries Prometheus to create metric reports which are packaged and uploaded to cost management at [cloud.redhat.com](https://cloud.redhat.com). - - This operator is capable of functioning within a disconnected/restricted network (aka air-gapped mode). In this mode, the operator will store the packaged reports for manual retrieval instead of being uploaded to cost management. Documentation for installing an operator within a restricted network can be found [here](https://docs.openshift.com/container-platform/4.5/operators/admin/olm-restricted-networks.html). - - For more information, reach out to . - ## Features and Capabilities - #### Metrics collection: - The Koku Metrics Operator (`koku-metrics-operator`) collects the metrics required for cost management by: - * Querying Prometheus to gather the necessary metrics for cost management. - * Writing Prometheus queries to CSV report files. - * Packaging the CSV report files into tarballs. - - #### Additional Capabilities: - * The operator can be configured to automatically upload the packaged reports to cost management through Red Hat Insights Ingress service. - * The operator can create a source in cloud.redhat.com. A source is required for cost management to process the uploaded packages. - * PersistentVolumeClaim (PVC) configuration: The KokuMetricsConfig CR can accept a PVC definition and the operator will create and mount the PVC. If one is not provided, a default PVC will be created. - * Restricted network installation: this operator can function on a restricted network. In this mode, the operator stores the packaged reports for manual retrieval. - - ## Limitations and Pre-Requisites - #### Limitations (Potential for metrics data loss) - * A source **must** exist in cloud.redhat.com for an uploaded payload to be processed by cost management. The operator sends the payload to the Red Hat Insights Ingress service which usually returns successfully, but the operator does not currently confirm with cost management that the payload was processed. After Ingress accepts the uploaded payload, the payload is removed from the operator and is gone forever. If the data within the payload is not processed, a gap will be introduced in the usage metrics. - - **Note** The following limitations are specific to operators configured to run in a restricted network: - * The `koku-metrics-operator` will not be able to generate new reports if the PVC storage is filled. If this occurs, the reports must be manually deleted from the PVC so that the operator can function as normal. - * The default report retention is 30 reports (about one week's worth of data). The reports must be manually downloaded and uploaded to cloud.redhat.com every week, or they will be deleted and the data will be lost. - - #### Storage configuration prerequisite - The operator will attempt to create and use the following PVC when installed: - - volume_claim_template: - apiVersion: v1 - kind: PersistentVolumeClaim - metadata: - name: koku-metrics-operator-data - spec: - accessModes: - - ReadWriteOnce - resources: - requests: - storage: 10Gi - - If a different PVC should be utilized, a valid PVC should be specified in the KokuMetricsConfig CR as described in the appropriate section below. The PVC to be used may exist already, or the operator will attempt to create it. - - To use the default specification, the follow assumptions must be met: - 1. A default StorageClass is defined. - 2. Dynamic provisioning for that default StorageClass is enabled. - - If these assumptions are not met, the operator will not deploy correctly. In these cases, storage must be manually configured. After configuring storage, a valid PVC template should be supplied in the `volume_claim_template` spec of the KokuMetricsConfig CR. - - ## Configure the koku-metrics-operator - **Note** There are separate instructions for configuring the `koku-metrics-operator` to run in a restricted network. - ##### Configure authentication - The default authentication for the operator is `token`. No further steps are required to configure token authentication. If `basic` is the preferred authentication method, a Secret must be created which holds username and password credentials: - 1. On the left navigation pane, select `Workloads` -> `Secrets` -> select Project: `koku-metrics-operator` -> `Create` -> `Key/Value Secret` - 2. Give the Secret a name and add 2 keys: `username` and `password` (all lowercase). The values for these keys correspond to cloud.redhat.com credentials. - 3. Select `Create`. - ##### Create the KokuMetricsConfig - Configure the koku-metrics-operator by creating a `KokuMetricsConfig`. - 1. On the left navigation pane, select `Operators` -> `Installed Operators` -> `koku-metrics-operator` -> `KokuMetricsConfig` -> `Create Instance`. - 2. For `basic` authentication, edit the following values in the spec: - * Replace `authentication: type:` with `basic`. - * Add the `secret_name` field under `authentication`, and set it equal to the name of the authentication Secret that was created above. The spec should look similar to the following: - - ``` - authentication: - secret_name: SECRET-NAME - type: basic - ``` - - 3. To configure the koku-metrics-operator to create a cost management source, edit the following values in the `source` field: - * Replace `INSERT-SOURCE-NAME` with the preferred name of the source to be created. - * Replace the `create_source` field value with `true`. - - **Note:** if the source already exists, replace `INSERT-SOURCE-NAME` with the existing name, and leave `create_source` as false. This will allow the operator to confirm the source exists. - 4. If not specified, the operator will create a default PersistentVolumeClaim called `koku-metrics-operator-data` with 10Gi of storage. To configure the koku-metrics-operator to use or create a different PVC, edit the following in the spec: - * Add the desired configuration to the `volume_claim_template` field in the spec: - - ``` - volume_claim_template: - apiVersion: v1 - kind: PersistentVolumeClaim - metadata: - name: pvc-spec-definition - spec: - accessModes: - - ReadWriteOnce - resources: - requests: - storage: 10Gi - ``` - - **Note:** If using the YAML View, the `volume_claim_template` field must be added to the spec - 5. Select `Create`. - - # Restricted Network Usage (disconnected/air-gapped mode) - ## Installation - To install the `koku-metrics-operator` in a restricted network, follow the [olm documentation](https://docs.openshift.com/container-platform/4.5/operators/admin/olm-restricted-networks.html). The operator is found in the `community-operators` Catalog in the `registry.redhat.io/redhat/community-operator-index:latest` Index. If pruning the index before pushing to the mirrored registry, keep the `koku-metrics-operator` package. - - Within a restricted network, the operator queries prometheus to gather the necessary usage metrics, writes the query results to CSV files, and packages the reports for storage in the PVC. These reports then need to be manually downloaded from the cluster and uploaded to [cloud.redhat.com](https://cloud.redhat.com). - - For more information, reach out to . - ## Configure the koku-metrics-operator for a restricted network - ##### Create the KokuMetricsConfig - Configure the koku-metrics-operator by creating a `KokuMetricsConfig`. - 1. On the left navigation pane, select `Operators` -> `Installed Operators` -> `koku-metrics-operator` -> `KokuMetricsConfig` -> `Create Instance`. - 2. Specify the desired storage. If not specified, the operator will create a default Persistent Volume Claim called `koku-metrics-operator-data` with 10Gi of storage. To configure the koku-metrics-operator to use or create a different PVC, edit the following in the spec: - * Add the desired configuration to the `volume_claim_template` field in the spec: - - ``` - volume_claim_template: - apiVersion: v1 - kind: PersistentVolumeClaim - metadata: - name: pvc-spec-definition - spec: - storageClassName: gp2 - accessModes: - - ReadWriteOnce - resources: - requests: - storage: 10Gi - ``` - - **Note:** If using the YAML View, the `volume_claim_template` field must be added to the spec - 3. (Optional) Specify the desired report retention. The operator will retain 30 reports by default. This corresponds to approximately one week's worth of data if using the default packaging cycle. To modify the number of retained reports: - * Change the `packaging` spec field `max_reports_to_store` to the desired number of reports to retain. Once this max number is reached, the operator will start removing the oldest packages remaining on the PVC: - - ``` - packaging: - max_size_MB: 100 - max_reports_to_store: 30 - ``` - - **Note:** The number of retained reports directly affects the frequency that reports must be manually downloaded from the PVC. Take caution in setting this to a higher number of reports, as the operator cannot write data to the PVC if the storage is full. - 4. To configure the operator to perform in a restricted network, set the `upload_toggle` to `false`: - - ``` - upload: - upload_cycle: 360, - upload_toggle: false - ``` - - 5. Select `Create`. - - ## Download reports from the Operator & clean up the PVC - If the `koku-metrics-operator` is configured to run in a restricted network, the metric reports will not automatically upload to cost managment. Instead, they need to be manually copied from the PVC for upload to [cloud.redhat.com](https://cloud.redhat.com). The default configuration saves one week of reports which means the process of downloading and uploading reports should be repeated weekly to prevent loss of metrics data. To download the reports, complete the following steps: - 1. Create the following Pod, ensuring the `claimName` matches the PVC containing the report data: - - ``` - kind: Pod - apiVersion: v1 - metadata: - name: volume-shell - spec: - volumes: - - name: koku-metrics-operator-reports - persistentVolumeClaim: - claimName: koku-metrics-operator-data - containers: - - name: volume-shell - image: busybox - command: ['sleep', '3600'] - volumeMounts: - - name: koku-metrics-operator-reports - mountPath: /tmp/koku-metrics-operator-reports - ``` - - 2. Use rsync to copy all of the files ready for upload from the PVC to a local folder: - - ``` - $ oc rsync volume-shell:/tmp/koku-metrics-operator-reports/upload local/path/to/save/folder - ``` - - 3. Once confirming that the files have been successfully copied, use rsh to connect to the pod and delete the contents of the upload folder so that they are no longer in storage: - - ``` - $ oc rsh volume-shell - $ rm /tmp/koku-metrics-operator-reports/upload/* - ``` - - 4. (Optional) Delete the pod that was used to connect to the PVC: - - ``` - $ oc delete -f volume-shell.yaml - ``` - - ## Create a source - In a restricted network, the `koku-metrics-operator` cannot automatically create a source. This process must be done manually. In the cloud.redhat.com platform, open the [Sources menu](https://cloud.redhat.com/settings/sources/) to begin adding an OpenShift source to cost management: - - 1. Navigate to the Sources menu - 2. Select the `Red Hat sources` tab - 3. Click `Add source` to open the Sources wizard. - 4. Enter a name for the source and click `Next`. - 5. Select `Red Hat Openshift Container Platform` as the source type and Cost Management as the application. Click `Next`. - 6. Enter the cluster identifier into the cloud.redhat.com Sources wizard, and click `Next`. - - **Note:** The cluster identifier can be found in the KokuMetricsConfig CR, the cluster Overview page, or the cluster Help > About. - - 7. In the cloud.redhat.com Sources wizard, review the details and click `Finish` to create the Source. - - ## Upload the reports to cost managment - Uploading reports to cost managment is done through curl: - - $ curl -vvvv -F "file=@FILE_NAME.tar.gz;type=application/vnd.redhat.hccm.tar+tgz" https://cloud.redhat.com/api/ingress/v1/upload -u USERNAME:PASS - - where `USERNAME` and `PASS` correspond to the user credentials for [cloud.redhat.com](https://cloud.redhat.com), and `FILE_NAME` is the name of the report to upload. - - displayName: Koku Metrics Operator - icon: - - base64data: PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4KPCEtLSBHZW5lcmF0b3I6IEFkb2JlIElsbHVzdHJhdG9yIDIyLjEuMCwgU1ZHIEV4cG9ydCBQbHVnLUluIC4gU1ZHIFZlcnNpb246IDYuMDAgQnVpbGQgMCkgIC0tPgo8c3ZnIHZlcnNpb249IjEuMSIgaWQ9IkxheWVyXzEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4IgoJIHZpZXdCb3g9IjAgMCAzMDAgMzAwIiBzdHlsZT0iZW5hYmxlLWJhY2tncm91bmQ6bmV3IDAgMCAzMDAgMzAwOyIgeG1sOnNwYWNlPSJwcmVzZ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MzQ1NTY1OCwwLjUxMTQ1OTQsMC43ODMyOTQ3LDAuNTExNDU5NCwxLjMxNzc5NDh2NS41MDE1NDExCgkJCWMzLjY2NzY5NDEsMCw2Ljk1NzU2NTMsMS4xNDcyOTMxLDkuODYwMzgyMSwzLjQzNzMwMTZjMC40NTYxNzY4LDAuMzgyNDQ2MywwLjcyMzQxOTIsMC44NDMyMDA3LDAuODAxNzQyNiwxLjM3NzY4NTUKCQkJYzAuMDczNzE1MiwwLjUzNDUwMDEtMC4xMTUyMDM5LDAuOTkwNjQ2NC0wLjU3MTM1MDEsMS4zNzMwNzc0bC0zLjg5ODA4NjUsNC4wMTMyNzUxCgkJCWMtMC4zMDg3MTU4LDAuMjMwMzkyNS0wLjY2ODEwNjEsMC4zODI0MzEtMS4wOTIwMTA1LDAuNDU2MTYxNWMtMC40MTkyOTYzLDAuMDc4MzIzNC0wLjgyMDE1OTksMC0xLjIwMjU5MDktMC4yMjU3NjkKCQkJYy0xLjE0MjcxNTUtMC44NDMyMDA3LTIuNDQyMDc3Ni0xLjI2MjQ5NjktMy44OTgwODY1LTEuMjYyNDk2OWgtNy42NzYzNjExYy0wLjkxNjkxNTksMC0xLjcwMDIyNTgsMC4zMjI1MjUtMi4zNDk4OTkzLDAuOTcyMjEzNwoJCQljLTAuNjQ5Njg4NywwLjY0OTY3MzUtMC45NzY4MjE5LDEuNDc0NDQxNS0wLjk3NjgyMTksMi40NjUwODc5YzAsMC42ODY1NTQsMC4yMzAzOTI1LDEuMzM2MjEyMiwwLjY5MTE0NjksMS45NDkwMzU2CgkJCWMwLjQ1NjE2MTUsMC42MTI4MjM1LDEuMDMyMTE5OCwxLjAzMjExOTgsMS43MTg2NTg0LDEuMjYyNDk2OUwxNzQuMjgwNjM5NiwxODUuODczNjExNXoiLz4KCTwvZz4KPC9nPgo8L3N2Zz4K - mediatype: image/svg+xml - install: - spec: - clusterPermissions: - - rules: - - apiGroups: - - config.openshift.io - resources: - - clusterversions - verbs: - - get - - list - - watch - - apiGroups: - - "" - resources: - - namespaces - verbs: - - get - - list - - watch - - apiGroups: - - "" - resources: - - secrets - verbs: - - get - serviceAccountName: koku-metrics-manager-role - deployments: - - name: koku-metrics-controller-manager - spec: - replicas: 1 - selector: - matchLabels: - control-plane: controller-manager - strategy: {} - template: - metadata: - labels: - control-plane: controller-manager - spec: - containers: - - args: - - --enable-leader-election - command: - - /manager - env: - - name: IN_CLUSTER - value: "true" - image: quay.io/project-koku/koku-metrics-operator@sha256:947f0eec61e0d77e9c9d074a12a8b792e2450944755307ef564497c9ad1713f1 - name: manager - resources: - limits: - cpu: 500m - memory: 500Mi - requests: - cpu: 100m - memory: 20Mi - terminationMessagePolicy: FallbackToLogsOnError - volumeMounts: - - mountPath: /tmp/koku-metrics-operator-reports - name: koku-metrics-operator-reports - serviceAccountName: koku-metrics-manager-role - terminationGracePeriodSeconds: 10 - volumes: - - name: koku-metrics-operator-reports - permissions: - - rules: - - apiGroups: - - "" - resources: - - configmaps - verbs: - - get - - list - - watch - - create - - update - - patch - - delete - - apiGroups: - - "" - resources: - - configmaps/status - verbs: - - get - - update - - patch - - apiGroups: - - "" - resources: - - events - verbs: - - create - - patch - - apiGroups: - - apps - resources: - - deployments - verbs: - - get - - list - - patch - - watch - - apiGroups: - - "" - resources: - - configmaps - - endpoints - - events - - persistentvolumeclaims - - pods - - secrets - - serviceaccounts - - services - - services/finalizers - verbs: - - create - - delete - - get - - list - - patch - - update - - watch - - apiGroups: - - koku-metrics-cfg.openshift.io - resources: - - kokumetricsconfigs - verbs: - - create - - delete - - get - - list - - patch - - update - - watch - - apiGroups: - - koku-metrics-cfg.openshift.io - resources: - - kokumetricsconfigs/status - verbs: - - get - - patch - - update - - apiGroups: - - operators.coreos.com - resources: - - clusterserviceversions - verbs: - - get - - list - - patch - - update - - watch - serviceAccountName: koku-metrics-manager-role - strategy: deployment - installModes: - - supported: true - type: OwnNamespace - - supported: true - type: SingleNamespace - - supported: false - type: MultiNamespace - - supported: false - type: AllNamespaces - relatedImages: - - name: koku-metrics-operator - image: quay.io/project-koku/koku-metrics-operator@sha256:947f0eec61e0d77e9c9d074a12a8b792e2450944755307ef564497c9ad1713f1 - keywords: - - cost - - management - - usage - - monitor - maintainers: - - email: cost-mgmt@redhat.com - name: cost-mgmt - maturity: alpha - provider: - name: Red Hat - replaces: koku-metrics-operator.v0.9.1 - version: 0.9.2 diff --git a/koku-metrics-operator/0.9.2/metadata/annotations.yaml b/koku-metrics-operator/0.9.2/metadata/annotations.yaml deleted file mode 100644 index cd37be01d..000000000 --- a/koku-metrics-operator/0.9.2/metadata/annotations.yaml +++ /dev/null @@ -1,10 +0,0 @@ -annotations: - operators.operatorframework.io.bundle.channel.default.v1: alpha - operators.operatorframework.io.bundle.channels.v1: alpha - operators.operatorframework.io.bundle.manifests.v1: manifests/ - operators.operatorframework.io.bundle.mediatype.v1: registry+v1 - operators.operatorframework.io.bundle.metadata.v1: metadata/ - operators.operatorframework.io.bundle.package.v1: koku-metrics-operator - operators.operatorframework.io.metrics.builder: operator-sdk-v0.19.4 - operators.operatorframework.io.metrics.mediatype.v1: metrics+v1 - operators.operatorframework.io.metrics.project_layout: go.kubebuilder.io/v2 diff --git a/koku-metrics-operator/0.9.3/Dockerfile b/koku-metrics-operator/0.9.3/Dockerfile deleted file mode 100644 index 794f515d1..000000000 --- a/koku-metrics-operator/0.9.3/Dockerfile +++ /dev/null @@ -1,14 +0,0 @@ -FROM scratch - -LABEL operators.operatorframework.io.bundle.mediatype.v1=registry+v1 -LABEL operators.operatorframework.io.bundle.manifests.v1=manifests/ -LABEL operators.operatorframework.io.bundle.metadata.v1=metadata/ -LABEL operators.operatorframework.io.bundle.package.v1=koku-metrics-operator -LABEL operators.operatorframework.io.bundle.channels.v1=alpha -LABEL operators.operatorframework.io.bundle.channel.default.v1=alpha -LABEL operators.operatorframework.io.metrics.mediatype.v1=metrics+v1 -LABEL operators.operatorframework.io.metrics.builder=operator-sdk-v0.19.4 -LABEL operators.operatorframework.io.metrics.project_layout=go.kubebuilder.io/v2 - -COPY manifests /manifests/ -COPY metadata /metadata/ diff --git a/koku-metrics-operator/0.9.3/manifests/koku-metrics-cfg.openshift.io_kokumetricsconfigs.yaml b/koku-metrics-operator/0.9.3/manifests/koku-metrics-cfg.openshift.io_kokumetricsconfigs.yaml deleted file mode 100644 index a2c03b9dc..000000000 --- a/koku-metrics-operator/0.9.3/manifests/koku-metrics-cfg.openshift.io_kokumetricsconfigs.yaml +++ /dev/null @@ -1,1587 +0,0 @@ -apiVersion: apiextensions.k8s.io/v1 -kind: CustomResourceDefinition -metadata: - annotations: - controller-gen.kubebuilder.io/version: v0.3.0 - creationTimestamp: null - name: kokumetricsconfigs.koku-metrics-cfg.openshift.io -spec: - group: koku-metrics-cfg.openshift.io - names: - kind: KokuMetricsConfig - listKind: KokuMetricsConfigList - plural: kokumetricsconfigs - singular: kokumetricsconfig - scope: Namespaced - versions: - - name: v1alpha1 - schema: - openAPIV3Schema: - description: KokuMetricsConfig is the Schema for the kokumetricsconfig API - (Deprecated) - properties: - apiVersion: - description: 'APIVersion defines the versioned schema of this representation - of an object. Servers should convert recognized schemas to the latest - internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' - type: string - kind: - description: 'Kind is a string value representing the REST resource this - object represents. Servers may infer this from the endpoint the client - submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' - type: string - metadata: - type: object - spec: - description: KokuMetricsConfigSpec defines the desired state of KokuMetricsConfig. - properties: - api_url: - default: https://cloud.redhat.com - description: FOR DEVELOPMENT ONLY. APIURL is a field of KokuMetricsConfig - to represent the url of the API endpoint for service interaction. - The default is `https://cloud.redhat.com`. - type: string - authentication: - description: Authentication is a field of KokuMetricsConfig to represent - the authentication object. - properties: - secret_name: - description: AuthenticationSecretName is a field of KokuMetricsConfig - to represent the secret with the user and password used for - uploads. - type: string - type: - default: token - description: 'AuthType is a field of KokuMetricsConfig to represent - the authentication type to be used basic or token. Valid values - are: - "basic" : Enables authentication using user and password - from authentication secret. - "token" (default): Uses cluster - token for authentication.' - enum: - - token - - basic - type: string - required: - - type - type: object - clusterID: - description: ClusterID is a field of KokuMetricsConfig to represent - the cluster UUID. Normally this value should not be specified. Only - set this value if the clusterID cannot be obtained from the ClusterVersion. - type: string - packaging: - description: Packaging is a field of KokuMetricsConfig to represent - the packaging object. - properties: - max_reports_to_store: - default: 30 - description: MaxReports is a field of KokuMetricsConfig to represent - the maximum number of reports to store. The default is 30 reports - which corresponds to approximately 7 days worth of data given - the other default values. - format: int64 - minimum: 1 - type: integer - max_size_MB: - default: 100 - description: MaxSize is a field of KokuMetricsConfig to represent - the max file size in megabytes that will be compressed for upload - to Ingress. The default is 100. - format: int64 - maximum: 100 - minimum: 1 - type: integer - required: - - max_reports_to_store - - max_size_MB - type: object - prometheus_config: - description: PrometheusConfig is a field of KokuMetricsConfig to represent - the configuration of Prometheus connection. - properties: - service_address: - default: https://thanos-querier.openshift-monitoring.svc:9091 - description: FOR DEVELOPMENT ONLY. SvcAddress is a field of KokuMetricsConfig - to represent the thanos-querier address. The default is `https://thanos-querier.openshift-monitoring.svc:9091`. - type: string - skip_tls_verification: - default: false - description: FOR DEVELOPMENT ONLY. SkipTLSVerification is a field - of KokuMetricsConfig to represent if the thanos-querier endpoint - must be certificate validated. The default is false. - type: boolean - required: - - service_address - - skip_tls_verification - type: object - source: - description: Source is a field of KokuMetricsConfig to represent the - desired source on cloud.redhat.com. - properties: - check_cycle: - default: 1440 - description: CheckCycle is a field of KokuMetricsConfig to represent - the number of minutes between each source check schedule The - default is 1440 min (24 hours). - format: int64 - minimum: 0 - type: integer - create_source: - default: false - description: CreateSource is a field of KokuMetricsConfigSpec - to represent if the source should be created if not found. A - source will not be created if upload_toggle is `false`. - type: boolean - name: - description: SourceName is a field of KokuMetricsConfigSpec to - represent the source name on cloud.redhat.com. - type: string - sources_path: - default: /api/sources/v1.0/ - description: FOR DEVELOPMENT ONLY. SourcesAPIPath is a field of - KokuMetricsConfig to represent the path of the Sources API service. - The default is `/api/sources/v1.0/`. - type: string - required: - - check_cycle - - create_source - - sources_path - type: object - upload: - description: Upload is a field of KokuMetricsConfig to represent the - upload object. - properties: - ingress_path: - default: /api/ingress/v1/upload - description: FOR DEVELOPMENT ONLY. IngressAPIPath is a field of - KokuMetricsConfig to represent the path of the Ingress API service. - The default is `/api/ingress/v1/upload`. - type: string - upload_cycle: - default: 360 - description: UploadCycle is a field of KokuMetricsConfig to represent - the number of minutes between each upload schedule. The default - is 360 min (6 hours). - format: int64 - minimum: 0 - type: integer - upload_toggle: - default: true - description: UploadToggle is a field of KokuMetricsConfig to represent - if the operator is installed in a restricted-network. If `false`, - the operator will not upload to cloud.redhat.com or check/create - sources. The default is true. - type: boolean - upload_wait: - description: UploadWait is a field of KokuMetricsConfig to represent - the time to wait before sending an upload. - format: int64 - minimum: 0 - type: integer - validate_cert: - default: true - description: ValidateCert is a field of KokuMetricsConfig to represent - if the Ingress endpoint must be certificate validated. - type: boolean - required: - - ingress_path - - upload_cycle - - upload_toggle - - validate_cert - type: object - volume_claim_template: - description: VolumeClaimTemplate is a field of KokuMetricsConfig to - represent a PVC template. - properties: - apiVersion: - description: 'APIVersion defines the versioned schema of this - representation of an object. Servers should convert recognized - schemas to the latest internal value, and may reject unrecognized - values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' - type: string - kind: - description: 'Kind is a string value representing the REST resource - this object represents. Servers may infer this from the endpoint - the client submits requests to. Cannot be updated. In CamelCase. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' - type: string - metadata: - description: EmbeddedMetadata contains metadata relevant to an - EmbeddedResource. - properties: - annotations: - additionalProperties: - type: string - description: 'Annotations is an unstructured key value map - stored with a resource that may be set by external tools - to store and retrieve arbitrary metadata. They are not queryable - and should be preserved when modifying objects. More info: - http://kubernetes.io/docs/user-guide/annotations' - type: object - labels: - additionalProperties: - type: string - description: 'Map of string keys and values that can be used - to organize and categorize (scope and select) objects. May - match selectors of replication controllers and services. - More info: http://kubernetes.io/docs/user-guide/labels' - type: object - name: - description: 'Name must be unique within a namespace. Is required - when creating resources, although some resources may allow - a client to request the generation of an appropriate name - automatically. Name is primarily intended for creation idempotence - and configuration definition. Cannot be updated. More info: - http://kubernetes.io/docs/user-guide/identifiers#names' - type: string - type: object - spec: - description: 'Spec defines the desired characteristics of a volume - requested by a pod author. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims' - properties: - accessModes: - description: 'AccessModes contains the desired access modes - the volume should have. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes-1' - items: - type: string - type: array - dataSource: - description: 'This field can be used to specify either: * - An existing VolumeSnapshot object (snapshot.storage.k8s.io/VolumeSnapshot - - Beta) * An existing PVC (PersistentVolumeClaim) * An existing - custom resource/object that implements data population (Alpha) - In order to use VolumeSnapshot object types, the appropriate - feature gate must be enabled (VolumeSnapshotDataSource or - AnyVolumeDataSource) If the provisioner or an external controller - can support the specified data source, it will create a - new volume based on the contents of the specified data source. - If the specified data source is not supported, the volume - will not be created and the failure will be reported as - an event. In the future, we plan to support more data source - types and the behavior of the provisioner may change.' - properties: - apiGroup: - description: APIGroup is the group for the resource being - referenced. If APIGroup is not specified, the specified - Kind must be in the core API group. For any other third-party - types, APIGroup is required. - type: string - kind: - description: Kind is the type of resource being referenced - type: string - name: - description: Name is the name of resource being referenced - type: string - required: - - kind - - name - type: object - resources: - description: 'Resources represents the minimum resources the - volume should have. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources' - properties: - limits: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - description: 'Limits describes the maximum amount of compute - resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/' - type: object - requests: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - description: 'Requests describes the minimum amount of - compute resources required. If Requests is omitted for - a container, it defaults to Limits if that is explicitly - specified, otherwise to an implementation-defined value. - More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/' - type: object - type: object - selector: - description: A label query over volumes to consider for binding. - properties: - matchExpressions: - description: matchExpressions is a list of label selector - requirements. The requirements are ANDed. - items: - description: A label selector requirement is a selector - that contains values, a key, and an operator that - relates the key and values. - properties: - key: - description: key is the label key that the selector - applies to. - type: string - operator: - description: operator represents a key's relationship - to a set of values. Valid operators are In, NotIn, - Exists and DoesNotExist. - type: string - values: - description: values is an array of string values. - If the operator is In or NotIn, the values array - must be non-empty. If the operator is Exists or - DoesNotExist, the values array must be empty. - This array is replaced during a strategic merge - patch. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - description: matchLabels is a map of {key,value} pairs. - A single {key,value} in the matchLabels map is equivalent - to an element of matchExpressions, whose key field is - "key", the operator is "In", and the values array contains - only "value". The requirements are ANDed. - type: object - type: object - storageClassName: - description: 'Name of the StorageClass required by the claim. - More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#class-1' - type: string - volumeMode: - description: volumeMode defines what type of volume is required - by the claim. Value of Filesystem is implied when not included - in claim spec. - type: string - volumeName: - description: VolumeName is the binding reference to the PersistentVolume - backing this claim. - type: string - type: object - type: object - required: - - authentication - - packaging - - prometheus_config - - source - - upload - type: object - status: - description: KokuMetricsConfigStatus defines the observed state of KokuMetricsConfig. - properties: - api_url: - description: APIURL is a field of KokuMetricsConfig to represent the - url of the API endpoint for service interaction. - type: string - authentication: - description: Authentication is a field of KokuMetricsConfig to represent - the authentication status. - properties: - credentials_found: - description: AuthenticationCredentialsFound is a field of KokuMetricsConfig - to represent if used for uploads were found. - type: boolean - error: - description: AuthErrorMessage is a field of KokuMetricsConfig - to represent an `invalid credentials` error message. - type: string - last_credential_verification_time: - description: LastVerificationTime is a field of KokuMetricsConfig - to represent the last time credentials were verified. - format: date-time - nullable: true - type: string - secret_name: - description: AuthenticationSecretName is a field of KokuMetricsConfig - to represent the secret with the user and password used for - uploads. - type: string - type: - description: AuthType is a field of KokuMetricsConfig to represent - the authentication type to be used basic or token. - enum: - - token - - basic - type: string - valid_basic_auth: - description: ValidBasicAuth is a field of KokuMetricsConfig to - represent if the given basic auth credentials are valid. - type: boolean - type: object - clusterID: - description: ClusterID is a field of KokuMetricsConfig to represent - the cluster UUID. - type: string - operator_commit: - description: OperatorCommit is a field of KokuMetricsConfig that shows - the commit hash of the operator. - type: string - packaging: - description: Packaging is a field of KokuMetricsConfig to represent - the packaging status - properties: - error: - description: PackagingError is a field of KokuMetricsConfig to - represent the error encountered packaging the reports. - type: string - last_successful_packaging_time: - description: LastSuccessfulPackagingTime is a field of KokuMetricsConfig - that shows the time of the last successful file packaging. - format: date-time - nullable: true - type: string - max_reports_to_store: - description: MaxReports is a field of KokuMetricsConfig to represent - the maximum number of reports to store. - format: int64 - type: integer - max_size_MB: - description: MaxSize is a field of KokuMetricsConfig to represent - the max file size in megabytes that will be compressed for upload - to Ingress. - format: int64 - type: integer - number_reports_stored: - description: ReportCount is a field of KokuMetricsConfig to represent - the number of reports in storage. - format: int64 - type: integer - packaged_files: - description: PackagedFiles is a field of KokuMetricsConfig to - represent the list of file packages in storage. - items: - type: string - type: array - type: object - persistent_volume_claim: - description: PersistentVolumeClaim is a field of KokuMetricsConfig - to represent a PVC. - properties: - apiVersion: - description: 'APIVersion defines the versioned schema of this - representation of an object. Servers should convert recognized - schemas to the latest internal value, and may reject unrecognized - values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' - type: string - kind: - description: 'Kind is a string value representing the REST resource - this object represents. Servers may infer this from the endpoint - the client submits requests to. Cannot be updated. In CamelCase. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' - type: string - metadata: - description: EmbeddedMetadata contains metadata relevant to an - EmbeddedResource. - properties: - annotations: - additionalProperties: - type: string - description: 'Annotations is an unstructured key value map - stored with a resource that may be set by external tools - to store and retrieve arbitrary metadata. They are not queryable - and should be preserved when modifying objects. More info: - http://kubernetes.io/docs/user-guide/annotations' - type: object - labels: - additionalProperties: - type: string - description: 'Map of string keys and values that can be used - to organize and categorize (scope and select) objects. May - match selectors of replication controllers and services. - More info: http://kubernetes.io/docs/user-guide/labels' - type: object - name: - description: 'Name must be unique within a namespace. Is required - when creating resources, although some resources may allow - a client to request the generation of an appropriate name - automatically. Name is primarily intended for creation idempotence - and configuration definition. Cannot be updated. More info: - http://kubernetes.io/docs/user-guide/identifiers#names' - type: string - type: object - spec: - description: 'Spec defines the desired characteristics of a volume - requested by a pod author. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims' - properties: - accessModes: - description: 'AccessModes contains the desired access modes - the volume should have. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes-1' - items: - type: string - type: array - dataSource: - description: 'This field can be used to specify either: * - An existing VolumeSnapshot object (snapshot.storage.k8s.io/VolumeSnapshot - - Beta) * An existing PVC (PersistentVolumeClaim) * An existing - custom resource/object that implements data population (Alpha) - In order to use VolumeSnapshot object types, the appropriate - feature gate must be enabled (VolumeSnapshotDataSource or - AnyVolumeDataSource) If the provisioner or an external controller - can support the specified data source, it will create a - new volume based on the contents of the specified data source. - If the specified data source is not supported, the volume - will not be created and the failure will be reported as - an event. In the future, we plan to support more data source - types and the behavior of the provisioner may change.' - properties: - apiGroup: - description: APIGroup is the group for the resource being - referenced. If APIGroup is not specified, the specified - Kind must be in the core API group. For any other third-party - types, APIGroup is required. - type: string - kind: - description: Kind is the type of resource being referenced - type: string - name: - description: Name is the name of resource being referenced - type: string - required: - - kind - - name - type: object - resources: - description: 'Resources represents the minimum resources the - volume should have. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources' - properties: - limits: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - description: 'Limits describes the maximum amount of compute - resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/' - type: object - requests: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - description: 'Requests describes the minimum amount of - compute resources required. If Requests is omitted for - a container, it defaults to Limits if that is explicitly - specified, otherwise to an implementation-defined value. - More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/' - type: object - type: object - selector: - description: A label query over volumes to consider for binding. - properties: - matchExpressions: - description: matchExpressions is a list of label selector - requirements. The requirements are ANDed. - items: - description: A label selector requirement is a selector - that contains values, a key, and an operator that - relates the key and values. - properties: - key: - description: key is the label key that the selector - applies to. - type: string - operator: - description: operator represents a key's relationship - to a set of values. Valid operators are In, NotIn, - Exists and DoesNotExist. - type: string - values: - description: values is an array of string values. - If the operator is In or NotIn, the values array - must be non-empty. If the operator is Exists or - DoesNotExist, the values array must be empty. - This array is replaced during a strategic merge - patch. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - description: matchLabels is a map of {key,value} pairs. - A single {key,value} in the matchLabels map is equivalent - to an element of matchExpressions, whose key field is - "key", the operator is "In", and the values array contains - only "value". The requirements are ANDed. - type: object - type: object - storageClassName: - description: 'Name of the StorageClass required by the claim. - More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#class-1' - type: string - volumeMode: - description: volumeMode defines what type of volume is required - by the claim. Value of Filesystem is implied when not included - in claim spec. - type: string - volumeName: - description: VolumeName is the binding reference to the PersistentVolume - backing this claim. - type: string - type: object - type: object - prometheus: - description: Prometheus represents the status of premetheus queries. - properties: - configuration_error: - description: ConfigError is a field of KokuMetricsConfigStatus - to represent errors during prometheus configuration. - type: string - last_query_start_time: - description: LastQueryStartTime is a field of KokuMetricsConfigStatus - to represent the last time queries were started. - format: date-time - nullable: true - type: string - last_query_success_time: - description: LastQuerySuccessTime is a field of KokuMetricsConfigStatus - to represent the last time queries were successful. - format: date-time - nullable: true - type: string - prometheus_configured: - description: PrometheusConfigured is a field of KokuMetricsConfigStatus - to represent if the operator is configured to connect to prometheus. - type: boolean - prometheus_connected: - description: PrometheusConnected is a field of KokuMetricsConfigStatus - to represent if prometheus can be queried. - type: boolean - prometheus_connection_error: - description: ConnectionError is a field of KokuMetricsConfigStatus - to represent errors during prometheus test query. - type: string - service_address: - description: SvcAddress is the internal thanos-querier address. - type: string - skip_tls_verification: - description: SkipTLSVerification is a field of KokuMetricsConfigStatus - to represent if the thanos-querier endpoint must be certificate - validated. - type: boolean - required: - - prometheus_configured - - prometheus_connected - type: object - reports: - description: Reports represents the status of report generation. - properties: - data_collected: - description: DataCollected is a field of KokuMetricsConfigStatus - to represent whether or not data was collected for the last - query. - type: boolean - data_collection_message: - description: DataCollectionMessage is a field of KokuMetricsConfigStatus - to represent a message associated with the data_collected status. - type: string - last_hour_queried: - description: LastHourQueried is a field of KokuMetricsConfigStatus - to represent the time range for which metrics were last queried. - type: string - report_month: - description: ReportMonth is a field of KokuMetricsConfigStatus - to represent the month for which reports are being generated. - type: string - type: object - source: - description: Source is a field of KokuMetricsConfig to represent the - observed state of the source on cloud.redhat.com. - properties: - check_cycle: - description: CheckCycle is a field of KokuMetricsConfig to represent - the number of minutes between each source check schedule. The - default is 1440 min (24 hours). - format: int64 - type: integer - create_source: - description: CreateSource is a field of KokuMetricsConfigStatus - to represent if the source should be created if not found. - type: boolean - error: - description: SourceError is a field of KokuMetricsConfigStatus - to represent the error encountered creating the source. - type: string - last_check_time: - description: LastSourceCheckTime is a field of KokuMetricsConfig - that shows the time that the last check was attempted. - format: date-time - nullable: true - type: string - name: - description: SourceName is a field of KokuMetricsConfigStatus - to represent the source name on cloud.redhat.com. - type: string - source_defined: - description: SourceDefined is a field of KokuMetricsConfigStatus - to represent if the source exists as defined on cloud.redhat.com. - type: boolean - sources_path: - description: SourcesAPIPath is a field of KokuMetricsConfig to - represent the path of the Sources API service. - type: string - type: object - storage: - description: Storage is a field - properties: - volume_mounted: - description: VolumeMounted is a bool to indicate if storage volume - was mounted. - type: boolean - volume_type: - description: VolumeType is the string representation of the volume - type. - type: string - type: object - upload: - description: Upload is a field of KokuMetricsConfig to represent the - upload object. - properties: - error: - description: UploadError is a field of KokuMetricsConfigStatus - to represent the error encountered uploading reports. - type: string - ingress_path: - description: IngressAPIPath is a field of KokuMetricsConfig to - represent the path of the Ingress API service. - type: string - last_successful_upload_time: - description: LastSuccessfulUploadTime is a field of KokuMetricsConfig - that shows the time of the last successful upload. - format: date-time - nullable: true - type: string - last_upload_status: - description: LastUploadStatus is a field of KokuMetricsConfig - that shows the http status of the last upload. - type: string - upload: - description: UploadToggle is a field of KokuMetricsConfig to represent - if the operator should upload to cloud.redhat.com. The default - is true - type: boolean - upload_cycle: - description: UploadCycle is a field of KokuMetricsConfig to represent - the number of minutes between each upload schedule. The default - is 360 min (6 hours). - format: int64 - type: integer - upload_wait: - description: UploadWait is a field of KokuMetricsConfig to represent - the time to wait before sending an upload. - format: int64 - type: integer - validate_cert: - description: ValidateCert is a field of KokuMetricsConfig to represent - if the Ingress endpoint must be certificate validated. - type: boolean - type: object - type: object - required: - - spec - type: object - served: true - storage: false - subresources: - status: {} - - name: v1beta1 - schema: - openAPIV3Schema: - description: KokuMetricsConfig is the Schema for the kokumetricsconfig API - properties: - apiVersion: - description: 'APIVersion defines the versioned schema of this representation - of an object. Servers should convert recognized schemas to the latest - internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' - type: string - kind: - description: 'Kind is a string value representing the REST resource this - object represents. Servers may infer this from the endpoint the client - submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' - type: string - metadata: - type: object - spec: - description: KokuMetricsConfigSpec defines the desired state of KokuMetricsConfig. - properties: - api_url: - default: https://cloud.redhat.com - description: FOR DEVELOPMENT ONLY. APIURL is a field of KokuMetricsConfig - to represent the url of the API endpoint for service interaction. - The default is `https://cloud.redhat.com`. - type: string - authentication: - description: Authentication is a field of KokuMetricsConfig to represent - the authentication object. - properties: - secret_name: - description: AuthenticationSecretName is a field of KokuMetricsConfig - to represent the secret with the user and password used for - uploads. - type: string - type: - default: token - description: 'AuthType is a field of KokuMetricsConfig to represent - the authentication type to be used basic or token. Valid values - are: - "basic" : Enables authentication using user and password - from authentication secret. - "token" (default): Uses cluster - token for authentication.' - enum: - - token - - basic - type: string - required: - - type - type: object - clusterID: - description: ClusterID is a field of KokuMetricsConfig to represent - the cluster UUID. Normally this value should not be specified. Only - set this value if the clusterID cannot be obtained from the ClusterVersion. - type: string - packaging: - description: Packaging is a field of KokuMetricsConfig to represent - the packaging object. - properties: - max_reports_to_store: - default: 30 - description: MaxReports is a field of KokuMetricsConfig to represent - the maximum number of reports to store. The default is 30 reports - which corresponds to approximately 7 days worth of data given - the other default values. - format: int64 - minimum: 1 - type: integer - max_size_MB: - default: 100 - description: MaxSize is a field of KokuMetricsConfig to represent - the max file size in megabytes that will be compressed for upload - to Ingress. The default is 100. - format: int64 - maximum: 100 - minimum: 1 - type: integer - required: - - max_reports_to_store - - max_size_MB - type: object - prometheus_config: - description: PrometheusConfig is a field of KokuMetricsConfig to represent - the configuration of Prometheus connection. - properties: - service_address: - default: https://thanos-querier.openshift-monitoring.svc:9091 - description: FOR DEVELOPMENT ONLY. SvcAddress is a field of KokuMetricsConfig - to represent the thanos-querier address. The default is `https://thanos-querier.openshift-monitoring.svc:9091`. - type: string - skip_tls_verification: - default: false - description: FOR DEVELOPMENT ONLY. SkipTLSVerification is a field - of KokuMetricsConfig to represent if the thanos-querier endpoint - must be certificate validated. The default is false. - type: boolean - required: - - service_address - - skip_tls_verification - type: object - source: - description: Source is a field of KokuMetricsConfig to represent the - desired source on cloud.redhat.com. - properties: - check_cycle: - default: 1440 - description: CheckCycle is a field of KokuMetricsConfig to represent - the number of minutes between each source check schedule The - default is 1440 min (24 hours). - format: int64 - minimum: 0 - type: integer - create_source: - default: false - description: CreateSource is a field of KokuMetricsConfigSpec - to represent if the source should be created if not found. - type: boolean - name: - description: SourceName is a field of KokuMetricsConfigSpec to - represent the source name on cloud.redhat.com. - type: string - sources_path: - default: /api/sources/v1.0/ - description: FOR DEVELOPMENT ONLY. SourcesAPIPath is a field of - KokuMetricsConfig to represent the path of the Sources API service. - The default is `/api/sources/v1.0/`. - type: string - required: - - check_cycle - - create_source - - sources_path - type: object - upload: - description: Upload is a field of KokuMetricsConfig to represent the - upload object. - properties: - ingress_path: - default: /api/ingress/v1/upload - description: FOR DEVELOPMENT ONLY. IngressAPIPath is a field of - KokuMetricsConfig to represent the path of the Ingress API service. - The default is `/api/ingress/v1/upload`. - type: string - upload_cycle: - default: 360 - description: UploadCycle is a field of KokuMetricsConfig to represent - the number of minutes between each upload schedule. The default - is 360 min (6 hours). - format: int64 - minimum: 0 - type: integer - upload_toggle: - default: true - description: UploadToggle is a field of KokuMetricsConfig to represent - if the operator is installed in a restricted-network. If `false`, - the operator will not upload to cloud.redhat.com or check/create - sources. The default is true. - type: boolean - upload_wait: - description: UploadWait is a field of KokuMetricsConfig to represent - the time to wait before sending an upload. - format: int64 - minimum: 0 - type: integer - validate_cert: - default: true - description: ValidateCert is a field of KokuMetricsConfig to represent - if the Ingress endpoint must be certificate validated. - type: boolean - required: - - ingress_path - - upload_cycle - - upload_toggle - - validate_cert - type: object - volume_claim_template: - description: VolumeClaimTemplate is a field of KokuMetricsConfig to - represent a PVC template. - properties: - apiVersion: - description: 'APIVersion defines the versioned schema of this - representation of an object. Servers should convert recognized - schemas to the latest internal value, and may reject unrecognized - values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' - type: string - kind: - description: 'Kind is a string value representing the REST resource - this object represents. Servers may infer this from the endpoint - the client submits requests to. Cannot be updated. In CamelCase. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' - type: string - metadata: - description: EmbeddedMetadata contains metadata relevant to an - EmbeddedResource. - properties: - annotations: - additionalProperties: - type: string - description: 'Annotations is an unstructured key value map - stored with a resource that may be set by external tools - to store and retrieve arbitrary metadata. They are not queryable - and should be preserved when modifying objects. More info: - http://kubernetes.io/docs/user-guide/annotations' - type: object - labels: - additionalProperties: - type: string - description: 'Map of string keys and values that can be used - to organize and categorize (scope and select) objects. May - match selectors of replication controllers and services. - More info: http://kubernetes.io/docs/user-guide/labels' - type: object - name: - description: 'Name must be unique within a namespace. Is required - when creating resources, although some resources may allow - a client to request the generation of an appropriate name - automatically. Name is primarily intended for creation idempotence - and configuration definition. Cannot be updated. More info: - http://kubernetes.io/docs/user-guide/identifiers#names' - type: string - type: object - spec: - description: 'Spec defines the desired characteristics of a volume - requested by a pod author. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims' - properties: - accessModes: - description: 'AccessModes contains the desired access modes - the volume should have. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes-1' - items: - type: string - type: array - dataSource: - description: 'This field can be used to specify either: * - An existing VolumeSnapshot object (snapshot.storage.k8s.io/VolumeSnapshot - - Beta) * An existing PVC (PersistentVolumeClaim) * An existing - custom resource/object that implements data population (Alpha) - In order to use VolumeSnapshot object types, the appropriate - feature gate must be enabled (VolumeSnapshotDataSource or - AnyVolumeDataSource) If the provisioner or an external controller - can support the specified data source, it will create a - new volume based on the contents of the specified data source. - If the specified data source is not supported, the volume - will not be created and the failure will be reported as - an event. In the future, we plan to support more data source - types and the behavior of the provisioner may change.' - properties: - apiGroup: - description: APIGroup is the group for the resource being - referenced. If APIGroup is not specified, the specified - Kind must be in the core API group. For any other third-party - types, APIGroup is required. - type: string - kind: - description: Kind is the type of resource being referenced - type: string - name: - description: Name is the name of resource being referenced - type: string - required: - - kind - - name - type: object - resources: - description: 'Resources represents the minimum resources the - volume should have. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources' - properties: - limits: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - description: 'Limits describes the maximum amount of compute - resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/' - type: object - requests: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - description: 'Requests describes the minimum amount of - compute resources required. If Requests is omitted for - a container, it defaults to Limits if that is explicitly - specified, otherwise to an implementation-defined value. - More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/' - type: object - type: object - selector: - description: A label query over volumes to consider for binding. - properties: - matchExpressions: - description: matchExpressions is a list of label selector - requirements. The requirements are ANDed. - items: - description: A label selector requirement is a selector - that contains values, a key, and an operator that - relates the key and values. - properties: - key: - description: key is the label key that the selector - applies to. - type: string - operator: - description: operator represents a key's relationship - to a set of values. Valid operators are In, NotIn, - Exists and DoesNotExist. - type: string - values: - description: values is an array of string values. - If the operator is In or NotIn, the values array - must be non-empty. If the operator is Exists or - DoesNotExist, the values array must be empty. - This array is replaced during a strategic merge - patch. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - description: matchLabels is a map of {key,value} pairs. - A single {key,value} in the matchLabels map is equivalent - to an element of matchExpressions, whose key field is - "key", the operator is "In", and the values array contains - only "value". The requirements are ANDed. - type: object - type: object - storageClassName: - description: 'Name of the StorageClass required by the claim. - More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#class-1' - type: string - volumeMode: - description: volumeMode defines what type of volume is required - by the claim. Value of Filesystem is implied when not included - in claim spec. - type: string - volumeName: - description: VolumeName is the binding reference to the PersistentVolume - backing this claim. - type: string - type: object - type: object - required: - - authentication - - packaging - - prometheus_config - - source - - upload - type: object - status: - description: KokuMetricsConfigStatus defines the observed state of KokuMetricsConfig. - properties: - api_url: - description: APIURL is a field of KokuMetricsConfig to represent the - url of the API endpoint for service interaction. - type: string - authentication: - description: Authentication is a field of KokuMetricsConfig to represent - the authentication status. - properties: - credentials_found: - description: AuthenticationCredentialsFound is a field of KokuMetricsConfig - to represent if used for uploads were found. - type: boolean - error: - description: AuthErrorMessage is a field of KokuMetricsConfig - to represent an `invalid credentials` error message. - type: string - last_credential_verification_time: - description: LastVerificationTime is a field of KokuMetricsConfig - to represent the last time credentials were verified. - format: date-time - nullable: true - type: string - secret_name: - description: AuthenticationSecretName is a field of KokuMetricsConfig - to represent the secret with the user and password used for - uploads. - type: string - type: - description: AuthType is a field of KokuMetricsConfig to represent - the authentication type to be used basic or token. - enum: - - token - - basic - type: string - valid_basic_auth: - description: ValidBasicAuth is a field of KokuMetricsConfig to - represent if the given basic auth credentials are valid. - type: boolean - type: object - clusterID: - description: ClusterID is a field of KokuMetricsConfig to represent - the cluster UUID. - type: string - operator_commit: - description: OperatorCommit is a field of KokuMetricsConfig that shows - the commit hash of the operator. - type: string - packaging: - description: Packaging is a field of KokuMetricsConfig to represent - the packaging status - properties: - error: - description: PackagingError is a field of KokuMetricsConfig to - represent the error encountered packaging the reports. - type: string - last_successful_packaging_time: - description: LastSuccessfulPackagingTime is a field of KokuMetricsConfig - that shows the time of the last successful file packaging. - format: date-time - nullable: true - type: string - max_reports_to_store: - description: MaxReports is a field of KokuMetricsConfig to represent - the maximum number of reports to store. - format: int64 - type: integer - max_size_MB: - description: MaxSize is a field of KokuMetricsConfig to represent - the max file size in megabytes that will be compressed for upload - to Ingress. - format: int64 - type: integer - number_reports_stored: - description: ReportCount is a field of KokuMetricsConfig to represent - the number of reports in storage. - format: int64 - type: integer - packaged_files: - description: PackagedFiles is a field of KokuMetricsConfig to - represent the list of file packages in storage. - items: - type: string - type: array - type: object - persistent_volume_claim: - description: PersistentVolumeClaim is a field of KokuMetricsConfig - to represent a PVC. - properties: - apiVersion: - description: 'APIVersion defines the versioned schema of this - representation of an object. Servers should convert recognized - schemas to the latest internal value, and may reject unrecognized - values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' - type: string - kind: - description: 'Kind is a string value representing the REST resource - this object represents. Servers may infer this from the endpoint - the client submits requests to. Cannot be updated. In CamelCase. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' - type: string - metadata: - description: EmbeddedMetadata contains metadata relevant to an - EmbeddedResource. - properties: - annotations: - additionalProperties: - type: string - description: 'Annotations is an unstructured key value map - stored with a resource that may be set by external tools - to store and retrieve arbitrary metadata. They are not queryable - and should be preserved when modifying objects. More info: - http://kubernetes.io/docs/user-guide/annotations' - type: object - labels: - additionalProperties: - type: string - description: 'Map of string keys and values that can be used - to organize and categorize (scope and select) objects. May - match selectors of replication controllers and services. - More info: http://kubernetes.io/docs/user-guide/labels' - type: object - name: - description: 'Name must be unique within a namespace. Is required - when creating resources, although some resources may allow - a client to request the generation of an appropriate name - automatically. Name is primarily intended for creation idempotence - and configuration definition. Cannot be updated. More info: - http://kubernetes.io/docs/user-guide/identifiers#names' - type: string - type: object - spec: - description: 'Spec defines the desired characteristics of a volume - requested by a pod author. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims' - properties: - accessModes: - description: 'AccessModes contains the desired access modes - the volume should have. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes-1' - items: - type: string - type: array - dataSource: - description: 'This field can be used to specify either: * - An existing VolumeSnapshot object (snapshot.storage.k8s.io/VolumeSnapshot - - Beta) * An existing PVC (PersistentVolumeClaim) * An existing - custom resource/object that implements data population (Alpha) - In order to use VolumeSnapshot object types, the appropriate - feature gate must be enabled (VolumeSnapshotDataSource or - AnyVolumeDataSource) If the provisioner or an external controller - can support the specified data source, it will create a - new volume based on the contents of the specified data source. - If the specified data source is not supported, the volume - will not be created and the failure will be reported as - an event. In the future, we plan to support more data source - types and the behavior of the provisioner may change.' - properties: - apiGroup: - description: APIGroup is the group for the resource being - referenced. If APIGroup is not specified, the specified - Kind must be in the core API group. For any other third-party - types, APIGroup is required. - type: string - kind: - description: Kind is the type of resource being referenced - type: string - name: - description: Name is the name of resource being referenced - type: string - required: - - kind - - name - type: object - resources: - description: 'Resources represents the minimum resources the - volume should have. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources' - properties: - limits: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - description: 'Limits describes the maximum amount of compute - resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/' - type: object - requests: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - description: 'Requests describes the minimum amount of - compute resources required. If Requests is omitted for - a container, it defaults to Limits if that is explicitly - specified, otherwise to an implementation-defined value. - More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/' - type: object - type: object - selector: - description: A label query over volumes to consider for binding. - properties: - matchExpressions: - description: matchExpressions is a list of label selector - requirements. The requirements are ANDed. - items: - description: A label selector requirement is a selector - that contains values, a key, and an operator that - relates the key and values. - properties: - key: - description: key is the label key that the selector - applies to. - type: string - operator: - description: operator represents a key's relationship - to a set of values. Valid operators are In, NotIn, - Exists and DoesNotExist. - type: string - values: - description: values is an array of string values. - If the operator is In or NotIn, the values array - must be non-empty. If the operator is Exists or - DoesNotExist, the values array must be empty. - This array is replaced during a strategic merge - patch. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - description: matchLabels is a map of {key,value} pairs. - A single {key,value} in the matchLabels map is equivalent - to an element of matchExpressions, whose key field is - "key", the operator is "In", and the values array contains - only "value". The requirements are ANDed. - type: object - type: object - storageClassName: - description: 'Name of the StorageClass required by the claim. - More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#class-1' - type: string - volumeMode: - description: volumeMode defines what type of volume is required - by the claim. Value of Filesystem is implied when not included - in claim spec. - type: string - volumeName: - description: VolumeName is the binding reference to the PersistentVolume - backing this claim. - type: string - type: object - type: object - prometheus: - description: Prometheus represents the status of premetheus queries. - properties: - configuration_error: - description: ConfigError is a field of KokuMetricsConfigStatus - to represent errors during prometheus configuration. - type: string - last_query_start_time: - description: LastQueryStartTime is a field of KokuMetricsConfigStatus - to represent the last time queries were started. - format: date-time - nullable: true - type: string - last_query_success_time: - description: LastQuerySuccessTime is a field of KokuMetricsConfigStatus - to represent the last time queries were successful. - format: date-time - nullable: true - type: string - prometheus_configured: - description: PrometheusConfigured is a field of KokuMetricsConfigStatus - to represent if the operator is configured to connect to prometheus. - type: boolean - prometheus_connected: - description: PrometheusConnected is a field of KokuMetricsConfigStatus - to represent if prometheus can be queried. - type: boolean - prometheus_connection_error: - description: ConnectionError is a field of KokuMetricsConfigStatus - to represent errors during prometheus test query. - type: string - service_address: - description: SvcAddress is the internal thanos-querier address. - type: string - skip_tls_verification: - description: SkipTLSVerification is a field of KokuMetricsConfigStatus - to represent if the thanos-querier endpoint must be certificate - validated. - type: boolean - required: - - prometheus_configured - - prometheus_connected - type: object - reports: - description: Reports represents the status of report generation. - properties: - data_collected: - description: DataCollected is a field of KokuMetricsConfigStatus - to represent whether or not data was collected for the last - query. - type: boolean - data_collection_message: - description: DataCollectionMessage is a field of KokuMetricsConfigStatus - to represent a message associated with the data_collected status. - type: string - last_hour_queried: - description: LastHourQueried is a field of KokuMetricsConfigStatus - to represent the time range for which metrics were last queried. - type: string - report_month: - description: ReportMonth is a field of KokuMetricsConfigStatus - to represent the month for which reports are being generated. - type: string - type: object - source: - description: Source is a field of KokuMetricsConfig to represent the - observed state of the source on cloud.redhat.com. - properties: - check_cycle: - description: CheckCycle is a field of KokuMetricsConfig to represent - the number of minutes between each source check schedule. The - default is 1440 min (24 hours). - format: int64 - type: integer - create_source: - description: CreateSource is a field of KokuMetricsConfigStatus - to represent if the source should be created if not found. A - source will not be created if upload_toggle is `false`. - type: boolean - error: - description: SourceError is a field of KokuMetricsConfigStatus - to represent the error encountered creating the source. - type: string - last_check_time: - description: LastSourceCheckTime is a field of KokuMetricsConfig - that shows the time that the last check was attempted. - format: date-time - nullable: true - type: string - name: - description: SourceName is a field of KokuMetricsConfigStatus - to represent the source name on cloud.redhat.com. - type: string - source_defined: - description: SourceDefined is a field of KokuMetricsConfigStatus - to represent if the source exists as defined on cloud.redhat.com. - type: boolean - sources_path: - description: SourcesAPIPath is a field of KokuMetricsConfig to - represent the path of the Sources API service. - type: string - type: object - storage: - description: Storage is a field - properties: - volume_mounted: - description: VolumeMounted is a bool to indicate if storage volume - was mounted. - type: boolean - volume_type: - description: VolumeType is the string representation of the volume - type. - type: string - type: object - upload: - description: Upload is a field of KokuMetricsConfig to represent the - upload object. - properties: - error: - description: UploadError is a field of KokuMetricsConfigStatus - to represent the error encountered uploading reports. - type: string - ingress_path: - description: IngressAPIPath is a field of KokuMetricsConfig to - represent the path of the Ingress API service. - type: string - last_successful_upload_time: - description: LastSuccessfulUploadTime is a field of KokuMetricsConfig - that shows the time of the last successful upload. - format: date-time - nullable: true - type: string - last_upload_status: - description: LastUploadStatus is a field of KokuMetricsConfig - that shows the http status of the last upload. - type: string - upload: - description: UploadToggle is a field of KokuMetricsConfig to represent - if the operator should upload to cloud.redhat.com. The default - is true - type: boolean - upload_cycle: - description: UploadCycle is a field of KokuMetricsConfig to represent - the number of minutes between each upload schedule. The default - is 360 min (6 hours). - format: int64 - type: integer - upload_wait: - description: UploadWait is a field of KokuMetricsConfig to represent - the time to wait before sending an upload. - format: int64 - type: integer - validate_cert: - description: ValidateCert is a field of KokuMetricsConfig to represent - if the Ingress endpoint must be certificate validated. - type: boolean - type: object - type: object - required: - - spec - type: object - served: true - storage: true - subresources: - status: {} -status: - acceptedNames: - kind: "" - plural: "" - conditions: [] - storedVersions: [] diff --git a/koku-metrics-operator/0.9.3/manifests/koku-metrics-operator.clusterserviceversion.yaml b/koku-metrics-operator/0.9.3/manifests/koku-metrics-operator.clusterserviceversion.yaml deleted file mode 100644 index 04857a818..000000000 --- a/koku-metrics-operator/0.9.3/manifests/koku-metrics-operator.clusterserviceversion.yaml +++ /dev/null @@ -1,485 +0,0 @@ -apiVersion: operators.coreos.com/v1alpha1 -kind: ClusterServiceVersion -metadata: - annotations: - alm-examples: |- - [ - { - "apiVersion": "koku-metrics-cfg.openshift.io/v1alpha1", - "kind": "KokuMetricsConfig", - "metadata": { - "name": "kokumetricscfg-sample-v1alpha1" - }, - "spec": { - "authentication": { - "type": "token" - }, - "packaging": { - "max_reports_to_store": 30, - "max_size_MB": 100 - }, - "prometheus_config": {}, - "source": { - "check_cycle": 1440, - "create_source": false, - "name": "INSERT-SOURCE-NAME" - }, - "upload": { - "upload_cycle": 360, - "upload_toggle": true - } - } - }, - { - "apiVersion": "koku-metrics-cfg.openshift.io/v1beta1", - "kind": "KokuMetricsConfig", - "metadata": { - "name": "kokumetricscfg-sample-v1beta1" - }, - "spec": { - "authentication": { - "type": "token" - }, - "packaging": { - "max_reports_to_store": 30, - "max_size_MB": 100 - }, - "prometheus_config": {}, - "source": { - "check_cycle": 1440, - "create_source": false, - "name": "INSERT-SOURCE-NAME" - }, - "upload": { - "upload_cycle": 360, - "upload_toggle": true - } - } - } - ] - capabilities: Seamless Upgrades - categories: Monitoring - certified: "false" - containerImage: quay.io/project-koku/koku-metrics-operator:v0.9.3 - createdAt: "2021-02-15T19:56:01Z" - description: A Golang-based OpenShift Operator that generates and uploads OpenShift - usage metrics to cost management. - operatorframework.io/suggested-namespace: koku-metrics-operator - operators.openshift.io/infrastructure-features: '["Disconnected"]' - operators.operatorframework.io/builder: operator-sdk-v0.19.4 - operators.operatorframework.io/project_layout: go.kubebuilder.io/v2 - repository: https://github.com/project-koku/koku-metrics-operator - support: Cost Management - name: koku-metrics-operator.v0.9.3 - namespace: placeholder -spec: - apiservicedefinitions: {} - customresourcedefinitions: - owned: - - description: KokuMetricsConfig is the Schema for the kokumetricsconfig API - kind: KokuMetricsConfig - name: kokumetricsconfigs.koku-metrics-cfg.openshift.io - version: v1beta1 - - description: KokuMetricsConfig is the Schema for the kokumetricsconfig API (Deprecated) - kind: KokuMetricsConfig - name: kokumetricsconfigs.koku-metrics-cfg.openshift.io - version: v1alpha1 - description: |- - # v0.9.3-alpha Koku Metrics Operator (Unsupported) - ## Introduction - The `koku-metrics-operator` is an OpenShift Operator used to collect OpenShift usage data and upload it to [cost managment](https://access.redhat.com/documentation/en-us/openshift_container_platform/4.5/html/getting_started_with_cost_management/assembly_introduction_cost_management). The operator queries Prometheus to create metric reports which are packaged and uploaded to cost management at [cloud.redhat.com](https://cloud.redhat.com). - - This operator is capable of functioning within a disconnected/restricted network (aka air-gapped mode). In this mode, the operator will store the packaged reports for manual retrieval instead of being uploaded to cost management. Documentation for installing an operator within a restricted network can be found [here](https://docs.openshift.com/container-platform/4.5/operators/admin/olm-restricted-networks.html). - - For more information, reach out to . - ## Features and Capabilities - #### Metrics collection: - The Koku Metrics Operator (`koku-metrics-operator`) collects the metrics required for cost management by: - * Querying Prometheus to gather the necessary metrics for cost management. - * Writing Prometheus queries to CSV report files. - * Packaging the CSV report files into tarballs. - - #### Additional Capabilities: - * The operator can be configured to automatically upload the packaged reports to cost management through Red Hat Insights Ingress service. - * The operator can create a source in cloud.redhat.com. A source is required for cost management to process the uploaded packages. - * PersistentVolumeClaim (PVC) configuration: The KokuMetricsConfig CR can accept a PVC definition and the operator will create and mount the PVC. If one is not provided, a default PVC will be created. - * Restricted network installation: this operator can function on a restricted network. In this mode, the operator stores the packaged reports for manual retrieval. - - ## Limitations and Pre-Requisites - #### Limitations (Potential for metrics data loss) - * A source **must** exist in cloud.redhat.com for an uploaded payload to be processed by cost management. The operator sends the payload to the Red Hat Insights Ingress service which usually returns successfully, but the operator does not currently confirm with cost management that the payload was processed. After Ingress accepts the uploaded payload, the payload is removed from the operator and is gone forever. If the data within the payload is not processed, a gap will be introduced in the usage metrics. - - **Note** The following limitations are specific to operators configured to run in a restricted network: - * The `koku-metrics-operator` will not be able to generate new reports if the PVC storage is filled. If this occurs, the reports must be manually deleted from the PVC so that the operator can function as normal. - * The default report retention is 30 reports (about one week's worth of data). The reports must be manually downloaded and uploaded to cloud.redhat.com every week, or they will be deleted and the data will be lost. - - #### Storage configuration prerequisite - The operator will attempt to create and use the following PVC when installed: - - volume_claim_template: - apiVersion: v1 - kind: PersistentVolumeClaim - metadata: - name: koku-metrics-operator-data - spec: - accessModes: - - ReadWriteOnce - resources: - requests: - storage: 10Gi - - If a different PVC should be utilized, a valid PVC should be specified in the KokuMetricsConfig CR as described in the appropriate section below. The PVC to be used may exist already, or the operator will attempt to create it. - - To use the default specification, the follow assumptions must be met: - 1. A default StorageClass is defined. - 2. Dynamic provisioning for that default StorageClass is enabled. - - If these assumptions are not met, the operator will not deploy correctly. In these cases, storage must be manually configured. After configuring storage, a valid PVC template should be supplied in the `volume_claim_template` spec of the KokuMetricsConfig CR. - - ## Configure the koku-metrics-operator - **Note** There are separate instructions for configuring the `koku-metrics-operator` to run in a restricted network. - ##### Configure authentication - The default authentication for the operator is `token`. No further steps are required to configure token authentication. If `basic` is the preferred authentication method, a Secret must be created which holds username and password credentials: - 1. On the left navigation pane, select `Workloads` -> `Secrets` -> select Project: `koku-metrics-operator` -> `Create` -> `Key/Value Secret` - 2. Give the Secret a name and add 2 keys: `username` and `password` (all lowercase). The values for these keys correspond to cloud.redhat.com credentials. - 3. Select `Create`. - ##### Create the KokuMetricsConfig - Configure the koku-metrics-operator by creating a `KokuMetricsConfig`. - 1. On the left navigation pane, select `Operators` -> `Installed Operators` -> `koku-metrics-operator` -> `KokuMetricsConfig` -> `Create Instance`. - 2. For `basic` authentication, edit the following values in the spec: - * Replace `authentication: type:` with `basic`. - * Add the `secret_name` field under `authentication`, and set it equal to the name of the authentication Secret that was created above. The spec should look similar to the following: - - ``` - authentication: - secret_name: SECRET-NAME - type: basic - ``` - - 3. To configure the koku-metrics-operator to create a cost management source, edit the following values in the `source` field: - * Replace `INSERT-SOURCE-NAME` with the preferred name of the source to be created. - * Replace the `create_source` field value with `true`. - - **Note:** if the source already exists, replace `INSERT-SOURCE-NAME` with the existing name, and leave `create_source` as false. This will allow the operator to confirm the source exists. - 4. If not specified, the operator will create a default PersistentVolumeClaim called `koku-metrics-operator-data` with 10Gi of storage. To configure the koku-metrics-operator to use or create a different PVC, edit the following in the spec: - * Add the desired configuration to the `volume_claim_template` field in the spec: - - ``` - volume_claim_template: - apiVersion: v1 - kind: PersistentVolumeClaim - metadata: - name: - spec: - accessModes: - - ReadWriteOnce - resources: - requests: - storage: 10Gi - ``` - - **Note:** If using the YAML View, the `volume_claim_template` field must be added to the spec - 5. Select `Create`. - - # Restricted Network Usage (disconnected/air-gapped mode) - ## Installation - To install the `koku-metrics-operator` in a restricted network, follow the [olm documentation](https://docs.openshift.com/container-platform/4.5/operators/admin/olm-restricted-networks.html). The operator is found in the `community-operators` Catalog in the `registry.redhat.io/redhat/community-operator-index:latest` Index. If pruning the index before pushing to the mirrored registry, keep the `koku-metrics-operator` package. - - Within a restricted network, the operator queries prometheus to gather the necessary usage metrics, writes the query results to CSV files, and packages the reports for storage in the PVC. These reports then need to be manually downloaded from the cluster and uploaded to [cloud.redhat.com](https://cloud.redhat.com). - - For more information, reach out to . - ## Configure the koku-metrics-operator for a restricted network - ##### Create the KokuMetricsConfig - Configure the koku-metrics-operator by creating a `KokuMetricsConfig`. - 1. On the left navigation pane, select `Operators` -> `Installed Operators` -> `koku-metrics-operator` -> `KokuMetricsConfig` -> `Create Instance`. - 2. Specify the desired storage. If not specified, the operator will create a default Persistent Volume Claim called `koku-metrics-operator-data` with 10Gi of storage. To configure the koku-metrics-operator to use or create a different PVC, edit the following in the spec: - * Add the desired configuration to the `volume_claim_template` field in the spec: - - ``` - volume_claim_template: - apiVersion: v1 - kind: PersistentVolumeClaim - metadata: - name: - spec: - storageClassName: - accessModes: - - ReadWriteOnce - resources: - requests: - storage: 10Gi - ``` - - **Note:** If using the YAML View, the `volume_claim_template` field must be added to the spec - 3. (Optional) Specify the desired report retention. The operator will retain 30 reports by default. This corresponds to approximately one week's worth of data if using the default packaging cycle. To modify the number of retained reports: - * Change the `packaging` spec field `max_reports_to_store` to the desired number of reports to retain. Once this max number is reached, the operator will start removing the oldest packages remaining on the PVC: - - ``` - packaging: - max_size_MB: 100 - max_reports_to_store: 30 - ``` - - **Note:** The number of retained reports directly affects the frequency that reports must be manually downloaded from the PVC. Take caution in setting this to a higher number of reports, as the operator cannot write data to the PVC if the storage is full. - 4. To configure the operator to perform in a restricted network, set the `upload_toggle` to `false`: - - ``` - upload: - upload_cycle: 360, - upload_toggle: false - ``` - - 5. Select `Create`. - - ## Download reports from the Operator & clean up the PVC - If the `koku-metrics-operator` is configured to run in a restricted network, the metric reports will not automatically upload to cost managment. Instead, they need to be manually copied from the PVC for upload to [cloud.redhat.com](https://cloud.redhat.com). The default configuration saves one week of reports which means the process of downloading and uploading reports should be repeated weekly to prevent loss of metrics data. To download the reports, complete the following steps: - 1. Create the following Pod, ensuring the `claimName` matches the PVC containing the report data: - - ``` - kind: Pod - apiVersion: v1 - metadata: - name: volume-shell - namespace: koku-metrics-operator - spec: - volumes: - - name: koku-metrics-operator-reports - persistentVolumeClaim: - claimName: koku-metrics-operator-data - containers: - - name: volume-shell - image: busybox - command: ['sleep', '3600'] - volumeMounts: - - name: koku-metrics-operator-reports - mountPath: /tmp/koku-metrics-operator-reports - ``` - - 2. Use rsync to copy all of the files ready for upload from the PVC to a local folder: - - ``` - $ oc rsync volume-shell:/tmp/koku-metrics-operator-reports/upload local/path/to/save/folder - ``` - - 3. Once confirming that the files have been successfully copied, use rsh to connect to the pod and delete the contents of the upload folder so that they are no longer in storage: - - ``` - $ oc rsh volume-shell - $ rm /tmp/koku-metrics-operator-reports/upload/* - ``` - - 4. (Optional) Delete the pod that was used to connect to the PVC: - - ``` - $ oc delete -f volume-shell.yaml - ``` - - ## Create a source - In a restricted network, the `koku-metrics-operator` cannot automatically create a source. This process must be done manually. In the cloud.redhat.com platform, open the [Sources menu](https://cloud.redhat.com/settings/sources/) to begin adding an OpenShift source to cost management: - - 1. Navigate to the Sources menu - 2. Select the `Red Hat sources` tab - 3. Click `Add source` to open the Sources wizard. - 4. Enter a name for the source and click `Next`. - 5. Select `Red Hat Openshift Container Platform` as the source type and Cost Management as the application. Click `Next`. - 6. Enter the cluster identifier into the cloud.redhat.com Sources wizard, and click `Next`. - - **Note:** The cluster identifier can be found in the KokuMetricsConfig CR, the cluster Overview page, or the cluster Help > About. - - 7. In the cloud.redhat.com Sources wizard, review the details and click `Finish` to create the Source. - - ## Upload the reports to cost managment - Uploading reports to cost managment is done through curl: - - $ curl -vvvv -F "file=@FILE_NAME.tar.gz;type=application/vnd.redhat.hccm.tar+tgz" https://cloud.redhat.com/api/ingress/v1/upload -u USERNAME:PASS - - where `USERNAME` and `PASS` correspond to the user credentials for [cloud.redhat.com](https://cloud.redhat.com), and `FILE_NAME` is the name of the report to upload. - - displayName: Koku Metrics Operator - icon: - - base64data: PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4KPCEtLSBHZW5lcmF0b3I6IEFkb2JlIElsbHVzdHJhdG9yIDIyLjEuMCwgU1ZHIEV4cG9ydCBQbHVnLUluIC4gU1ZHIFZlcnNpb246IDYuMDAgQnVpbGQgMCkgIC0tPgo8c3ZnIHZlcnNpb249IjEuMSIgaWQ9IkxheWVyXzEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4IgoJIHZpZXdCb3g9IjAgMCAzMDAgMzAwIiBzdHlsZT0iZW5hYmxlLWJhY2tncm91bmQ6bmV3IDAgMCAzMDAgMzAwOyIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSI+CjxzdHlsZSB0eXBlPSJ0ZXh0L2NzcyI+Cgkuc3Qwe2ZpbGw6I0VFMDAwMDt9Cjwvc3R5bGU+Cjx0aXRsZT5Db3N0LWljb248L3RpdGxlPgo8ZGVzYz5DcmVhdGVkIHdpdGggU2tldGNoLjwvZGVzYz4KPGc+Cgk8Zz4KCQk8cGF0aCBjbGFzcz0ic3QwIiBkPSJNMjM5LjAzNzAzMzEsMTE3LjI3NTE3N2MtMy4yNjU4MDgxLTQxLjk4OTA1MTgtMzguMjU2NjgzMy03NC42NDcyMDE1LTgxLjE3ODgzMy03NC42NDcyMDE1CgkJCWMtMjcuNTI2MTUzNiwwLTUzLjE4NjEyNjcsMTMuOTk2MzQ5My02OC4xMTU1NzAxLDM3LjMyMzYwMDhjLTEuODY2MTgwNCwwLTMuNzMyMzUzMi0wLjQ2NjU0NTEtNi4wNjUwNzg3LTAuNDY2NTQ1MQoJCQljLTM0LjUyNDMzMDEsMC02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xLjE0MjcxNTUtMC44NDMyMDA3LTIuNDQyMDc3Ni0xLjI2MjQ5NjktMy44OTgwODY1LTEuMjYyNDk2OWgtNy42NzYzNjExYy0wLjkxNjkxNTksMC0xLjcwMDIyNTgsMC4zMjI1MjUtMi4zNDk4OTkzLDAuOTcyMjEzNwoJCQljLTAuNjQ5Njg4NywwLjY0OTY3MzUtMC45NzY4MjE5LDEuNDc0NDQxNS0wLjk3NjgyMTksMi40NjUwODc5YzAsMC42ODY1NTQsMC4yMzAzOTI1LDEuMzM2MjEyMiwwLjY5MTE0NjksMS45NDkwMzU2CgkJCWMwLjQ1NjE2MTUsMC42MTI4MjM1LDEuMDMyMTE5OCwxLjAzMjExOTgsMS43MTg2NTg0LDEuMjYyNDk2OUwxNzQuMjgwNjM5NiwxODUuODczNjExNXoiLz4KCTwvZz4KPC9nPgo8L3N2Zz4K - mediatype: image/svg+xml - install: - spec: - clusterPermissions: - - rules: - - apiGroups: - - config.openshift.io - resources: - - clusterversions - verbs: - - get - - list - - watch - - apiGroups: - - "" - resources: - - namespaces - verbs: - - get - - list - - watch - - apiGroups: - - "" - resources: - - secrets - verbs: - - get - serviceAccountName: koku-metrics-manager-role - deployments: - - name: koku-metrics-controller-manager - spec: - replicas: 1 - selector: - matchLabels: - control-plane: controller-manager - strategy: {} - template: - metadata: - labels: - control-plane: controller-manager - spec: - containers: - - args: - - --enable-leader-election - command: - - /manager - env: - - name: IN_CLUSTER - value: "true" - - name: WATCH_NAMESPACE - valueFrom: - fieldRef: - fieldPath: metadata.annotations['olm.targetNamespaces'] - image: quay.io/project-koku/koku-metrics-operator@sha256:a09b76b020abf2768b67a1680db1228124b0292c7fb957f9b75c749a5d0578b7 - name: manager - resources: - limits: - cpu: 500m - memory: 500Mi - requests: - cpu: 100m - memory: 20Mi - terminationMessagePolicy: FallbackToLogsOnError - volumeMounts: - - mountPath: /tmp/koku-metrics-operator-reports - name: koku-metrics-operator-reports - serviceAccountName: koku-metrics-manager-role - terminationGracePeriodSeconds: 10 - volumes: - - name: koku-metrics-operator-reports - permissions: - - rules: - - apiGroups: - - "" - resources: - - configmaps - verbs: - - get - - list - - watch - - create - - update - - patch - - delete - - apiGroups: - - "" - resources: - - configmaps/status - verbs: - - get - - update - - patch - - apiGroups: - - "" - resources: - - events - verbs: - - create - - patch - - apiGroups: - - apps - resources: - - deployments - verbs: - - get - - list - - patch - - watch - - apiGroups: - - "" - resources: - - configmaps - - endpoints - - events - - persistentvolumeclaims - - pods - - secrets - - serviceaccounts - - services - - services/finalizers - verbs: - - create - - delete - - get - - list - - patch - - update - - watch - - apiGroups: - - koku-metrics-cfg.openshift.io - resources: - - kokumetricsconfigs - verbs: - - create - - delete - - get - - list - - patch - - update - - watch - - apiGroups: - - koku-metrics-cfg.openshift.io - resources: - - kokumetricsconfigs/status - verbs: - - get - - patch - - update - - apiGroups: - - operators.coreos.com - resources: - - clusterserviceversions - verbs: - - get - - list - - patch - - update - - watch - serviceAccountName: koku-metrics-manager-role - strategy: deployment - installModes: - - supported: true - type: OwnNamespace - - supported: true - type: SingleNamespace - - supported: false - type: MultiNamespace - - supported: false - type: AllNamespaces - relatedImages: - - name: koku-metrics-operator - image: quay.io/project-koku/koku-metrics-operator@sha256:a09b76b020abf2768b67a1680db1228124b0292c7fb957f9b75c749a5d0578b7 - keywords: - - cost - - management - - usage - - monitor - maintainers: - - email: cost-mgmt@redhat.com - name: cost-mgmt - maturity: alpha - provider: - name: Red Hat - replaces: koku-metrics-operator.v0.9.2 - version: 0.9.3 diff --git a/koku-metrics-operator/0.9.3/metadata/annotations.yaml b/koku-metrics-operator/0.9.3/metadata/annotations.yaml deleted file mode 100644 index cd37be01d..000000000 --- a/koku-metrics-operator/0.9.3/metadata/annotations.yaml +++ /dev/null @@ -1,10 +0,0 @@ -annotations: - operators.operatorframework.io.bundle.channel.default.v1: alpha - operators.operatorframework.io.bundle.channels.v1: alpha - operators.operatorframework.io.bundle.manifests.v1: manifests/ - operators.operatorframework.io.bundle.mediatype.v1: registry+v1 - operators.operatorframework.io.bundle.metadata.v1: metadata/ - operators.operatorframework.io.bundle.package.v1: koku-metrics-operator - operators.operatorframework.io.metrics.builder: operator-sdk-v0.19.4 - operators.operatorframework.io.metrics.mediatype.v1: metrics+v1 - operators.operatorframework.io.metrics.project_layout: go.kubebuilder.io/v2 diff --git a/koku-metrics-operator/0.9.4/Dockerfile b/koku-metrics-operator/0.9.4/Dockerfile deleted file mode 100644 index ccc76f4a9..000000000 --- a/koku-metrics-operator/0.9.4/Dockerfile +++ /dev/null @@ -1,14 +0,0 @@ -FROM scratch - -LABEL operators.operatorframework.io.bundle.mediatype.v1=registry+v1 -LABEL operators.operatorframework.io.bundle.manifests.v1=manifests/ -LABEL operators.operatorframework.io.bundle.metadata.v1=metadata/ -LABEL operators.operatorframework.io.bundle.package.v1=koku-metrics-operator -LABEL operators.operatorframework.io.bundle.channels.v1=alpha,beta -LABEL operators.operatorframework.io.bundle.channel.default.v1=alpha -LABEL operators.operatorframework.io.metrics.builder=operator-sdk-v0.19.4 -LABEL operators.operatorframework.io.metrics.project_layout=go.kubebuilder.io/v2 -LABEL operators.operatorframework.io.metrics.mediatype.v1=metrics+v1 - -COPY manifests /manifests/ -COPY metadata /metadata/ diff --git a/koku-metrics-operator/0.9.4/manifests/koku-metrics-cfg.openshift.io_kokumetricsconfigs.yaml b/koku-metrics-operator/0.9.4/manifests/koku-metrics-cfg.openshift.io_kokumetricsconfigs.yaml deleted file mode 100644 index 03a5a3689..000000000 --- a/koku-metrics-operator/0.9.4/manifests/koku-metrics-cfg.openshift.io_kokumetricsconfigs.yaml +++ /dev/null @@ -1,1587 +0,0 @@ -apiVersion: apiextensions.k8s.io/v1 -kind: CustomResourceDefinition -metadata: - annotations: - controller-gen.kubebuilder.io/version: v0.3.0 - creationTimestamp: null - name: kokumetricsconfigs.koku-metrics-cfg.openshift.io -spec: - group: koku-metrics-cfg.openshift.io - names: - kind: KokuMetricsConfig - listKind: KokuMetricsConfigList - plural: kokumetricsconfigs - singular: kokumetricsconfig - scope: Namespaced - versions: - - name: v1alpha1 - schema: - openAPIV3Schema: - description: KokuMetricsConfig is the Schema for the kokumetricsconfig API - (Deprecated) - properties: - apiVersion: - description: 'APIVersion defines the versioned schema of this representation - of an object. Servers should convert recognized schemas to the latest - internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' - type: string - kind: - description: 'Kind is a string value representing the REST resource this - object represents. Servers may infer this from the endpoint the client - submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' - type: string - metadata: - type: object - spec: - description: KokuMetricsConfigSpec defines the desired state of KokuMetricsConfig. - properties: - api_url: - default: https://cloud.redhat.com - description: FOR DEVELOPMENT ONLY. APIURL is a field of KokuMetricsConfig - to represent the url of the API endpoint for service interaction. - The default is `https://cloud.redhat.com`. - type: string - authentication: - description: Authentication is a field of KokuMetricsConfig to represent - the authentication object. - properties: - secret_name: - description: AuthenticationSecretName is a field of KokuMetricsConfig - to represent the secret with the user and password used for - uploads. - type: string - type: - default: token - description: 'AuthType is a field of KokuMetricsConfig to represent - the authentication type to be used basic or token. Valid values - are: - "basic" : Enables authentication using user and password - from authentication secret. - "token" (default): Uses cluster - token for authentication.' - enum: - - token - - basic - type: string - required: - - type - type: object - clusterID: - description: ClusterID is a field of KokuMetricsConfig to represent - the cluster UUID. Normally this value should not be specified. Only - set this value if the clusterID cannot be obtained from the ClusterVersion. - type: string - packaging: - description: Packaging is a field of KokuMetricsConfig to represent - the packaging object. - properties: - max_reports_to_store: - default: 30 - description: MaxReports is a field of KokuMetricsConfig to represent - the maximum number of reports to store. The default is 30 reports - which corresponds to approximately 7 days worth of data given - the other default values. - format: int64 - minimum: 1 - type: integer - max_size_MB: - default: 100 - description: MaxSize is a field of KokuMetricsConfig to represent - the max file size in megabytes that will be compressed for upload - to Ingress. The default is 100. - format: int64 - maximum: 100 - minimum: 1 - type: integer - required: - - max_reports_to_store - - max_size_MB - type: object - prometheus_config: - description: PrometheusConfig is a field of KokuMetricsConfig to represent - the configuration of Prometheus connection. - properties: - service_address: - default: https://thanos-querier.openshift-monitoring.svc:9091 - description: FOR DEVELOPMENT ONLY. SvcAddress is a field of KokuMetricsConfig - to represent the thanos-querier address. The default is `https://thanos-querier.openshift-monitoring.svc:9091`. - type: string - skip_tls_verification: - default: false - description: FOR DEVELOPMENT ONLY. SkipTLSVerification is a field - of KokuMetricsConfig to represent if the thanos-querier endpoint - must be certificate validated. The default is false. - type: boolean - required: - - service_address - - skip_tls_verification - type: object - source: - description: Source is a field of KokuMetricsConfig to represent the - desired source on cloud.redhat.com. - properties: - check_cycle: - default: 1440 - description: CheckCycle is a field of KokuMetricsConfig to represent - the number of minutes between each source check schedule The - default is 1440 min (24 hours). - format: int64 - minimum: 0 - type: integer - create_source: - default: false - description: CreateSource is a field of KokuMetricsConfigSpec - to represent if the source should be created if not found. A - source will not be created if upload_toggle is `false`. - type: boolean - name: - description: SourceName is a field of KokuMetricsConfigSpec to - represent the source name on cloud.redhat.com. - type: string - sources_path: - default: /api/sources/v1.0/ - description: FOR DEVELOPMENT ONLY. SourcesAPIPath is a field of - KokuMetricsConfig to represent the path of the Sources API service. - The default is `/api/sources/v1.0/`. - type: string - required: - - check_cycle - - create_source - - sources_path - type: object - upload: - description: Upload is a field of KokuMetricsConfig to represent the - upload object. - properties: - ingress_path: - default: /api/ingress/v1/upload - description: FOR DEVELOPMENT ONLY. IngressAPIPath is a field of - KokuMetricsConfig to represent the path of the Ingress API service. - The default is `/api/ingress/v1/upload`. - type: string - upload_cycle: - default: 360 - description: UploadCycle is a field of KokuMetricsConfig to represent - the number of minutes between each upload schedule. The default - is 360 min (6 hours). - format: int64 - minimum: 0 - type: integer - upload_toggle: - default: true - description: UploadToggle is a field of KokuMetricsConfig to represent - if the operator is installed in a restricted-network. If `false`, - the operator will not upload to cloud.redhat.com or check/create - sources. The default is true. - type: boolean - upload_wait: - description: UploadWait is a field of KokuMetricsConfig to represent - the time to wait before sending an upload. - format: int64 - minimum: 0 - type: integer - validate_cert: - default: true - description: ValidateCert is a field of KokuMetricsConfig to represent - if the Ingress endpoint must be certificate validated. - type: boolean - required: - - ingress_path - - upload_cycle - - upload_toggle - - validate_cert - type: object - volume_claim_template: - description: VolumeClaimTemplate is a field of KokuMetricsConfig to - represent a PVC template. - properties: - apiVersion: - description: 'APIVersion defines the versioned schema of this - representation of an object. Servers should convert recognized - schemas to the latest internal value, and may reject unrecognized - values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' - type: string - kind: - description: 'Kind is a string value representing the REST resource - this object represents. Servers may infer this from the endpoint - the client submits requests to. Cannot be updated. In CamelCase. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' - type: string - metadata: - description: EmbeddedMetadata contains metadata relevant to an - EmbeddedResource. - properties: - annotations: - additionalProperties: - type: string - description: 'Annotations is an unstructured key value map - stored with a resource that may be set by external tools - to store and retrieve arbitrary metadata. They are not queryable - and should be preserved when modifying objects. More info: - http://kubernetes.io/docs/user-guide/annotations' - type: object - labels: - additionalProperties: - type: string - description: 'Map of string keys and values that can be used - to organize and categorize (scope and select) objects. May - match selectors of replication controllers and services. - More info: http://kubernetes.io/docs/user-guide/labels' - type: object - name: - description: 'Name must be unique within a namespace. Is required - when creating resources, although some resources may allow - a client to request the generation of an appropriate name - automatically. Name is primarily intended for creation idempotence - and configuration definition. Cannot be updated. More info: - http://kubernetes.io/docs/user-guide/identifiers#names' - type: string - type: object - spec: - description: 'Spec defines the desired characteristics of a volume - requested by a pod author. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims' - properties: - accessModes: - description: 'AccessModes contains the desired access modes - the volume should have. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes-1' - items: - type: string - type: array - dataSource: - description: 'This field can be used to specify either: * - An existing VolumeSnapshot object (snapshot.storage.k8s.io/VolumeSnapshot - - Beta) * An existing PVC (PersistentVolumeClaim) * An existing - custom resource/object that implements data population (Alpha) - In order to use VolumeSnapshot object types, the appropriate - feature gate must be enabled (VolumeSnapshotDataSource or - AnyVolumeDataSource) If the provisioner or an external controller - can support the specified data source, it will create a - new volume based on the contents of the specified data source. - If the specified data source is not supported, the volume - will not be created and the failure will be reported as - an event. In the future, we plan to support more data source - types and the behavior of the provisioner may change.' - properties: - apiGroup: - description: APIGroup is the group for the resource being - referenced. If APIGroup is not specified, the specified - Kind must be in the core API group. For any other third-party - types, APIGroup is required. - type: string - kind: - description: Kind is the type of resource being referenced - type: string - name: - description: Name is the name of resource being referenced - type: string - required: - - kind - - name - type: object - resources: - description: 'Resources represents the minimum resources the - volume should have. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources' - properties: - limits: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - description: 'Limits describes the maximum amount of compute - resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/' - type: object - requests: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - description: 'Requests describes the minimum amount of - compute resources required. If Requests is omitted for - a container, it defaults to Limits if that is explicitly - specified, otherwise to an implementation-defined value. - More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/' - type: object - type: object - selector: - description: A label query over volumes to consider for binding. - properties: - matchExpressions: - description: matchExpressions is a list of label selector - requirements. The requirements are ANDed. - items: - description: A label selector requirement is a selector - that contains values, a key, and an operator that - relates the key and values. - properties: - key: - description: key is the label key that the selector - applies to. - type: string - operator: - description: operator represents a key's relationship - to a set of values. Valid operators are In, NotIn, - Exists and DoesNotExist. - type: string - values: - description: values is an array of string values. - If the operator is In or NotIn, the values array - must be non-empty. If the operator is Exists or - DoesNotExist, the values array must be empty. - This array is replaced during a strategic merge - patch. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - description: matchLabels is a map of {key,value} pairs. - A single {key,value} in the matchLabels map is equivalent - to an element of matchExpressions, whose key field is - "key", the operator is "In", and the values array contains - only "value". The requirements are ANDed. - type: object - type: object - storageClassName: - description: 'Name of the StorageClass required by the claim. - More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#class-1' - type: string - volumeMode: - description: volumeMode defines what type of volume is required - by the claim. Value of Filesystem is implied when not included - in claim spec. - type: string - volumeName: - description: VolumeName is the binding reference to the PersistentVolume - backing this claim. - type: string - type: object - type: object - required: - - authentication - - packaging - - prometheus_config - - source - - upload - type: object - status: - description: KokuMetricsConfigStatus defines the observed state of KokuMetricsConfig. - properties: - api_url: - description: APIURL is a field of KokuMetricsConfig to represent the - url of the API endpoint for service interaction. - type: string - authentication: - description: Authentication is a field of KokuMetricsConfig to represent - the authentication status. - properties: - credentials_found: - description: AuthenticationCredentialsFound is a field of KokuMetricsConfig - to represent if used for uploads were found. - type: boolean - error: - description: AuthErrorMessage is a field of KokuMetricsConfig - to represent an `invalid credentials` error message. - type: string - last_credential_verification_time: - description: LastVerificationTime is a field of KokuMetricsConfig - to represent the last time credentials were verified. - format: date-time - nullable: true - type: string - secret_name: - description: AuthenticationSecretName is a field of KokuMetricsConfig - to represent the secret with the user and password used for - uploads. - type: string - type: - description: AuthType is a field of KokuMetricsConfig to represent - the authentication type to be used basic or token. - enum: - - token - - basic - type: string - valid_basic_auth: - description: ValidBasicAuth is a field of KokuMetricsConfig to - represent if the given basic auth credentials are valid. - type: boolean - type: object - clusterID: - description: ClusterID is a field of KokuMetricsConfig to represent - the cluster UUID. - type: string - operator_commit: - description: OperatorCommit is a field of KokuMetricsConfig that shows - the commit hash of the operator. - type: string - packaging: - description: Packaging is a field of KokuMetricsConfig to represent - the packaging status - properties: - error: - description: PackagingError is a field of KokuMetricsConfig to - represent the error encountered packaging the reports. - type: string - last_successful_packaging_time: - description: LastSuccessfulPackagingTime is a field of KokuMetricsConfig - that shows the time of the last successful file packaging. - format: date-time - nullable: true - type: string - max_reports_to_store: - description: MaxReports is a field of KokuMetricsConfig to represent - the maximum number of reports to store. - format: int64 - type: integer - max_size_MB: - description: MaxSize is a field of KokuMetricsConfig to represent - the max file size in megabytes that will be compressed for upload - to Ingress. - format: int64 - type: integer - number_reports_stored: - description: ReportCount is a field of KokuMetricsConfig to represent - the number of reports in storage. - format: int64 - type: integer - packaged_files: - description: PackagedFiles is a field of KokuMetricsConfig to - represent the list of file packages in storage. - items: - type: string - type: array - type: object - persistent_volume_claim: - description: PersistentVolumeClaim is a field of KokuMetricsConfig - to represent a PVC. - properties: - apiVersion: - description: 'APIVersion defines the versioned schema of this - representation of an object. Servers should convert recognized - schemas to the latest internal value, and may reject unrecognized - values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' - type: string - kind: - description: 'Kind is a string value representing the REST resource - this object represents. Servers may infer this from the endpoint - the client submits requests to. Cannot be updated. In CamelCase. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' - type: string - metadata: - description: EmbeddedMetadata contains metadata relevant to an - EmbeddedResource. - properties: - annotations: - additionalProperties: - type: string - description: 'Annotations is an unstructured key value map - stored with a resource that may be set by external tools - to store and retrieve arbitrary metadata. They are not queryable - and should be preserved when modifying objects. More info: - http://kubernetes.io/docs/user-guide/annotations' - type: object - labels: - additionalProperties: - type: string - description: 'Map of string keys and values that can be used - to organize and categorize (scope and select) objects. May - match selectors of replication controllers and services. - More info: http://kubernetes.io/docs/user-guide/labels' - type: object - name: - description: 'Name must be unique within a namespace. Is required - when creating resources, although some resources may allow - a client to request the generation of an appropriate name - automatically. Name is primarily intended for creation idempotence - and configuration definition. Cannot be updated. More info: - http://kubernetes.io/docs/user-guide/identifiers#names' - type: string - type: object - spec: - description: 'Spec defines the desired characteristics of a volume - requested by a pod author. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims' - properties: - accessModes: - description: 'AccessModes contains the desired access modes - the volume should have. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes-1' - items: - type: string - type: array - dataSource: - description: 'This field can be used to specify either: * - An existing VolumeSnapshot object (snapshot.storage.k8s.io/VolumeSnapshot - - Beta) * An existing PVC (PersistentVolumeClaim) * An existing - custom resource/object that implements data population (Alpha) - In order to use VolumeSnapshot object types, the appropriate - feature gate must be enabled (VolumeSnapshotDataSource or - AnyVolumeDataSource) If the provisioner or an external controller - can support the specified data source, it will create a - new volume based on the contents of the specified data source. - If the specified data source is not supported, the volume - will not be created and the failure will be reported as - an event. In the future, we plan to support more data source - types and the behavior of the provisioner may change.' - properties: - apiGroup: - description: APIGroup is the group for the resource being - referenced. If APIGroup is not specified, the specified - Kind must be in the core API group. For any other third-party - types, APIGroup is required. - type: string - kind: - description: Kind is the type of resource being referenced - type: string - name: - description: Name is the name of resource being referenced - type: string - required: - - kind - - name - type: object - resources: - description: 'Resources represents the minimum resources the - volume should have. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources' - properties: - limits: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - description: 'Limits describes the maximum amount of compute - resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/' - type: object - requests: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - description: 'Requests describes the minimum amount of - compute resources required. If Requests is omitted for - a container, it defaults to Limits if that is explicitly - specified, otherwise to an implementation-defined value. - More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/' - type: object - type: object - selector: - description: A label query over volumes to consider for binding. - properties: - matchExpressions: - description: matchExpressions is a list of label selector - requirements. The requirements are ANDed. - items: - description: A label selector requirement is a selector - that contains values, a key, and an operator that - relates the key and values. - properties: - key: - description: key is the label key that the selector - applies to. - type: string - operator: - description: operator represents a key's relationship - to a set of values. Valid operators are In, NotIn, - Exists and DoesNotExist. - type: string - values: - description: values is an array of string values. - If the operator is In or NotIn, the values array - must be non-empty. If the operator is Exists or - DoesNotExist, the values array must be empty. - This array is replaced during a strategic merge - patch. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - description: matchLabels is a map of {key,value} pairs. - A single {key,value} in the matchLabels map is equivalent - to an element of matchExpressions, whose key field is - "key", the operator is "In", and the values array contains - only "value". The requirements are ANDed. - type: object - type: object - storageClassName: - description: 'Name of the StorageClass required by the claim. - More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#class-1' - type: string - volumeMode: - description: volumeMode defines what type of volume is required - by the claim. Value of Filesystem is implied when not included - in claim spec. - type: string - volumeName: - description: VolumeName is the binding reference to the PersistentVolume - backing this claim. - type: string - type: object - type: object - prometheus: - description: Prometheus represents the status of premetheus queries. - properties: - configuration_error: - description: ConfigError is a field of KokuMetricsConfigStatus - to represent errors during prometheus configuration. - type: string - last_query_start_time: - description: LastQueryStartTime is a field of KokuMetricsConfigStatus - to represent the last time queries were started. - format: date-time - nullable: true - type: string - last_query_success_time: - description: LastQuerySuccessTime is a field of KokuMetricsConfigStatus - to represent the last time queries were successful. - format: date-time - nullable: true - type: string - prometheus_configured: - description: PrometheusConfigured is a field of KokuMetricsConfigStatus - to represent if the operator is configured to connect to prometheus. - type: boolean - prometheus_connected: - description: PrometheusConnected is a field of KokuMetricsConfigStatus - to represent if prometheus can be queried. - type: boolean - prometheus_connection_error: - description: ConnectionError is a field of KokuMetricsConfigStatus - to represent errors during prometheus test query. - type: string - service_address: - description: SvcAddress is the internal thanos-querier address. - type: string - skip_tls_verification: - description: SkipTLSVerification is a field of KokuMetricsConfigStatus - to represent if the thanos-querier endpoint must be certificate - validated. - type: boolean - required: - - prometheus_configured - - prometheus_connected - type: object - reports: - description: Reports represents the status of report generation. - properties: - data_collected: - description: DataCollected is a field of KokuMetricsConfigStatus - to represent whether or not data was collected for the last - query. - type: boolean - data_collection_message: - description: DataCollectionMessage is a field of KokuMetricsConfigStatus - to represent a message associated with the data_collected status. - type: string - last_hour_queried: - description: LastHourQueried is a field of KokuMetricsConfigStatus - to represent the time range for which metrics were last queried. - type: string - report_month: - description: ReportMonth is a field of KokuMetricsConfigStatus - to represent the month for which reports are being generated. - type: string - type: object - source: - description: Source is a field of KokuMetricsConfig to represent the - observed state of the source on cloud.redhat.com. - properties: - check_cycle: - description: CheckCycle is a field of KokuMetricsConfig to represent - the number of minutes between each source check schedule. The - default is 1440 min (24 hours). - format: int64 - type: integer - create_source: - description: CreateSource is a field of KokuMetricsConfigStatus - to represent if the source should be created if not found. - type: boolean - error: - description: SourceError is a field of KokuMetricsConfigStatus - to represent the error encountered creating the source. - type: string - last_check_time: - description: LastSourceCheckTime is a field of KokuMetricsConfig - that shows the time that the last check was attempted. - format: date-time - nullable: true - type: string - name: - description: SourceName is a field of KokuMetricsConfigStatus - to represent the source name on cloud.redhat.com. - type: string - source_defined: - description: SourceDefined is a field of KokuMetricsConfigStatus - to represent if the source exists as defined on cloud.redhat.com. - type: boolean - sources_path: - description: SourcesAPIPath is a field of KokuMetricsConfig to - represent the path of the Sources API service. - type: string - type: object - storage: - description: Storage is a field - properties: - volume_mounted: - description: VolumeMounted is a bool to indicate if storage volume - was mounted. - type: boolean - volume_type: - description: VolumeType is the string representation of the volume - type. - type: string - type: object - upload: - description: Upload is a field of KokuMetricsConfig to represent the - upload object. - properties: - error: - description: UploadError is a field of KokuMetricsConfigStatus - to represent the error encountered uploading reports. - type: string - ingress_path: - description: IngressAPIPath is a field of KokuMetricsConfig to - represent the path of the Ingress API service. - type: string - last_successful_upload_time: - description: LastSuccessfulUploadTime is a field of KokuMetricsConfig - that shows the time of the last successful upload. - format: date-time - nullable: true - type: string - last_upload_status: - description: LastUploadStatus is a field of KokuMetricsConfig - that shows the http status of the last upload. - type: string - upload: - description: UploadToggle is a field of KokuMetricsConfig to represent - if the operator should upload to cloud.redhat.com. The default - is true - type: boolean - upload_cycle: - description: UploadCycle is a field of KokuMetricsConfig to represent - the number of minutes between each upload schedule. The default - is 360 min (6 hours). - format: int64 - type: integer - upload_wait: - description: UploadWait is a field of KokuMetricsConfig to represent - the time to wait before sending an upload. - format: int64 - type: integer - validate_cert: - description: ValidateCert is a field of KokuMetricsConfig to represent - if the Ingress endpoint must be certificate validated. - type: boolean - type: object - type: object - required: - - spec - type: object - served: false - storage: false - subresources: - status: {} - - name: v1beta1 - schema: - openAPIV3Schema: - description: KokuMetricsConfig is the Schema for the kokumetricsconfig API - properties: - apiVersion: - description: 'APIVersion defines the versioned schema of this representation - of an object. Servers should convert recognized schemas to the latest - internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' - type: string - kind: - description: 'Kind is a string value representing the REST resource this - object represents. Servers may infer this from the endpoint the client - submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' - type: string - metadata: - type: object - spec: - description: KokuMetricsConfigSpec defines the desired state of KokuMetricsConfig. - properties: - api_url: - default: https://cloud.redhat.com - description: FOR DEVELOPMENT ONLY. APIURL is a field of KokuMetricsConfig - to represent the url of the API endpoint for service interaction. - The default is `https://cloud.redhat.com`. - type: string - authentication: - description: Authentication is a field of KokuMetricsConfig to represent - the authentication object. - properties: - secret_name: - description: AuthenticationSecretName is a field of KokuMetricsConfig - to represent the secret with the user and password used for - uploads. - type: string - type: - default: token - description: 'AuthType is a field of KokuMetricsConfig to represent - the authentication type to be used basic or token. Valid values - are: - "basic" : Enables authentication using user and password - from authentication secret. - "token" (default): Uses cluster - token for authentication.' - enum: - - token - - basic - type: string - required: - - type - type: object - clusterID: - description: ClusterID is a field of KokuMetricsConfig to represent - the cluster UUID. Normally this value should not be specified. Only - set this value if the clusterID cannot be obtained from the ClusterVersion. - type: string - packaging: - description: Packaging is a field of KokuMetricsConfig to represent - the packaging object. - properties: - max_reports_to_store: - default: 30 - description: MaxReports is a field of KokuMetricsConfig to represent - the maximum number of reports to store. The default is 30 reports - which corresponds to approximately 7 days worth of data given - the other default values. - format: int64 - minimum: 1 - type: integer - max_size_MB: - default: 100 - description: MaxSize is a field of KokuMetricsConfig to represent - the max file size in megabytes that will be compressed for upload - to Ingress. The default is 100. - format: int64 - maximum: 100 - minimum: 1 - type: integer - required: - - max_reports_to_store - - max_size_MB - type: object - prometheus_config: - description: PrometheusConfig is a field of KokuMetricsConfig to represent - the configuration of Prometheus connection. - properties: - service_address: - default: https://thanos-querier.openshift-monitoring.svc:9091 - description: FOR DEVELOPMENT ONLY. SvcAddress is a field of KokuMetricsConfig - to represent the thanos-querier address. The default is `https://thanos-querier.openshift-monitoring.svc:9091`. - type: string - skip_tls_verification: - default: false - description: FOR DEVELOPMENT ONLY. SkipTLSVerification is a field - of KokuMetricsConfig to represent if the thanos-querier endpoint - must be certificate validated. The default is false. - type: boolean - required: - - service_address - - skip_tls_verification - type: object - source: - description: Source is a field of KokuMetricsConfig to represent the - desired source on cloud.redhat.com. - properties: - check_cycle: - default: 1440 - description: CheckCycle is a field of KokuMetricsConfig to represent - the number of minutes between each source check schedule The - default is 1440 min (24 hours). - format: int64 - minimum: 0 - type: integer - create_source: - default: false - description: CreateSource is a field of KokuMetricsConfigSpec - to represent if the source should be created if not found. - type: boolean - name: - description: SourceName is a field of KokuMetricsConfigSpec to - represent the source name on cloud.redhat.com. - type: string - sources_path: - default: /api/sources/v1.0/ - description: FOR DEVELOPMENT ONLY. SourcesAPIPath is a field of - KokuMetricsConfig to represent the path of the Sources API service. - The default is `/api/sources/v1.0/`. - type: string - required: - - check_cycle - - create_source - - sources_path - type: object - upload: - description: Upload is a field of KokuMetricsConfig to represent the - upload object. - properties: - ingress_path: - default: /api/ingress/v1/upload - description: FOR DEVELOPMENT ONLY. IngressAPIPath is a field of - KokuMetricsConfig to represent the path of the Ingress API service. - The default is `/api/ingress/v1/upload`. - type: string - upload_cycle: - default: 360 - description: UploadCycle is a field of KokuMetricsConfig to represent - the number of minutes between each upload schedule. The default - is 360 min (6 hours). - format: int64 - minimum: 0 - type: integer - upload_toggle: - default: true - description: UploadToggle is a field of KokuMetricsConfig to represent - if the operator is installed in a restricted-network. If `false`, - the operator will not upload to cloud.redhat.com or check/create - sources. The default is true. - type: boolean - upload_wait: - description: UploadWait is a field of KokuMetricsConfig to represent - the time to wait before sending an upload. - format: int64 - minimum: 0 - type: integer - validate_cert: - default: true - description: ValidateCert is a field of KokuMetricsConfig to represent - if the Ingress endpoint must be certificate validated. - type: boolean - required: - - ingress_path - - upload_cycle - - upload_toggle - - validate_cert - type: object - volume_claim_template: - description: VolumeClaimTemplate is a field of KokuMetricsConfig to - represent a PVC template. - properties: - apiVersion: - description: 'APIVersion defines the versioned schema of this - representation of an object. Servers should convert recognized - schemas to the latest internal value, and may reject unrecognized - values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' - type: string - kind: - description: 'Kind is a string value representing the REST resource - this object represents. Servers may infer this from the endpoint - the client submits requests to. Cannot be updated. In CamelCase. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' - type: string - metadata: - description: EmbeddedMetadata contains metadata relevant to an - EmbeddedResource. - properties: - annotations: - additionalProperties: - type: string - description: 'Annotations is an unstructured key value map - stored with a resource that may be set by external tools - to store and retrieve arbitrary metadata. They are not queryable - and should be preserved when modifying objects. More info: - http://kubernetes.io/docs/user-guide/annotations' - type: object - labels: - additionalProperties: - type: string - description: 'Map of string keys and values that can be used - to organize and categorize (scope and select) objects. May - match selectors of replication controllers and services. - More info: http://kubernetes.io/docs/user-guide/labels' - type: object - name: - description: 'Name must be unique within a namespace. Is required - when creating resources, although some resources may allow - a client to request the generation of an appropriate name - automatically. Name is primarily intended for creation idempotence - and configuration definition. Cannot be updated. More info: - http://kubernetes.io/docs/user-guide/identifiers#names' - type: string - type: object - spec: - description: 'Spec defines the desired characteristics of a volume - requested by a pod author. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims' - properties: - accessModes: - description: 'AccessModes contains the desired access modes - the volume should have. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes-1' - items: - type: string - type: array - dataSource: - description: 'This field can be used to specify either: * - An existing VolumeSnapshot object (snapshot.storage.k8s.io/VolumeSnapshot - - Beta) * An existing PVC (PersistentVolumeClaim) * An existing - custom resource/object that implements data population (Alpha) - In order to use VolumeSnapshot object types, the appropriate - feature gate must be enabled (VolumeSnapshotDataSource or - AnyVolumeDataSource) If the provisioner or an external controller - can support the specified data source, it will create a - new volume based on the contents of the specified data source. - If the specified data source is not supported, the volume - will not be created and the failure will be reported as - an event. In the future, we plan to support more data source - types and the behavior of the provisioner may change.' - properties: - apiGroup: - description: APIGroup is the group for the resource being - referenced. If APIGroup is not specified, the specified - Kind must be in the core API group. For any other third-party - types, APIGroup is required. - type: string - kind: - description: Kind is the type of resource being referenced - type: string - name: - description: Name is the name of resource being referenced - type: string - required: - - kind - - name - type: object - resources: - description: 'Resources represents the minimum resources the - volume should have. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources' - properties: - limits: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - description: 'Limits describes the maximum amount of compute - resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/' - type: object - requests: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - description: 'Requests describes the minimum amount of - compute resources required. If Requests is omitted for - a container, it defaults to Limits if that is explicitly - specified, otherwise to an implementation-defined value. - More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/' - type: object - type: object - selector: - description: A label query over volumes to consider for binding. - properties: - matchExpressions: - description: matchExpressions is a list of label selector - requirements. The requirements are ANDed. - items: - description: A label selector requirement is a selector - that contains values, a key, and an operator that - relates the key and values. - properties: - key: - description: key is the label key that the selector - applies to. - type: string - operator: - description: operator represents a key's relationship - to a set of values. Valid operators are In, NotIn, - Exists and DoesNotExist. - type: string - values: - description: values is an array of string values. - If the operator is In or NotIn, the values array - must be non-empty. If the operator is Exists or - DoesNotExist, the values array must be empty. - This array is replaced during a strategic merge - patch. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - description: matchLabels is a map of {key,value} pairs. - A single {key,value} in the matchLabels map is equivalent - to an element of matchExpressions, whose key field is - "key", the operator is "In", and the values array contains - only "value". The requirements are ANDed. - type: object - type: object - storageClassName: - description: 'Name of the StorageClass required by the claim. - More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#class-1' - type: string - volumeMode: - description: volumeMode defines what type of volume is required - by the claim. Value of Filesystem is implied when not included - in claim spec. - type: string - volumeName: - description: VolumeName is the binding reference to the PersistentVolume - backing this claim. - type: string - type: object - type: object - required: - - authentication - - packaging - - prometheus_config - - source - - upload - type: object - status: - description: KokuMetricsConfigStatus defines the observed state of KokuMetricsConfig. - properties: - api_url: - description: APIURL is a field of KokuMetricsConfig to represent the - url of the API endpoint for service interaction. - type: string - authentication: - description: Authentication is a field of KokuMetricsConfig to represent - the authentication status. - properties: - credentials_found: - description: AuthenticationCredentialsFound is a field of KokuMetricsConfig - to represent if used for uploads were found. - type: boolean - error: - description: AuthErrorMessage is a field of KokuMetricsConfig - to represent an `invalid credentials` error message. - type: string - last_credential_verification_time: - description: LastVerificationTime is a field of KokuMetricsConfig - to represent the last time credentials were verified. - format: date-time - nullable: true - type: string - secret_name: - description: AuthenticationSecretName is a field of KokuMetricsConfig - to represent the secret with the user and password used for - uploads. - type: string - type: - description: AuthType is a field of KokuMetricsConfig to represent - the authentication type to be used basic or token. - enum: - - token - - basic - type: string - valid_basic_auth: - description: ValidBasicAuth is a field of KokuMetricsConfig to - represent if the given basic auth credentials are valid. - type: boolean - type: object - clusterID: - description: ClusterID is a field of KokuMetricsConfig to represent - the cluster UUID. - type: string - operator_commit: - description: OperatorCommit is a field of KokuMetricsConfig that shows - the commit hash of the operator. - type: string - packaging: - description: Packaging is a field of KokuMetricsConfig to represent - the packaging status - properties: - error: - description: PackagingError is a field of KokuMetricsConfig to - represent the error encountered packaging the reports. - type: string - last_successful_packaging_time: - description: LastSuccessfulPackagingTime is a field of KokuMetricsConfig - that shows the time of the last successful file packaging. - format: date-time - nullable: true - type: string - max_reports_to_store: - description: MaxReports is a field of KokuMetricsConfig to represent - the maximum number of reports to store. - format: int64 - type: integer - max_size_MB: - description: MaxSize is a field of KokuMetricsConfig to represent - the max file size in megabytes that will be compressed for upload - to Ingress. - format: int64 - type: integer - number_reports_stored: - description: ReportCount is a field of KokuMetricsConfig to represent - the number of reports in storage. - format: int64 - type: integer - packaged_files: - description: PackagedFiles is a field of KokuMetricsConfig to - represent the list of file packages in storage. - items: - type: string - type: array - type: object - persistent_volume_claim: - description: PersistentVolumeClaim is a field of KokuMetricsConfig - to represent a PVC. - properties: - apiVersion: - description: 'APIVersion defines the versioned schema of this - representation of an object. Servers should convert recognized - schemas to the latest internal value, and may reject unrecognized - values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' - type: string - kind: - description: 'Kind is a string value representing the REST resource - this object represents. Servers may infer this from the endpoint - the client submits requests to. Cannot be updated. In CamelCase. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' - type: string - metadata: - description: EmbeddedMetadata contains metadata relevant to an - EmbeddedResource. - properties: - annotations: - additionalProperties: - type: string - description: 'Annotations is an unstructured key value map - stored with a resource that may be set by external tools - to store and retrieve arbitrary metadata. They are not queryable - and should be preserved when modifying objects. More info: - http://kubernetes.io/docs/user-guide/annotations' - type: object - labels: - additionalProperties: - type: string - description: 'Map of string keys and values that can be used - to organize and categorize (scope and select) objects. May - match selectors of replication controllers and services. - More info: http://kubernetes.io/docs/user-guide/labels' - type: object - name: - description: 'Name must be unique within a namespace. Is required - when creating resources, although some resources may allow - a client to request the generation of an appropriate name - automatically. Name is primarily intended for creation idempotence - and configuration definition. Cannot be updated. More info: - http://kubernetes.io/docs/user-guide/identifiers#names' - type: string - type: object - spec: - description: 'Spec defines the desired characteristics of a volume - requested by a pod author. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims' - properties: - accessModes: - description: 'AccessModes contains the desired access modes - the volume should have. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes-1' - items: - type: string - type: array - dataSource: - description: 'This field can be used to specify either: * - An existing VolumeSnapshot object (snapshot.storage.k8s.io/VolumeSnapshot - - Beta) * An existing PVC (PersistentVolumeClaim) * An existing - custom resource/object that implements data population (Alpha) - In order to use VolumeSnapshot object types, the appropriate - feature gate must be enabled (VolumeSnapshotDataSource or - AnyVolumeDataSource) If the provisioner or an external controller - can support the specified data source, it will create a - new volume based on the contents of the specified data source. - If the specified data source is not supported, the volume - will not be created and the failure will be reported as - an event. In the future, we plan to support more data source - types and the behavior of the provisioner may change.' - properties: - apiGroup: - description: APIGroup is the group for the resource being - referenced. If APIGroup is not specified, the specified - Kind must be in the core API group. For any other third-party - types, APIGroup is required. - type: string - kind: - description: Kind is the type of resource being referenced - type: string - name: - description: Name is the name of resource being referenced - type: string - required: - - kind - - name - type: object - resources: - description: 'Resources represents the minimum resources the - volume should have. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources' - properties: - limits: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - description: 'Limits describes the maximum amount of compute - resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/' - type: object - requests: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - description: 'Requests describes the minimum amount of - compute resources required. If Requests is omitted for - a container, it defaults to Limits if that is explicitly - specified, otherwise to an implementation-defined value. - More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/' - type: object - type: object - selector: - description: A label query over volumes to consider for binding. - properties: - matchExpressions: - description: matchExpressions is a list of label selector - requirements. The requirements are ANDed. - items: - description: A label selector requirement is a selector - that contains values, a key, and an operator that - relates the key and values. - properties: - key: - description: key is the label key that the selector - applies to. - type: string - operator: - description: operator represents a key's relationship - to a set of values. Valid operators are In, NotIn, - Exists and DoesNotExist. - type: string - values: - description: values is an array of string values. - If the operator is In or NotIn, the values array - must be non-empty. If the operator is Exists or - DoesNotExist, the values array must be empty. - This array is replaced during a strategic merge - patch. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - description: matchLabels is a map of {key,value} pairs. - A single {key,value} in the matchLabels map is equivalent - to an element of matchExpressions, whose key field is - "key", the operator is "In", and the values array contains - only "value". The requirements are ANDed. - type: object - type: object - storageClassName: - description: 'Name of the StorageClass required by the claim. - More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#class-1' - type: string - volumeMode: - description: volumeMode defines what type of volume is required - by the claim. Value of Filesystem is implied when not included - in claim spec. - type: string - volumeName: - description: VolumeName is the binding reference to the PersistentVolume - backing this claim. - type: string - type: object - type: object - prometheus: - description: Prometheus represents the status of premetheus queries. - properties: - configuration_error: - description: ConfigError is a field of KokuMetricsConfigStatus - to represent errors during prometheus configuration. - type: string - last_query_start_time: - description: LastQueryStartTime is a field of KokuMetricsConfigStatus - to represent the last time queries were started. - format: date-time - nullable: true - type: string - last_query_success_time: - description: LastQuerySuccessTime is a field of KokuMetricsConfigStatus - to represent the last time queries were successful. - format: date-time - nullable: true - type: string - prometheus_configured: - description: PrometheusConfigured is a field of KokuMetricsConfigStatus - to represent if the operator is configured to connect to prometheus. - type: boolean - prometheus_connected: - description: PrometheusConnected is a field of KokuMetricsConfigStatus - to represent if prometheus can be queried. - type: boolean - prometheus_connection_error: - description: ConnectionError is a field of KokuMetricsConfigStatus - to represent errors during prometheus test query. - type: string - service_address: - description: SvcAddress is the internal thanos-querier address. - type: string - skip_tls_verification: - description: SkipTLSVerification is a field of KokuMetricsConfigStatus - to represent if the thanos-querier endpoint must be certificate - validated. - type: boolean - required: - - prometheus_configured - - prometheus_connected - type: object - reports: - description: Reports represents the status of report generation. - properties: - data_collected: - description: DataCollected is a field of KokuMetricsConfigStatus - to represent whether or not data was collected for the last - query. - type: boolean - data_collection_message: - description: DataCollectionMessage is a field of KokuMetricsConfigStatus - to represent a message associated with the data_collected status. - type: string - last_hour_queried: - description: LastHourQueried is a field of KokuMetricsConfigStatus - to represent the time range for which metrics were last queried. - type: string - report_month: - description: ReportMonth is a field of KokuMetricsConfigStatus - to represent the month for which reports are being generated. - type: string - type: object - source: - description: Source is a field of KokuMetricsConfig to represent the - observed state of the source on cloud.redhat.com. - properties: - check_cycle: - description: CheckCycle is a field of KokuMetricsConfig to represent - the number of minutes between each source check schedule. The - default is 1440 min (24 hours). - format: int64 - type: integer - create_source: - description: CreateSource is a field of KokuMetricsConfigStatus - to represent if the source should be created if not found. A - source will not be created if upload_toggle is `false`. - type: boolean - error: - description: SourceError is a field of KokuMetricsConfigStatus - to represent the error encountered creating the source. - type: string - last_check_time: - description: LastSourceCheckTime is a field of KokuMetricsConfig - that shows the time that the last check was attempted. - format: date-time - nullable: true - type: string - name: - description: SourceName is a field of KokuMetricsConfigStatus - to represent the source name on cloud.redhat.com. - type: string - source_defined: - description: SourceDefined is a field of KokuMetricsConfigStatus - to represent if the source exists as defined on cloud.redhat.com. - type: boolean - sources_path: - description: SourcesAPIPath is a field of KokuMetricsConfig to - represent the path of the Sources API service. - type: string - type: object - storage: - description: Storage is a field - properties: - volume_mounted: - description: VolumeMounted is a bool to indicate if storage volume - was mounted. - type: boolean - volume_type: - description: VolumeType is the string representation of the volume - type. - type: string - type: object - upload: - description: Upload is a field of KokuMetricsConfig to represent the - upload object. - properties: - error: - description: UploadError is a field of KokuMetricsConfigStatus - to represent the error encountered uploading reports. - type: string - ingress_path: - description: IngressAPIPath is a field of KokuMetricsConfig to - represent the path of the Ingress API service. - type: string - last_successful_upload_time: - description: LastSuccessfulUploadTime is a field of KokuMetricsConfig - that shows the time of the last successful upload. - format: date-time - nullable: true - type: string - last_upload_status: - description: LastUploadStatus is a field of KokuMetricsConfig - that shows the http status of the last upload. - type: string - upload: - description: UploadToggle is a field of KokuMetricsConfig to represent - if the operator should upload to cloud.redhat.com. The default - is true - type: boolean - upload_cycle: - description: UploadCycle is a field of KokuMetricsConfig to represent - the number of minutes between each upload schedule. The default - is 360 min (6 hours). - format: int64 - type: integer - upload_wait: - description: UploadWait is a field of KokuMetricsConfig to represent - the time to wait before sending an upload. - format: int64 - type: integer - validate_cert: - description: ValidateCert is a field of KokuMetricsConfig to represent - if the Ingress endpoint must be certificate validated. - type: boolean - type: object - type: object - required: - - spec - type: object - served: true - storage: true - subresources: - status: {} -status: - acceptedNames: - kind: "" - plural: "" - conditions: [] - storedVersions: [] diff --git a/koku-metrics-operator/0.9.4/manifests/koku-metrics-operator.clusterserviceversion.yaml b/koku-metrics-operator/0.9.4/manifests/koku-metrics-operator.clusterserviceversion.yaml deleted file mode 100644 index f21ab106b..000000000 --- a/koku-metrics-operator/0.9.4/manifests/koku-metrics-operator.clusterserviceversion.yaml +++ /dev/null @@ -1,455 +0,0 @@ -apiVersion: operators.coreos.com/v1alpha1 -kind: ClusterServiceVersion -metadata: - annotations: - alm-examples: |- - [ - { - "apiVersion": "koku-metrics-cfg.openshift.io/v1beta1", - "kind": "KokuMetricsConfig", - "metadata": { - "name": "kokumetricscfg-sample-v1beta1" - }, - "spec": { - "authentication": { - "type": "token" - }, - "packaging": { - "max_reports_to_store": 30, - "max_size_MB": 100 - }, - "prometheus_config": {}, - "source": { - "check_cycle": 1440, - "create_source": false, - "name": "INSERT-SOURCE-NAME" - }, - "upload": { - "upload_cycle": 360, - "upload_toggle": true - } - } - } - ] - capabilities: Seamless Upgrades - categories: Monitoring - certified: "false" - containerImage: quay.io/project-koku/koku-metrics-operator:v0.9.4 - createdAt: "2021-02-16T16:03:12Z" - description: A Golang-based OpenShift Operator that generates and uploads OpenShift - usage metrics to cost management. - operatorframework.io/suggested-namespace: koku-metrics-operator - operators.openshift.io/infrastructure-features: '["Disconnected"]' - operators.operatorframework.io/builder: operator-sdk-v0.19.4 - operators.operatorframework.io/project_layout: go.kubebuilder.io/v2 - repository: https://github.com/project-koku/koku-metrics-operator - support: Cost Management - name: koku-metrics-operator.v0.9.4 - namespace: placeholder -spec: - apiservicedefinitions: {} - customresourcedefinitions: - owned: - - description: KokuMetricsConfig is the Schema for the kokumetricsconfig API - kind: KokuMetricsConfig - name: kokumetricsconfigs.koku-metrics-cfg.openshift.io - version: v1beta1 - description: |- - # v0.9.4 Koku Metrics Operator - ## Introduction - The `koku-metrics-operator` is an OpenShift Operator used to collect OpenShift usage data and upload it to [cost managment](https://access.redhat.com/documentation/en-us/openshift_container_platform/4.5/html/getting_started_with_cost_management/assembly_introduction_cost_management). The operator queries Prometheus to create metric reports which are packaged and uploaded to cost management at [cloud.redhat.com](https://cloud.redhat.com). - - This operator is capable of functioning within a disconnected/restricted network (aka air-gapped mode). In this mode, the operator will store the packaged reports for manual retrieval instead of being uploaded to cost management. Documentation for installing an operator within a restricted network can be found [here](https://docs.openshift.com/container-platform/4.5/operators/admin/olm-restricted-networks.html). - - For more information, reach out to . - ## Features and Capabilities - #### Metrics collection: - The Koku Metrics Operator (`koku-metrics-operator`) collects the metrics required for cost management by: - * Querying Prometheus to gather the necessary metrics for cost management. - * Writing Prometheus queries to CSV report files. - * Packaging the CSV report files into tarballs. - - #### Additional Capabilities: - * The operator can be configured to automatically upload the packaged reports to cost management through Red Hat Insights Ingress service. - * The operator can create a source in cloud.redhat.com. A source is required for cost management to process the uploaded packages. - * PersistentVolumeClaim (PVC) configuration: The KokuMetricsConfig CR can accept a PVC definition and the operator will create and mount the PVC. If one is not provided, a default PVC will be created. - * Restricted network installation: this operator can function on a restricted network. In this mode, the operator stores the packaged reports for manual retrieval. - - ## Limitations and Pre-Requisites - #### Limitations (Potential for metrics data loss) - * A source **must** exist in cloud.redhat.com for an uploaded payload to be processed by cost management. The operator sends the payload to the Red Hat Insights Ingress service which usually returns successfully, but the operator does not currently confirm with cost management that the payload was processed. After Ingress accepts the uploaded payload, the payload is removed from the operator and is gone forever. If the data within the payload is not processed, a gap will be introduced in the usage metrics. - - **Note** The following limitations are specific to operators configured to run in a restricted network: - * The `koku-metrics-operator` will not be able to generate new reports if the PVC storage is filled. If this occurs, the reports must be manually deleted from the PVC so that the operator can function as normal. - * The default report retention is 30 reports (about one week's worth of data). The reports must be manually downloaded and uploaded to cloud.redhat.com every week, or they will be deleted and the data will be lost. - - #### Storage configuration prerequisite - The operator will attempt to create and use the following PVC when installed: - - volume_claim_template: - apiVersion: v1 - kind: PersistentVolumeClaim - metadata: - name: koku-metrics-operator-data - spec: - accessModes: - - ReadWriteOnce - resources: - requests: - storage: 10Gi - - If a different PVC should be utilized, a valid PVC should be specified in the KokuMetricsConfig CR as described in the appropriate section below. The PVC to be used may exist already, or the operator will attempt to create it. - - To use the default specification, the follow assumptions must be met: - 1. A default StorageClass is defined. - 2. Dynamic provisioning for that default StorageClass is enabled. - - If these assumptions are not met, the operator will not deploy correctly. In these cases, storage must be manually configured. After configuring storage, a valid PVC template should be supplied in the `volume_claim_template` spec of the KokuMetricsConfig CR. - - ## Configure the koku-metrics-operator - **Note** There are separate instructions for configuring the `koku-metrics-operator` to run in a restricted network. - ##### Configure authentication - The default authentication for the operator is `token`. No further steps are required to configure token authentication. If `basic` is the preferred authentication method, a Secret must be created which holds username and password credentials: - 1. On the left navigation pane, select `Workloads` -> `Secrets` -> select Project: `koku-metrics-operator` -> `Create` -> `Key/Value Secret` - 2. Give the Secret a name and add 2 keys: `username` and `password` (all lowercase). The values for these keys correspond to cloud.redhat.com credentials. - 3. Select `Create`. - ##### Create the KokuMetricsConfig - Configure the koku-metrics-operator by creating a `KokuMetricsConfig`. - 1. On the left navigation pane, select `Operators` -> `Installed Operators` -> `koku-metrics-operator` -> `KokuMetricsConfig` -> `Create Instance`. - 2. For `basic` authentication, edit the following values in the spec: - * Replace `authentication: type:` with `basic`. - * Add the `secret_name` field under `authentication`, and set it equal to the name of the authentication Secret that was created above. The spec should look similar to the following: - - ``` - authentication: - secret_name: SECRET-NAME - type: basic - ``` - - 3. To configure the koku-metrics-operator to create a cost management source, edit the following values in the `source` field: - * Replace `INSERT-SOURCE-NAME` with the preferred name of the source to be created. - * Replace the `create_source` field value with `true`. - - **Note:** if the source already exists, replace `INSERT-SOURCE-NAME` with the existing name, and leave `create_source` as false. This will allow the operator to confirm the source exists. - 4. If not specified, the operator will create a default PersistentVolumeClaim called `koku-metrics-operator-data` with 10Gi of storage. To configure the koku-metrics-operator to use or create a different PVC, edit the following in the spec: - * Add the desired configuration to the `volume_claim_template` field in the spec: - - ``` - volume_claim_template: - apiVersion: v1 - kind: PersistentVolumeClaim - metadata: - name: - spec: - accessModes: - - ReadWriteOnce - resources: - requests: - storage: 10Gi - ``` - - **Note:** If using the YAML View, the `volume_claim_template` field must be added to the spec - 5. Select `Create`. - - # Restricted Network Usage (disconnected/air-gapped mode) - ## Installation - To install the `koku-metrics-operator` in a restricted network, follow the [olm documentation](https://docs.openshift.com/container-platform/4.5/operators/admin/olm-restricted-networks.html). The operator is found in the `community-operators` Catalog in the `registry.redhat.io/redhat/community-operator-index:latest` Index. If pruning the index before pushing to the mirrored registry, keep the `koku-metrics-operator` package. - - Within a restricted network, the operator queries prometheus to gather the necessary usage metrics, writes the query results to CSV files, and packages the reports for storage in the PVC. These reports then need to be manually downloaded from the cluster and uploaded to [cloud.redhat.com](https://cloud.redhat.com). - - For more information, reach out to . - ## Configure the koku-metrics-operator for a restricted network - ##### Create the KokuMetricsConfig - Configure the koku-metrics-operator by creating a `KokuMetricsConfig`. - 1. On the left navigation pane, select `Operators` -> `Installed Operators` -> `koku-metrics-operator` -> `KokuMetricsConfig` -> `Create Instance`. - 2. Specify the desired storage. If not specified, the operator will create a default Persistent Volume Claim called `koku-metrics-operator-data` with 10Gi of storage. To configure the koku-metrics-operator to use or create a different PVC, edit the following in the spec: - * Add the desired configuration to the `volume_claim_template` field in the spec: - - ``` - volume_claim_template: - apiVersion: v1 - kind: PersistentVolumeClaim - metadata: - name: - spec: - storageClassName: - accessModes: - - ReadWriteOnce - resources: - requests: - storage: 10Gi - ``` - - **Note:** If using the YAML View, the `volume_claim_template` field must be added to the spec - 3. (Optional) Specify the desired report retention. The operator will retain 30 reports by default. This corresponds to approximately one week's worth of data if using the default packaging cycle. To modify the number of retained reports: - * Change the `packaging` spec field `max_reports_to_store` to the desired number of reports to retain. Once this max number is reached, the operator will start removing the oldest packages remaining on the PVC: - - ``` - packaging: - max_size_MB: 100 - max_reports_to_store: 30 - ``` - - **Note:** The number of retained reports directly affects the frequency that reports must be manually downloaded from the PVC. Take caution in setting this to a higher number of reports, as the operator cannot write data to the PVC if the storage is full. - 4. To configure the operator to perform in a restricted network, set the `upload_toggle` to `false`: - - ``` - upload: - upload_cycle: 360, - upload_toggle: false - ``` - - 5. Select `Create`. - - ## Download reports from the Operator & clean up the PVC - If the `koku-metrics-operator` is configured to run in a restricted network, the metric reports will not automatically upload to cost managment. Instead, they need to be manually copied from the PVC for upload to [cloud.redhat.com](https://cloud.redhat.com). The default configuration saves one week of reports which means the process of downloading and uploading reports should be repeated weekly to prevent loss of metrics data. To download the reports, complete the following steps: - 1. Create the following Pod, ensuring the `claimName` matches the PVC containing the report data: - - ``` - kind: Pod - apiVersion: v1 - metadata: - name: volume-shell - namespace: koku-metrics-operator - spec: - volumes: - - name: koku-metrics-operator-reports - persistentVolumeClaim: - claimName: koku-metrics-operator-data - containers: - - name: volume-shell - image: busybox - command: ['sleep', '3600'] - volumeMounts: - - name: koku-metrics-operator-reports - mountPath: /tmp/koku-metrics-operator-reports - ``` - - 2. Use rsync to copy all of the files ready for upload from the PVC to a local folder: - - ``` - $ oc rsync volume-shell:/tmp/koku-metrics-operator-reports/upload local/path/to/save/folder - ``` - - 3. Once confirming that the files have been successfully copied, use rsh to connect to the pod and delete the contents of the upload folder so that they are no longer in storage: - - ``` - $ oc rsh volume-shell - $ rm /tmp/koku-metrics-operator-reports/upload/* - ``` - - 4. (Optional) Delete the pod that was used to connect to the PVC: - - ``` - $ oc delete -f volume-shell.yaml - ``` - - ## Create a source - In a restricted network, the `koku-metrics-operator` cannot automatically create a source. This process must be done manually. In the cloud.redhat.com platform, open the [Sources menu](https://cloud.redhat.com/settings/sources/) to begin adding an OpenShift source to cost management: - - 1. Navigate to the Sources menu - 2. Select the `Red Hat sources` tab - 3. Click `Add source` to open the Sources wizard. - 4. Enter a name for the source and click `Next`. - 5. Select `Red Hat Openshift Container Platform` as the source type and Cost Management as the application. Click `Next`. - 6. Enter the cluster identifier into the cloud.redhat.com Sources wizard, and click `Next`. - - **Note:** The cluster identifier can be found in the KokuMetricsConfig CR, the cluster Overview page, or the cluster Help > About. - - 7. In the cloud.redhat.com Sources wizard, review the details and click `Finish` to create the Source. - - ## Upload the reports to cost managment - Uploading reports to cost managment is done through curl: - - $ curl -vvvv -F "file=@FILE_NAME.tar.gz;type=application/vnd.redhat.hccm.tar+tgz" https://cloud.redhat.com/api/ingress/v1/upload -u USERNAME:PASS - - where `USERNAME` and `PASS` correspond to the user credentials for [cloud.redhat.com](https://cloud.redhat.com), and `FILE_NAME` is the name of the report to upload. - - displayName: Koku Metrics Operator - icon: - - base64data: PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4KPCEtLSBHZW5lcmF0b3I6IEFkb2JlIElsbHVzdHJhdG9yIDIyLjEuMCwgU1ZHIEV4cG9ydCBQbHVnLUluIC4gU1ZHIFZlcnNpb246IDYuMDAgQnVpbGQgMCkgIC0tPgo8c3ZnIHZlcnNpb249IjEuMSIgaWQ9IkxheWVyXzEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4IgoJIHZpZXdCb3g9IjAgMCAzMDAgMzAwIiBzdHlsZT0iZW5hYmxlLWJhY2tncm91bmQ6bmV3IDAgMCAzMDAgMzAwOyIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSI+CjxzdHlsZSB0eXBlPSJ0ZXh0L2NzcyI+Cgkuc3Qwe2ZpbGw6I0VFMDAwMDt9Cjwvc3R5bGU+Cjx0aXRsZT5Db3N0LWljb248L3RpdGxlPgo8ZGVzYz5DcmVhdGVkIHdpdGggU2tldGNoLjwvZGVzYz4KPGc+Cgk8Zz4KCQk8cGF0aCBjbGFzcz0ic3QwIiBkPSJNMjM5LjAzNzAzMzEsMTE3LjI3NTE3N2MtMy4yNjU4MDgx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wMDEtMC4xMTUyMDM5LDAuOTkwNjQ2NC0wLjU3MTM1MDEsMS4zNzMwNzc0bC0zLjg5ODA4NjUsNC4wMTMyNzUxCgkJCWMtMC4zMDg3MTU4LDAuMjMwMzkyNS0wLjY2ODEwNjEsMC4zODI0MzEtMS4wOTIwMTA1LDAuNDU2MTYxNWMtMC40MTkyOTYzLDAuMDc4MzIzNC0wLjgyMDE1OTksMC0xLjIwMjU5MDktMC4yMjU3NjkKCQkJYy0xLjE0MjcxNTUtMC44NDMyMDA3LTIuNDQyMDc3Ni0xLjI2MjQ5NjktMy44OTgwODY1LTEuMjYyNDk2OWgtNy42NzYzNjExYy0wLjkxNjkxNTksMC0xLjcwMDIyNTgsMC4zMjI1MjUtMi4zNDk4OTkzLDAuOTcyMjEzNwoJCQljLTAuNjQ5Njg4NywwLjY0OTY3MzUtMC45NzY4MjE5LDEuNDc0NDQxNS0wLjk3NjgyMTksMi40NjUwODc5YzAsMC42ODY1NTQsMC4yMzAzOTI1LDEuMzM2MjEyMiwwLjY5MTE0NjksMS45NDkwMzU2CgkJCWMwLjQ1NjE2MTUsMC42MTI4MjM1LDEuMDMyMTE5OCwxLjAzMjExOTgsMS43MTg2NTg0LDEuMjYyNDk2OUwxNzQuMjgwNjM5NiwxODUuODczNjExNXoiLz4KCTwvZz4KPC9nPgo8L3N2Zz4K - mediatype: image/svg+xml - install: - spec: - clusterPermissions: - - rules: - - apiGroups: - - config.openshift.io - resources: - - clusterversions - verbs: - - get - - list - - watch - - apiGroups: - - "" - resources: - - namespaces - verbs: - - get - - list - - watch - - apiGroups: - - "" - resources: - - secrets - verbs: - - get - serviceAccountName: koku-metrics-manager-role - deployments: - - name: koku-metrics-controller-manager - spec: - replicas: 1 - selector: - matchLabels: - control-plane: controller-manager - strategy: {} - template: - metadata: - labels: - control-plane: controller-manager - spec: - containers: - - args: - - --enable-leader-election - command: - - /manager - env: - - name: IN_CLUSTER - value: "true" - - name: WATCH_NAMESPACE - valueFrom: - fieldRef: - fieldPath: metadata.annotations['olm.targetNamespaces'] - image: quay.io/project-koku/koku-metrics-operator@sha256:a09b76b020abf2768b67a1680db1228124b0292c7fb957f9b75c749a5d0578b7 - name: manager - resources: - limits: - cpu: 500m - memory: 500Mi - requests: - cpu: 100m - memory: 20Mi - terminationMessagePolicy: FallbackToLogsOnError - volumeMounts: - - mountPath: /tmp/koku-metrics-operator-reports - name: koku-metrics-operator-reports - serviceAccountName: koku-metrics-manager-role - terminationGracePeriodSeconds: 10 - volumes: - - name: koku-metrics-operator-reports - permissions: - - rules: - - apiGroups: - - "" - resources: - - configmaps - verbs: - - get - - list - - watch - - create - - update - - patch - - delete - - apiGroups: - - "" - resources: - - configmaps/status - verbs: - - get - - update - - patch - - apiGroups: - - "" - resources: - - events - verbs: - - create - - patch - - apiGroups: - - apps - resources: - - deployments - verbs: - - get - - list - - patch - - watch - - apiGroups: - - "" - resources: - - configmaps - - endpoints - - events - - persistentvolumeclaims - - pods - - secrets - - serviceaccounts - - services - - services/finalizers - verbs: - - create - - delete - - get - - list - - patch - - update - - watch - - apiGroups: - - koku-metrics-cfg.openshift.io - resources: - - kokumetricsconfigs - verbs: - - create - - delete - - get - - list - - patch - - update - - watch - - apiGroups: - - koku-metrics-cfg.openshift.io - resources: - - kokumetricsconfigs/status - verbs: - - get - - patch - - update - - apiGroups: - - operators.coreos.com - resources: - - clusterserviceversions - verbs: - - get - - list - - patch - - update - - watch - serviceAccountName: koku-metrics-manager-role - strategy: deployment - installModes: - - supported: true - type: OwnNamespace - - supported: true - type: SingleNamespace - - supported: false - type: MultiNamespace - - supported: false - type: AllNamespaces - relatedImages: - - name: koku-metrics-operator - image: quay.io/project-koku/koku-metrics-operator@sha256:a09b76b020abf2768b67a1680db1228124b0292c7fb957f9b75c749a5d0578b7 - keywords: - - cost - - management - - usage - - monitor - maintainers: - - email: costmanagement@redhat.com - name: costmanagement - maturity: alpha - provider: - name: Red Hat - replaces: koku-metrics-operator.v0.9.3 - version: 0.9.4 diff --git a/koku-metrics-operator/0.9.4/metadata/annotations.yaml b/koku-metrics-operator/0.9.4/metadata/annotations.yaml deleted file mode 100644 index def7841d8..000000000 --- a/koku-metrics-operator/0.9.4/metadata/annotations.yaml +++ /dev/null @@ -1,10 +0,0 @@ -annotations: - operators.operatorframework.io.bundle.channel.default.v1: alpha - operators.operatorframework.io.bundle.channels.v1: alpha,beta - operators.operatorframework.io.bundle.manifests.v1: manifests/ - operators.operatorframework.io.bundle.mediatype.v1: registry+v1 - operators.operatorframework.io.bundle.metadata.v1: metadata/ - operators.operatorframework.io.bundle.package.v1: koku-metrics-operator - operators.operatorframework.io.metrics.builder: operator-sdk-v0.19.4 - operators.operatorframework.io.metrics.mediatype.v1: metrics+v1 - operators.operatorframework.io.metrics.project_layout: go.kubebuilder.io/v2 diff --git a/koku-metrics-operator/0.9.5/Dockerfile b/koku-metrics-operator/0.9.5/Dockerfile deleted file mode 100644 index baca1a624..000000000 --- a/koku-metrics-operator/0.9.5/Dockerfile +++ /dev/null @@ -1,14 +0,0 @@ -FROM scratch - -LABEL operators.operatorframework.io.bundle.mediatype.v1=registry+v1 -LABEL operators.operatorframework.io.bundle.manifests.v1=manifests/ -LABEL operators.operatorframework.io.bundle.metadata.v1=metadata/ -LABEL operators.operatorframework.io.bundle.package.v1=koku-metrics-operator -LABEL operators.operatorframework.io.bundle.channels.v1=alpha,beta -LABEL operators.operatorframework.io.bundle.channel.default.v1=beta -LABEL operators.operatorframework.io.metrics.mediatype.v1=metrics+v1 -LABEL operators.operatorframework.io.metrics.builder=operator-sdk-v0.19.4 -LABEL operators.operatorframework.io.metrics.project_layout=go.kubebuilder.io/v2 - -COPY manifests /manifests/ -COPY metadata /metadata/ diff --git a/koku-metrics-operator/0.9.5/manifests/koku-metrics-cfg.openshift.io_kokumetricsconfigs.yaml b/koku-metrics-operator/0.9.5/manifests/koku-metrics-cfg.openshift.io_kokumetricsconfigs.yaml deleted file mode 100644 index 09b25deb1..000000000 --- a/koku-metrics-operator/0.9.5/manifests/koku-metrics-cfg.openshift.io_kokumetricsconfigs.yaml +++ /dev/null @@ -1,804 +0,0 @@ -apiVersion: apiextensions.k8s.io/v1 -kind: CustomResourceDefinition -metadata: - annotations: - controller-gen.kubebuilder.io/version: v0.3.0 - creationTimestamp: null - name: kokumetricsconfigs.koku-metrics-cfg.openshift.io -spec: - group: koku-metrics-cfg.openshift.io - names: - kind: KokuMetricsConfig - listKind: KokuMetricsConfigList - plural: kokumetricsconfigs - singular: kokumetricsconfig - scope: Namespaced - versions: - - name: v1beta1 - schema: - openAPIV3Schema: - description: KokuMetricsConfig is the Schema for the kokumetricsconfig API - properties: - apiVersion: - description: 'APIVersion defines the versioned schema of this representation - of an object. Servers should convert recognized schemas to the latest - internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' - type: string - kind: - description: 'Kind is a string value representing the REST resource this - object represents. Servers may infer this from the endpoint the client - submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' - type: string - metadata: - type: object - spec: - description: KokuMetricsConfigSpec defines the desired state of KokuMetricsConfig. - properties: - api_url: - default: https://cloud.redhat.com - description: FOR DEVELOPMENT ONLY. APIURL is a field of KokuMetricsConfig - to represent the url of the API endpoint for service interaction. - The default is `https://cloud.redhat.com`. - type: string - authentication: - description: Authentication is a field of KokuMetricsConfig to represent - the authentication object. - properties: - secret_name: - description: AuthenticationSecretName is a field of KokuMetricsConfig - to represent the secret with the user and password used for - uploads. - type: string - type: - default: token - description: 'AuthType is a field of KokuMetricsConfig to represent - the authentication type to be used basic or token. Valid values - are: - "basic" : Enables authentication using user and password - from authentication secret. - "token" (default): Uses cluster - token for authentication.' - enum: - - token - - basic - type: string - required: - - type - type: object - clusterID: - description: ClusterID is a field of KokuMetricsConfig to represent - the cluster UUID. Normally this value should not be specified. Only - set this value if the clusterID cannot be obtained from the ClusterVersion. - type: string - packaging: - description: Packaging is a field of KokuMetricsConfig to represent - the packaging object. - properties: - max_reports_to_store: - default: 30 - description: MaxReports is a field of KokuMetricsConfig to represent - the maximum number of reports to store. The default is 30 reports - which corresponds to approximately 7 days worth of data given - the other default values. - format: int64 - minimum: 1 - type: integer - max_size_MB: - default: 100 - description: MaxSize is a field of KokuMetricsConfig to represent - the max file size in megabytes that will be compressed for upload - to Ingress. The default is 100. - format: int64 - maximum: 100 - minimum: 1 - type: integer - required: - - max_reports_to_store - - max_size_MB - type: object - prometheus_config: - description: PrometheusConfig is a field of KokuMetricsConfig to represent - the configuration of Prometheus connection. - properties: - service_address: - default: https://thanos-querier.openshift-monitoring.svc:9091 - description: FOR DEVELOPMENT ONLY. SvcAddress is a field of KokuMetricsConfig - to represent the thanos-querier address. The default is `https://thanos-querier.openshift-monitoring.svc:9091`. - type: string - skip_tls_verification: - default: false - description: FOR DEVELOPMENT ONLY. SkipTLSVerification is a field - of KokuMetricsConfig to represent if the thanos-querier endpoint - must be certificate validated. The default is false. - type: boolean - required: - - service_address - - skip_tls_verification - type: object - source: - description: Source is a field of KokuMetricsConfig to represent the - desired source on cloud.redhat.com. - properties: - check_cycle: - default: 1440 - description: CheckCycle is a field of KokuMetricsConfig to represent - the number of minutes between each source check schedule The - default is 1440 min (24 hours). - format: int64 - minimum: 0 - type: integer - create_source: - default: false - description: CreateSource is a field of KokuMetricsConfigSpec - to represent if the source should be created if not found. - type: boolean - name: - description: SourceName is a field of KokuMetricsConfigSpec to - represent the source name on cloud.redhat.com. - type: string - sources_path: - default: /api/sources/v1.0/ - description: FOR DEVELOPMENT ONLY. SourcesAPIPath is a field of - KokuMetricsConfig to represent the path of the Sources API service. - The default is `/api/sources/v1.0/`. - type: string - required: - - check_cycle - - create_source - - sources_path - type: object - upload: - description: Upload is a field of KokuMetricsConfig to represent the - upload object. - properties: - ingress_path: - default: /api/ingress/v1/upload - description: FOR DEVELOPMENT ONLY. IngressAPIPath is a field of - KokuMetricsConfig to represent the path of the Ingress API service. - The default is `/api/ingress/v1/upload`. - type: string - upload_cycle: - default: 360 - description: UploadCycle is a field of KokuMetricsConfig to represent - the number of minutes between each upload schedule. The default - is 360 min (6 hours). - format: int64 - minimum: 0 - type: integer - upload_toggle: - default: true - description: UploadToggle is a field of KokuMetricsConfig to represent - if the operator is installed in a restricted-network. If `false`, - the operator will not upload to cloud.redhat.com or check/create - sources. The default is true. - type: boolean - upload_wait: - description: UploadWait is a field of KokuMetricsConfig to represent - the time to wait before sending an upload. - format: int64 - minimum: 0 - type: integer - validate_cert: - default: true - description: ValidateCert is a field of KokuMetricsConfig to represent - if the Ingress endpoint must be certificate validated. - type: boolean - required: - - ingress_path - - upload_cycle - - upload_toggle - - validate_cert - type: object - volume_claim_template: - description: VolumeClaimTemplate is a field of KokuMetricsConfig to - represent a PVC template. - properties: - apiVersion: - description: 'APIVersion defines the versioned schema of this - representation of an object. Servers should convert recognized - schemas to the latest internal value, and may reject unrecognized - values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' - type: string - kind: - description: 'Kind is a string value representing the REST resource - this object represents. Servers may infer this from the endpoint - the client submits requests to. Cannot be updated. In CamelCase. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' - type: string - metadata: - description: EmbeddedMetadata contains metadata relevant to an - EmbeddedResource. - properties: - annotations: - additionalProperties: - type: string - description: 'Annotations is an unstructured key value map - stored with a resource that may be set by external tools - to store and retrieve arbitrary metadata. They are not queryable - and should be preserved when modifying objects. More info: - http://kubernetes.io/docs/user-guide/annotations' - type: object - labels: - additionalProperties: - type: string - description: 'Map of string keys and values that can be used - to organize and categorize (scope and select) objects. May - match selectors of replication controllers and services. - More info: http://kubernetes.io/docs/user-guide/labels' - type: object - name: - description: 'Name must be unique within a namespace. Is required - when creating resources, although some resources may allow - a client to request the generation of an appropriate name - automatically. Name is primarily intended for creation idempotence - and configuration definition. Cannot be updated. More info: - http://kubernetes.io/docs/user-guide/identifiers#names' - type: string - type: object - spec: - description: 'Spec defines the desired characteristics of a volume - requested by a pod author. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims' - properties: - accessModes: - description: 'AccessModes contains the desired access modes - the volume should have. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes-1' - items: - type: string - type: array - dataSource: - description: 'This field can be used to specify either: * - An existing VolumeSnapshot object (snapshot.storage.k8s.io/VolumeSnapshot - - Beta) * An existing PVC (PersistentVolumeClaim) * An existing - custom resource/object that implements data population (Alpha) - In order to use VolumeSnapshot object types, the appropriate - feature gate must be enabled (VolumeSnapshotDataSource or - AnyVolumeDataSource) If the provisioner or an external controller - can support the specified data source, it will create a - new volume based on the contents of the specified data source. - If the specified data source is not supported, the volume - will not be created and the failure will be reported as - an event. In the future, we plan to support more data source - types and the behavior of the provisioner may change.' - properties: - apiGroup: - description: APIGroup is the group for the resource being - referenced. If APIGroup is not specified, the specified - Kind must be in the core API group. For any other third-party - types, APIGroup is required. - type: string - kind: - description: Kind is the type of resource being referenced - type: string - name: - description: Name is the name of resource being referenced - type: string - required: - - kind - - name - type: object - resources: - description: 'Resources represents the minimum resources the - volume should have. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources' - properties: - limits: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - description: 'Limits describes the maximum amount of compute - resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/' - type: object - requests: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - description: 'Requests describes the minimum amount of - compute resources required. If Requests is omitted for - a container, it defaults to Limits if that is explicitly - specified, otherwise to an implementation-defined value. - More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/' - type: object - type: object - selector: - description: A label query over volumes to consider for binding. - properties: - matchExpressions: - description: matchExpressions is a list of label selector - requirements. The requirements are ANDed. - items: - description: A label selector requirement is a selector - that contains values, a key, and an operator that - relates the key and values. - properties: - key: - description: key is the label key that the selector - applies to. - type: string - operator: - description: operator represents a key's relationship - to a set of values. Valid operators are In, NotIn, - Exists and DoesNotExist. - type: string - values: - description: values is an array of string values. - If the operator is In or NotIn, the values array - must be non-empty. If the operator is Exists or - DoesNotExist, the values array must be empty. - This array is replaced during a strategic merge - patch. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - description: matchLabels is a map of {key,value} pairs. - A single {key,value} in the matchLabels map is equivalent - to an element of matchExpressions, whose key field is - "key", the operator is "In", and the values array contains - only "value". The requirements are ANDed. - type: object - type: object - storageClassName: - description: 'Name of the StorageClass required by the claim. - More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#class-1' - type: string - volumeMode: - description: volumeMode defines what type of volume is required - by the claim. Value of Filesystem is implied when not included - in claim spec. - type: string - volumeName: - description: VolumeName is the binding reference to the PersistentVolume - backing this claim. - type: string - type: object - type: object - required: - - authentication - - packaging - - prometheus_config - - source - - upload - type: object - status: - description: KokuMetricsConfigStatus defines the observed state of KokuMetricsConfig. - properties: - api_url: - description: APIURL is a field of KokuMetricsConfig to represent the - url of the API endpoint for service interaction. - type: string - authentication: - description: Authentication is a field of KokuMetricsConfig to represent - the authentication status. - properties: - credentials_found: - description: AuthenticationCredentialsFound is a field of KokuMetricsConfig - to represent if used for uploads were found. - type: boolean - error: - description: AuthErrorMessage is a field of KokuMetricsConfig - to represent an `invalid credentials` error message. - type: string - last_credential_verification_time: - description: LastVerificationTime is a field of KokuMetricsConfig - to represent the last time credentials were verified. - format: date-time - nullable: true - type: string - secret_name: - description: AuthenticationSecretName is a field of KokuMetricsConfig - to represent the secret with the user and password used for - uploads. - type: string - type: - description: AuthType is a field of KokuMetricsConfig to represent - the authentication type to be used basic or token. - enum: - - token - - basic - type: string - valid_basic_auth: - description: ValidBasicAuth is a field of KokuMetricsConfig to - represent if the given basic auth credentials are valid. - type: boolean - type: object - clusterID: - description: ClusterID is a field of KokuMetricsConfig to represent - the cluster UUID. - type: string - operator_commit: - description: OperatorCommit is a field of KokuMetricsConfig that shows - the commit hash of the operator. - type: string - packaging: - description: Packaging is a field of KokuMetricsConfig to represent - the packaging status - properties: - error: - description: PackagingError is a field of KokuMetricsConfig to - represent the error encountered packaging the reports. - type: string - last_successful_packaging_time: - description: LastSuccessfulPackagingTime is a field of KokuMetricsConfig - that shows the time of the last successful file packaging. - format: date-time - nullable: true - type: string - max_reports_to_store: - description: MaxReports is a field of KokuMetricsConfig to represent - the maximum number of reports to store. - format: int64 - type: integer - max_size_MB: - description: MaxSize is a field of KokuMetricsConfig to represent - the max file size in megabytes that will be compressed for upload - to Ingress. - format: int64 - type: integer - number_reports_stored: - description: ReportCount is a field of KokuMetricsConfig to represent - the number of reports in storage. - format: int64 - type: integer - packaged_files: - description: PackagedFiles is a field of KokuMetricsConfig to - represent the list of file packages in storage. - items: - type: string - type: array - type: object - persistent_volume_claim: - description: PersistentVolumeClaim is a field of KokuMetricsConfig - to represent a PVC. - properties: - apiVersion: - description: 'APIVersion defines the versioned schema of this - representation of an object. Servers should convert recognized - schemas to the latest internal value, and may reject unrecognized - values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' - type: string - kind: - description: 'Kind is a string value representing the REST resource - this object represents. Servers may infer this from the endpoint - the client submits requests to. Cannot be updated. In CamelCase. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' - type: string - metadata: - description: EmbeddedMetadata contains metadata relevant to an - EmbeddedResource. - properties: - annotations: - additionalProperties: - type: string - description: 'Annotations is an unstructured key value map - stored with a resource that may be set by external tools - to store and retrieve arbitrary metadata. They are not queryable - and should be preserved when modifying objects. More info: - http://kubernetes.io/docs/user-guide/annotations' - type: object - labels: - additionalProperties: - type: string - description: 'Map of string keys and values that can be used - to organize and categorize (scope and select) objects. May - match selectors of replication controllers and services. - More info: http://kubernetes.io/docs/user-guide/labels' - type: object - name: - description: 'Name must be unique within a namespace. Is required - when creating resources, although some resources may allow - a client to request the generation of an appropriate name - automatically. Name is primarily intended for creation idempotence - and configuration definition. Cannot be updated. More info: - http://kubernetes.io/docs/user-guide/identifiers#names' - type: string - type: object - spec: - description: 'Spec defines the desired characteristics of a volume - requested by a pod author. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims' - properties: - accessModes: - description: 'AccessModes contains the desired access modes - the volume should have. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes-1' - items: - type: string - type: array - dataSource: - description: 'This field can be used to specify either: * - An existing VolumeSnapshot object (snapshot.storage.k8s.io/VolumeSnapshot - - Beta) * An existing PVC (PersistentVolumeClaim) * An existing - custom resource/object that implements data population (Alpha) - In order to use VolumeSnapshot object types, the appropriate - feature gate must be enabled (VolumeSnapshotDataSource or - AnyVolumeDataSource) If the provisioner or an external controller - can support the specified data source, it will create a - new volume based on the contents of the specified data source. - If the specified data source is not supported, the volume - will not be created and the failure will be reported as - an event. In the future, we plan to support more data source - types and the behavior of the provisioner may change.' - properties: - apiGroup: - description: APIGroup is the group for the resource being - referenced. If APIGroup is not specified, the specified - Kind must be in the core API group. For any other third-party - types, APIGroup is required. - type: string - kind: - description: Kind is the type of resource being referenced - type: string - name: - description: Name is the name of resource being referenced - type: string - required: - - kind - - name - type: object - resources: - description: 'Resources represents the minimum resources the - volume should have. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources' - properties: - limits: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - description: 'Limits describes the maximum amount of compute - resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/' - type: object - requests: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - description: 'Requests describes the minimum amount of - compute resources required. If Requests is omitted for - a container, it defaults to Limits if that is explicitly - specified, otherwise to an implementation-defined value. - More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/' - type: object - type: object - selector: - description: A label query over volumes to consider for binding. - properties: - matchExpressions: - description: matchExpressions is a list of label selector - requirements. The requirements are ANDed. - items: - description: A label selector requirement is a selector - that contains values, a key, and an operator that - relates the key and values. - properties: - key: - description: key is the label key that the selector - applies to. - type: string - operator: - description: operator represents a key's relationship - to a set of values. Valid operators are In, NotIn, - Exists and DoesNotExist. - type: string - values: - description: values is an array of string values. - If the operator is In or NotIn, the values array - must be non-empty. If the operator is Exists or - DoesNotExist, the values array must be empty. - This array is replaced during a strategic merge - patch. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - description: matchLabels is a map of {key,value} pairs. - A single {key,value} in the matchLabels map is equivalent - to an element of matchExpressions, whose key field is - "key", the operator is "In", and the values array contains - only "value". The requirements are ANDed. - type: object - type: object - storageClassName: - description: 'Name of the StorageClass required by the claim. - More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#class-1' - type: string - volumeMode: - description: volumeMode defines what type of volume is required - by the claim. Value of Filesystem is implied when not included - in claim spec. - type: string - volumeName: - description: VolumeName is the binding reference to the PersistentVolume - backing this claim. - type: string - type: object - type: object - prometheus: - description: Prometheus represents the status of premetheus queries. - properties: - configuration_error: - description: ConfigError is a field of KokuMetricsConfigStatus - to represent errors during prometheus configuration. - type: string - last_query_start_time: - description: LastQueryStartTime is a field of KokuMetricsConfigStatus - to represent the last time queries were started. - format: date-time - nullable: true - type: string - last_query_success_time: - description: LastQuerySuccessTime is a field of KokuMetricsConfigStatus - to represent the last time queries were successful. - format: date-time - nullable: true - type: string - prometheus_configured: - description: PrometheusConfigured is a field of KokuMetricsConfigStatus - to represent if the operator is configured to connect to prometheus. - type: boolean - prometheus_connected: - description: PrometheusConnected is a field of KokuMetricsConfigStatus - to represent if prometheus can be queried. - type: boolean - prometheus_connection_error: - description: ConnectionError is a field of KokuMetricsConfigStatus - to represent errors during prometheus test query. - type: string - service_address: - description: SvcAddress is the internal thanos-querier address. - type: string - skip_tls_verification: - description: SkipTLSVerification is a field of KokuMetricsConfigStatus - to represent if the thanos-querier endpoint must be certificate - validated. - type: boolean - required: - - prometheus_configured - - prometheus_connected - type: object - reports: - description: Reports represents the status of report generation. - properties: - data_collected: - description: DataCollected is a field of KokuMetricsConfigStatus - to represent whether or not data was collected for the last - query. - type: boolean - data_collection_message: - description: DataCollectionMessage is a field of KokuMetricsConfigStatus - to represent a message associated with the data_collected status. - type: string - last_hour_queried: - description: LastHourQueried is a field of KokuMetricsConfigStatus - to represent the time range for which metrics were last queried. - type: string - report_month: - description: ReportMonth is a field of KokuMetricsConfigStatus - to represent the month for which reports are being generated. - type: string - type: object - source: - description: Source is a field of KokuMetricsConfig to represent the - observed state of the source on cloud.redhat.com. - properties: - check_cycle: - description: CheckCycle is a field of KokuMetricsConfig to represent - the number of minutes between each source check schedule. The - default is 1440 min (24 hours). - format: int64 - type: integer - create_source: - description: CreateSource is a field of KokuMetricsConfigStatus - to represent if the source should be created if not found. A - source will not be created if upload_toggle is `false`. - type: boolean - error: - description: SourceError is a field of KokuMetricsConfigStatus - to represent the error encountered creating the source. - type: string - last_check_time: - description: LastSourceCheckTime is a field of KokuMetricsConfig - that shows the time that the last check was attempted. - format: date-time - nullable: true - type: string - name: - description: SourceName is a field of KokuMetricsConfigStatus - to represent the source name on cloud.redhat.com. - type: string - source_defined: - description: SourceDefined is a field of KokuMetricsConfigStatus - to represent if the source exists as defined on cloud.redhat.com. - type: boolean - sources_path: - description: SourcesAPIPath is a field of KokuMetricsConfig to - represent the path of the Sources API service. - type: string - type: object - storage: - description: Storage is a field - properties: - volume_mounted: - description: VolumeMounted is a bool to indicate if storage volume - was mounted. - type: boolean - volume_type: - description: VolumeType is the string representation of the volume - type. - type: string - type: object - upload: - description: Upload is a field of KokuMetricsConfig to represent the - upload object. - properties: - error: - description: UploadError is a field of KokuMetricsConfigStatus - to represent the error encountered uploading reports. - type: string - ingress_path: - description: IngressAPIPath is a field of KokuMetricsConfig to - represent the path of the Ingress API service. - type: string - last_successful_upload_time: - description: LastSuccessfulUploadTime is a field of KokuMetricsConfig - that shows the time of the last successful upload. - format: date-time - nullable: true - type: string - last_upload_status: - description: LastUploadStatus is a field of KokuMetricsConfig - that shows the http status of the last upload. - type: string - upload: - description: UploadToggle is a field of KokuMetricsConfig to represent - if the operator should upload to cloud.redhat.com. The default - is true - type: boolean - upload_cycle: - description: UploadCycle is a field of KokuMetricsConfig to represent - the number of minutes between each upload schedule. The default - is 360 min (6 hours). - format: int64 - type: integer - upload_wait: - description: UploadWait is a field of KokuMetricsConfig to represent - the time to wait before sending an upload. - format: int64 - type: integer - validate_cert: - description: ValidateCert is a field of KokuMetricsConfig to represent - if the Ingress endpoint must be certificate validated. - type: boolean - type: object - type: object - required: - - spec - type: object - served: true - storage: true - subresources: - status: {} -status: - acceptedNames: - kind: "" - plural: "" - conditions: [] - storedVersions: [] diff --git a/koku-metrics-operator/0.9.5/manifests/koku-metrics-operator.clusterserviceversion.yaml b/koku-metrics-operator/0.9.5/manifests/koku-metrics-operator.clusterserviceversion.yaml deleted file mode 100644 index a63c7484a..000000000 --- a/koku-metrics-operator/0.9.5/manifests/koku-metrics-operator.clusterserviceversion.yaml +++ /dev/null @@ -1,455 +0,0 @@ -apiVersion: operators.coreos.com/v1alpha1 -kind: ClusterServiceVersion -metadata: - annotations: - alm-examples: |- - [ - { - "apiVersion": "koku-metrics-cfg.openshift.io/v1beta1", - "kind": "KokuMetricsConfig", - "metadata": { - "name": "kokumetricscfg-sample-v1beta1" - }, - "spec": { - "authentication": { - "type": "token" - }, - "packaging": { - "max_reports_to_store": 30, - "max_size_MB": 100 - }, - "prometheus_config": {}, - "source": { - "check_cycle": 1440, - "create_source": false, - "name": "INSERT-SOURCE-NAME" - }, - "upload": { - "upload_cycle": 360, - "upload_toggle": true - } - } - } - ] - capabilities: Seamless Upgrades - categories: Monitoring - certified: "false" - containerImage: quay.io/project-koku/koku-metrics-operator@sha256:6aba05ac027d1a49a36f99f161515d361703ac1b0466e31bb34bc7c3cc269550 - createdAt: "2021-03-17T19:09:49Z" - description: A Golang-based OpenShift Operator that generates and uploads OpenShift - usage metrics to cost management. - operatorframework.io/suggested-namespace: koku-metrics-operator - operators.openshift.io/infrastructure-features: '["Disconnected"]' - operators.operatorframework.io/builder: operator-sdk-v0.19.4 - operators.operatorframework.io/project_layout: go.kubebuilder.io/v2 - repository: https://github.com/project-koku/koku-metrics-operator - support: Cost Management - name: koku-metrics-operator.v0.9.5 - namespace: placeholder -spec: - apiservicedefinitions: {} - customresourcedefinitions: - owned: - - description: KokuMetricsConfig is the Schema for the kokumetricsconfig API - kind: KokuMetricsConfig - name: kokumetricsconfigs.koku-metrics-cfg.openshift.io - version: v1beta1 - description: |- - # v0.9.5 Koku Metrics Operator - ## Introduction - The `koku-metrics-operator` is a component of the [cost managment](https://access.redhat.com/documentation/en-us/openshift_container_platform/4.5/html/getting_started_with_cost_management/assembly_introduction_cost_management) service for Openshift, used to gather the required information from the cluster. It is recommended to be installed in OpenShift 4.5+. This operator obtains OpenShift usage data by querying Prometheus and uploads it to cost management to be processed. The Operator queries Prometheus every hour to create metric reports, which are then packaged and uploaded to cost management at [cloud.redhat.com](https://cloud.redhat.com). For more information, reach out to . - - This operator is capable of functioning within a disconnected/restricted network (aka air-gapped mode). In this mode, the operator will store the packaged reports for manual retrieval instead of being uploaded to cost management. Documentation for installing an operator within a restricted network can be found [here](https://docs.openshift.com/container-platform/4.5/operators/admin/olm-restricted-networks.html). - - For more information, reach out to . - ## Features and Capabilities - #### Metrics collection: - The Koku Metrics Operator (`koku-metrics-operator`) collects the metrics required for cost management by: - * Querying Prometheus to gather the necessary metrics for cost management. - * Writing Prometheus queries to CSV report files. - * Packaging the CSV report files into tarballs. - - #### Additional Capabilities: - * The operator can be configured to automatically upload the packaged reports to cost management through Red Hat Insights Ingress service. - * The operator can create a source in cloud.redhat.com. A source is required for cost management to process the uploaded packages. - * PersistentVolumeClaim (PVC) configuration: The KokuMetricsConfig CR can accept a PVC definition and the operator will create and mount the PVC. If one is not provided, a default PVC will be created. - * Restricted network installation: this operator can function on a restricted network. In this mode, the operator stores the packaged reports for manual retrieval. - - ## Limitations and Pre-Requisites - #### Limitations (Potential for metrics data loss) - * A source **must** exist in cloud.redhat.com for an uploaded payload to be processed by cost management. The operator sends the payload to the Red Hat Insights Ingress service which usually returns successfully, but the operator does not currently confirm with cost management that the payload was processed. After Ingress accepts the uploaded payload, the payload is removed from the operator and is gone forever. If the data within the payload is not processed, a gap will be introduced in the usage metrics. - - **Note** The following limitations are specific to operators configured to run in a restricted network: - * The `koku-metrics-operator` will not be able to generate new reports if the PVC storage is filled. If this occurs, the reports must be manually deleted from the PVC so that the operator can function as normal. - * The default report retention is 30 reports (about one week's worth of data). The reports must be manually downloaded and uploaded to cloud.redhat.com every week, or they will be deleted and the data will be lost. - - #### Storage configuration prerequisite - The operator will attempt to create and use the following PVC when installed: - - volume_claim_template: - apiVersion: v1 - kind: PersistentVolumeClaim - metadata: - name: koku-metrics-operator-data - spec: - accessModes: - - ReadWriteOnce - resources: - requests: - storage: 10Gi - - If a different PVC should be utilized, a valid PVC should be specified in the KokuMetricsConfig CR as described in the appropriate section below. The PVC to be used may exist already, or the operator will attempt to create it. - - To use the default specification, the follow assumptions must be met: - 1. A default StorageClass is defined. - 2. Dynamic provisioning for that default StorageClass is enabled. - - If these assumptions are not met, the operator will not deploy correctly. In these cases, storage must be manually configured. After configuring storage, a valid PVC template should be supplied in the `volume_claim_template` spec of the KokuMetricsConfig CR. - - ## Configure the koku-metrics-operator - **Note** There are separate instructions for configuring the `koku-metrics-operator` to run in a restricted network. - ##### Configure authentication - The default authentication for the operator is `token`. No further steps are required to configure token authentication. If `basic` is the preferred authentication method, a Secret must be created which holds username and password credentials: - 1. On the left navigation pane, select `Workloads` -> `Secrets` -> select Project: `koku-metrics-operator` -> `Create` -> `Key/Value Secret` - 2. Give the Secret a name and add 2 keys: `username` and `password` (all lowercase). The values for these keys correspond to cloud.redhat.com credentials. - 3. Select `Create`. - ##### Create the KokuMetricsConfig - Configure the koku-metrics-operator by creating a `KokuMetricsConfig`. - 1. On the left navigation pane, select `Operators` -> `Installed Operators` -> `koku-metrics-operator` -> `KokuMetricsConfig` -> `Create Instance`. - 2. For `basic` authentication, edit the following values in the spec: - * Replace `authentication: type:` with `basic`. - * Add the `secret_name` field under `authentication`, and set it equal to the name of the authentication Secret that was created above. The spec should look similar to the following: - - ``` - authentication: - secret_name: SECRET-NAME - type: basic - ``` - - 3. To configure the koku-metrics-operator to create a cost management source, edit the following values in the `source` field: - * Replace `INSERT-SOURCE-NAME` with the preferred name of the source to be created. - * Replace the `create_source` field value with `true`. - - **Note:** if the source already exists, replace `INSERT-SOURCE-NAME` with the existing name, and leave `create_source` as false. This will allow the operator to confirm the source exists. - 4. If not specified, the operator will create a default PersistentVolumeClaim called `koku-metrics-operator-data` with 10Gi of storage. To configure the koku-metrics-operator to use or create a different PVC, edit the following in the spec: - * Add the desired configuration to the `volume_claim_template` field in the spec: - - ``` - volume_claim_template: - apiVersion: v1 - kind: PersistentVolumeClaim - metadata: - name: - spec: - accessModes: - - ReadWriteOnce - resources: - requests: - storage: 10Gi - ``` - - **Note:** If using the YAML View, the `volume_claim_template` field must be added to the spec - 5. Select `Create`. - - # Restricted Network Usage (disconnected/air-gapped mode) - ## Installation - To install the `koku-metrics-operator` in a restricted network, follow the [olm documentation](https://docs.openshift.com/container-platform/4.5/operators/admin/olm-restricted-networks.html). The operator is found in the `community-operators` Catalog in the `registry.redhat.io/redhat/community-operator-index:latest` Index. If pruning the index before pushing to the mirrored registry, keep the `koku-metrics-operator` package. - - Within a restricted network, the operator queries prometheus to gather the necessary usage metrics, writes the query results to CSV files, and packages the reports for storage in the PVC. These reports then need to be manually downloaded from the cluster and uploaded to [cloud.redhat.com](https://cloud.redhat.com). - - For more information, reach out to . - ## Configure the koku-metrics-operator for a restricted network - ##### Create the KokuMetricsConfig - Configure the koku-metrics-operator by creating a `KokuMetricsConfig`. - 1. On the left navigation pane, select `Operators` -> `Installed Operators` -> `koku-metrics-operator` -> `KokuMetricsConfig` -> `Create Instance`. - 2. Specify the desired storage. If not specified, the operator will create a default Persistent Volume Claim called `koku-metrics-operator-data` with 10Gi of storage. To configure the koku-metrics-operator to use or create a different PVC, edit the following in the spec: - * Add the desired configuration to the `volume_claim_template` field in the spec: - - ``` - volume_claim_template: - apiVersion: v1 - kind: PersistentVolumeClaim - metadata: - name: - spec: - storageClassName: - accessModes: - - ReadWriteOnce - resources: - requests: - storage: 10Gi - ``` - - **Note:** If using the YAML View, the `volume_claim_template` field must be added to the spec - 3. (Optional) Specify the desired report retention. The operator will retain 30 reports by default. This corresponds to approximately one week's worth of data if using the default packaging cycle. To modify the number of retained reports: - * Change the `packaging` spec field `max_reports_to_store` to the desired number of reports to retain. Once this max number is reached, the operator will start removing the oldest packages remaining on the PVC: - - ``` - packaging: - max_size_MB: 100 - max_reports_to_store: 30 - ``` - - **Note:** The number of retained reports directly affects the frequency that reports must be manually downloaded from the PVC. Take caution in setting this to a higher number of reports, as the operator cannot write data to the PVC if the storage is full. - 4. To configure the operator to perform in a restricted network, set the `upload_toggle` to `false`: - - ``` - upload: - upload_cycle: 360, - upload_toggle: false - ``` - - 5. Select `Create`. - - ## Download reports from the Operator & clean up the PVC - If the `koku-metrics-operator` is configured to run in a restricted network, the metric reports will not automatically upload to cost managment. Instead, they need to be manually copied from the PVC for upload to [cloud.redhat.com](https://cloud.redhat.com). The default configuration saves one week of reports which means the process of downloading and uploading reports should be repeated weekly to prevent loss of metrics data. To download the reports, complete the following steps: - 1. Create the following Pod, ensuring the `claimName` matches the PVC containing the report data: - - ``` - kind: Pod - apiVersion: v1 - metadata: - name: volume-shell - namespace: koku-metrics-operator - spec: - volumes: - - name: koku-metrics-operator-reports - persistentVolumeClaim: - claimName: koku-metrics-operator-data - containers: - - name: volume-shell - image: busybox - command: ['sleep', '3600'] - volumeMounts: - - name: koku-metrics-operator-reports - mountPath: /tmp/koku-metrics-operator-reports - ``` - - 2. Use rsync to copy all of the files ready for upload from the PVC to a local folder: - - ``` - $ oc rsync volume-shell:/tmp/koku-metrics-operator-reports/upload local/path/to/save/folder - ``` - - 3. Once confirming that the files have been successfully copied, use rsh to connect to the pod and delete the contents of the upload folder so that they are no longer in storage: - - ``` - $ oc rsh volume-shell - $ rm /tmp/koku-metrics-operator-reports/upload/* - ``` - - 4. (Optional) Delete the pod that was used to connect to the PVC: - - ``` - $ oc delete -f volume-shell.yaml - ``` - - ## Create a source - In a restricted network, the `koku-metrics-operator` cannot automatically create a source. This process must be done manually. In the cloud.redhat.com platform, open the [Sources menu](https://cloud.redhat.com/settings/sources/) to begin adding an OpenShift source to cost management: - - 1. Navigate to the Sources menu - 2. Select the `Red Hat sources` tab - 3. Click `Add source` to open the Sources wizard. - 4. Enter a name for the source and click `Next`. - 5. Select `Red Hat Openshift Container Platform` as the source type and Cost Management as the application. Click `Next`. - 6. Enter the cluster identifier into the cloud.redhat.com Sources wizard, and click `Next`. - - **Note:** The cluster identifier can be found in the KokuMetricsConfig CR, the cluster Overview page, or the cluster Help > About. - - 7. In the cloud.redhat.com Sources wizard, review the details and click `Finish` to create the Source. - - ## Upload the reports to cost managment - Uploading reports to cost managment is done through curl: - - $ curl -vvvv -F "file=@FILE_NAME.tar.gz;type=application/vnd.redhat.hccm.tar+tgz" https://cloud.redhat.com/api/ingress/v1/upload -u USERNAME:PASS - - where `USERNAME` and `PASS` correspond to the user credentials for [cloud.redhat.com](https://cloud.redhat.com), and `FILE_NAME` is the name of the report to upload. - - displayName: Koku Metrics Operator - icon: - - base64data: PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4KPCEtLSBHZW5lcmF0b3I6IEFkb2JlIElsbHVzdHJhdG9yIDIyLjEuMCwgU1ZHIEV4cG9ydCBQbHVnLUluIC4gU1ZHIFZlcnNpb246IDYuMDAgQnVpbGQgMCkgIC0tPgo8c3ZnIHZlcnNpb249IjEuMSIgaWQ9IkxheWVyXzEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4IgoJIHZpZXdCb3g9IjAgMCAzMDAgMzAwIiBzdHlsZT0iZW5hYmxlLWJhY2tncm91bmQ6bmV3IDAgMCAzMDAgMzAwOyIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSI+CjxzdHlsZSB0eXBlPSJ0ZXh0L2NzcyI+Cgkuc3Qwe2ZpbGw6I0VFMDAwMDt9Cjwvc3R5bGU+Cjx0aXRsZT5Db3N0LWljb248L3RpdGxlPgo8ZGVzYz5DcmVhdGVkIHdpdGggU2tldGNoLjwvZGVzYz4KPGc+Cgk8Zz4KCQk8cGF0aCBjbGFzcz0ic3QwIiBkPSJNMjM5LjAzNzAzMzEsMTE3LjI3NTE3N2MtMy4yNjU4MDgxLTQxLjk4OTA1MTgtMzguMjU2NjgzMy03NC42NDcyMDE1LTgxLjE3ODgzMy03NC42NDcyMDE1CgkJCWMtMjcuNTI2MTUzNiwwLTUzLjE4NjEyNjcsMTMuOTk2MzQ5My02OC4xMTU1NzAxLDM3LjMyMzYwMDhjLTEuODY2MTgwNCwwLTMuNzMyMzUz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TkyOTYzLDAuMDc4MzIzNC0wLjgyMDE1OTksMC0xLjIwMjU5MDktMC4yMjU3NjkKCQkJYy0xLjE0MjcxNTUtMC44NDMyMDA3LTIuNDQyMDc3Ni0xLjI2MjQ5NjktMy44OTgwODY1LTEuMjYyNDk2OWgtNy42NzYzNjExYy0wLjkxNjkxNTksMC0xLjcwMDIyNTgsMC4zMjI1MjUtMi4zNDk4OTkzLDAuOTcyMjEzNwoJCQljLTAuNjQ5Njg4NywwLjY0OTY3MzUtMC45NzY4MjE5LDEuNDc0NDQxNS0wLjk3NjgyMTksMi40NjUwODc5YzAsMC42ODY1NTQsMC4yMzAzOTI1LDEuMzM2MjEyMiwwLjY5MTE0NjksMS45NDkwMzU2CgkJCWMwLjQ1NjE2MTUsMC42MTI4MjM1LDEuMDMyMTE5OCwxLjAzMjExOTgsMS43MTg2NTg0LDEuMjYyNDk2OUwxNzQuMjgwNjM5NiwxODUuODczNjExNXoiLz4KCTwvZz4KPC9nPgo8L3N2Zz4K - mediatype: image/svg+xml - install: - spec: - clusterPermissions: - - rules: - - apiGroups: - - config.openshift.io - resources: - - clusterversions - verbs: - - get - - list - - watch - - apiGroups: - - "" - resources: - - namespaces - verbs: - - get - - list - - watch - - apiGroups: - - "" - resources: - - secrets - verbs: - - get - serviceAccountName: koku-metrics-manager-role - deployments: - - name: koku-metrics-controller-manager - spec: - replicas: 1 - selector: - matchLabels: - control-plane: controller-manager - strategy: {} - template: - metadata: - labels: - control-plane: controller-manager - spec: - containers: - - args: - - --enable-leader-election - command: - - /manager - env: - - name: IN_CLUSTER - value: "true" - - name: WATCH_NAMESPACE - valueFrom: - fieldRef: - fieldPath: metadata.annotations['olm.targetNamespaces'] - image: quay.io/project-koku/koku-metrics-operator@sha256:6aba05ac027d1a49a36f99f161515d361703ac1b0466e31bb34bc7c3cc269550 - name: manager - resources: - limits: - cpu: 500m - memory: 500Mi - requests: - cpu: 100m - memory: 20Mi - terminationMessagePolicy: FallbackToLogsOnError - volumeMounts: - - mountPath: /tmp/koku-metrics-operator-reports - name: koku-metrics-operator-reports - serviceAccountName: koku-metrics-manager-role - terminationGracePeriodSeconds: 10 - volumes: - - name: koku-metrics-operator-reports - permissions: - - rules: - - apiGroups: - - "" - resources: - - configmaps - verbs: - - get - - list - - watch - - create - - update - - patch - - delete - - apiGroups: - - "" - resources: - - configmaps/status - verbs: - - get - - update - - patch - - apiGroups: - - "" - resources: - - events - verbs: - - create - - patch - - apiGroups: - - apps - resources: - - deployments - verbs: - - get - - list - - patch - - watch - - apiGroups: - - "" - resources: - - configmaps - - endpoints - - events - - persistentvolumeclaims - - pods - - secrets - - serviceaccounts - - services - - services/finalizers - verbs: - - create - - delete - - get - - list - - patch - - update - - watch - - apiGroups: - - koku-metrics-cfg.openshift.io - resources: - - kokumetricsconfigs - verbs: - - create - - delete - - get - - list - - patch - - update - - watch - - apiGroups: - - koku-metrics-cfg.openshift.io - resources: - - kokumetricsconfigs/status - verbs: - - get - - patch - - update - - apiGroups: - - operators.coreos.com - resources: - - clusterserviceversions - verbs: - - get - - list - - patch - - update - - watch - serviceAccountName: koku-metrics-manager-role - strategy: deployment - installModes: - - supported: true - type: OwnNamespace - - supported: true - type: SingleNamespace - - supported: false - type: MultiNamespace - - supported: false - type: AllNamespaces - relatedImages: - - name: koku-metrics-operator - image: quay.io/project-koku/koku-metrics-operator@sha256:6aba05ac027d1a49a36f99f161515d361703ac1b0466e31bb34bc7c3cc269550 - keywords: - - cost - - management - - usage - - monitor - maintainers: - - email: costmanagement@redhat.com - name: costmanagement - maturity: alpha - provider: - name: Red Hat - replaces: koku-metrics-operator.v0.9.4 - version: 0.9.5 diff --git a/koku-metrics-operator/0.9.5/metadata/annotations.yaml b/koku-metrics-operator/0.9.5/metadata/annotations.yaml deleted file mode 100644 index 1df004507..000000000 --- a/koku-metrics-operator/0.9.5/metadata/annotations.yaml +++ /dev/null @@ -1,10 +0,0 @@ -annotations: - operators.operatorframework.io.bundle.channel.default.v1: beta - operators.operatorframework.io.bundle.channels.v1: alpha,beta - operators.operatorframework.io.bundle.manifests.v1: manifests/ - operators.operatorframework.io.bundle.mediatype.v1: registry+v1 - operators.operatorframework.io.bundle.metadata.v1: metadata/ - operators.operatorframework.io.bundle.package.v1: koku-metrics-operator - operators.operatorframework.io.metrics.builder: operator-sdk-v0.19.4 - operators.operatorframework.io.metrics.mediatype.v1: metrics+v1 - operators.operatorframework.io.metrics.project_layout: go.kubebuilder.io/v2 diff --git a/koku-metrics-operator/0.9.6/Dockerfile b/koku-metrics-operator/0.9.6/Dockerfile deleted file mode 100644 index baca1a624..000000000 --- a/koku-metrics-operator/0.9.6/Dockerfile +++ /dev/null @@ -1,14 +0,0 @@ -FROM scratch - -LABEL operators.operatorframework.io.bundle.mediatype.v1=registry+v1 -LABEL operators.operatorframework.io.bundle.manifests.v1=manifests/ -LABEL operators.operatorframework.io.bundle.metadata.v1=metadata/ -LABEL operators.operatorframework.io.bundle.package.v1=koku-metrics-operator -LABEL operators.operatorframework.io.bundle.channels.v1=alpha,beta -LABEL operators.operatorframework.io.bundle.channel.default.v1=beta -LABEL operators.operatorframework.io.metrics.mediatype.v1=metrics+v1 -LABEL operators.operatorframework.io.metrics.builder=operator-sdk-v0.19.4 -LABEL operators.operatorframework.io.metrics.project_layout=go.kubebuilder.io/v2 - -COPY manifests /manifests/ -COPY metadata /metadata/ diff --git a/koku-metrics-operator/0.9.6/manifests/koku-metrics-cfg.openshift.io_kokumetricsconfigs.yaml b/koku-metrics-operator/0.9.6/manifests/koku-metrics-cfg.openshift.io_kokumetricsconfigs.yaml deleted file mode 100644 index 09b25deb1..000000000 --- a/koku-metrics-operator/0.9.6/manifests/koku-metrics-cfg.openshift.io_kokumetricsconfigs.yaml +++ /dev/null @@ -1,804 +0,0 @@ -apiVersion: apiextensions.k8s.io/v1 -kind: CustomResourceDefinition -metadata: - annotations: - controller-gen.kubebuilder.io/version: v0.3.0 - creationTimestamp: null - name: kokumetricsconfigs.koku-metrics-cfg.openshift.io -spec: - group: koku-metrics-cfg.openshift.io - names: - kind: KokuMetricsConfig - listKind: KokuMetricsConfigList - plural: kokumetricsconfigs - singular: kokumetricsconfig - scope: Namespaced - versions: - - name: v1beta1 - schema: - openAPIV3Schema: - description: KokuMetricsConfig is the Schema for the kokumetricsconfig API - properties: - apiVersion: - description: 'APIVersion defines the versioned schema of this representation - of an object. Servers should convert recognized schemas to the latest - internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' - type: string - kind: - description: 'Kind is a string value representing the REST resource this - object represents. Servers may infer this from the endpoint the client - submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' - type: string - metadata: - type: object - spec: - description: KokuMetricsConfigSpec defines the desired state of KokuMetricsConfig. - properties: - api_url: - default: https://cloud.redhat.com - description: FOR DEVELOPMENT ONLY. APIURL is a field of KokuMetricsConfig - to represent the url of the API endpoint for service interaction. - The default is `https://cloud.redhat.com`. - type: string - authentication: - description: Authentication is a field of KokuMetricsConfig to represent - the authentication object. - properties: - secret_name: - description: AuthenticationSecretName is a field of KokuMetricsConfig - to represent the secret with the user and password used for - uploads. - type: string - type: - default: token - description: 'AuthType is a field of KokuMetricsConfig to represent - the authentication type to be used basic or token. Valid values - are: - "basic" : Enables authentication using user and password - from authentication secret. - "token" (default): Uses cluster - token for authentication.' - enum: - - token - - basic - type: string - required: - - type - type: object - clusterID: - description: ClusterID is a field of KokuMetricsConfig to represent - the cluster UUID. Normally this value should not be specified. Only - set this value if the clusterID cannot be obtained from the ClusterVersion. - type: string - packaging: - description: Packaging is a field of KokuMetricsConfig to represent - the packaging object. - properties: - max_reports_to_store: - default: 30 - description: MaxReports is a field of KokuMetricsConfig to represent - the maximum number of reports to store. The default is 30 reports - which corresponds to approximately 7 days worth of data given - the other default values. - format: int64 - minimum: 1 - type: integer - max_size_MB: - default: 100 - description: MaxSize is a field of KokuMetricsConfig to represent - the max file size in megabytes that will be compressed for upload - to Ingress. The default is 100. - format: int64 - maximum: 100 - minimum: 1 - type: integer - required: - - max_reports_to_store - - max_size_MB - type: object - prometheus_config: - description: PrometheusConfig is a field of KokuMetricsConfig to represent - the configuration of Prometheus connection. - properties: - service_address: - default: https://thanos-querier.openshift-monitoring.svc:9091 - description: FOR DEVELOPMENT ONLY. SvcAddress is a field of KokuMetricsConfig - to represent the thanos-querier address. The default is `https://thanos-querier.openshift-monitoring.svc:9091`. - type: string - skip_tls_verification: - default: false - description: FOR DEVELOPMENT ONLY. SkipTLSVerification is a field - of KokuMetricsConfig to represent if the thanos-querier endpoint - must be certificate validated. The default is false. - type: boolean - required: - - service_address - - skip_tls_verification - type: object - source: - description: Source is a field of KokuMetricsConfig to represent the - desired source on cloud.redhat.com. - properties: - check_cycle: - default: 1440 - description: CheckCycle is a field of KokuMetricsConfig to represent - the number of minutes between each source check schedule The - default is 1440 min (24 hours). - format: int64 - minimum: 0 - type: integer - create_source: - default: false - description: CreateSource is a field of KokuMetricsConfigSpec - to represent if the source should be created if not found. - type: boolean - name: - description: SourceName is a field of KokuMetricsConfigSpec to - represent the source name on cloud.redhat.com. - type: string - sources_path: - default: /api/sources/v1.0/ - description: FOR DEVELOPMENT ONLY. SourcesAPIPath is a field of - KokuMetricsConfig to represent the path of the Sources API service. - The default is `/api/sources/v1.0/`. - type: string - required: - - check_cycle - - create_source - - sources_path - type: object - upload: - description: Upload is a field of KokuMetricsConfig to represent the - upload object. - properties: - ingress_path: - default: /api/ingress/v1/upload - description: FOR DEVELOPMENT ONLY. IngressAPIPath is a field of - KokuMetricsConfig to represent the path of the Ingress API service. - The default is `/api/ingress/v1/upload`. - type: string - upload_cycle: - default: 360 - description: UploadCycle is a field of KokuMetricsConfig to represent - the number of minutes between each upload schedule. The default - is 360 min (6 hours). - format: int64 - minimum: 0 - type: integer - upload_toggle: - default: true - description: UploadToggle is a field of KokuMetricsConfig to represent - if the operator is installed in a restricted-network. If `false`, - the operator will not upload to cloud.redhat.com or check/create - sources. The default is true. - type: boolean - upload_wait: - description: UploadWait is a field of KokuMetricsConfig to represent - the time to wait before sending an upload. - format: int64 - minimum: 0 - type: integer - validate_cert: - default: true - description: ValidateCert is a field of KokuMetricsConfig to represent - if the Ingress endpoint must be certificate validated. - type: boolean - required: - - ingress_path - - upload_cycle - - upload_toggle - - validate_cert - type: object - volume_claim_template: - description: VolumeClaimTemplate is a field of KokuMetricsConfig to - represent a PVC template. - properties: - apiVersion: - description: 'APIVersion defines the versioned schema of this - representation of an object. Servers should convert recognized - schemas to the latest internal value, and may reject unrecognized - values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' - type: string - kind: - description: 'Kind is a string value representing the REST resource - this object represents. Servers may infer this from the endpoint - the client submits requests to. Cannot be updated. In CamelCase. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' - type: string - metadata: - description: EmbeddedMetadata contains metadata relevant to an - EmbeddedResource. - properties: - annotations: - additionalProperties: - type: string - description: 'Annotations is an unstructured key value map - stored with a resource that may be set by external tools - to store and retrieve arbitrary metadata. They are not queryable - and should be preserved when modifying objects. More info: - http://kubernetes.io/docs/user-guide/annotations' - type: object - labels: - additionalProperties: - type: string - description: 'Map of string keys and values that can be used - to organize and categorize (scope and select) objects. May - match selectors of replication controllers and services. - More info: http://kubernetes.io/docs/user-guide/labels' - type: object - name: - description: 'Name must be unique within a namespace. Is required - when creating resources, although some resources may allow - a client to request the generation of an appropriate name - automatically. Name is primarily intended for creation idempotence - and configuration definition. Cannot be updated. More info: - http://kubernetes.io/docs/user-guide/identifiers#names' - type: string - type: object - spec: - description: 'Spec defines the desired characteristics of a volume - requested by a pod author. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims' - properties: - accessModes: - description: 'AccessModes contains the desired access modes - the volume should have. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes-1' - items: - type: string - type: array - dataSource: - description: 'This field can be used to specify either: * - An existing VolumeSnapshot object (snapshot.storage.k8s.io/VolumeSnapshot - - Beta) * An existing PVC (PersistentVolumeClaim) * An existing - custom resource/object that implements data population (Alpha) - In order to use VolumeSnapshot object types, the appropriate - feature gate must be enabled (VolumeSnapshotDataSource or - AnyVolumeDataSource) If the provisioner or an external controller - can support the specified data source, it will create a - new volume based on the contents of the specified data source. - If the specified data source is not supported, the volume - will not be created and the failure will be reported as - an event. In the future, we plan to support more data source - types and the behavior of the provisioner may change.' - properties: - apiGroup: - description: APIGroup is the group for the resource being - referenced. If APIGroup is not specified, the specified - Kind must be in the core API group. For any other third-party - types, APIGroup is required. - type: string - kind: - description: Kind is the type of resource being referenced - type: string - name: - description: Name is the name of resource being referenced - type: string - required: - - kind - - name - type: object - resources: - description: 'Resources represents the minimum resources the - volume should have. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources' - properties: - limits: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - description: 'Limits describes the maximum amount of compute - resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/' - type: object - requests: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - description: 'Requests describes the minimum amount of - compute resources required. If Requests is omitted for - a container, it defaults to Limits if that is explicitly - specified, otherwise to an implementation-defined value. - More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/' - type: object - type: object - selector: - description: A label query over volumes to consider for binding. - properties: - matchExpressions: - description: matchExpressions is a list of label selector - requirements. The requirements are ANDed. - items: - description: A label selector requirement is a selector - that contains values, a key, and an operator that - relates the key and values. - properties: - key: - description: key is the label key that the selector - applies to. - type: string - operator: - description: operator represents a key's relationship - to a set of values. Valid operators are In, NotIn, - Exists and DoesNotExist. - type: string - values: - description: values is an array of string values. - If the operator is In or NotIn, the values array - must be non-empty. If the operator is Exists or - DoesNotExist, the values array must be empty. - This array is replaced during a strategic merge - patch. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - description: matchLabels is a map of {key,value} pairs. - A single {key,value} in the matchLabels map is equivalent - to an element of matchExpressions, whose key field is - "key", the operator is "In", and the values array contains - only "value". The requirements are ANDed. - type: object - type: object - storageClassName: - description: 'Name of the StorageClass required by the claim. - More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#class-1' - type: string - volumeMode: - description: volumeMode defines what type of volume is required - by the claim. Value of Filesystem is implied when not included - in claim spec. - type: string - volumeName: - description: VolumeName is the binding reference to the PersistentVolume - backing this claim. - type: string - type: object - type: object - required: - - authentication - - packaging - - prometheus_config - - source - - upload - type: object - status: - description: KokuMetricsConfigStatus defines the observed state of KokuMetricsConfig. - properties: - api_url: - description: APIURL is a field of KokuMetricsConfig to represent the - url of the API endpoint for service interaction. - type: string - authentication: - description: Authentication is a field of KokuMetricsConfig to represent - the authentication status. - properties: - credentials_found: - description: AuthenticationCredentialsFound is a field of KokuMetricsConfig - to represent if used for uploads were found. - type: boolean - error: - description: AuthErrorMessage is a field of KokuMetricsConfig - to represent an `invalid credentials` error message. - type: string - last_credential_verification_time: - description: LastVerificationTime is a field of KokuMetricsConfig - to represent the last time credentials were verified. - format: date-time - nullable: true - type: string - secret_name: - description: AuthenticationSecretName is a field of KokuMetricsConfig - to represent the secret with the user and password used for - uploads. - type: string - type: - description: AuthType is a field of KokuMetricsConfig to represent - the authentication type to be used basic or token. - enum: - - token - - basic - type: string - valid_basic_auth: - description: ValidBasicAuth is a field of KokuMetricsConfig to - represent if the given basic auth credentials are valid. - type: boolean - type: object - clusterID: - description: ClusterID is a field of KokuMetricsConfig to represent - the cluster UUID. - type: string - operator_commit: - description: OperatorCommit is a field of KokuMetricsConfig that shows - the commit hash of the operator. - type: string - packaging: - description: Packaging is a field of KokuMetricsConfig to represent - the packaging status - properties: - error: - description: PackagingError is a field of KokuMetricsConfig to - represent the error encountered packaging the reports. - type: string - last_successful_packaging_time: - description: LastSuccessfulPackagingTime is a field of KokuMetricsConfig - that shows the time of the last successful file packaging. - format: date-time - nullable: true - type: string - max_reports_to_store: - description: MaxReports is a field of KokuMetricsConfig to represent - the maximum number of reports to store. - format: int64 - type: integer - max_size_MB: - description: MaxSize is a field of KokuMetricsConfig to represent - the max file size in megabytes that will be compressed for upload - to Ingress. - format: int64 - type: integer - number_reports_stored: - description: ReportCount is a field of KokuMetricsConfig to represent - the number of reports in storage. - format: int64 - type: integer - packaged_files: - description: PackagedFiles is a field of KokuMetricsConfig to - represent the list of file packages in storage. - items: - type: string - type: array - type: object - persistent_volume_claim: - description: PersistentVolumeClaim is a field of KokuMetricsConfig - to represent a PVC. - properties: - apiVersion: - description: 'APIVersion defines the versioned schema of this - representation of an object. Servers should convert recognized - schemas to the latest internal value, and may reject unrecognized - values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' - type: string - kind: - description: 'Kind is a string value representing the REST resource - this object represents. Servers may infer this from the endpoint - the client submits requests to. Cannot be updated. In CamelCase. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' - type: string - metadata: - description: EmbeddedMetadata contains metadata relevant to an - EmbeddedResource. - properties: - annotations: - additionalProperties: - type: string - description: 'Annotations is an unstructured key value map - stored with a resource that may be set by external tools - to store and retrieve arbitrary metadata. They are not queryable - and should be preserved when modifying objects. More info: - http://kubernetes.io/docs/user-guide/annotations' - type: object - labels: - additionalProperties: - type: string - description: 'Map of string keys and values that can be used - to organize and categorize (scope and select) objects. May - match selectors of replication controllers and services. - More info: http://kubernetes.io/docs/user-guide/labels' - type: object - name: - description: 'Name must be unique within a namespace. Is required - when creating resources, although some resources may allow - a client to request the generation of an appropriate name - automatically. Name is primarily intended for creation idempotence - and configuration definition. Cannot be updated. More info: - http://kubernetes.io/docs/user-guide/identifiers#names' - type: string - type: object - spec: - description: 'Spec defines the desired characteristics of a volume - requested by a pod author. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims' - properties: - accessModes: - description: 'AccessModes contains the desired access modes - the volume should have. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes-1' - items: - type: string - type: array - dataSource: - description: 'This field can be used to specify either: * - An existing VolumeSnapshot object (snapshot.storage.k8s.io/VolumeSnapshot - - Beta) * An existing PVC (PersistentVolumeClaim) * An existing - custom resource/object that implements data population (Alpha) - In order to use VolumeSnapshot object types, the appropriate - feature gate must be enabled (VolumeSnapshotDataSource or - AnyVolumeDataSource) If the provisioner or an external controller - can support the specified data source, it will create a - new volume based on the contents of the specified data source. - If the specified data source is not supported, the volume - will not be created and the failure will be reported as - an event. In the future, we plan to support more data source - types and the behavior of the provisioner may change.' - properties: - apiGroup: - description: APIGroup is the group for the resource being - referenced. If APIGroup is not specified, the specified - Kind must be in the core API group. For any other third-party - types, APIGroup is required. - type: string - kind: - description: Kind is the type of resource being referenced - type: string - name: - description: Name is the name of resource being referenced - type: string - required: - - kind - - name - type: object - resources: - description: 'Resources represents the minimum resources the - volume should have. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources' - properties: - limits: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - description: 'Limits describes the maximum amount of compute - resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/' - type: object - requests: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - description: 'Requests describes the minimum amount of - compute resources required. If Requests is omitted for - a container, it defaults to Limits if that is explicitly - specified, otherwise to an implementation-defined value. - More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/' - type: object - type: object - selector: - description: A label query over volumes to consider for binding. - properties: - matchExpressions: - description: matchExpressions is a list of label selector - requirements. The requirements are ANDed. - items: - description: A label selector requirement is a selector - that contains values, a key, and an operator that - relates the key and values. - properties: - key: - description: key is the label key that the selector - applies to. - type: string - operator: - description: operator represents a key's relationship - to a set of values. Valid operators are In, NotIn, - Exists and DoesNotExist. - type: string - values: - description: values is an array of string values. - If the operator is In or NotIn, the values array - must be non-empty. If the operator is Exists or - DoesNotExist, the values array must be empty. - This array is replaced during a strategic merge - patch. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - description: matchLabels is a map of {key,value} pairs. - A single {key,value} in the matchLabels map is equivalent - to an element of matchExpressions, whose key field is - "key", the operator is "In", and the values array contains - only "value". The requirements are ANDed. - type: object - type: object - storageClassName: - description: 'Name of the StorageClass required by the claim. - More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#class-1' - type: string - volumeMode: - description: volumeMode defines what type of volume is required - by the claim. Value of Filesystem is implied when not included - in claim spec. - type: string - volumeName: - description: VolumeName is the binding reference to the PersistentVolume - backing this claim. - type: string - type: object - type: object - prometheus: - description: Prometheus represents the status of premetheus queries. - properties: - configuration_error: - description: ConfigError is a field of KokuMetricsConfigStatus - to represent errors during prometheus configuration. - type: string - last_query_start_time: - description: LastQueryStartTime is a field of KokuMetricsConfigStatus - to represent the last time queries were started. - format: date-time - nullable: true - type: string - last_query_success_time: - description: LastQuerySuccessTime is a field of KokuMetricsConfigStatus - to represent the last time queries were successful. - format: date-time - nullable: true - type: string - prometheus_configured: - description: PrometheusConfigured is a field of KokuMetricsConfigStatus - to represent if the operator is configured to connect to prometheus. - type: boolean - prometheus_connected: - description: PrometheusConnected is a field of KokuMetricsConfigStatus - to represent if prometheus can be queried. - type: boolean - prometheus_connection_error: - description: ConnectionError is a field of KokuMetricsConfigStatus - to represent errors during prometheus test query. - type: string - service_address: - description: SvcAddress is the internal thanos-querier address. - type: string - skip_tls_verification: - description: SkipTLSVerification is a field of KokuMetricsConfigStatus - to represent if the thanos-querier endpoint must be certificate - validated. - type: boolean - required: - - prometheus_configured - - prometheus_connected - type: object - reports: - description: Reports represents the status of report generation. - properties: - data_collected: - description: DataCollected is a field of KokuMetricsConfigStatus - to represent whether or not data was collected for the last - query. - type: boolean - data_collection_message: - description: DataCollectionMessage is a field of KokuMetricsConfigStatus - to represent a message associated with the data_collected status. - type: string - last_hour_queried: - description: LastHourQueried is a field of KokuMetricsConfigStatus - to represent the time range for which metrics were last queried. - type: string - report_month: - description: ReportMonth is a field of KokuMetricsConfigStatus - to represent the month for which reports are being generated. - type: string - type: object - source: - description: Source is a field of KokuMetricsConfig to represent the - observed state of the source on cloud.redhat.com. - properties: - check_cycle: - description: CheckCycle is a field of KokuMetricsConfig to represent - the number of minutes between each source check schedule. The - default is 1440 min (24 hours). - format: int64 - type: integer - create_source: - description: CreateSource is a field of KokuMetricsConfigStatus - to represent if the source should be created if not found. A - source will not be created if upload_toggle is `false`. - type: boolean - error: - description: SourceError is a field of KokuMetricsConfigStatus - to represent the error encountered creating the source. - type: string - last_check_time: - description: LastSourceCheckTime is a field of KokuMetricsConfig - that shows the time that the last check was attempted. - format: date-time - nullable: true - type: string - name: - description: SourceName is a field of KokuMetricsConfigStatus - to represent the source name on cloud.redhat.com. - type: string - source_defined: - description: SourceDefined is a field of KokuMetricsConfigStatus - to represent if the source exists as defined on cloud.redhat.com. - type: boolean - sources_path: - description: SourcesAPIPath is a field of KokuMetricsConfig to - represent the path of the Sources API service. - type: string - type: object - storage: - description: Storage is a field - properties: - volume_mounted: - description: VolumeMounted is a bool to indicate if storage volume - was mounted. - type: boolean - volume_type: - description: VolumeType is the string representation of the volume - type. - type: string - type: object - upload: - description: Upload is a field of KokuMetricsConfig to represent the - upload object. - properties: - error: - description: UploadError is a field of KokuMetricsConfigStatus - to represent the error encountered uploading reports. - type: string - ingress_path: - description: IngressAPIPath is a field of KokuMetricsConfig to - represent the path of the Ingress API service. - type: string - last_successful_upload_time: - description: LastSuccessfulUploadTime is a field of KokuMetricsConfig - that shows the time of the last successful upload. - format: date-time - nullable: true - type: string - last_upload_status: - description: LastUploadStatus is a field of KokuMetricsConfig - that shows the http status of the last upload. - type: string - upload: - description: UploadToggle is a field of KokuMetricsConfig to represent - if the operator should upload to cloud.redhat.com. The default - is true - type: boolean - upload_cycle: - description: UploadCycle is a field of KokuMetricsConfig to represent - the number of minutes between each upload schedule. The default - is 360 min (6 hours). - format: int64 - type: integer - upload_wait: - description: UploadWait is a field of KokuMetricsConfig to represent - the time to wait before sending an upload. - format: int64 - type: integer - validate_cert: - description: ValidateCert is a field of KokuMetricsConfig to represent - if the Ingress endpoint must be certificate validated. - type: boolean - type: object - type: object - required: - - spec - type: object - served: true - storage: true - subresources: - status: {} -status: - acceptedNames: - kind: "" - plural: "" - conditions: [] - storedVersions: [] diff --git a/koku-metrics-operator/0.9.6/manifests/koku-metrics-operator.clusterserviceversion.yaml b/koku-metrics-operator/0.9.6/manifests/koku-metrics-operator.clusterserviceversion.yaml deleted file mode 100644 index 385e4f731..000000000 --- a/koku-metrics-operator/0.9.6/manifests/koku-metrics-operator.clusterserviceversion.yaml +++ /dev/null @@ -1,456 +0,0 @@ -apiVersion: operators.coreos.com/v1alpha1 -kind: ClusterServiceVersion -metadata: - annotations: - alm-examples: |- - [ - { - "apiVersion": "koku-metrics-cfg.openshift.io/v1beta1", - "kind": "KokuMetricsConfig", - "metadata": { - "name": "kokumetricscfg-sample-v1beta1" - }, - "spec": { - "authentication": { - "type": "token" - }, - "packaging": { - "max_reports_to_store": 30, - "max_size_MB": 100 - }, - "prometheus_config": {}, - "source": { - "check_cycle": 1440, - "create_source": false, - "name": "INSERT-SOURCE-NAME" - }, - "upload": { - "upload_cycle": 360, - "upload_toggle": true - } - } - } - ] - capabilities: Seamless Upgrades - categories: Monitoring - certified: "false" - containerImage: quay.io/project-koku/koku-metrics-operator@sha256:520a852663a629a78df4328573b629102d269587245c44f7559e54cd30e90bb1 - createdAt: "2021-04-01T16:48:59Z" - description: A Golang-based OpenShift Operator that generates and uploads OpenShift - usage metrics to cost management. - operatorframework.io/suggested-namespace: koku-metrics-operator - operators.openshift.io/infrastructure-features: '["Disconnected"]' - operators.operatorframework.io/builder: operator-sdk-v0.19.4 - operators.operatorframework.io/project_layout: go.kubebuilder.io/v2 - repository: https://github.com/project-koku/koku-metrics-operator - support: Cost Management - name: koku-metrics-operator.v0.9.6 - namespace: placeholder -spec: - apiservicedefinitions: {} - customresourcedefinitions: - owned: - - description: KokuMetricsConfig is the Schema for the kokumetricsconfig API - kind: KokuMetricsConfig - name: kokumetricsconfigs.koku-metrics-cfg.openshift.io - version: v1beta1 - description: |- - # Koku Metrics Operator - ## Introduction - The `koku-metrics-operator` is a component of the [cost managment](https://access.redhat.com/documentation/en-us/openshift_container_platform/4.5/html/getting_started_with_cost_management/assembly_introduction_cost_management) service for Openshift, used to gather the required information from the cluster. It is recommended to be installed in OpenShift 4.5+. This operator obtains OpenShift usage data by querying Prometheus and uploads it to cost management to be processed. The Operator queries Prometheus every hour to create metric reports, which are then packaged and uploaded to cost management at [cloud.redhat.com](https://cloud.redhat.com). For more information, reach out to . - - This operator is capable of functioning within a disconnected/restricted network (aka air-gapped mode). In this mode, the operator will store the packaged reports for manual retrieval instead of being uploaded to cost management. Documentation for installing an operator within a restricted network can be found [here](https://docs.openshift.com/container-platform/4.5/operators/admin/olm-restricted-networks.html). - - For more information, reach out to . - ## Features and Capabilities - #### Metrics collection: - The Koku Metrics Operator (`koku-metrics-operator`) collects the metrics required for cost management by: - * Querying Prometheus to gather the necessary metrics for cost management. - * Writing Prometheus queries to CSV report files. - * Packaging the CSV report files into tarballs. - - #### Additional Capabilities: - * The operator can be configured to automatically upload the packaged reports to cost management through Red Hat Insights Ingress service. - * The operator can create a source in cloud.redhat.com. A source is required for cost management to process the uploaded packages. - * PersistentVolumeClaim (PVC) configuration: The KokuMetricsConfig CR can accept a PVC definition and the operator will create and mount the PVC. If one is not provided, a default PVC will be created. - * Restricted network installation: this operator can function on a restricted network. In this mode, the operator stores the packaged reports for manual retrieval. - - ## Limitations and Pre-Requisites - #### Limitations (Potential for metrics data loss) - * A source **must** exist in cloud.redhat.com for an uploaded payload to be processed by cost management. The operator sends the payload to the Red Hat Insights Ingress service which usually returns successfully, but the operator does not currently confirm with cost management that the payload was processed. After Ingress accepts the uploaded payload, the payload is removed from the operator and is gone forever. If the data within the payload is not processed, a gap will be introduced in the usage metrics. - - **Note** The following limitations are specific to operators configured to run in a restricted network: - * The `koku-metrics-operator` will not be able to generate new reports if the PVC storage is filled. If this occurs, the reports must be manually deleted from the PVC so that the operator can function as normal. - * The default report retention is 30 reports (about one week's worth of data). The reports must be manually downloaded and uploaded to cloud.redhat.com every week, or they will be deleted and the data will be lost. - - #### Storage configuration prerequisite - The operator will attempt to create and use the following PVC when installed: - - volume_claim_template: - apiVersion: v1 - kind: PersistentVolumeClaim - metadata: - name: koku-metrics-operator-data - spec: - accessModes: - - ReadWriteOnce - resources: - requests: - storage: 10Gi - - If a different PVC should be utilized, a valid PVC should be specified in the KokuMetricsConfig CR as described in the appropriate section below. The PVC to be used may exist already, or the operator will attempt to create it. - - To use the default specification, the follow assumptions must be met: - 1. A default StorageClass is defined. - 2. Dynamic provisioning for that default StorageClass is enabled. - - If these assumptions are not met, the operator will not deploy correctly. In these cases, storage must be manually configured. After configuring storage, a valid PVC template should be supplied in the `volume_claim_template` spec of the KokuMetricsConfig CR. - - ## Configure the koku-metrics-operator - **Note** There are separate instructions for configuring the `koku-metrics-operator` to run in a restricted network. - ##### Configure authentication - The default authentication for the operator is `token`. No further steps are required to configure token authentication. If `basic` is the preferred authentication method, a Secret must be created which holds username and password credentials: - 1. On the left navigation pane, select `Workloads` -> `Secrets` -> select Project: `koku-metrics-operator` -> `Create` -> `Key/Value Secret` - 2. Give the Secret a name and add 2 keys: `username` and `password` (all lowercase). The values for these keys correspond to cloud.redhat.com credentials. - 3. Select `Create`. - ##### Create the KokuMetricsConfig - Configure the koku-metrics-operator by creating a `KokuMetricsConfig`. - 1. On the left navigation pane, select `Operators` -> `Installed Operators` -> `koku-metrics-operator` -> `KokuMetricsConfig` -> `Create Instance`. - 2. For `basic` authentication, edit the following values in the spec: - * Replace `authentication: type:` with `basic`. - * Add the `secret_name` field under `authentication`, and set it equal to the name of the authentication Secret that was created above. The spec should look similar to the following: - - ``` - authentication: - secret_name: SECRET-NAME - type: basic - ``` - - 3. To configure the koku-metrics-operator to create a cost management source, edit the following values in the `source` field: - * Replace `INSERT-SOURCE-NAME` with the preferred name of the source to be created. - * Replace the `create_source` field value with `true`. - - **Note:** if the source already exists, replace `INSERT-SOURCE-NAME` with the existing name, and leave `create_source` as false. This will allow the operator to confirm the source exists. - 4. If not specified, the operator will create a default PersistentVolumeClaim called `koku-metrics-operator-data` with 10Gi of storage. To configure the koku-metrics-operator to use or create a different PVC, edit the following in the spec: - * Add the desired configuration to the `volume_claim_template` field in the spec: - - ``` - volume_claim_template: - apiVersion: v1 - kind: PersistentVolumeClaim - metadata: - name: - spec: - accessModes: - - ReadWriteOnce - resources: - requests: - storage: 10Gi - ``` - - **Note:** If using the YAML View, the `volume_claim_template` field must be added to the spec - 5. Select `Create`. - - # Restricted Network Usage (disconnected/air-gapped mode) - ## Installation - To install the `koku-metrics-operator` in a restricted network, follow the [olm documentation](https://docs.openshift.com/container-platform/4.5/operators/admin/olm-restricted-networks.html). The operator is found in the `community-operators` Catalog in the `registry.redhat.io/redhat/community-operator-index:latest` Index. If pruning the index before pushing to the mirrored registry, keep the `koku-metrics-operator` package. - - Within a restricted network, the operator queries prometheus to gather the necessary usage metrics, writes the query results to CSV files, and packages the reports for storage in the PVC. These reports then need to be manually downloaded from the cluster and uploaded to [cloud.redhat.com](https://cloud.redhat.com). - - For more information, reach out to . - ## Configure the koku-metrics-operator for a restricted network - ##### Create the KokuMetricsConfig - Configure the koku-metrics-operator by creating a `KokuMetricsConfig`. - 1. On the left navigation pane, select `Operators` -> `Installed Operators` -> `koku-metrics-operator` -> `KokuMetricsConfig` -> `Create Instance`. - 2. Specify the desired storage. If not specified, the operator will create a default Persistent Volume Claim called `koku-metrics-operator-data` with 10Gi of storage. To configure the koku-metrics-operator to use or create a different PVC, edit the following in the spec: - * Add the desired configuration to the `volume_claim_template` field in the spec: - - ``` - volume_claim_template: - apiVersion: v1 - kind: PersistentVolumeClaim - metadata: - name: - spec: - storageClassName: - accessModes: - - ReadWriteOnce - resources: - requests: - storage: 10Gi - ``` - - **Note:** If using the YAML View, the `volume_claim_template` field must be added to the spec - 3. (Optional) Specify the desired report retention. The operator will retain 30 reports by default. This corresponds to approximately one week's worth of data if using the default packaging cycle. To modify the number of retained reports: - * Change the `packaging` spec field `max_reports_to_store` to the desired number of reports to retain. Once this max number is reached, the operator will start removing the oldest packages remaining on the PVC: - - ``` - packaging: - max_size_MB: 100 - max_reports_to_store: 30 - ``` - - **Note:** The number of retained reports directly affects the frequency that reports must be manually downloaded from the PVC. Take caution in setting this to a higher number of reports, as the operator cannot write data to the PVC if the storage is full. - 4. To configure the operator to perform in a restricted network, set the `upload_toggle` to `false`: - - ``` - upload: - upload_cycle: 360, - upload_toggle: false - ``` - - 5. Select `Create`. - - ## Download reports from the Operator & clean up the PVC - If the `koku-metrics-operator` is configured to run in a restricted network, the metric reports will not automatically upload to cost managment. Instead, they need to be manually copied from the PVC for upload to [cloud.redhat.com](https://cloud.redhat.com). The default configuration saves one week of reports which means the process of downloading and uploading reports should be repeated weekly to prevent loss of metrics data. To download the reports, complete the following steps: - 1. Create the following Pod, ensuring the `claimName` matches the PVC containing the report data: - - ``` - kind: Pod - apiVersion: v1 - metadata: - name: volume-shell - namespace: koku-metrics-operator - spec: - volumes: - - name: koku-metrics-operator-reports - persistentVolumeClaim: - claimName: koku-metrics-operator-data - containers: - - name: volume-shell - image: busybox - command: ['sleep', '3600'] - volumeMounts: - - name: koku-metrics-operator-reports - mountPath: /tmp/koku-metrics-operator-reports - ``` - - 2. Use rsync to copy all of the files ready for upload from the PVC to a local folder: - - ``` - $ oc rsync volume-shell:/tmp/koku-metrics-operator-reports/upload local/path/to/save/folder - ``` - - 3. Once confirming that the files have been successfully copied, use rsh to connect to the pod and delete the contents of the upload folder so that they are no longer in storage: - - ``` - $ oc rsh volume-shell - $ rm /tmp/koku-metrics-operator-reports/upload/* - ``` - - 4. (Optional) Delete the pod that was used to connect to the PVC: - - ``` - $ oc delete -f volume-shell.yaml - ``` - - ## Create a source - In a restricted network, the `koku-metrics-operator` cannot automatically create a source. This process must be done manually. In the cloud.redhat.com platform, open the [Sources menu](https://cloud.redhat.com/settings/sources/) to begin adding an OpenShift source to cost management: - - Prerequisites: - * The cluster identifier which can be found in the KokuMetricsConfig CR, the cluster Overview page, or the cluster Help > About. - - Create source: - 1. Navigate to the Sources menu - 2. Select the `Red Hat sources` tab - 3. Create a new `Red Hat Openshift Container Platform` source: - * give the source a unique name - * add the Cost Management application - * add the cluster identifier - 4. In the Sources wizard, review the details and click `Finish` to create the Source. - - ## Upload the reports to cost managment - Uploading reports to cost managment is done through curl: - - $ curl -vvvv -F "file=@FILE_NAME.tar.gz;type=application/vnd.redhat.hccm.tar+tgz" https://cloud.redhat.com/api/ingress/v1/upload -u USERNAME:PASS - - where `USERNAME` and `PASS` correspond to the user credentials for [cloud.redhat.com](https://cloud.redhat.com), and `FILE_NAME` is the name of the report to upload. - - displayName: Koku Metrics Operator - icon: - - base64data: PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4KPCEtLSBHZW5lcmF0b3I6IEFkb2JlIElsbHVzdHJhdG9yIDIyLjEuMCwgU1Z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UtMC45NzY4MjE5LDEuNDc0NDQxNS0wLjk3NjgyMTksMi40NjUwODc5YzAsMC42ODY1NTQsMC4yMzAzOTI1LDEuMzM2MjEyMiwwLjY5MTE0NjksMS45NDkwMzU2CgkJCWMwLjQ1NjE2MTUsMC42MTI4MjM1LDEuMDMyMTE5OCwxLjAzMjExOTgsMS43MTg2NTg0LDEuMjYyNDk2OUwxNzQuMjgwNjM5NiwxODUuODczNjExNXoiLz4KCTwvZz4KPC9nPgo8L3N2Zz4K - mediatype: image/svg+xml - install: - spec: - clusterPermissions: - - rules: - - apiGroups: - - config.openshift.io - resources: - - clusterversions - verbs: - - get - - list - - watch - - apiGroups: - - "" - resources: - - namespaces - verbs: - - get - - list - - watch - - apiGroups: - - "" - resources: - - secrets - verbs: - - get - serviceAccountName: koku-metrics-manager-role - deployments: - - name: koku-metrics-controller-manager - spec: - replicas: 1 - selector: - matchLabels: - control-plane: controller-manager - strategy: {} - template: - metadata: - labels: - control-plane: controller-manager - spec: - containers: - - args: - - --enable-leader-election - command: - - /manager - env: - - name: IN_CLUSTER - value: "true" - - name: WATCH_NAMESPACE - valueFrom: - fieldRef: - fieldPath: metadata.annotations['olm.targetNamespaces'] - image: quay.io/project-koku/koku-metrics-operator@sha256:520a852663a629a78df4328573b629102d269587245c44f7559e54cd30e90bb1 - name: manager - resources: - limits: - cpu: 500m - memory: 500Mi - requests: - cpu: 100m - memory: 20Mi - terminationMessagePolicy: FallbackToLogsOnError - volumeMounts: - - mountPath: /tmp/koku-metrics-operator-reports - name: koku-metrics-operator-reports - serviceAccountName: koku-metrics-manager-role - terminationGracePeriodSeconds: 10 - volumes: - - name: koku-metrics-operator-reports - permissions: - - rules: - - apiGroups: - - "" - resources: - - configmaps - verbs: - - get - - list - - watch - - create - - update - - patch - - delete - - apiGroups: - - "" - resources: - - configmaps/status - verbs: - - get - - update - - patch - - apiGroups: - - "" - resources: - - events - verbs: - - create - - patch - - apiGroups: - - apps - resources: - - deployments - verbs: - - get - - list - - patch - - watch - - apiGroups: - - "" - resources: - - configmaps - - endpoints - - events - - persistentvolumeclaims - - pods - - secrets - - serviceaccounts - - services - - services/finalizers - verbs: - - create - - delete - - get - - list - - patch - - update - - watch - - apiGroups: - - koku-metrics-cfg.openshift.io - resources: - - kokumetricsconfigs - verbs: - - create - - delete - - get - - list - - patch - - update - - watch - - apiGroups: - - koku-metrics-cfg.openshift.io - resources: - - kokumetricsconfigs/status - verbs: - - get - - patch - - update - - apiGroups: - - operators.coreos.com - resources: - - clusterserviceversions - verbs: - - get - - list - - patch - - update - - watch - serviceAccountName: koku-metrics-manager-role - strategy: deployment - installModes: - - supported: true - type: OwnNamespace - - supported: true - type: SingleNamespace - - supported: false - type: MultiNamespace - - supported: false - type: AllNamespaces - relatedImages: - - name: koku-metrics-operator - image: quay.io/project-koku/koku-metrics-operator@sha256:520a852663a629a78df4328573b629102d269587245c44f7559e54cd30e90bb1 - keywords: - - cost - - management - - usage - - monitor - maintainers: - - email: costmanagement@redhat.com - name: costmanagement - maturity: alpha - provider: - name: Red Hat - replaces: koku-metrics-operator.v0.9.5 - version: 0.9.6 diff --git a/koku-metrics-operator/0.9.6/metadata/annotations.yaml b/koku-metrics-operator/0.9.6/metadata/annotations.yaml deleted file mode 100644 index 1df004507..000000000 --- a/koku-metrics-operator/0.9.6/metadata/annotations.yaml +++ /dev/null @@ -1,10 +0,0 @@ -annotations: - operators.operatorframework.io.bundle.channel.default.v1: beta - operators.operatorframework.io.bundle.channels.v1: alpha,beta - operators.operatorframework.io.bundle.manifests.v1: manifests/ - operators.operatorframework.io.bundle.mediatype.v1: registry+v1 - operators.operatorframework.io.bundle.metadata.v1: metadata/ - operators.operatorframework.io.bundle.package.v1: koku-metrics-operator - operators.operatorframework.io.metrics.builder: operator-sdk-v0.19.4 - operators.operatorframework.io.metrics.mediatype.v1: metrics+v1 - operators.operatorframework.io.metrics.project_layout: go.kubebuilder.io/v2 diff --git a/koku-metrics-operator/0.9.7/Dockerfile b/koku-metrics-operator/0.9.7/Dockerfile deleted file mode 100644 index baca1a624..000000000 --- a/koku-metrics-operator/0.9.7/Dockerfile +++ /dev/null @@ -1,14 +0,0 @@ -FROM scratch - -LABEL operators.operatorframework.io.bundle.mediatype.v1=registry+v1 -LABEL operators.operatorframework.io.bundle.manifests.v1=manifests/ -LABEL operators.operatorframework.io.bundle.metadata.v1=metadata/ -LABEL operators.operatorframework.io.bundle.package.v1=koku-metrics-operator -LABEL operators.operatorframework.io.bundle.channels.v1=alpha,beta -LABEL operators.operatorframework.io.bundle.channel.default.v1=beta -LABEL operators.operatorframework.io.metrics.mediatype.v1=metrics+v1 -LABEL operators.operatorframework.io.metrics.builder=operator-sdk-v0.19.4 -LABEL operators.operatorframework.io.metrics.project_layout=go.kubebuilder.io/v2 - -COPY manifests /manifests/ -COPY metadata /metadata/ diff --git a/koku-metrics-operator/0.9.7/manifests/koku-metrics-cfg.openshift.io_kokumetricsconfigs.yaml b/koku-metrics-operator/0.9.7/manifests/koku-metrics-cfg.openshift.io_kokumetricsconfigs.yaml deleted file mode 100644 index 09b25deb1..000000000 --- a/koku-metrics-operator/0.9.7/manifests/koku-metrics-cfg.openshift.io_kokumetricsconfigs.yaml +++ /dev/null @@ -1,804 +0,0 @@ -apiVersion: apiextensions.k8s.io/v1 -kind: CustomResourceDefinition -metadata: - annotations: - controller-gen.kubebuilder.io/version: v0.3.0 - creationTimestamp: null - name: kokumetricsconfigs.koku-metrics-cfg.openshift.io -spec: - group: koku-metrics-cfg.openshift.io - names: - kind: KokuMetricsConfig - listKind: KokuMetricsConfigList - plural: kokumetricsconfigs - singular: kokumetricsconfig - scope: Namespaced - versions: - - name: v1beta1 - schema: - openAPIV3Schema: - description: KokuMetricsConfig is the Schema for the kokumetricsconfig API - properties: - apiVersion: - description: 'APIVersion defines the versioned schema of this representation - of an object. Servers should convert recognized schemas to the latest - internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' - type: string - kind: - description: 'Kind is a string value representing the REST resource this - object represents. Servers may infer this from the endpoint the client - submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' - type: string - metadata: - type: object - spec: - description: KokuMetricsConfigSpec defines the desired state of KokuMetricsConfig. - properties: - api_url: - default: https://cloud.redhat.com - description: FOR DEVELOPMENT ONLY. APIURL is a field of KokuMetricsConfig - to represent the url of the API endpoint for service interaction. - The default is `https://cloud.redhat.com`. - type: string - authentication: - description: Authentication is a field of KokuMetricsConfig to represent - the authentication object. - properties: - secret_name: - description: AuthenticationSecretName is a field of KokuMetricsConfig - to represent the secret with the user and password used for - uploads. - type: string - type: - default: token - description: 'AuthType is a field of KokuMetricsConfig to represent - the authentication type to be used basic or token. Valid values - are: - "basic" : Enables authentication using user and password - from authentication secret. - "token" (default): Uses cluster - token for authentication.' - enum: - - token - - basic - type: string - required: - - type - type: object - clusterID: - description: ClusterID is a field of KokuMetricsConfig to represent - the cluster UUID. Normally this value should not be specified. Only - set this value if the clusterID cannot be obtained from the ClusterVersion. - type: string - packaging: - description: Packaging is a field of KokuMetricsConfig to represent - the packaging object. - properties: - max_reports_to_store: - default: 30 - description: MaxReports is a field of KokuMetricsConfig to represent - the maximum number of reports to store. The default is 30 reports - which corresponds to approximately 7 days worth of data given - the other default values. - format: int64 - minimum: 1 - type: integer - max_size_MB: - default: 100 - description: MaxSize is a field of KokuMetricsConfig to represent - the max file size in megabytes that will be compressed for upload - to Ingress. The default is 100. - format: int64 - maximum: 100 - minimum: 1 - type: integer - required: - - max_reports_to_store - - max_size_MB - type: object - prometheus_config: - description: PrometheusConfig is a field of KokuMetricsConfig to represent - the configuration of Prometheus connection. - properties: - service_address: - default: https://thanos-querier.openshift-monitoring.svc:9091 - description: FOR DEVELOPMENT ONLY. SvcAddress is a field of KokuMetricsConfig - to represent the thanos-querier address. The default is `https://thanos-querier.openshift-monitoring.svc:9091`. - type: string - skip_tls_verification: - default: false - description: FOR DEVELOPMENT ONLY. SkipTLSVerification is a field - of KokuMetricsConfig to represent if the thanos-querier endpoint - must be certificate validated. The default is false. - type: boolean - required: - - service_address - - skip_tls_verification - type: object - source: - description: Source is a field of KokuMetricsConfig to represent the - desired source on cloud.redhat.com. - properties: - check_cycle: - default: 1440 - description: CheckCycle is a field of KokuMetricsConfig to represent - the number of minutes between each source check schedule The - default is 1440 min (24 hours). - format: int64 - minimum: 0 - type: integer - create_source: - default: false - description: CreateSource is a field of KokuMetricsConfigSpec - to represent if the source should be created if not found. - type: boolean - name: - description: SourceName is a field of KokuMetricsConfigSpec to - represent the source name on cloud.redhat.com. - type: string - sources_path: - default: /api/sources/v1.0/ - description: FOR DEVELOPMENT ONLY. SourcesAPIPath is a field of - KokuMetricsConfig to represent the path of the Sources API service. - The default is `/api/sources/v1.0/`. - type: string - required: - - check_cycle - - create_source - - sources_path - type: object - upload: - description: Upload is a field of KokuMetricsConfig to represent the - upload object. - properties: - ingress_path: - default: /api/ingress/v1/upload - description: FOR DEVELOPMENT ONLY. IngressAPIPath is a field of - KokuMetricsConfig to represent the path of the Ingress API service. - The default is `/api/ingress/v1/upload`. - type: string - upload_cycle: - default: 360 - description: UploadCycle is a field of KokuMetricsConfig to represent - the number of minutes between each upload schedule. The default - is 360 min (6 hours). - format: int64 - minimum: 0 - type: integer - upload_toggle: - default: true - description: UploadToggle is a field of KokuMetricsConfig to represent - if the operator is installed in a restricted-network. If `false`, - the operator will not upload to cloud.redhat.com or check/create - sources. The default is true. - type: boolean - upload_wait: - description: UploadWait is a field of KokuMetricsConfig to represent - the time to wait before sending an upload. - format: int64 - minimum: 0 - type: integer - validate_cert: - default: true - description: ValidateCert is a field of KokuMetricsConfig to represent - if the Ingress endpoint must be certificate validated. - type: boolean - required: - - ingress_path - - upload_cycle - - upload_toggle - - validate_cert - type: object - volume_claim_template: - description: VolumeClaimTemplate is a field of KokuMetricsConfig to - represent a PVC template. - properties: - apiVersion: - description: 'APIVersion defines the versioned schema of this - representation of an object. Servers should convert recognized - schemas to the latest internal value, and may reject unrecognized - values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' - type: string - kind: - description: 'Kind is a string value representing the REST resource - this object represents. Servers may infer this from the endpoint - the client submits requests to. Cannot be updated. In CamelCase. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' - type: string - metadata: - description: EmbeddedMetadata contains metadata relevant to an - EmbeddedResource. - properties: - annotations: - additionalProperties: - type: string - description: 'Annotations is an unstructured key value map - stored with a resource that may be set by external tools - to store and retrieve arbitrary metadata. They are not queryable - and should be preserved when modifying objects. More info: - http://kubernetes.io/docs/user-guide/annotations' - type: object - labels: - additionalProperties: - type: string - description: 'Map of string keys and values that can be used - to organize and categorize (scope and select) objects. May - match selectors of replication controllers and services. - More info: http://kubernetes.io/docs/user-guide/labels' - type: object - name: - description: 'Name must be unique within a namespace. Is required - when creating resources, although some resources may allow - a client to request the generation of an appropriate name - automatically. Name is primarily intended for creation idempotence - and configuration definition. Cannot be updated. More info: - http://kubernetes.io/docs/user-guide/identifiers#names' - type: string - type: object - spec: - description: 'Spec defines the desired characteristics of a volume - requested by a pod author. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims' - properties: - accessModes: - description: 'AccessModes contains the desired access modes - the volume should have. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes-1' - items: - type: string - type: array - dataSource: - description: 'This field can be used to specify either: * - An existing VolumeSnapshot object (snapshot.storage.k8s.io/VolumeSnapshot - - Beta) * An existing PVC (PersistentVolumeClaim) * An existing - custom resource/object that implements data population (Alpha) - In order to use VolumeSnapshot object types, the appropriate - feature gate must be enabled (VolumeSnapshotDataSource or - AnyVolumeDataSource) If the provisioner or an external controller - can support the specified data source, it will create a - new volume based on the contents of the specified data source. - If the specified data source is not supported, the volume - will not be created and the failure will be reported as - an event. In the future, we plan to support more data source - types and the behavior of the provisioner may change.' - properties: - apiGroup: - description: APIGroup is the group for the resource being - referenced. If APIGroup is not specified, the specified - Kind must be in the core API group. For any other third-party - types, APIGroup is required. - type: string - kind: - description: Kind is the type of resource being referenced - type: string - name: - description: Name is the name of resource being referenced - type: string - required: - - kind - - name - type: object - resources: - description: 'Resources represents the minimum resources the - volume should have. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources' - properties: - limits: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - description: 'Limits describes the maximum amount of compute - resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/' - type: object - requests: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - description: 'Requests describes the minimum amount of - compute resources required. If Requests is omitted for - a container, it defaults to Limits if that is explicitly - specified, otherwise to an implementation-defined value. - More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/' - type: object - type: object - selector: - description: A label query over volumes to consider for binding. - properties: - matchExpressions: - description: matchExpressions is a list of label selector - requirements. The requirements are ANDed. - items: - description: A label selector requirement is a selector - that contains values, a key, and an operator that - relates the key and values. - properties: - key: - description: key is the label key that the selector - applies to. - type: string - operator: - description: operator represents a key's relationship - to a set of values. Valid operators are In, NotIn, - Exists and DoesNotExist. - type: string - values: - description: values is an array of string values. - If the operator is In or NotIn, the values array - must be non-empty. If the operator is Exists or - DoesNotExist, the values array must be empty. - This array is replaced during a strategic merge - patch. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - description: matchLabels is a map of {key,value} pairs. - A single {key,value} in the matchLabels map is equivalent - to an element of matchExpressions, whose key field is - "key", the operator is "In", and the values array contains - only "value". The requirements are ANDed. - type: object - type: object - storageClassName: - description: 'Name of the StorageClass required by the claim. - More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#class-1' - type: string - volumeMode: - description: volumeMode defines what type of volume is required - by the claim. Value of Filesystem is implied when not included - in claim spec. - type: string - volumeName: - description: VolumeName is the binding reference to the PersistentVolume - backing this claim. - type: string - type: object - type: object - required: - - authentication - - packaging - - prometheus_config - - source - - upload - type: object - status: - description: KokuMetricsConfigStatus defines the observed state of KokuMetricsConfig. - properties: - api_url: - description: APIURL is a field of KokuMetricsConfig to represent the - url of the API endpoint for service interaction. - type: string - authentication: - description: Authentication is a field of KokuMetricsConfig to represent - the authentication status. - properties: - credentials_found: - description: AuthenticationCredentialsFound is a field of KokuMetricsConfig - to represent if used for uploads were found. - type: boolean - error: - description: AuthErrorMessage is a field of KokuMetricsConfig - to represent an `invalid credentials` error message. - type: string - last_credential_verification_time: - description: LastVerificationTime is a field of KokuMetricsConfig - to represent the last time credentials were verified. - format: date-time - nullable: true - type: string - secret_name: - description: AuthenticationSecretName is a field of KokuMetricsConfig - to represent the secret with the user and password used for - uploads. - type: string - type: - description: AuthType is a field of KokuMetricsConfig to represent - the authentication type to be used basic or token. - enum: - - token - - basic - type: string - valid_basic_auth: - description: ValidBasicAuth is a field of KokuMetricsConfig to - represent if the given basic auth credentials are valid. - type: boolean - type: object - clusterID: - description: ClusterID is a field of KokuMetricsConfig to represent - the cluster UUID. - type: string - operator_commit: - description: OperatorCommit is a field of KokuMetricsConfig that shows - the commit hash of the operator. - type: string - packaging: - description: Packaging is a field of KokuMetricsConfig to represent - the packaging status - properties: - error: - description: PackagingError is a field of KokuMetricsConfig to - represent the error encountered packaging the reports. - type: string - last_successful_packaging_time: - description: LastSuccessfulPackagingTime is a field of KokuMetricsConfig - that shows the time of the last successful file packaging. - format: date-time - nullable: true - type: string - max_reports_to_store: - description: MaxReports is a field of KokuMetricsConfig to represent - the maximum number of reports to store. - format: int64 - type: integer - max_size_MB: - description: MaxSize is a field of KokuMetricsConfig to represent - the max file size in megabytes that will be compressed for upload - to Ingress. - format: int64 - type: integer - number_reports_stored: - description: ReportCount is a field of KokuMetricsConfig to represent - the number of reports in storage. - format: int64 - type: integer - packaged_files: - description: PackagedFiles is a field of KokuMetricsConfig to - represent the list of file packages in storage. - items: - type: string - type: array - type: object - persistent_volume_claim: - description: PersistentVolumeClaim is a field of KokuMetricsConfig - to represent a PVC. - properties: - apiVersion: - description: 'APIVersion defines the versioned schema of this - representation of an object. Servers should convert recognized - schemas to the latest internal value, and may reject unrecognized - values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' - type: string - kind: - description: 'Kind is a string value representing the REST resource - this object represents. Servers may infer this from the endpoint - the client submits requests to. Cannot be updated. In CamelCase. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' - type: string - metadata: - description: EmbeddedMetadata contains metadata relevant to an - EmbeddedResource. - properties: - annotations: - additionalProperties: - type: string - description: 'Annotations is an unstructured key value map - stored with a resource that may be set by external tools - to store and retrieve arbitrary metadata. They are not queryable - and should be preserved when modifying objects. More info: - http://kubernetes.io/docs/user-guide/annotations' - type: object - labels: - additionalProperties: - type: string - description: 'Map of string keys and values that can be used - to organize and categorize (scope and select) objects. May - match selectors of replication controllers and services. - More info: http://kubernetes.io/docs/user-guide/labels' - type: object - name: - description: 'Name must be unique within a namespace. Is required - when creating resources, although some resources may allow - a client to request the generation of an appropriate name - automatically. Name is primarily intended for creation idempotence - and configuration definition. Cannot be updated. More info: - http://kubernetes.io/docs/user-guide/identifiers#names' - type: string - type: object - spec: - description: 'Spec defines the desired characteristics of a volume - requested by a pod author. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims' - properties: - accessModes: - description: 'AccessModes contains the desired access modes - the volume should have. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes-1' - items: - type: string - type: array - dataSource: - description: 'This field can be used to specify either: * - An existing VolumeSnapshot object (snapshot.storage.k8s.io/VolumeSnapshot - - Beta) * An existing PVC (PersistentVolumeClaim) * An existing - custom resource/object that implements data population (Alpha) - In order to use VolumeSnapshot object types, the appropriate - feature gate must be enabled (VolumeSnapshotDataSource or - AnyVolumeDataSource) If the provisioner or an external controller - can support the specified data source, it will create a - new volume based on the contents of the specified data source. - If the specified data source is not supported, the volume - will not be created and the failure will be reported as - an event. In the future, we plan to support more data source - types and the behavior of the provisioner may change.' - properties: - apiGroup: - description: APIGroup is the group for the resource being - referenced. If APIGroup is not specified, the specified - Kind must be in the core API group. For any other third-party - types, APIGroup is required. - type: string - kind: - description: Kind is the type of resource being referenced - type: string - name: - description: Name is the name of resource being referenced - type: string - required: - - kind - - name - type: object - resources: - description: 'Resources represents the minimum resources the - volume should have. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources' - properties: - limits: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - description: 'Limits describes the maximum amount of compute - resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/' - type: object - requests: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - description: 'Requests describes the minimum amount of - compute resources required. If Requests is omitted for - a container, it defaults to Limits if that is explicitly - specified, otherwise to an implementation-defined value. - More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/' - type: object - type: object - selector: - description: A label query over volumes to consider for binding. - properties: - matchExpressions: - description: matchExpressions is a list of label selector - requirements. The requirements are ANDed. - items: - description: A label selector requirement is a selector - that contains values, a key, and an operator that - relates the key and values. - properties: - key: - description: key is the label key that the selector - applies to. - type: string - operator: - description: operator represents a key's relationship - to a set of values. Valid operators are In, NotIn, - Exists and DoesNotExist. - type: string - values: - description: values is an array of string values. - If the operator is In or NotIn, the values array - must be non-empty. If the operator is Exists or - DoesNotExist, the values array must be empty. - This array is replaced during a strategic merge - patch. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - description: matchLabels is a map of {key,value} pairs. - A single {key,value} in the matchLabels map is equivalent - to an element of matchExpressions, whose key field is - "key", the operator is "In", and the values array contains - only "value". The requirements are ANDed. - type: object - type: object - storageClassName: - description: 'Name of the StorageClass required by the claim. - More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#class-1' - type: string - volumeMode: - description: volumeMode defines what type of volume is required - by the claim. Value of Filesystem is implied when not included - in claim spec. - type: string - volumeName: - description: VolumeName is the binding reference to the PersistentVolume - backing this claim. - type: string - type: object - type: object - prometheus: - description: Prometheus represents the status of premetheus queries. - properties: - configuration_error: - description: ConfigError is a field of KokuMetricsConfigStatus - to represent errors during prometheus configuration. - type: string - last_query_start_time: - description: LastQueryStartTime is a field of KokuMetricsConfigStatus - to represent the last time queries were started. - format: date-time - nullable: true - type: string - last_query_success_time: - description: LastQuerySuccessTime is a field of KokuMetricsConfigStatus - to represent the last time queries were successful. - format: date-time - nullable: true - type: string - prometheus_configured: - description: PrometheusConfigured is a field of KokuMetricsConfigStatus - to represent if the operator is configured to connect to prometheus. - type: boolean - prometheus_connected: - description: PrometheusConnected is a field of KokuMetricsConfigStatus - to represent if prometheus can be queried. - type: boolean - prometheus_connection_error: - description: ConnectionError is a field of KokuMetricsConfigStatus - to represent errors during prometheus test query. - type: string - service_address: - description: SvcAddress is the internal thanos-querier address. - type: string - skip_tls_verification: - description: SkipTLSVerification is a field of KokuMetricsConfigStatus - to represent if the thanos-querier endpoint must be certificate - validated. - type: boolean - required: - - prometheus_configured - - prometheus_connected - type: object - reports: - description: Reports represents the status of report generation. - properties: - data_collected: - description: DataCollected is a field of KokuMetricsConfigStatus - to represent whether or not data was collected for the last - query. - type: boolean - data_collection_message: - description: DataCollectionMessage is a field of KokuMetricsConfigStatus - to represent a message associated with the data_collected status. - type: string - last_hour_queried: - description: LastHourQueried is a field of KokuMetricsConfigStatus - to represent the time range for which metrics were last queried. - type: string - report_month: - description: ReportMonth is a field of KokuMetricsConfigStatus - to represent the month for which reports are being generated. - type: string - type: object - source: - description: Source is a field of KokuMetricsConfig to represent the - observed state of the source on cloud.redhat.com. - properties: - check_cycle: - description: CheckCycle is a field of KokuMetricsConfig to represent - the number of minutes between each source check schedule. The - default is 1440 min (24 hours). - format: int64 - type: integer - create_source: - description: CreateSource is a field of KokuMetricsConfigStatus - to represent if the source should be created if not found. A - source will not be created if upload_toggle is `false`. - type: boolean - error: - description: SourceError is a field of KokuMetricsConfigStatus - to represent the error encountered creating the source. - type: string - last_check_time: - description: LastSourceCheckTime is a field of KokuMetricsConfig - that shows the time that the last check was attempted. - format: date-time - nullable: true - type: string - name: - description: SourceName is a field of KokuMetricsConfigStatus - to represent the source name on cloud.redhat.com. - type: string - source_defined: - description: SourceDefined is a field of KokuMetricsConfigStatus - to represent if the source exists as defined on cloud.redhat.com. - type: boolean - sources_path: - description: SourcesAPIPath is a field of KokuMetricsConfig to - represent the path of the Sources API service. - type: string - type: object - storage: - description: Storage is a field - properties: - volume_mounted: - description: VolumeMounted is a bool to indicate if storage volume - was mounted. - type: boolean - volume_type: - description: VolumeType is the string representation of the volume - type. - type: string - type: object - upload: - description: Upload is a field of KokuMetricsConfig to represent the - upload object. - properties: - error: - description: UploadError is a field of KokuMetricsConfigStatus - to represent the error encountered uploading reports. - type: string - ingress_path: - description: IngressAPIPath is a field of KokuMetricsConfig to - represent the path of the Ingress API service. - type: string - last_successful_upload_time: - description: LastSuccessfulUploadTime is a field of KokuMetricsConfig - that shows the time of the last successful upload. - format: date-time - nullable: true - type: string - last_upload_status: - description: LastUploadStatus is a field of KokuMetricsConfig - that shows the http status of the last upload. - type: string - upload: - description: UploadToggle is a field of KokuMetricsConfig to represent - if the operator should upload to cloud.redhat.com. The default - is true - type: boolean - upload_cycle: - description: UploadCycle is a field of KokuMetricsConfig to represent - the number of minutes between each upload schedule. The default - is 360 min (6 hours). - format: int64 - type: integer - upload_wait: - description: UploadWait is a field of KokuMetricsConfig to represent - the time to wait before sending an upload. - format: int64 - type: integer - validate_cert: - description: ValidateCert is a field of KokuMetricsConfig to represent - if the Ingress endpoint must be certificate validated. - type: boolean - type: object - type: object - required: - - spec - type: object - served: true - storage: true - subresources: - status: {} -status: - acceptedNames: - kind: "" - plural: "" - conditions: [] - storedVersions: [] diff --git a/koku-metrics-operator/0.9.7/manifests/koku-metrics-operator.clusterserviceversion.yaml b/koku-metrics-operator/0.9.7/manifests/koku-metrics-operator.clusterserviceversion.yaml deleted file mode 100644 index c8a4381f2..000000000 --- a/koku-metrics-operator/0.9.7/manifests/koku-metrics-operator.clusterserviceversion.yaml +++ /dev/null @@ -1,456 +0,0 @@ -apiVersion: operators.coreos.com/v1alpha1 -kind: ClusterServiceVersion -metadata: - annotations: - alm-examples: |- - [ - { - "apiVersion": "koku-metrics-cfg.openshift.io/v1beta1", - "kind": "KokuMetricsConfig", - "metadata": { - "name": "kokumetricscfg-sample-v1beta1" - }, - "spec": { - "authentication": { - "type": "token" - }, - "packaging": { - "max_reports_to_store": 30, - "max_size_MB": 100 - }, - "prometheus_config": {}, - "source": { - "check_cycle": 1440, - "create_source": false, - "name": "INSERT-SOURCE-NAME" - }, - "upload": { - "upload_cycle": 360, - "upload_toggle": true - } - } - } - ] - capabilities: Seamless Upgrades - categories: Monitoring - certified: "false" - containerImage: quay.io/project-koku/koku-metrics-operator@sha256:50fd60d011a700edf41e53f69ea4717b31b26ceb1f9e079b1d4372570c8f9d13 - createdAt: "2021-04-13T20:39:31Z" - description: A Golang-based OpenShift Operator that generates and uploads OpenShift - usage metrics to cost management. - operatorframework.io/suggested-namespace: koku-metrics-operator - operators.openshift.io/infrastructure-features: '["Disconnected"]' - operators.operatorframework.io/builder: operator-sdk-v0.19.4 - operators.operatorframework.io/project_layout: go.kubebuilder.io/v2 - repository: https://github.com/project-koku/koku-metrics-operator - support: Cost Management - name: koku-metrics-operator.v0.9.7 - namespace: placeholder -spec: - apiservicedefinitions: {} - customresourcedefinitions: - owned: - - description: KokuMetricsConfig is the Schema for the kokumetricsconfig API - kind: KokuMetricsConfig - name: kokumetricsconfigs.koku-metrics-cfg.openshift.io - version: v1beta1 - description: |- - # Koku Metrics Operator - ## Introduction - The `koku-metrics-operator` is a component of the [cost managment](https://access.redhat.com/documentation/en-us/openshift_container_platform/4.5/html/getting_started_with_cost_management/assembly_introduction_cost_management) service for Openshift, used to gather the required information from the cluster. It is recommended to be installed in OpenShift 4.5+. This operator obtains OpenShift usage data by querying Prometheus and uploads it to cost management to be processed. The Operator queries Prometheus every hour to create metric reports, which are then packaged and uploaded to cost management at [cloud.redhat.com](https://cloud.redhat.com). For more information, reach out to . - - This operator is capable of functioning within a disconnected/restricted network (aka air-gapped mode). In this mode, the operator will store the packaged reports for manual retrieval instead of being uploaded to cost management. Documentation for installing an operator within a restricted network can be found [here](https://docs.openshift.com/container-platform/4.5/operators/admin/olm-restricted-networks.html). - - For more information, reach out to . - ## Features and Capabilities - #### Metrics collection: - The Koku Metrics Operator (`koku-metrics-operator`) collects the metrics required for cost management by: - * Querying Prometheus to gather the necessary metrics for cost management. - * Writing Prometheus queries to CSV report files. - * Packaging the CSV report files into tarballs. - - #### Additional Capabilities: - * The operator can be configured to automatically upload the packaged reports to cost management through Red Hat Insights Ingress service. - * The operator can create a source in cloud.redhat.com. A source is required for cost management to process the uploaded packages. - * PersistentVolumeClaim (PVC) configuration: The KokuMetricsConfig CR can accept a PVC definition and the operator will create and mount the PVC. If one is not provided, a default PVC will be created. - * Restricted network installation: this operator can function on a restricted network. In this mode, the operator stores the packaged reports for manual retrieval. - - ## Limitations and Pre-Requisites - #### Limitations (Potential for metrics data loss) - * A source **must** exist in cloud.redhat.com for an uploaded payload to be processed by cost management. The operator sends the payload to the Red Hat Insights Ingress service which usually returns successfully, but the operator does not currently confirm with cost management that the payload was processed. After Ingress accepts the uploaded payload, the payload is removed from the operator and is gone forever. If the data within the payload is not processed, a gap will be introduced in the usage metrics. - - **Note** The following limitations are specific to operators configured to run in a restricted network: - * The `koku-metrics-operator` will not be able to generate new reports if the PVC storage is filled. If this occurs, the reports must be manually deleted from the PVC so that the operator can function as normal. - * The default report retention is 30 reports (about one week's worth of data). The reports must be manually downloaded and uploaded to cloud.redhat.com every week, or they will be deleted and the data will be lost. - - #### Storage configuration prerequisite - The operator will attempt to create and use the following PVC when installed: - - volume_claim_template: - apiVersion: v1 - kind: PersistentVolumeClaim - metadata: - name: koku-metrics-operator-data - spec: - accessModes: - - ReadWriteOnce - resources: - requests: - storage: 10Gi - - If a different PVC should be utilized, a valid PVC should be specified in the KokuMetricsConfig CR as described in the appropriate section below. The PVC to be used may exist already, or the operator will attempt to create it. - - To use the default specification, the follow assumptions must be met: - 1. A default StorageClass is defined. - 2. Dynamic provisioning for that default StorageClass is enabled. - - If these assumptions are not met, the operator will not deploy correctly. In these cases, storage must be manually configured. After configuring storage, a valid PVC template should be supplied in the `volume_claim_template` spec of the KokuMetricsConfig CR. - - ## Configure the koku-metrics-operator - **Note** There are separate instructions for configuring the `koku-metrics-operator` to run in a restricted network. - ##### Configure authentication - The default authentication for the operator is `token`. No further steps are required to configure token authentication. If `basic` is the preferred authentication method, a Secret must be created which holds username and password credentials: - 1. On the left navigation pane, select `Workloads` -> `Secrets` -> select Project: `koku-metrics-operator` -> `Create` -> `Key/Value Secret` - 2. Give the Secret a name and add 2 keys: `username` and `password` (all lowercase). The values for these keys correspond to cloud.redhat.com credentials. - 3. Select `Create`. - ##### Create the KokuMetricsConfig - Configure the koku-metrics-operator by creating a `KokuMetricsConfig`. - 1. On the left navigation pane, select `Operators` -> `Installed Operators` -> `koku-metrics-operator` -> `KokuMetricsConfig` -> `Create Instance`. - 2. For `basic` authentication, edit the following values in the spec: - * Replace `authentication: type:` with `basic`. - * Add the `secret_name` field under `authentication`, and set it equal to the name of the authentication Secret that was created above. The spec should look similar to the following: - - ``` - authentication: - secret_name: SECRET-NAME - type: basic - ``` - - 3. To configure the koku-metrics-operator to create a cost management source, edit the following values in the `source` field: - * Replace `INSERT-SOURCE-NAME` with the preferred name of the source to be created. - * Replace the `create_source` field value with `true`. - - **Note:** if the source already exists, replace `INSERT-SOURCE-NAME` with the existing name, and leave `create_source` as false. This will allow the operator to confirm the source exists. - 4. If not specified, the operator will create a default PersistentVolumeClaim called `koku-metrics-operator-data` with 10Gi of storage. To configure the koku-metrics-operator to use or create a different PVC, edit the following in the spec: - * Add the desired configuration to the `volume_claim_template` field in the spec: - - ``` - volume_claim_template: - apiVersion: v1 - kind: PersistentVolumeClaim - metadata: - name: - spec: - accessModes: - - ReadWriteOnce - resources: - requests: - storage: 10Gi - ``` - - **Note:** If using the YAML View, the `volume_claim_template` field must be added to the spec - 5. Select `Create`. - - # Restricted Network Usage (disconnected/air-gapped mode) - ## Installation - To install the `koku-metrics-operator` in a restricted network, follow the [olm documentation](https://docs.openshift.com/container-platform/4.5/operators/admin/olm-restricted-networks.html). The operator is found in the `community-operators` Catalog in the `registry.redhat.io/redhat/community-operator-index:latest` Index. If pruning the index before pushing to the mirrored registry, keep the `koku-metrics-operator` package. - - Within a restricted network, the operator queries prometheus to gather the necessary usage metrics, writes the query results to CSV files, and packages the reports for storage in the PVC. These reports then need to be manually downloaded from the cluster and uploaded to [cloud.redhat.com](https://cloud.redhat.com). - - For more information, reach out to . - ## Configure the koku-metrics-operator for a restricted network - ##### Create the KokuMetricsConfig - Configure the koku-metrics-operator by creating a `KokuMetricsConfig`. - 1. On the left navigation pane, select `Operators` -> `Installed Operators` -> `koku-metrics-operator` -> `KokuMetricsConfig` -> `Create Instance`. - 2. Specify the desired storage. If not specified, the operator will create a default Persistent Volume Claim called `koku-metrics-operator-data` with 10Gi of storage. To configure the koku-metrics-operator to use or create a different PVC, edit the following in the spec: - * Add the desired configuration to the `volume_claim_template` field in the spec: - - ``` - volume_claim_template: - apiVersion: v1 - kind: PersistentVolumeClaim - metadata: - name: - spec: - storageClassName: - accessModes: - - ReadWriteOnce - resources: - requests: - storage: 10Gi - ``` - - **Note:** If using the YAML View, the `volume_claim_template` field must be added to the spec - 3. (Optional) Specify the desired report retention. The operator will retain 30 reports by default. This corresponds to approximately one week's worth of data if using the default packaging cycle. To modify the number of retained reports: - * Change the `packaging` spec field `max_reports_to_store` to the desired number of reports to retain. Once this max number is reached, the operator will start removing the oldest packages remaining on the PVC: - - ``` - packaging: - max_size_MB: 100 - max_reports_to_store: 30 - ``` - - **Note:** The number of retained reports directly affects the frequency that reports must be manually downloaded from the PVC. Take caution in setting this to a higher number of reports, as the operator cannot write data to the PVC if the storage is full. - 4. To configure the operator to perform in a restricted network, set the `upload_toggle` to `false`: - - ``` - upload: - upload_cycle: 360, - upload_toggle: false - ``` - - 5. Select `Create`. - - ## Download reports from the Operator & clean up the PVC - If the `koku-metrics-operator` is configured to run in a restricted network, the metric reports will not automatically upload to cost managment. Instead, they need to be manually copied from the PVC for upload to [cloud.redhat.com](https://cloud.redhat.com). The default configuration saves one week of reports which means the process of downloading and uploading reports should be repeated weekly to prevent loss of metrics data. To download the reports, complete the following steps: - 1. Create the following Pod, ensuring the `claimName` matches the PVC containing the report data: - - ``` - kind: Pod - apiVersion: v1 - metadata: - name: volume-shell - namespace: koku-metrics-operator - spec: - volumes: - - name: koku-metrics-operator-reports - persistentVolumeClaim: - claimName: koku-metrics-operator-data - containers: - - name: volume-shell - image: busybox - command: ['sleep', '3600'] - volumeMounts: - - name: koku-metrics-operator-reports - mountPath: /tmp/koku-metrics-operator-reports - ``` - - 2. Use rsync to copy all of the files ready for upload from the PVC to a local folder: - - ``` - $ oc rsync volume-shell:/tmp/koku-metrics-operator-reports/upload local/path/to/save/folder - ``` - - 3. Once confirming that the files have been successfully copied, use rsh to connect to the pod and delete the contents of the upload folder so that they are no longer in storage: - - ``` - $ oc rsh volume-shell - $ rm /tmp/koku-metrics-operator-reports/upload/* - ``` - - 4. (Optional) Delete the pod that was used to connect to the PVC: - - ``` - $ oc delete -f volume-shell.yaml - ``` - - ## Create a source - In a restricted network, the `koku-metrics-operator` cannot automatically create a source. This process must be done manually. In the cloud.redhat.com platform, open the [Sources menu](https://cloud.redhat.com/settings/sources/) to begin adding an OpenShift source to cost management: - - Prerequisites: - * The cluster identifier which can be found in the KokuMetricsConfig CR, the cluster Overview page, or the cluster Help > About. - - Create source: - 1. Navigate to the Sources menu - 2. Select the `Red Hat sources` tab - 3. Create a new `Red Hat Openshift Container Platform` source: - * give the source a unique name - * add the Cost Management application - * add the cluster identifier - 4. In the Sources wizard, review the details and click `Finish` to create the Source. - - ## Upload the reports to cost managment - Uploading reports to cost managment is done through curl: - - $ curl -vvvv -F "file=@FILE_NAME.tar.gz;type=application/vnd.redhat.hccm.tar+tgz" https://cloud.redhat.com/api/ingress/v1/upload -u USERNAME:PASS - - where `USERNAME` and `PASS` correspond to the user credentials for [cloud.redhat.com](https://cloud.redhat.com), and `FILE_NAME` is the name of the report to upload. - - displayName: Koku Metrics Operator - icon: - - base64data: PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4KPCEtLSBHZW5lcmF0b3I6IEFkb2JlIElsbHVzdHJhdG9yIDIyLjEuMCwgU1ZHIEV4cG9ydCBQbHVnLUluIC4gU1ZHIFZlcnNpb246IDYuMDAgQnVpbGQgMCkgIC0tPgo8c3ZnIHZlcnNpb249IjEuMSIgaWQ9IkxheWVyXzEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4IgoJIHZpZXdCb3g9IjAgMCAzMDAgMzAwIiBzd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atype: image/svg+xml - install: - spec: - clusterPermissions: - - rules: - - apiGroups: - - config.openshift.io - resources: - - clusterversions - verbs: - - get - - list - - watch - - apiGroups: - - "" - resources: - - namespaces - verbs: - - get - - list - - watch - - apiGroups: - - "" - resources: - - secrets - verbs: - - get - serviceAccountName: koku-metrics-manager-role - deployments: - - name: koku-metrics-controller-manager - spec: - replicas: 1 - selector: - matchLabels: - control-plane: controller-manager - strategy: {} - template: - metadata: - labels: - control-plane: controller-manager - spec: - containers: - - args: - - --enable-leader-election - command: - - /manager - env: - - name: IN_CLUSTER - value: "true" - - name: WATCH_NAMESPACE - valueFrom: - fieldRef: - fieldPath: metadata.annotations['olm.targetNamespaces'] - image: quay.io/project-koku/koku-metrics-operator@sha256:50fd60d011a700edf41e53f69ea4717b31b26ceb1f9e079b1d4372570c8f9d13 - name: manager - resources: - limits: - cpu: 500m - memory: 500Mi - requests: - cpu: 100m - memory: 20Mi - terminationMessagePolicy: FallbackToLogsOnError - volumeMounts: - - mountPath: /tmp/koku-metrics-operator-reports - name: koku-metrics-operator-reports - serviceAccountName: koku-metrics-manager-role - terminationGracePeriodSeconds: 10 - volumes: - - name: koku-metrics-operator-reports - permissions: - - rules: - - apiGroups: - - "" - resources: - - configmaps - verbs: - - get - - list - - watch - - create - - update - - patch - - delete - - apiGroups: - - "" - resources: - - configmaps/status - verbs: - - get - - update - - patch - - apiGroups: - - "" - resources: - - events - verbs: - - create - - patch - - apiGroups: - - apps - resources: - - deployments - verbs: - - get - - list - - patch - - watch - - apiGroups: - - "" - resources: - - configmaps - - endpoints - - events - - persistentvolumeclaims - - pods - - secrets - - serviceaccounts - - services - - services/finalizers - verbs: - - create - - delete - - get - - list - - patch - - update - - watch - - apiGroups: - - koku-metrics-cfg.openshift.io - resources: - - kokumetricsconfigs - verbs: - - create - - delete - - get - - list - - patch - - update - - watch - - apiGroups: - - koku-metrics-cfg.openshift.io - resources: - - kokumetricsconfigs/status - verbs: - - get - - patch - - update - - apiGroups: - - operators.coreos.com - resources: - - clusterserviceversions - verbs: - - get - - list - - patch - - update - - watch - serviceAccountName: koku-metrics-manager-role - strategy: deployment - installModes: - - supported: true - type: OwnNamespace - - supported: true - type: SingleNamespace - - supported: false - type: MultiNamespace - - supported: false - type: AllNamespaces - relatedImages: - - name: koku-metrics-operator - image: quay.io/project-koku/koku-metrics-operator@sha256:50fd60d011a700edf41e53f69ea4717b31b26ceb1f9e079b1d4372570c8f9d13 - keywords: - - cost - - management - - usage - - monitor - maintainers: - - email: costmanagement@redhat.com - name: costmanagement - maturity: alpha - provider: - name: Red Hat - replaces: koku-metrics-operator.v0.9.6 - version: 0.9.7 diff --git a/koku-metrics-operator/0.9.7/metadata/annotations.yaml b/koku-metrics-operator/0.9.7/metadata/annotations.yaml deleted file mode 100644 index 1df004507..000000000 --- a/koku-metrics-operator/0.9.7/metadata/annotations.yaml +++ /dev/null @@ -1,10 +0,0 @@ -annotations: - operators.operatorframework.io.bundle.channel.default.v1: beta - operators.operatorframework.io.bundle.channels.v1: alpha,beta - operators.operatorframework.io.bundle.manifests.v1: manifests/ - operators.operatorframework.io.bundle.mediatype.v1: registry+v1 - operators.operatorframework.io.bundle.metadata.v1: metadata/ - operators.operatorframework.io.bundle.package.v1: koku-metrics-operator - operators.operatorframework.io.metrics.builder: operator-sdk-v0.19.4 - operators.operatorframework.io.metrics.mediatype.v1: metrics+v1 - operators.operatorframework.io.metrics.project_layout: go.kubebuilder.io/v2 diff --git a/koku-metrics-operator/0.9.8/Dockerfile b/koku-metrics-operator/0.9.8/Dockerfile deleted file mode 100644 index baca1a624..000000000 --- a/koku-metrics-operator/0.9.8/Dockerfile +++ /dev/null @@ -1,14 +0,0 @@ -FROM scratch - -LABEL operators.operatorframework.io.bundle.mediatype.v1=registry+v1 -LABEL operators.operatorframework.io.bundle.manifests.v1=manifests/ -LABEL operators.operatorframework.io.bundle.metadata.v1=metadata/ -LABEL operators.operatorframework.io.bundle.package.v1=koku-metrics-operator -LABEL operators.operatorframework.io.bundle.channels.v1=alpha,beta -LABEL operators.operatorframework.io.bundle.channel.default.v1=beta -LABEL operators.operatorframework.io.metrics.mediatype.v1=metrics+v1 -LABEL operators.operatorframework.io.metrics.builder=operator-sdk-v0.19.4 -LABEL operators.operatorframework.io.metrics.project_layout=go.kubebuilder.io/v2 - -COPY manifests /manifests/ -COPY metadata /metadata/ diff --git a/koku-metrics-operator/0.9.8/manifests/koku-metrics-cfg.openshift.io_kokumetricsconfigs.yaml b/koku-metrics-operator/0.9.8/manifests/koku-metrics-cfg.openshift.io_kokumetricsconfigs.yaml deleted file mode 100644 index 117df55da..000000000 --- a/koku-metrics-operator/0.9.8/manifests/koku-metrics-cfg.openshift.io_kokumetricsconfigs.yaml +++ /dev/null @@ -1,833 +0,0 @@ -apiVersion: apiextensions.k8s.io/v1 -kind: CustomResourceDefinition -metadata: - annotations: - controller-gen.kubebuilder.io/version: v0.3.0 - creationTimestamp: null - name: kokumetricsconfigs.koku-metrics-cfg.openshift.io -spec: - group: koku-metrics-cfg.openshift.io - names: - kind: KokuMetricsConfig - listKind: KokuMetricsConfigList - plural: kokumetricsconfigs - singular: kokumetricsconfig - scope: Namespaced - versions: - - name: v1beta1 - schema: - openAPIV3Schema: - description: KokuMetricsConfig is the Schema for the kokumetricsconfig API - properties: - apiVersion: - description: 'APIVersion defines the versioned schema of this representation - of an object. Servers should convert recognized schemas to the latest - internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' - type: string - kind: - description: 'Kind is a string value representing the REST resource this - object represents. Servers may infer this from the endpoint the client - submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' - type: string - metadata: - type: object - spec: - description: KokuMetricsConfigSpec defines the desired state of KokuMetricsConfig. - properties: - api_url: - default: https://cloud.redhat.com - description: FOR DEVELOPMENT ONLY. APIURL is a field of KokuMetricsConfig - to represent the url of the API endpoint for service interaction. - The default is `https://cloud.redhat.com`. - type: string - authentication: - description: Authentication is a field of KokuMetricsConfig to represent - the authentication object. - properties: - secret_name: - description: AuthenticationSecretName is a field of KokuMetricsConfig - to represent the secret with the user and password used for - uploads. - type: string - type: - default: token - description: 'AuthType is a field of KokuMetricsConfig to represent - the authentication type to be used basic or token. Valid values - are: - "basic" : Enables authentication using user and password - from authentication secret. - "token" (default): Uses cluster - token for authentication.' - enum: - - token - - basic - type: string - required: - - type - type: object - clusterID: - description: ClusterID is a field of KokuMetricsConfig to represent - the cluster UUID. Normally this value should not be specified. Only - set this value if the clusterID cannot be obtained from the ClusterVersion. - type: string - clusterVersion: - description: ClusterVersion is a field of KokuMetricsConfig to represent - the cluster version. Normally this value should not be specified. - Only set this value if the clusterVersion cannot be obtained from - the ClusterVersion. - type: string - packaging: - description: Packaging is a field of KokuMetricsConfig to represent - the packaging object. - properties: - max_reports_to_store: - default: 30 - description: MaxReports is a field of KokuMetricsConfig to represent - the maximum number of reports to store. The default is 30 reports - which corresponds to approximately 7 days worth of data given - the other default values. - format: int64 - minimum: 1 - type: integer - max_size_MB: - default: 100 - description: MaxSize is a field of KokuMetricsConfig to represent - the max file size in megabytes that will be compressed for upload - to Ingress. The default is 100. - format: int64 - maximum: 100 - minimum: 1 - type: integer - required: - - max_reports_to_store - - max_size_MB - type: object - prometheus_config: - description: PrometheusConfig is a field of KokuMetricsConfig to represent - the configuration of Prometheus connection. - properties: - service_address: - default: https://thanos-querier.openshift-monitoring.svc:9091 - description: FOR DEVELOPMENT ONLY. SvcAddress is a field of KokuMetricsConfig - to represent the thanos-querier address. The default is `https://thanos-querier.openshift-monitoring.svc:9091`. - type: string - skip_tls_verification: - default: false - description: FOR DEVELOPMENT ONLY. SkipTLSVerification is a field - of KokuMetricsConfig to represent if the thanos-querier endpoint - must be certificate validated. The default is false. - type: boolean - required: - - service_address - - skip_tls_verification - type: object - source: - description: Source is a field of KokuMetricsConfig to represent the - desired source on cloud.redhat.com. - properties: - check_cycle: - default: 1440 - description: CheckCycle is a field of KokuMetricsConfig to represent - the number of minutes between each source check schedule The - default is 1440 min (24 hours). - format: int64 - minimum: 0 - type: integer - create_source: - default: false - description: CreateSource is a field of KokuMetricsConfigSpec - to represent if the source should be created if not found. - type: boolean - name: - description: SourceName is a field of KokuMetricsConfigSpec to - represent the source name on cloud.redhat.com. - type: string - sources_path: - default: /api/sources/v1.0/ - description: FOR DEVELOPMENT ONLY. SourcesAPIPath is a field of - KokuMetricsConfig to represent the path of the Sources API service. - The default is `/api/sources/v1.0/`. - type: string - required: - - check_cycle - - create_source - - sources_path - type: object - upload: - description: Upload is a field of KokuMetricsConfig to represent the - upload object. - properties: - ingress_path: - default: /api/ingress/v1/upload - description: FOR DEVELOPMENT ONLY. IngressAPIPath is a field of - KokuMetricsConfig to represent the path of the Ingress API service. - The default is `/api/ingress/v1/upload`. - type: string - upload_cycle: - default: 360 - description: UploadCycle is a field of KokuMetricsConfig to represent - the number of minutes between each upload schedule. The default - is 360 min (6 hours). - format: int64 - minimum: 0 - type: integer - upload_toggle: - default: true - description: UploadToggle is a field of KokuMetricsConfig to represent - if the operator is installed in a restricted-network. If `false`, - the operator will not upload to cloud.redhat.com or check/create - sources. The default is true. - type: boolean - upload_wait: - description: UploadWait is a field of KokuMetricsConfig to represent - the time to wait before sending an upload. - format: int64 - minimum: 0 - type: integer - validate_cert: - default: true - description: ValidateCert is a field of KokuMetricsConfig to represent - if the Ingress endpoint must be certificate validated. - type: boolean - required: - - ingress_path - - upload_cycle - - upload_toggle - - validate_cert - type: object - volume_claim_template: - description: VolumeClaimTemplate is a field of KokuMetricsConfig to - represent a PVC template. - properties: - apiVersion: - description: 'APIVersion defines the versioned schema of this - representation of an object. Servers should convert recognized - schemas to the latest internal value, and may reject unrecognized - values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' - type: string - kind: - description: 'Kind is a string value representing the REST resource - this object represents. Servers may infer this from the endpoint - the client submits requests to. Cannot be updated. In CamelCase. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' - type: string - metadata: - description: EmbeddedMetadata contains metadata relevant to an - EmbeddedResource. - properties: - annotations: - additionalProperties: - type: string - description: 'Annotations is an unstructured key value map - stored with a resource that may be set by external tools - to store and retrieve arbitrary metadata. They are not queryable - and should be preserved when modifying objects. More info: - http://kubernetes.io/docs/user-guide/annotations' - type: object - labels: - additionalProperties: - type: string - description: 'Map of string keys and values that can be used - to organize and categorize (scope and select) objects. May - match selectors of replication controllers and services. - More info: http://kubernetes.io/docs/user-guide/labels' - type: object - name: - description: 'Name must be unique within a namespace. Is required - when creating resources, although some resources may allow - a client to request the generation of an appropriate name - automatically. Name is primarily intended for creation idempotence - and configuration definition. Cannot be updated. More info: - http://kubernetes.io/docs/user-guide/identifiers#names' - type: string - type: object - spec: - description: 'Spec defines the desired characteristics of a volume - requested by a pod author. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims' - properties: - accessModes: - description: 'AccessModes contains the desired access modes - the volume should have. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes-1' - items: - type: string - type: array - dataSource: - description: 'This field can be used to specify either: * - An existing VolumeSnapshot object (snapshot.storage.k8s.io/VolumeSnapshot - - Beta) * An existing PVC (PersistentVolumeClaim) * An existing - custom resource/object that implements data population (Alpha) - In order to use VolumeSnapshot object types, the appropriate - feature gate must be enabled (VolumeSnapshotDataSource or - AnyVolumeDataSource) If the provisioner or an external controller - can support the specified data source, it will create a - new volume based on the contents of the specified data source. - If the specified data source is not supported, the volume - will not be created and the failure will be reported as - an event. In the future, we plan to support more data source - types and the behavior of the provisioner may change.' - properties: - apiGroup: - description: APIGroup is the group for the resource being - referenced. If APIGroup is not specified, the specified - Kind must be in the core API group. For any other third-party - types, APIGroup is required. - type: string - kind: - description: Kind is the type of resource being referenced - type: string - name: - description: Name is the name of resource being referenced - type: string - required: - - kind - - name - type: object - resources: - description: 'Resources represents the minimum resources the - volume should have. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources' - properties: - limits: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - description: 'Limits describes the maximum amount of compute - resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/' - type: object - requests: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - description: 'Requests describes the minimum amount of - compute resources required. If Requests is omitted for - a container, it defaults to Limits if that is explicitly - specified, otherwise to an implementation-defined value. - More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/' - type: object - type: object - selector: - description: A label query over volumes to consider for binding. - properties: - matchExpressions: - description: matchExpressions is a list of label selector - requirements. The requirements are ANDed. - items: - description: A label selector requirement is a selector - that contains values, a key, and an operator that - relates the key and values. - properties: - key: - description: key is the label key that the selector - applies to. - type: string - operator: - description: operator represents a key's relationship - to a set of values. Valid operators are In, NotIn, - Exists and DoesNotExist. - type: string - values: - description: values is an array of string values. - If the operator is In or NotIn, the values array - must be non-empty. If the operator is Exists or - DoesNotExist, the values array must be empty. - This array is replaced during a strategic merge - patch. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - description: matchLabels is a map of {key,value} pairs. - A single {key,value} in the matchLabels map is equivalent - to an element of matchExpressions, whose key field is - "key", the operator is "In", and the values array contains - only "value". The requirements are ANDed. - type: object - type: object - storageClassName: - description: 'Name of the StorageClass required by the claim. - More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#class-1' - type: string - volumeMode: - description: volumeMode defines what type of volume is required - by the claim. Value of Filesystem is implied when not included - in claim spec. - type: string - volumeName: - description: VolumeName is the binding reference to the PersistentVolume - backing this claim. - type: string - type: object - type: object - required: - - authentication - - packaging - - prometheus_config - - source - - upload - type: object - status: - description: KokuMetricsConfigStatus defines the observed state of KokuMetricsConfig. - properties: - api_url: - description: APIURL is a field of KokuMetricsConfig to represent the - url of the API endpoint for service interaction. - type: string - authentication: - description: Authentication is a field of KokuMetricsConfig to represent - the authentication status. - properties: - credentials_found: - description: AuthenticationCredentialsFound is a field of KokuMetricsConfig - to represent if used for uploads were found. - type: boolean - error: - description: AuthErrorMessage is a field of KokuMetricsConfig - to represent an `invalid credentials` error message. - type: string - last_credential_verification_time: - description: LastVerificationTime is a field of KokuMetricsConfig - to represent the last time credentials were verified. - format: date-time - nullable: true - type: string - secret_name: - description: AuthenticationSecretName is a field of KokuMetricsConfig - to represent the secret with the user and password used for - uploads. - type: string - type: - description: AuthType is a field of KokuMetricsConfig to represent - the authentication type to be used basic or token. - enum: - - token - - basic - type: string - valid_basic_auth: - description: ValidBasicAuth is a field of KokuMetricsConfig to - represent if the given basic auth credentials are valid. - type: boolean - type: object - clusterID: - description: ClusterID is a field of KokuMetricsConfig to represent - the cluster UUID. - type: string - clusterVersion: - description: ClusterVersion is a field of KokuMetricsConfig to represent - the cluster version. - type: string - operator_commit: - description: OperatorCommit is a field of KokuMetricsConfig that shows - the commit hash of the operator. - type: string - packaging: - description: Packaging is a field of KokuMetricsConfig to represent - the packaging status - properties: - error: - description: PackagingError is a field of KokuMetricsConfig to - represent the error encountered packaging the reports. - type: string - last_successful_packaging_time: - description: LastSuccessfulPackagingTime is a field of KokuMetricsConfig - that shows the time of the last successful file packaging. - format: date-time - nullable: true - type: string - max_reports_to_store: - description: MaxReports is a field of KokuMetricsConfig to represent - the maximum number of reports to store. - format: int64 - type: integer - max_size_MB: - description: MaxSize is a field of KokuMetricsConfig to represent - the max file size in megabytes that will be compressed for upload - to Ingress. - format: int64 - type: integer - number_reports_stored: - description: ReportCount is a field of KokuMetricsConfig to represent - the number of reports in storage. - format: int64 - type: integer - packaged_files: - description: PackagedFiles is a field of KokuMetricsConfig to - represent the list of file packages in storage. - items: - type: string - type: array - type: object - persistent_volume_claim: - description: PersistentVolumeClaim is a field of KokuMetricsConfig - to represent a PVC. - properties: - apiVersion: - description: 'APIVersion defines the versioned schema of this - representation of an object. Servers should convert recognized - schemas to the latest internal value, and may reject unrecognized - values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' - type: string - kind: - description: 'Kind is a string value representing the REST resource - this object represents. Servers may infer this from the endpoint - the client submits requests to. Cannot be updated. In CamelCase. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' - type: string - metadata: - description: EmbeddedMetadata contains metadata relevant to an - EmbeddedResource. - properties: - annotations: - additionalProperties: - type: string - description: 'Annotations is an unstructured key value map - stored with a resource that may be set by external tools - to store and retrieve arbitrary metadata. They are not queryable - and should be preserved when modifying objects. More info: - http://kubernetes.io/docs/user-guide/annotations' - type: object - labels: - additionalProperties: - type: string - description: 'Map of string keys and values that can be used - to organize and categorize (scope and select) objects. May - match selectors of replication controllers and services. - More info: http://kubernetes.io/docs/user-guide/labels' - type: object - name: - description: 'Name must be unique within a namespace. Is required - when creating resources, although some resources may allow - a client to request the generation of an appropriate name - automatically. Name is primarily intended for creation idempotence - and configuration definition. Cannot be updated. More info: - http://kubernetes.io/docs/user-guide/identifiers#names' - type: string - type: object - spec: - description: 'Spec defines the desired characteristics of a volume - requested by a pod author. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims' - properties: - accessModes: - description: 'AccessModes contains the desired access modes - the volume should have. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes-1' - items: - type: string - type: array - dataSource: - description: 'This field can be used to specify either: * - An existing VolumeSnapshot object (snapshot.storage.k8s.io/VolumeSnapshot - - Beta) * An existing PVC (PersistentVolumeClaim) * An existing - custom resource/object that implements data population (Alpha) - In order to use VolumeSnapshot object types, the appropriate - feature gate must be enabled (VolumeSnapshotDataSource or - AnyVolumeDataSource) If the provisioner or an external controller - can support the specified data source, it will create a - new volume based on the contents of the specified data source. - If the specified data source is not supported, the volume - will not be created and the failure will be reported as - an event. In the future, we plan to support more data source - types and the behavior of the provisioner may change.' - properties: - apiGroup: - description: APIGroup is the group for the resource being - referenced. If APIGroup is not specified, the specified - Kind must be in the core API group. For any other third-party - types, APIGroup is required. - type: string - kind: - description: Kind is the type of resource being referenced - type: string - name: - description: Name is the name of resource being referenced - type: string - required: - - kind - - name - type: object - resources: - description: 'Resources represents the minimum resources the - volume should have. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources' - properties: - limits: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - description: 'Limits describes the maximum amount of compute - resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/' - type: object - requests: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - description: 'Requests describes the minimum amount of - compute resources required. If Requests is omitted for - a container, it defaults to Limits if that is explicitly - specified, otherwise to an implementation-defined value. - More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/' - type: object - type: object - selector: - description: A label query over volumes to consider for binding. - properties: - matchExpressions: - description: matchExpressions is a list of label selector - requirements. The requirements are ANDed. - items: - description: A label selector requirement is a selector - that contains values, a key, and an operator that - relates the key and values. - properties: - key: - description: key is the label key that the selector - applies to. - type: string - operator: - description: operator represents a key's relationship - to a set of values. Valid operators are In, NotIn, - Exists and DoesNotExist. - type: string - values: - description: values is an array of string values. - If the operator is In or NotIn, the values array - must be non-empty. If the operator is Exists or - DoesNotExist, the values array must be empty. - This array is replaced during a strategic merge - patch. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - description: matchLabels is a map of {key,value} pairs. - A single {key,value} in the matchLabels map is equivalent - to an element of matchExpressions, whose key field is - "key", the operator is "In", and the values array contains - only "value". The requirements are ANDed. - type: object - type: object - storageClassName: - description: 'Name of the StorageClass required by the claim. - More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#class-1' - type: string - volumeMode: - description: volumeMode defines what type of volume is required - by the claim. Value of Filesystem is implied when not included - in claim spec. - type: string - volumeName: - description: VolumeName is the binding reference to the PersistentVolume - backing this claim. - type: string - type: object - type: object - prometheus: - description: Prometheus represents the status of premetheus queries. - properties: - configuration_error: - description: ConfigError is a field of KokuMetricsConfigStatus - to represent errors during prometheus configuration. - type: string - last_query_start_time: - description: LastQueryStartTime is a field of KokuMetricsConfigStatus - to represent the last time queries were started. - format: date-time - nullable: true - type: string - last_query_success_time: - description: LastQuerySuccessTime is a field of KokuMetricsConfigStatus - to represent the last time queries were successful. - format: date-time - nullable: true - type: string - prometheus_configured: - description: PrometheusConfigured is a field of KokuMetricsConfigStatus - to represent if the operator is configured to connect to prometheus. - type: boolean - prometheus_connected: - description: PrometheusConnected is a field of KokuMetricsConfigStatus - to represent if prometheus can be queried. - type: boolean - prometheus_connection_error: - description: ConnectionError is a field of KokuMetricsConfigStatus - to represent errors during prometheus test query. - type: string - service_address: - description: SvcAddress is the internal thanos-querier address. - type: string - skip_tls_verification: - description: SkipTLSVerification is a field of KokuMetricsConfigStatus - to represent if the thanos-querier endpoint must be certificate - validated. - type: boolean - required: - - prometheus_configured - - prometheus_connected - type: object - reports: - description: Reports represents the status of report generation. - properties: - data_collected: - description: DataCollected is a field of KokuMetricsConfigStatus - to represent whether or not data was collected for the last - query. - type: boolean - data_collection_message: - description: DataCollectionMessage is a field of KokuMetricsConfigStatus - to represent a message associated with the data_collected status. - type: string - last_hour_queried: - description: LastHourQueried is a field of KokuMetricsConfigStatus - to represent the time range for which metrics were last queried. - type: string - report_month: - description: ReportMonth is a field of KokuMetricsConfigStatus - to represent the month for which reports are being generated. - type: string - type: object - source: - description: Source is a field of KokuMetricsConfig to represent the - observed state of the source on cloud.redhat.com. - properties: - check_cycle: - description: CheckCycle is a field of KokuMetricsConfig to represent - the number of minutes between each source check schedule. The - default is 1440 min (24 hours). - format: int64 - type: integer - create_source: - description: CreateSource is a field of KokuMetricsConfigStatus - to represent if the source should be created if not found. A - source will not be created if upload_toggle is `false`. - type: boolean - error: - description: SourceError is a field of KokuMetricsConfigStatus - to represent the error encountered creating the source. - type: string - last_check_time: - description: LastSourceCheckTime is a field of KokuMetricsConfig - that shows the time that the last check was attempted. - format: date-time - nullable: true - type: string - name: - description: SourceName is a field of KokuMetricsConfigStatus - to represent the source name on cloud.redhat.com. - type: string - source_defined: - description: SourceDefined is a field of KokuMetricsConfigStatus - to represent if the source exists as defined on cloud.redhat.com. - type: boolean - sources_path: - description: SourcesAPIPath is a field of KokuMetricsConfig to - represent the path of the Sources API service. - type: string - type: object - storage: - description: Storage is a field - properties: - volume_mounted: - description: VolumeMounted is a bool to indicate if storage volume - was mounted. - type: boolean - volume_type: - description: VolumeType is the string representation of the volume - type. - type: string - type: object - upload: - description: Upload is a field of KokuMetricsConfig to represent the - upload object. - properties: - error: - description: UploadError is a field of KokuMetricsConfigStatus - to represent the error encountered uploading reports. - type: string - ingress_path: - description: IngressAPIPath is a field of KokuMetricsConfig to - represent the path of the Ingress API service. - type: string - last_payload_files: - description: LastPayloadFiles is a field of KokuMetricsConfig - to represent the list of files in the last payload that was - sent. - items: - type: string - type: array - last_payload_manifest_id: - description: LastPayloadManifest is a field of KokuMetricsConfig - that shows the manifestID of the last payload. - type: string - last_payload_name: - description: LastPayloadName is a field of KokuMetricsConfig that - shows the name of the last payload file. - type: string - last_payload_request_id: - description: LastPayloadRequestID is a field of KokuMetricsConfig - that shows the insights request id of the last payload. - type: string - last_successful_upload_time: - description: LastSuccessfulUploadTime is a field of KokuMetricsConfig - that shows the time of the last successful upload. - format: date-time - nullable: true - type: string - last_upload_status: - description: LastUploadStatus is a field of KokuMetricsConfig - that shows the http status of the last upload. - type: string - upload: - description: UploadToggle is a field of KokuMetricsConfig to represent - if the operator should upload to cloud.redhat.com. The default - is true - type: boolean - upload_cycle: - description: UploadCycle is a field of KokuMetricsConfig to represent - the number of minutes between each upload schedule. The default - is 360 min (6 hours). - format: int64 - type: integer - upload_wait: - description: UploadWait is a field of KokuMetricsConfig to represent - the time to wait before sending an upload. - format: int64 - type: integer - validate_cert: - description: ValidateCert is a field of KokuMetricsConfig to represent - if the Ingress endpoint must be certificate validated. - type: boolean - type: object - type: object - required: - - spec - type: object - served: true - storage: true - subresources: - status: {} -status: - acceptedNames: - kind: "" - plural: "" - conditions: [] - storedVersions: [] diff --git a/koku-metrics-operator/0.9.8/manifests/koku-metrics-operator.clusterserviceversion.yaml b/koku-metrics-operator/0.9.8/manifests/koku-metrics-operator.clusterserviceversion.yaml deleted file mode 100644 index a103c54cd..000000000 --- a/koku-metrics-operator/0.9.8/manifests/koku-metrics-operator.clusterserviceversion.yaml +++ /dev/null @@ -1,456 +0,0 @@ -apiVersion: operators.coreos.com/v1alpha1 -kind: ClusterServiceVersion -metadata: - annotations: - alm-examples: |- - [ - { - "apiVersion": "koku-metrics-cfg.openshift.io/v1beta1", - "kind": "KokuMetricsConfig", - "metadata": { - "name": "kokumetricscfg-sample-v1beta1" - }, - "spec": { - "authentication": { - "type": "token" - }, - "packaging": { - "max_reports_to_store": 30, - "max_size_MB": 100 - }, - "prometheus_config": {}, - "source": { - "check_cycle": 1440, - "create_source": false, - "name": "INSERT-SOURCE-NAME" - }, - "upload": { - "upload_cycle": 360, - "upload_toggle": true - } - } - } - ] - capabilities: Seamless Upgrades - categories: Monitoring - certified: "false" - containerImage: quay.io/project-koku/koku-metrics-operator@sha256:6c0b63c1e94141f501afe1b46142876fba7ae946b3c1983bff950e4b82a1a444 - createdAt: "2021-07-28T16:24:29Z" - description: A Golang-based OpenShift Operator that generates and uploads OpenShift - usage metrics to cost management. - operatorframework.io/suggested-namespace: koku-metrics-operator - operators.openshift.io/infrastructure-features: '["Disconnected"]' - operators.operatorframework.io/builder: operator-sdk-v0.19.4 - operators.operatorframework.io/project_layout: go.kubebuilder.io/v2 - repository: https://github.com/project-koku/koku-metrics-operator - support: Cost Management - name: koku-metrics-operator.v0.9.8 - namespace: placeholder -spec: - apiservicedefinitions: {} - customresourcedefinitions: - owned: - - description: KokuMetricsConfig is the Schema for the kokumetricsconfig API - kind: KokuMetricsConfig - name: kokumetricsconfigs.koku-metrics-cfg.openshift.io - version: v1beta1 - description: |- - # Koku Metrics Operator - ## Introduction - The `koku-metrics-operator` is a component of the [cost managment](https://access.redhat.com/documentation/en-us/openshift_container_platform/4.5/html/getting_started_with_cost_management/assembly_introduction_cost_management) service for Openshift, used to gather the required information from the cluster. It is recommended to be installed in OpenShift 4.5+. This operator obtains OpenShift usage data by querying Prometheus and uploads it to cost management to be processed. The Operator queries Prometheus every hour to create metric reports, which are then packaged and uploaded to cost management at [cloud.redhat.com](https://cloud.redhat.com). For more information, reach out to . - - This operator is capable of functioning within a disconnected/restricted network (aka air-gapped mode). In this mode, the operator will store the packaged reports for manual retrieval instead of being uploaded to cost management. Documentation for installing an operator within a restricted network can be found [here](https://docs.openshift.com/container-platform/4.5/operators/admin/olm-restricted-networks.html). - - For more information, reach out to . - ## Features and Capabilities - #### Metrics collection: - The Koku Metrics Operator (`koku-metrics-operator`) collects the metrics required for cost management by: - * Querying Prometheus to gather the necessary metrics for cost management. - * Writing Prometheus queries to CSV report files. - * Packaging the CSV report files into tarballs. - - #### Additional Capabilities: - * The operator can be configured to automatically upload the packaged reports to cost management through Red Hat Insights Ingress service. - * The operator can create a source in cloud.redhat.com. A source is required for cost management to process the uploaded packages. - * PersistentVolumeClaim (PVC) configuration: The KokuMetricsConfig CR can accept a PVC definition and the operator will create and mount the PVC. If one is not provided, a default PVC will be created. - * Restricted network installation: this operator can function on a restricted network. In this mode, the operator stores the packaged reports for manual retrieval. - - ## Limitations and Pre-Requisites - #### Limitations (Potential for metrics data loss) - * A source **must** exist in cloud.redhat.com for an uploaded payload to be processed by cost management. The operator sends the payload to the Red Hat Insights Ingress service which usually returns successfully, but the operator does not currently confirm with cost management that the payload was processed. After Ingress accepts the uploaded payload, the payload is removed from the operator and is gone forever. If the data within the payload is not processed, a gap will be introduced in the usage metrics. - - **Note** The following limitations are specific to operators configured to run in a restricted network: - * The `koku-metrics-operator` will not be able to generate new reports if the PVC storage is filled. If this occurs, the reports must be manually deleted from the PVC so that the operator can function as normal. - * The default report retention is 30 reports (about one week's worth of data). The reports must be manually downloaded and uploaded to cloud.redhat.com every week, or they will be deleted and the data will be lost. - - #### Storage configuration prerequisite - The operator will attempt to create and use the following PVC when installed: - - volume_claim_template: - apiVersion: v1 - kind: PersistentVolumeClaim - metadata: - name: koku-metrics-operator-data - spec: - accessModes: - - ReadWriteOnce - resources: - requests: - storage: 10Gi - - If a different PVC should be utilized, a valid PVC should be specified in the KokuMetricsConfig CR as described in the appropriate section below. The PVC to be used may exist already, or the operator will attempt to create it. - - To use the default specification, the follow assumptions must be met: - 1. A default StorageClass is defined. - 2. Dynamic provisioning for that default StorageClass is enabled. - - If these assumptions are not met, the operator will not deploy correctly. In these cases, storage must be manually configured. After configuring storage, a valid PVC template should be supplied in the `volume_claim_template` spec of the KokuMetricsConfig CR. - - ## Configure the koku-metrics-operator - **Note** There are separate instructions for configuring the `koku-metrics-operator` to run in a restricted network. - ##### Configure authentication - The default authentication for the operator is `token`. No further steps are required to configure token authentication. If `basic` is the preferred authentication method, a Secret must be created which holds username and password credentials: - 1. On the left navigation pane, select `Workloads` -> `Secrets` -> select Project: `koku-metrics-operator` -> `Create` -> `Key/Value Secret` - 2. Give the Secret a name and add 2 keys: `username` and `password` (all lowercase). The values for these keys correspond to cloud.redhat.com credentials. - 3. Select `Create`. - ##### Create the KokuMetricsConfig - Configure the koku-metrics-operator by creating a `KokuMetricsConfig`. - 1. On the left navigation pane, select `Operators` -> `Installed Operators` -> `koku-metrics-operator` -> `KokuMetricsConfig` -> `Create Instance`. - 2. For `basic` authentication, edit the following values in the spec: - * Replace `authentication: type:` with `basic`. - * Add the `secret_name` field under `authentication`, and set it equal to the name of the authentication Secret that was created above. The spec should look similar to the following: - - ``` - authentication: - secret_name: SECRET-NAME - type: basic - ``` - - 3. To configure the koku-metrics-operator to create a cost management source, edit the following values in the `source` field: - * Replace `INSERT-SOURCE-NAME` with the preferred name of the source to be created. - * Replace the `create_source` field value with `true`. - - **Note:** if the source already exists, replace `INSERT-SOURCE-NAME` with the existing name, and leave `create_source` as false. This will allow the operator to confirm the source exists. - 4. If not specified, the operator will create a default PersistentVolumeClaim called `koku-metrics-operator-data` with 10Gi of storage. To configure the koku-metrics-operator to use or create a different PVC, edit the following in the spec: - * Add the desired configuration to the `volume_claim_template` field in the spec: - - ``` - volume_claim_template: - apiVersion: v1 - kind: PersistentVolumeClaim - metadata: - name: - spec: - accessModes: - - ReadWriteOnce - resources: - requests: - storage: 10Gi - ``` - - **Note:** If using the YAML View, the `volume_claim_template` field must be added to the spec - 5. Select `Create`. - - # Restricted Network Usage (disconnected/air-gapped mode) - ## Installation - To install the `koku-metrics-operator` in a restricted network, follow the [olm documentation](https://docs.openshift.com/container-platform/4.5/operators/admin/olm-restricted-networks.html). The operator is found in the `community-operators` Catalog in the `registry.redhat.io/redhat/community-operator-index:latest` Index. If pruning the index before pushing to the mirrored registry, keep the `koku-metrics-operator` package. - - Within a restricted network, the operator queries prometheus to gather the necessary usage metrics, writes the query results to CSV files, and packages the reports for storage in the PVC. These reports then need to be manually downloaded from the cluster and uploaded to [cloud.redhat.com](https://cloud.redhat.com). - - For more information, reach out to . - ## Configure the koku-metrics-operator for a restricted network - ##### Create the KokuMetricsConfig - Configure the koku-metrics-operator by creating a `KokuMetricsConfig`. - 1. On the left navigation pane, select `Operators` -> `Installed Operators` -> `koku-metrics-operator` -> `KokuMetricsConfig` -> `Create Instance`. - 2. Specify the desired storage. If not specified, the operator will create a default Persistent Volume Claim called `koku-metrics-operator-data` with 10Gi of storage. To configure the koku-metrics-operator to use or create a different PVC, edit the following in the spec: - * Add the desired configuration to the `volume_claim_template` field in the spec: - - ``` - volume_claim_template: - apiVersion: v1 - kind: PersistentVolumeClaim - metadata: - name: - spec: - storageClassName: - accessModes: - - ReadWriteOnce - resources: - requests: - storage: 10Gi - ``` - - **Note:** If using the YAML View, the `volume_claim_template` field must be added to the spec - 3. (Optional) Specify the desired report retention. The operator will retain 30 reports by default. This corresponds to approximately one week's worth of data if using the default packaging cycle. To modify the number of retained reports: - * Change the `packaging` spec field `max_reports_to_store` to the desired number of reports to retain. Once this max number is reached, the operator will start removing the oldest packages remaining on the PVC: - - ``` - packaging: - max_size_MB: 100 - max_reports_to_store: 30 - ``` - - **Note:** The number of retained reports directly affects the frequency that reports must be manually downloaded from the PVC. Take caution in setting this to a higher number of reports, as the operator cannot write data to the PVC if the storage is full. - 4. To configure the operator to perform in a restricted network, set the `upload_toggle` to `false`: - - ``` - upload: - upload_cycle: 360, - upload_toggle: false - ``` - - 5. Select `Create`. - - ## Download reports from the Operator & clean up the PVC - If the `koku-metrics-operator` is configured to run in a restricted network, the metric reports will not automatically upload to cost managment. Instead, they need to be manually copied from the PVC for upload to [cloud.redhat.com](https://cloud.redhat.com). The default configuration saves one week of reports which means the process of downloading and uploading reports should be repeated weekly to prevent loss of metrics data. To download the reports, complete the following steps: - 1. Create the following Pod, ensuring the `claimName` matches the PVC containing the report data: - - ``` - kind: Pod - apiVersion: v1 - metadata: - name: volume-shell - namespace: koku-metrics-operator - spec: - volumes: - - name: koku-metrics-operator-reports - persistentVolumeClaim: - claimName: koku-metrics-operator-data - containers: - - name: volume-shell - image: busybox - command: ['sleep', '3600'] - volumeMounts: - - name: koku-metrics-operator-reports - mountPath: /tmp/koku-metrics-operator-reports - ``` - - 2. Use rsync to copy all of the files ready for upload from the PVC to a local folder: - - ``` - $ oc rsync volume-shell:/tmp/koku-metrics-operator-reports/upload local/path/to/save/folder - ``` - - 3. Once confirming that the files have been successfully copied, use rsh to connect to the pod and delete the contents of the upload folder so that they are no longer in storage: - - ``` - $ oc rsh volume-shell - $ rm /tmp/koku-metrics-operator-reports/upload/* - ``` - - 4. (Optional) Delete the pod that was used to connect to the PVC: - - ``` - $ oc delete -f volume-shell.yaml - ``` - - ## Create a source - In a restricted network, the `koku-metrics-operator` cannot automatically create a source. This process must be done manually. In the cloud.redhat.com platform, open the [Sources menu](https://cloud.redhat.com/settings/sources/) to begin adding an OpenShift source to cost management: - - Prerequisites: - * The cluster identifier which can be found in the KokuMetricsConfig CR, the cluster Overview page, or the cluster Help > About. - - Create source: - 1. Navigate to the Sources menu - 2. Select the `Red Hat sources` tab - 3. Create a new `Red Hat Openshift Container Platform` source: - * give the source a unique name - * add the Cost Management application - * add the cluster identifier - 4. In the Sources wizard, review the details and click `Finish` to create the Source. - - ## Upload the reports to cost managment - Uploading reports to cost managment is done through curl: - - $ curl -vvvv -F "file=@FILE_NAME.tar.gz;type=application/vnd.redhat.hccm.tar+tgz" https://cloud.redhat.com/api/ingress/v1/upload -u USERNAME:PASS - - where `USERNAME` and `PASS` correspond to the user credentials for [cloud.redhat.com](https://cloud.redhat.com), and `FILE_NAME` is the name of the report to upload. - - displayName: Koku Metrics Operator - icon: - - base64data: PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4KPCEtLSBHZW5lcmF0b3I6IEFkb2JlIElsbHVzdHJhdG9yIDIyLjEuMCwgU1ZHIEV4cG9ydCBQbHVnLUluIC4gU1ZHIFZlcnNpb246IDYuMDAgQnVpbGQgMCkgIC0tPgo8c3ZnIHZlcnNpb249IjEuMSIgaWQ9IkxheWVyXzEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2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DEuMDMyMTE5OCwxLjAzMjExOTgsMS43MTg2NTg0LDEuMjYyNDk2OUwxNzQuMjgwNjM5NiwxODUuODczNjExNXoiLz4KCTwvZz4KPC9nPgo8L3N2Zz4K - mediatype: image/svg+xml - install: - spec: - clusterPermissions: - - rules: - - apiGroups: - - config.openshift.io - resources: - - clusterversions - verbs: - - get - - list - - watch - - apiGroups: - - "" - resources: - - namespaces - verbs: - - get - - list - - watch - - apiGroups: - - "" - resources: - - secrets - verbs: - - get - serviceAccountName: koku-metrics-manager-role - deployments: - - name: koku-metrics-controller-manager - spec: - replicas: 1 - selector: - matchLabels: - control-plane: controller-manager - strategy: {} - template: - metadata: - labels: - control-plane: controller-manager - spec: - containers: - - args: - - --enable-leader-election - command: - - /manager - env: - - name: IN_CLUSTER - value: "true" - - name: WATCH_NAMESPACE - valueFrom: - fieldRef: - fieldPath: metadata.annotations['olm.targetNamespaces'] - image: quay.io/project-koku/koku-metrics-operator@sha256:6c0b63c1e94141f501afe1b46142876fba7ae946b3c1983bff950e4b82a1a444 - name: manager - resources: - limits: - cpu: 500m - memory: 500Mi - requests: - cpu: 100m - memory: 20Mi - terminationMessagePolicy: FallbackToLogsOnError - volumeMounts: - - mountPath: /tmp/koku-metrics-operator-reports - name: koku-metrics-operator-reports - serviceAccountName: koku-metrics-manager-role - terminationGracePeriodSeconds: 10 - volumes: - - name: koku-metrics-operator-reports - permissions: - - rules: - - apiGroups: - - "" - resources: - - configmaps - verbs: - - get - - list - - watch - - create - - update - - patch - - delete - - apiGroups: - - "" - resources: - - configmaps/status - verbs: - - get - - update - - patch - - apiGroups: - - "" - resources: - - events - verbs: - - create - - patch - - apiGroups: - - apps - resources: - - deployments - verbs: - - get - - list - - patch - - watch - - apiGroups: - - "" - resources: - - configmaps - - endpoints - - events - - persistentvolumeclaims - - pods - - secrets - - serviceaccounts - - services - - services/finalizers - verbs: - - create - - delete - - get - - list - - patch - - update - - watch - - apiGroups: - - koku-metrics-cfg.openshift.io - resources: - - kokumetricsconfigs - verbs: - - create - - delete - - get - - list - - patch - - update - - watch - - apiGroups: - - koku-metrics-cfg.openshift.io - resources: - - kokumetricsconfigs/status - verbs: - - get - - patch - - update - - apiGroups: - - operators.coreos.com - resources: - - clusterserviceversions - verbs: - - get - - list - - patch - - update - - watch - serviceAccountName: koku-metrics-manager-role - strategy: deployment - installModes: - - supported: true - type: OwnNamespace - - supported: true - type: SingleNamespace - - supported: false - type: MultiNamespace - - supported: false - type: AllNamespaces - relatedImages: - - name: koku-metrics-operator - image: quay.io/project-koku/koku-metrics-operator@sha256:6c0b63c1e94141f501afe1b46142876fba7ae946b3c1983bff950e4b82a1a444 - keywords: - - cost - - management - - usage - - monitor - maintainers: - - email: costmanagement@redhat.com - name: costmanagement - maturity: alpha - provider: - name: Red Hat - replaces: koku-metrics-operator.v0.9.7 - version: 0.9.8 diff --git a/koku-metrics-operator/0.9.8/metadata/annotations.yaml b/koku-metrics-operator/0.9.8/metadata/annotations.yaml deleted file mode 100644 index 1df004507..000000000 --- a/koku-metrics-operator/0.9.8/metadata/annotations.yaml +++ /dev/null @@ -1,10 +0,0 @@ -annotations: - operators.operatorframework.io.bundle.channel.default.v1: beta - operators.operatorframework.io.bundle.channels.v1: alpha,beta - operators.operatorframework.io.bundle.manifests.v1: manifests/ - operators.operatorframework.io.bundle.mediatype.v1: registry+v1 - operators.operatorframework.io.bundle.metadata.v1: metadata/ - operators.operatorframework.io.bundle.package.v1: koku-metrics-operator - operators.operatorframework.io.metrics.builder: operator-sdk-v0.19.4 - operators.operatorframework.io.metrics.mediatype.v1: metrics+v1 - operators.operatorframework.io.metrics.project_layout: go.kubebuilder.io/v2 diff --git a/koku-metrics-operator/1.1.1/Dockerfile b/koku-metrics-operator/1.1.1/Dockerfile deleted file mode 100644 index 7147fd722..000000000 --- a/koku-metrics-operator/1.1.1/Dockerfile +++ /dev/null @@ -1,21 +0,0 @@ -FROM scratch - -# Core bundle labels. -LABEL operators.operatorframework.io.bundle.mediatype.v1=registry+v1 -LABEL operators.operatorframework.io.bundle.manifests.v1=manifests/ -LABEL operators.operatorframework.io.bundle.metadata.v1=metadata/ -LABEL operators.operatorframework.io.bundle.package.v1=koku-metrics-operator -LABEL operators.operatorframework.io.bundle.channels.v1=alpha,beta -LABEL operators.operatorframework.io.bundle.channel.default.v1=beta -LABEL operators.operatorframework.io.metrics.builder=operator-sdk-v1.10.0+git -LABEL operators.operatorframework.io.metrics.mediatype.v1=metrics+v1 -LABEL operators.operatorframework.io.metrics.project_layout=go.kubebuilder.io/v2 - -# Labels for testing. -LABEL operators.operatorframework.io.test.mediatype.v1=scorecard+v1 -LABEL operators.operatorframework.io.test.config.v1=tests/scorecard/ - -# Copy files to locations specified by labels. -COPY manifests /manifests/ -COPY metadata /metadata/ -COPY tests/scorecard /tests/scorecard/ diff --git a/koku-metrics-operator/1.1.1/manifests/koku-metrics-cfg.openshift.io_kokumetricsconfigs.yaml b/koku-metrics-operator/1.1.1/manifests/koku-metrics-cfg.openshift.io_kokumetricsconfigs.yaml deleted file mode 100644 index f0a62933b..000000000 --- a/koku-metrics-operator/1.1.1/manifests/koku-metrics-cfg.openshift.io_kokumetricsconfigs.yaml +++ /dev/null @@ -1,825 +0,0 @@ -apiVersion: apiextensions.k8s.io/v1 -kind: CustomResourceDefinition -metadata: - annotations: - controller-gen.kubebuilder.io/version: v0.3.0 - creationTimestamp: null - name: kokumetricsconfigs.koku-metrics-cfg.openshift.io -spec: - group: koku-metrics-cfg.openshift.io - names: - kind: KokuMetricsConfig - listKind: KokuMetricsConfigList - plural: kokumetricsconfigs - singular: kokumetricsconfig - scope: Namespaced - versions: - - name: v1beta1 - schema: - openAPIV3Schema: - description: KokuMetricsConfig is the Schema for the kokumetricsconfig API - properties: - apiVersion: - description: 'APIVersion defines the versioned schema of this representation - of an object. Servers should convert recognized schemas to the latest - internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' - type: string - kind: - description: 'Kind is a string value representing the REST resource this - object represents. Servers may infer this from the endpoint the client - submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' - type: string - metadata: - type: object - spec: - description: KokuMetricsConfigSpec defines the desired state of KokuMetricsConfig. - properties: - api_url: - default: https://cloud.redhat.com - description: FOR DEVELOPMENT ONLY. APIURL is a field of KokuMetricsConfig - to represent the url of the API endpoint for service interaction. - The default is `https://cloud.redhat.com`. - type: string - authentication: - description: Authentication is a field of KokuMetricsConfig to represent - the authentication object. - properties: - secret_name: - description: AuthenticationSecretName is a field of KokuMetricsConfig - to represent the secret with the user and password used for - uploads. - type: string - type: - default: token - description: 'AuthType is a field of KokuMetricsConfig to represent - the authentication type to be used basic or token. Valid values - are: - "basic" : Enables authentication using user and password - from authentication secret. - "token" (default): Uses cluster - token for authentication.' - enum: - - token - - basic - type: string - required: - - type - type: object - clusterID: - description: ClusterID is a field of KokuMetricsConfig to represent - the cluster UUID. Normally this value should not be specified. Only - set this value if the clusterID cannot be obtained from the ClusterVersion. - type: string - clusterVersion: - description: ClusterVersion is a field of KokuMetricsConfig to represent - the cluster version. Normally this value should not be specified. - Only set this value if the clusterVersion cannot be obtained from - the ClusterVersion. - type: string - packaging: - description: Packaging is a field of KokuMetricsConfig to represent - the packaging object. - properties: - max_reports_to_store: - default: 30 - description: MaxReports is a field of KokuMetricsConfig to represent - the maximum number of reports to store. The default is 30 reports - which corresponds to approximately 7 days worth of data given - the other default values. - format: int64 - minimum: 1 - type: integer - max_size_MB: - default: 100 - description: MaxSize is a field of KokuMetricsConfig to represent - the max file size in megabytes that will be compressed for upload - to Ingress. The default is 100. - format: int64 - maximum: 100 - minimum: 1 - type: integer - required: - - max_reports_to_store - - max_size_MB - type: object - prometheus_config: - description: PrometheusConfig is a field of KokuMetricsConfig to represent - the configuration of Prometheus connection. - properties: - service_address: - default: https://thanos-querier.openshift-monitoring.svc:9091 - description: FOR DEVELOPMENT ONLY. SvcAddress is a field of KokuMetricsConfig - to represent the thanos-querier address. The default is `https://thanos-querier.openshift-monitoring.svc:9091`. - type: string - skip_tls_verification: - default: false - description: FOR DEVELOPMENT ONLY. SkipTLSVerification is a field - of KokuMetricsConfig to represent if the thanos-querier endpoint - must be certificate validated. The default is false. - type: boolean - required: - - service_address - - skip_tls_verification - type: object - source: - description: Source is a field of KokuMetricsConfig to represent the - desired source on cloud.redhat.com. - properties: - check_cycle: - default: 1440 - description: CheckCycle is a field of KokuMetricsConfig to represent - the number of minutes between each source check schedule The - default is 1440 min (24 hours). - format: int64 - minimum: 0 - type: integer - create_source: - default: false - description: CreateSource is a field of KokuMetricsConfigSpec - to represent if the source should be created if not found. - type: boolean - name: - description: SourceName is a field of KokuMetricsConfigSpec to - represent the source name on cloud.redhat.com. - type: string - sources_path: - default: /api/sources/v1.0/ - description: FOR DEVELOPMENT ONLY. SourcesAPIPath is a field of - KokuMetricsConfig to represent the path of the Sources API service. - The default is `/api/sources/v1.0/`. - type: string - required: - - check_cycle - - create_source - - sources_path - type: object - upload: - description: Upload is a field of KokuMetricsConfig to represent the - upload object. - properties: - ingress_path: - default: /api/ingress/v1/upload - description: FOR DEVELOPMENT ONLY. IngressAPIPath is a field of - KokuMetricsConfig to represent the path of the Ingress API service. - The default is `/api/ingress/v1/upload`. - type: string - upload_cycle: - default: 360 - description: UploadCycle is a field of KokuMetricsConfig to represent - the number of minutes between each upload schedule. The default - is 360 min (6 hours). - format: int64 - minimum: 0 - type: integer - upload_toggle: - default: true - description: UploadToggle is a field of KokuMetricsConfig to represent - if the operator is installed in a restricted-network. If `false`, - the operator will not upload to cloud.redhat.com or check/create - sources. The default is true. - type: boolean - upload_wait: - description: UploadWait is a field of KokuMetricsConfig to represent - the time to wait before sending an upload. - format: int64 - minimum: 0 - type: integer - validate_cert: - default: true - description: ValidateCert is a field of KokuMetricsConfig to represent - if the Ingress endpoint must be certificate validated. - type: boolean - required: - - ingress_path - - upload_cycle - - upload_toggle - - validate_cert - type: object - volume_claim_template: - description: VolumeClaimTemplate is a field of KokuMetricsConfig to - represent a PVC template. - properties: - apiVersion: - description: 'APIVersion defines the versioned schema of this - representation of an object. Servers should convert recognized - schemas to the latest internal value, and may reject unrecognized - values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' - type: string - kind: - description: 'Kind is a string value representing the REST resource - this object represents. Servers may infer this from the endpoint - the client submits requests to. Cannot be updated. In CamelCase. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' - type: string - metadata: - description: EmbeddedMetadata contains metadata relevant to an - EmbeddedResource. - properties: - annotations: - additionalProperties: - type: string - description: 'Annotations is an unstructured key value map - stored with a resource that may be set by external tools - to store and retrieve arbitrary metadata. They are not queryable - and should be preserved when modifying objects. More info: - http://kubernetes.io/docs/user-guide/annotations' - type: object - labels: - additionalProperties: - type: string - description: 'Map of string keys and values that can be used - to organize and categorize (scope and select) objects. May - match selectors of replication controllers and services. - More info: http://kubernetes.io/docs/user-guide/labels' - type: object - name: - description: 'Name must be unique within a namespace. Is required - when creating resources, although some resources may allow - a client to request the generation of an appropriate name - automatically. Name is primarily intended for creation idempotence - and configuration definition. Cannot be updated. More info: - http://kubernetes.io/docs/user-guide/identifiers#names' - type: string - type: object - spec: - description: 'Spec defines the desired characteristics of a volume - requested by a pod author. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims' - properties: - accessModes: - description: 'AccessModes contains the desired access modes - the volume should have. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes-1' - items: - type: string - type: array - dataSource: - description: 'This field can be used to specify either: * - An existing VolumeSnapshot object (snapshot.storage.k8s.io/VolumeSnapshot) - * An existing PVC (PersistentVolumeClaim) * An existing - custom resource that implements data population (Alpha) - In order to use custom resource types that implement data - population, the AnyVolumeDataSource feature gate must be - enabled. If the provisioner or an external controller can - support the specified data source, it will create a new - volume based on the contents of the specified data source.' - properties: - apiGroup: - description: APIGroup is the group for the resource being - referenced. If APIGroup is not specified, the specified - Kind must be in the core API group. For any other third-party - types, APIGroup is required. - type: string - kind: - description: Kind is the type of resource being referenced - type: string - name: - description: Name is the name of resource being referenced - type: string - required: - - kind - - name - type: object - resources: - description: 'Resources represents the minimum resources the - volume should have. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources' - properties: - limits: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - description: 'Limits describes the maximum amount of compute - resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/' - type: object - requests: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - description: 'Requests describes the minimum amount of - compute resources required. If Requests is omitted for - a container, it defaults to Limits if that is explicitly - specified, otherwise to an implementation-defined value. - More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/' - type: object - type: object - selector: - description: A label query over volumes to consider for binding. - properties: - matchExpressions: - description: matchExpressions is a list of label selector - requirements. The requirements are ANDed. - items: - description: A label selector requirement is a selector - that contains values, a key, and an operator that - relates the key and values. - properties: - key: - description: key is the label key that the selector - applies to. - type: string - operator: - description: operator represents a key's relationship - to a set of values. Valid operators are In, NotIn, - Exists and DoesNotExist. - type: string - values: - description: values is an array of string values. - If the operator is In or NotIn, the values array - must be non-empty. If the operator is Exists or - DoesNotExist, the values array must be empty. - This array is replaced during a strategic merge - patch. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - description: matchLabels is a map of {key,value} pairs. - A single {key,value} in the matchLabels map is equivalent - to an element of matchExpressions, whose key field is - "key", the operator is "In", and the values array contains - only "value". The requirements are ANDed. - type: object - type: object - storageClassName: - description: 'Name of the StorageClass required by the claim. - More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#class-1' - type: string - volumeMode: - description: volumeMode defines what type of volume is required - by the claim. Value of Filesystem is implied when not included - in claim spec. - type: string - volumeName: - description: VolumeName is the binding reference to the PersistentVolume - backing this claim. - type: string - type: object - type: object - required: - - authentication - - packaging - - prometheus_config - - source - - upload - type: object - status: - description: KokuMetricsConfigStatus defines the observed state of KokuMetricsConfig. - properties: - api_url: - description: APIURL is a field of KokuMetricsConfig to represent the - url of the API endpoint for service interaction. - type: string - authentication: - description: Authentication is a field of KokuMetricsConfig to represent - the authentication status. - properties: - credentials_found: - description: AuthenticationCredentialsFound is a field of KokuMetricsConfig - to represent if used for uploads were found. - type: boolean - error: - description: AuthErrorMessage is a field of KokuMetricsConfig - to represent an `invalid credentials` error message. - type: string - last_credential_verification_time: - description: LastVerificationTime is a field of KokuMetricsConfig - to represent the last time credentials were verified. - format: date-time - nullable: true - type: string - secret_name: - description: AuthenticationSecretName is a field of KokuMetricsConfig - to represent the secret with the user and password used for - uploads. - type: string - type: - description: AuthType is a field of KokuMetricsConfig to represent - the authentication type to be used basic or token. - enum: - - token - - basic - type: string - valid_basic_auth: - description: ValidBasicAuth is a field of KokuMetricsConfig to - represent if the given basic auth credentials are valid. - type: boolean - type: object - clusterID: - description: ClusterID is a field of KokuMetricsConfig to represent - the cluster UUID. - type: string - clusterVersion: - description: ClusterVersion is a field of KokuMetricsConfig to represent - the cluster version. - type: string - operator_commit: - description: OperatorCommit is a field of KokuMetricsConfig that shows - the commit hash of the operator. - type: string - packaging: - description: Packaging is a field of KokuMetricsConfig to represent - the packaging status - properties: - error: - description: PackagingError is a field of KokuMetricsConfig to - represent the error encountered packaging the reports. - type: string - last_successful_packaging_time: - description: LastSuccessfulPackagingTime is a field of KokuMetricsConfig - that shows the time of the last successful file packaging. - format: date-time - nullable: true - type: string - max_reports_to_store: - description: MaxReports is a field of KokuMetricsConfig to represent - the maximum number of reports to store. - format: int64 - type: integer - max_size_MB: - description: MaxSize is a field of KokuMetricsConfig to represent - the max file size in megabytes that will be compressed for upload - to Ingress. - format: int64 - type: integer - number_reports_stored: - description: ReportCount is a field of KokuMetricsConfig to represent - the number of reports in storage. - format: int64 - type: integer - packaged_files: - description: PackagedFiles is a field of KokuMetricsConfig to - represent the list of file packages in storage. - items: - type: string - type: array - type: object - persistent_volume_claim: - description: PersistentVolumeClaim is a field of KokuMetricsConfig - to represent a PVC. - properties: - apiVersion: - description: 'APIVersion defines the versioned schema of this - representation of an object. Servers should convert recognized - schemas to the latest internal value, and may reject unrecognized - values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' - type: string - kind: - description: 'Kind is a string value representing the REST resource - this object represents. Servers may infer this from the endpoint - the client submits requests to. Cannot be updated. In CamelCase. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' - type: string - metadata: - description: EmbeddedMetadata contains metadata relevant to an - EmbeddedResource. - properties: - annotations: - additionalProperties: - type: string - description: 'Annotations is an unstructured key value map - stored with a resource that may be set by external tools - to store and retrieve arbitrary metadata. They are not queryable - and should be preserved when modifying objects. More info: - http://kubernetes.io/docs/user-guide/annotations' - type: object - labels: - additionalProperties: - type: string - description: 'Map of string keys and values that can be used - to organize and categorize (scope and select) objects. May - match selectors of replication controllers and services. - More info: http://kubernetes.io/docs/user-guide/labels' - type: object - name: - description: 'Name must be unique within a namespace. Is required - when creating resources, although some resources may allow - a client to request the generation of an appropriate name - automatically. Name is primarily intended for creation idempotence - and configuration definition. Cannot be updated. More info: - http://kubernetes.io/docs/user-guide/identifiers#names' - type: string - type: object - spec: - description: 'Spec defines the desired characteristics of a volume - requested by a pod author. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims' - properties: - accessModes: - description: 'AccessModes contains the desired access modes - the volume should have. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes-1' - items: - type: string - type: array - dataSource: - description: 'This field can be used to specify either: * - An existing VolumeSnapshot object (snapshot.storage.k8s.io/VolumeSnapshot) - * An existing PVC (PersistentVolumeClaim) * An existing - custom resource that implements data population (Alpha) - In order to use custom resource types that implement data - population, the AnyVolumeDataSource feature gate must be - enabled. If the provisioner or an external controller can - support the specified data source, it will create a new - volume based on the contents of the specified data source.' - properties: - apiGroup: - description: APIGroup is the group for the resource being - referenced. If APIGroup is not specified, the specified - Kind must be in the core API group. For any other third-party - types, APIGroup is required. - type: string - kind: - description: Kind is the type of resource being referenced - type: string - name: - description: Name is the name of resource being referenced - type: string - required: - - kind - - name - type: object - resources: - description: 'Resources represents the minimum resources the - volume should have. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources' - properties: - limits: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - description: 'Limits describes the maximum amount of compute - resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/' - type: object - requests: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - description: 'Requests describes the minimum amount of - compute resources required. If Requests is omitted for - a container, it defaults to Limits if that is explicitly - specified, otherwise to an implementation-defined value. - More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/' - type: object - type: object - selector: - description: A label query over volumes to consider for binding. - properties: - matchExpressions: - description: matchExpressions is a list of label selector - requirements. The requirements are ANDed. - items: - description: A label selector requirement is a selector - that contains values, a key, and an operator that - relates the key and values. - properties: - key: - description: key is the label key that the selector - applies to. - type: string - operator: - description: operator represents a key's relationship - to a set of values. Valid operators are In, NotIn, - Exists and DoesNotExist. - type: string - values: - description: values is an array of string values. - If the operator is In or NotIn, the values array - must be non-empty. If the operator is Exists or - DoesNotExist, the values array must be empty. - This array is replaced during a strategic merge - patch. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - description: matchLabels is a map of {key,value} pairs. - A single {key,value} in the matchLabels map is equivalent - to an element of matchExpressions, whose key field is - "key", the operator is "In", and the values array contains - only "value". The requirements are ANDed. - type: object - type: object - storageClassName: - description: 'Name of the StorageClass required by the claim. - More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#class-1' - type: string - volumeMode: - description: volumeMode defines what type of volume is required - by the claim. Value of Filesystem is implied when not included - in claim spec. - type: string - volumeName: - description: VolumeName is the binding reference to the PersistentVolume - backing this claim. - type: string - type: object - type: object - prometheus: - description: Prometheus represents the status of premetheus queries. - properties: - configuration_error: - description: ConfigError is a field of KokuMetricsConfigStatus - to represent errors during prometheus configuration. - type: string - last_query_start_time: - description: LastQueryStartTime is a field of KokuMetricsConfigStatus - to represent the last time queries were started. - format: date-time - nullable: true - type: string - last_query_success_time: - description: LastQuerySuccessTime is a field of KokuMetricsConfigStatus - to represent the last time queries were successful. - format: date-time - nullable: true - type: string - prometheus_configured: - description: PrometheusConfigured is a field of KokuMetricsConfigStatus - to represent if the operator is configured to connect to prometheus. - type: boolean - prometheus_connected: - description: PrometheusConnected is a field of KokuMetricsConfigStatus - to represent if prometheus can be queried. - type: boolean - prometheus_connection_error: - description: ConnectionError is a field of KokuMetricsConfigStatus - to represent errors during prometheus test query. - type: string - service_address: - description: SvcAddress is the internal thanos-querier address. - type: string - skip_tls_verification: - description: SkipTLSVerification is a field of KokuMetricsConfigStatus - to represent if the thanos-querier endpoint must be certificate - validated. - type: boolean - required: - - prometheus_configured - - prometheus_connected - type: object - reports: - description: Reports represents the status of report generation. - properties: - data_collected: - description: DataCollected is a field of KokuMetricsConfigStatus - to represent whether or not data was collected for the last - query. - type: boolean - data_collection_message: - description: DataCollectionMessage is a field of KokuMetricsConfigStatus - to represent a message associated with the data_collected status. - type: string - last_hour_queried: - description: LastHourQueried is a field of KokuMetricsConfigStatus - to represent the time range for which metrics were last queried. - type: string - report_month: - description: ReportMonth is a field of KokuMetricsConfigStatus - to represent the month for which reports are being generated. - type: string - type: object - source: - description: Source is a field of KokuMetricsConfig to represent the - observed state of the source on cloud.redhat.com. - properties: - check_cycle: - description: CheckCycle is a field of KokuMetricsConfig to represent - the number of minutes between each source check schedule. The - default is 1440 min (24 hours). - format: int64 - type: integer - create_source: - description: CreateSource is a field of KokuMetricsConfigStatus - to represent if the source should be created if not found. A - source will not be created if upload_toggle is `false`. - type: boolean - error: - description: SourceError is a field of KokuMetricsConfigStatus - to represent the error encountered creating the source. - type: string - last_check_time: - description: LastSourceCheckTime is a field of KokuMetricsConfig - that shows the time that the last check was attempted. - format: date-time - nullable: true - type: string - name: - description: SourceName is a field of KokuMetricsConfigStatus - to represent the source name on cloud.redhat.com. - type: string - source_defined: - description: SourceDefined is a field of KokuMetricsConfigStatus - to represent if the source exists as defined on cloud.redhat.com. - type: boolean - sources_path: - description: SourcesAPIPath is a field of KokuMetricsConfig to - represent the path of the Sources API service. - type: string - type: object - storage: - description: Storage is a field - properties: - volume_mounted: - description: VolumeMounted is a bool to indicate if storage volume - was mounted. - type: boolean - volume_type: - description: VolumeType is the string representation of the volume - type. - type: string - type: object - upload: - description: Upload is a field of KokuMetricsConfig to represent the - upload object. - properties: - error: - description: UploadError is a field of KokuMetricsConfigStatus - to represent the error encountered uploading reports. - type: string - ingress_path: - description: IngressAPIPath is a field of KokuMetricsConfig to - represent the path of the Ingress API service. - type: string - last_payload_files: - description: LastPayloadFiles is a field of KokuMetricsConfig - to represent the list of files in the last payload that was - sent. - items: - type: string - type: array - last_payload_manifest_id: - description: LastPayloadManifest is a field of KokuMetricsConfig - that shows the manifestID of the last payload. - type: string - last_payload_name: - description: LastPayloadName is a field of KokuMetricsConfig that - shows the name of the last payload file. - type: string - last_payload_request_id: - description: LastPayloadRequestID is a field of KokuMetricsConfig - that shows the insights request id of the last payload. - type: string - last_successful_upload_time: - description: LastSuccessfulUploadTime is a field of KokuMetricsConfig - that shows the time of the last successful upload. - format: date-time - nullable: true - type: string - last_upload_status: - description: LastUploadStatus is a field of KokuMetricsConfig - that shows the http status of the last upload. - type: string - upload: - description: UploadToggle is a field of KokuMetricsConfig to represent - if the operator should upload to cloud.redhat.com. The default - is true - type: boolean - upload_cycle: - description: UploadCycle is a field of KokuMetricsConfig to represent - the number of minutes between each upload schedule. The default - is 360 min (6 hours). - format: int64 - type: integer - upload_wait: - description: UploadWait is a field of KokuMetricsConfig to represent - the time to wait before sending an upload. - format: int64 - type: integer - validate_cert: - description: ValidateCert is a field of KokuMetricsConfig to represent - if the Ingress endpoint must be certificate validated. - type: boolean - type: object - type: object - required: - - spec - type: object - served: true - storage: true - subresources: - status: {} -status: - acceptedNames: - kind: "" - plural: "" - conditions: [] - storedVersions: [] diff --git a/koku-metrics-operator/1.1.1/manifests/koku-metrics-operator.clusterserviceversion.yaml b/koku-metrics-operator/1.1.1/manifests/koku-metrics-operator.clusterserviceversion.yaml deleted file mode 100644 index e1b6fe8e1..000000000 --- a/koku-metrics-operator/1.1.1/manifests/koku-metrics-operator.clusterserviceversion.yaml +++ /dev/null @@ -1,469 +0,0 @@ -apiVersion: operators.coreos.com/v1alpha1 -kind: ClusterServiceVersion -metadata: - annotations: - alm-examples: |- - [ - { - "apiVersion": "koku-metrics-cfg.openshift.io/v1beta1", - "kind": "KokuMetricsConfig", - "metadata": { - "name": "kokumetricscfg-sample-v1beta1" - }, - "spec": { - "authentication": { - "type": "token" - }, - "packaging": { - "max_reports_to_store": 30, - "max_size_MB": 100 - }, - "prometheus_config": {}, - "source": { - "check_cycle": 1440, - "create_source": false, - "name": "INSERT-SOURCE-NAME" - }, - "upload": { - "upload_cycle": 360, - "upload_toggle": true - } - } - } - ] - capabilities: Seamless Upgrades - categories: Monitoring - certified: "false" - containerImage: quay.io/project-koku/koku-metrics-operator@sha256:da062c74a576ba7314b16a12fb628d5147edabe66293e021d7261b3e65c9824c - createdAt: "2021-12-09T21:08:57Z" - description: A Golang-based OpenShift Operator that generates and uploads OpenShift - usage metrics to cost management. - operatorframework.io/suggested-namespace: koku-metrics-operator - operators.openshift.io/infrastructure-features: '["Disconnected"]' - operators.operatorframework.io/builder: operator-sdk-v1.10.0+git - operators.operatorframework.io/project_layout: go.kubebuilder.io/v2 - repository: https://github.com/project-koku/koku-metrics-operator - support: Cost Management - name: koku-metrics-operator.v1.1.1 - namespace: placeholder -spec: - apiservicedefinitions: {} - customresourcedefinitions: - owned: - - description: KokuMetricsConfig is the Schema for the kokumetricsconfig API - displayName: Koku Metrics Config - kind: KokuMetricsConfig - name: kokumetricsconfigs.koku-metrics-cfg.openshift.io - version: v1beta1 - description: |- - # Koku Metrics Operator - ## Introduction - The `koku-metrics-operator` is a component of the [cost managment](https://access.redhat.com/documentation/en-us/openshift_container_platform/4.5/html/getting_started_with_cost_management/assembly_introduction_cost_management) service for Openshift, used to gather the required information from the cluster. It is recommended to be installed in OpenShift 4.5+. This operator obtains OpenShift usage data by querying Prometheus and uploads it to cost management to be processed. The Operator queries Prometheus every hour to create metric reports, which are then packaged and uploaded to cost management at [cloud.redhat.com](https://cloud.redhat.com). For more information, reach out to . - - This operator is capable of functioning within a disconnected/restricted network (aka air-gapped mode). In this mode, the operator will store the packaged reports for manual retrieval instead of being uploaded to cost management. Documentation for installing an operator within a restricted network can be found [here](https://docs.openshift.com/container-platform/4.5/operators/admin/olm-restricted-networks.html). - - For more information, reach out to . - ## Features and Capabilities - #### Metrics collection: - The Koku Metrics Operator (`koku-metrics-operator`) collects the metrics required for cost management by: - * Querying Prometheus to gather the necessary metrics for cost management. - * Writing Prometheus queries to CSV report files. - * Packaging the CSV report files into tarballs. - - #### Additional Capabilities: - * The operator can be configured to automatically upload the packaged reports to cost management through Red Hat Insights Ingress service. - * The operator can create a source in cloud.redhat.com. A source is required for cost management to process the uploaded packages. - * PersistentVolumeClaim (PVC) configuration: The KokuMetricsConfig CR can accept a PVC definition and the operator will create and mount the PVC. If one is not provided, a default PVC will be created. - * Restricted network installation: this operator can function on a restricted network. In this mode, the operator stores the packaged reports for manual retrieval. - - ## Limitations and Pre-Requisites - #### Limitations (Potential for metrics data loss) - * A source **must** exist in cloud.redhat.com for an uploaded payload to be processed by cost management. The operator sends the payload to the Red Hat Insights Ingress service which usually returns successfully, but the operator does not currently confirm with cost management that the payload was processed. After Ingress accepts the uploaded payload, the payload is removed from the operator and is gone forever. If the data within the payload is not processed, a gap will be introduced in the usage metrics. - - **Note** The following limitations are specific to operators configured to run in a restricted network: - * The `koku-metrics-operator` will not be able to generate new reports if the PVC storage is filled. If this occurs, the reports must be manually deleted from the PVC so that the operator can function as normal. - * The default report retention is 30 reports (about one week's worth of data). The reports must be manually downloaded and uploaded to cloud.redhat.com every week, or they will be deleted and the data will be lost. - - #### Storage configuration prerequisite - The operator will attempt to create and use the following PVC when installed: - - volume_claim_template: - apiVersion: v1 - kind: PersistentVolumeClaim - metadata: - name: koku-metrics-operator-data - spec: - accessModes: - - ReadWriteOnce - resources: - requests: - storage: 10Gi - - If a different PVC should be utilized, a valid PVC should be specified in the KokuMetricsConfig CR as described in the appropriate section below. The PVC to be used may exist already, or the operator will attempt to create it. - - To use the default specification, the follow assumptions must be met: - 1. A default StorageClass is defined. - 2. Dynamic provisioning for that default StorageClass is enabled. - - If these assumptions are not met, the operator will not deploy correctly. In these cases, storage must be manually configured. After configuring storage, a valid PVC template should be supplied in the `volume_claim_template` spec of the KokuMetricsConfig CR. - - ## Configure the koku-metrics-operator - **Note** There are separate instructions for configuring the `koku-metrics-operator` to run in a restricted network. - ##### Configure authentication - The default authentication for the operator is `token`. No further steps are required to configure token authentication. If `basic` is the preferred authentication method, a Secret must be created which holds username and password credentials: - 1. On the left navigation pane, select `Workloads` -> `Secrets` -> select Project: `koku-metrics-operator` -> `Create` -> `Key/Value Secret` - 2. Give the Secret a name and add 2 keys: `username` and `password` (all lowercase). The values for these keys correspond to cloud.redhat.com credentials. - 3. Select `Create`. - ##### Create the KokuMetricsConfig - Configure the koku-metrics-operator by creating a `KokuMetricsConfig`. - 1. On the left navigation pane, select `Operators` -> `Installed Operators` -> `koku-metrics-operator` -> `KokuMetricsConfig` -> `Create Instance`. - 2. For `basic` authentication, edit the following values in the spec: - * Replace `authentication: type:` with `basic`. - * Add the `secret_name` field under `authentication`, and set it equal to the name of the authentication Secret that was created above. The spec should look similar to the following: - - ``` - authentication: - secret_name: SECRET-NAME - type: basic - ``` - - 3. To configure the koku-metrics-operator to create a cost management source, edit the following values in the `source` field: - * Replace `INSERT-SOURCE-NAME` with the preferred name of the source to be created. - * Replace the `create_source` field value with `true`. - - **Note:** if the source already exists, replace `INSERT-SOURCE-NAME` with the existing name, and leave `create_source` as false. This will allow the operator to confirm the source exists. - 4. If not specified, the operator will create a default PersistentVolumeClaim called `koku-metrics-operator-data` with 10Gi of storage. To configure the koku-metrics-operator to use or create a different PVC, edit the following in the spec: - * Add the desired configuration to the `volume_claim_template` field in the spec: - - ``` - volume_claim_template: - apiVersion: v1 - kind: PersistentVolumeClaim - metadata: - name: - spec: - accessModes: - - ReadWriteOnce - resources: - requests: - storage: 10Gi - ``` - - **Note:** If using the YAML View, the `volume_claim_template` field must be added to the spec - 5. Select `Create`. - - # Restricted Network Usage (disconnected/air-gapped mode) - ## Installation - To install the `koku-metrics-operator` in a restricted network, follow the [olm documentation](https://docs.openshift.com/container-platform/4.5/operators/admin/olm-restricted-networks.html). The operator is found in the `community-operators` Catalog in the `registry.redhat.io/redhat/community-operator-index:latest` Index. If pruning the index before pushing to the mirrored registry, keep the `koku-metrics-operator` package. - - Within a restricted network, the operator queries prometheus to gather the necessary usage metrics, writes the query results to CSV files, and packages the reports for storage in the PVC. These reports then need to be manually downloaded from the cluster and uploaded to [cloud.redhat.com](https://cloud.redhat.com). - - For more information, reach out to . - ## Configure the koku-metrics-operator for a restricted network - ##### Create the KokuMetricsConfig - Configure the koku-metrics-operator by creating a `KokuMetricsConfig`. - 1. On the left navigation pane, select `Operators` -> `Installed Operators` -> `koku-metrics-operator` -> `KokuMetricsConfig` -> `Create Instance`. - 2. Specify the desired storage. If not specified, the operator will create a default Persistent Volume Claim called `koku-metrics-operator-data` with 10Gi of storage. To configure the koku-metrics-operator to use or create a different PVC, edit the following in the spec: - * Add the desired configuration to the `volume_claim_template` field in the spec: - - ``` - volume_claim_template: - apiVersion: v1 - kind: PersistentVolumeClaim - metadata: - name: - spec: - storageClassName: - accessModes: - - ReadWriteOnce - resources: - requests: - storage: 10Gi - ``` - - **Note:** If using the YAML View, the `volume_claim_template` field must be added to the spec - 3. (Optional) Specify the desired report retention. The operator will retain 30 reports by default. This corresponds to approximately one week's worth of data if using the default packaging cycle. To modify the number of retained reports: - * Change the `packaging` spec field `max_reports_to_store` to the desired number of reports to retain. Once this max number is reached, the operator will start removing the oldest packages remaining on the PVC: - - ``` - packaging: - max_size_MB: 100 - max_reports_to_store: 30 - ``` - - **Note:** The number of retained reports directly affects the frequency that reports must be manually downloaded from the PVC. Take caution in setting this to a higher number of reports, as the operator cannot write data to the PVC if the storage is full. - 4. To configure the operator to perform in a restricted network, set the `upload_toggle` to `false`: - - ``` - upload: - upload_cycle: 360, - upload_toggle: false - ``` - - 5. Select `Create`. - - ## Download reports from the Operator & clean up the PVC - If the `koku-metrics-operator` is configured to run in a restricted network, the metric reports will not automatically upload to cost managment. Instead, they need to be manually copied from the PVC for upload to [cloud.redhat.com](https://cloud.redhat.com). The default configuration saves one week of reports which means the process of downloading and uploading reports should be repeated weekly to prevent loss of metrics data. To download the reports, complete the following steps: - 1. Create the following Pod, ensuring the `claimName` matches the PVC containing the report data: - - ``` - kind: Pod - apiVersion: v1 - metadata: - name: volume-shell - namespace: koku-metrics-operator - spec: - volumes: - - name: koku-metrics-operator-reports - persistentVolumeClaim: - claimName: koku-metrics-operator-data - containers: - - name: volume-shell - image: busybox - command: ['sleep', 'infinity'] - volumeMounts: - - name: koku-metrics-operator-reports - mountPath: /tmp/koku-metrics-operator-reports - ``` - - 2. Use rsync to copy all of the files ready for upload from the PVC to a local folder: - - ``` - $ oc rsync volume-shell:/tmp/koku-metrics-operator-reports/upload local/path/to/save/folder - ``` - - 3. Once confirming that the files have been successfully copied, use rsh to connect to the pod and delete the contents of the upload folder so that they are no longer in storage: - - ``` - $ oc rsh volume-shell - $ rm /tmp/koku-metrics-operator-reports/upload/* - ``` - - 4. (Optional) Delete the pod that was used to connect to the PVC: - - ``` - $ oc delete -f volume-shell.yaml - ``` - - ## Create a source - In a restricted network, the `koku-metrics-operator` cannot automatically create a source. This process must be done manually. In the cloud.redhat.com platform, open the [Sources menu](https://cloud.redhat.com/settings/sources/) to begin adding an OpenShift source to cost management: - - Prerequisites: - * The cluster identifier which can be found in the KokuMetricsConfig CR, the cluster Overview page, or the cluster Help > About. - - Create source: - 1. Navigate to the Sources menu - 2. Select the `Red Hat sources` tab - 3. Create a new `Red Hat Openshift Container Platform` source: - * give the source a unique name - * add the Cost Management application - * add the cluster identifier - 4. In the Sources wizard, review the details and click `Finish` to create the Source. - - ## Upload the reports to cost managment - Uploading reports to cost managment is done through curl: - - $ curl -vvvv -F "file=@FILE_NAME.tar.gz;type=application/vnd.redhat.hccm.tar+tgz" https://cloud.redhat.com/api/ingress/v1/upload -u USERNAME:PASS - - where `USERNAME` and `PASS` correspond to the user credentials for [cloud.redhat.com](https://cloud.redhat.com), and `FILE_NAME` is the name of the report to upload. - - displayName: Koku Metrics Operator - icon: - - base64data: PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4KPCEtLSBHZW5lcmF0b3I6IEFkb2JlIElsbHVzdHJhdG9yIDIyLjEuMCwgU1ZHIEV4cG9ydCBQbHVnLUluIC4gU1ZHIFZlcnNpb246IDYuMDAgQnVpbGQgMCkgIC0tPgo8c3Zn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zOTI1LDEuMzM2MjEyMiwwLjY5MTE0NjksMS45NDkwMzU2CgkJCWMwLjQ1NjE2MTUsMC42MTI4MjM1LDEuMDMyMTE5OCwxLjAzMjExOTgsMS43MTg2NTg0LDEuMjYyNDk2OUwxNzQuMjgwNjM5NiwxODUuODczNjExNXoiLz4KCTwvZz4KPC9nPgo8L3N2Zz4K - mediatype: image/svg+xml - install: - spec: - clusterPermissions: - - rules: - - apiGroups: - - config.openshift.io - resources: - - clusterversions - verbs: - - get - - list - - watch - - apiGroups: - - "" - resources: - - namespaces - verbs: - - get - - list - - watch - - apiGroups: - - "" - resources: - - secrets - verbs: - - get - serviceAccountName: koku-metrics-controller-manager - deployments: - - name: koku-metrics-controller-manager - spec: - replicas: 1 - selector: - matchLabels: - control-plane: controller-manager - strategy: {} - template: - metadata: - labels: - control-plane: controller-manager - spec: - containers: - - args: - - --enable-leader-election - command: - - /manager - env: - - name: IN_CLUSTER - value: "true" - - name: WATCH_NAMESPACE - valueFrom: - fieldRef: - fieldPath: metadata.annotations['olm.targetNamespaces'] - image: quay.io/project-koku/koku-metrics-operator@sha256:da062c74a576ba7314b16a12fb628d5147edabe66293e021d7261b3e65c9824c - name: manager - resources: - limits: - cpu: 500m - memory: 500Mi - requests: - cpu: 100m - memory: 20Mi - terminationMessagePolicy: FallbackToLogsOnError - volumeMounts: - - mountPath: /tmp/koku-metrics-operator-reports - name: koku-metrics-operator-reports - serviceAccountName: koku-metrics-controller-manager - terminationGracePeriodSeconds: 10 - volumes: - - name: koku-metrics-operator-reports - permissions: - - rules: - - apiGroups: - - "" - resources: - - configmaps - verbs: - - get - - list - - watch - - create - - update - - patch - - delete - - apiGroups: - - "" - resources: - - configmaps/status - verbs: - - get - - update - - patch - - apiGroups: - - "" - resources: - - events - verbs: - - create - - patch - - apiGroups: - - coordination.k8s.io - resources: - - leases - verbs: - - get - - list - - watch - - create - - update - - patch - - delete - - apiGroups: - - apps - resources: - - deployments - verbs: - - get - - list - - patch - - watch - - apiGroups: - - "" - resources: - - configmaps - - endpoints - - events - - persistentvolumeclaims - - pods - - secrets - - serviceaccounts - - services - - services/finalizers - verbs: - - create - - delete - - get - - list - - patch - - update - - watch - - apiGroups: - - koku-metrics-cfg.openshift.io - resources: - - kokumetricsconfigs - verbs: - - create - - delete - - get - - list - - patch - - update - - watch - - apiGroups: - - koku-metrics-cfg.openshift.io - resources: - - kokumetricsconfigs/status - verbs: - - get - - patch - - update - - apiGroups: - - operators.coreos.com - resources: - - clusterserviceversions - verbs: - - get - - list - - patch - - update - - watch - serviceAccountName: koku-metrics-controller-manager - strategy: deployment - installModes: - - supported: true - type: OwnNamespace - - supported: true - type: SingleNamespace - - supported: false - type: MultiNamespace - - supported: false - type: AllNamespaces - relatedImages: - - name: koku-metrics-operator - image: quay.io/project-koku/koku-metrics-operator@sha256:da062c74a576ba7314b16a12fb628d5147edabe66293e021d7261b3e65c9824c - keywords: - - cost - - management - - usage - - monitor - maintainers: - - email: costmanagement@redhat.com - name: costmanagement - maturity: alpha - provider: - name: Red Hat - replaces: koku-metrics-operator.v0.9.8 - version: 1.1.1 diff --git a/koku-metrics-operator/1.1.1/metadata/annotations.yaml b/koku-metrics-operator/1.1.1/metadata/annotations.yaml deleted file mode 100644 index 5e2f30385..000000000 --- a/koku-metrics-operator/1.1.1/metadata/annotations.yaml +++ /dev/null @@ -1,15 +0,0 @@ -annotations: - # Core bundle annotations. - operators.operatorframework.io.bundle.mediatype.v1: registry+v1 - operators.operatorframework.io.bundle.manifests.v1: manifests/ - operators.operatorframework.io.bundle.metadata.v1: metadata/ - operators.operatorframework.io.bundle.package.v1: koku-metrics-operator - operators.operatorframework.io.bundle.channels.v1: alpha,beta - operators.operatorframework.io.bundle.channel.default.v1: beta - operators.operatorframework.io.metrics.builder: operator-sdk-v1.10.0+git - operators.operatorframework.io.metrics.mediatype.v1: metrics+v1 - operators.operatorframework.io.metrics.project_layout: go.kubebuilder.io/v2 - - # Annotations for testing. - operators.operatorframework.io.test.mediatype.v1: scorecard+v1 - operators.operatorframework.io.test.config.v1: tests/scorecard/ diff --git a/koku-metrics-operator/1.1.1/tests/scorecard/config.yaml b/koku-metrics-operator/1.1.1/tests/scorecard/config.yaml deleted file mode 100644 index e2d83b262..000000000 --- a/koku-metrics-operator/1.1.1/tests/scorecard/config.yaml +++ /dev/null @@ -1,28 +0,0 @@ -apiVersion: scorecard.operatorframework.io/v1alpha3 -kind: Configuration -metadata: - name: config -stages: -- parallel: true - tests: - - entrypoint: - - scorecard-test - - basic-check-spec - image: quay.io/operator-framework/scorecard-test:v1.10.1 - labels: - suite: basic - test: basic-check-spec-test - - entrypoint: - - scorecard-test - - olm-bundle-validation - image: quay.io/operator-framework/scorecard-test:v1.10.1 - labels: - suite: olm - test: olm-bundle-validation-test - - entrypoint: - - scorecard-test - - olm-crds-have-validation - image: quay.io/operator-framework/scorecard-test:v1.10.1 - labels: - suite: olm - test: olm-crds-have-validation-test diff --git a/koku-metrics-operator/1.1.2/Dockerfile b/koku-metrics-operator/1.1.2/Dockerfile deleted file mode 100644 index 7147fd722..000000000 --- a/koku-metrics-operator/1.1.2/Dockerfile +++ /dev/null @@ -1,21 +0,0 @@ -FROM scratch - -# Core bundle labels. -LABEL operators.operatorframework.io.bundle.mediatype.v1=registry+v1 -LABEL operators.operatorframework.io.bundle.manifests.v1=manifests/ -LABEL operators.operatorframework.io.bundle.metadata.v1=metadata/ -LABEL operators.operatorframework.io.bundle.package.v1=koku-metrics-operator -LABEL operators.operatorframework.io.bundle.channels.v1=alpha,beta -LABEL operators.operatorframework.io.bundle.channel.default.v1=beta -LABEL operators.operatorframework.io.metrics.builder=operator-sdk-v1.10.0+git -LABEL operators.operatorframework.io.metrics.mediatype.v1=metrics+v1 -LABEL operators.operatorframework.io.metrics.project_layout=go.kubebuilder.io/v2 - -# Labels for testing. -LABEL operators.operatorframework.io.test.mediatype.v1=scorecard+v1 -LABEL operators.operatorframework.io.test.config.v1=tests/scorecard/ - -# Copy files to locations specified by labels. -COPY manifests /manifests/ -COPY metadata /metadata/ -COPY tests/scorecard /tests/scorecard/ diff --git a/koku-metrics-operator/1.1.2/manifests/koku-metrics-cfg.openshift.io_kokumetricsconfigs.yaml b/koku-metrics-operator/1.1.2/manifests/koku-metrics-cfg.openshift.io_kokumetricsconfigs.yaml deleted file mode 100644 index f0a62933b..000000000 --- a/koku-metrics-operator/1.1.2/manifests/koku-metrics-cfg.openshift.io_kokumetricsconfigs.yaml +++ /dev/null @@ -1,825 +0,0 @@ -apiVersion: apiextensions.k8s.io/v1 -kind: CustomResourceDefinition -metadata: - annotations: - controller-gen.kubebuilder.io/version: v0.3.0 - creationTimestamp: null - name: kokumetricsconfigs.koku-metrics-cfg.openshift.io -spec: - group: koku-metrics-cfg.openshift.io - names: - kind: KokuMetricsConfig - listKind: KokuMetricsConfigList - plural: kokumetricsconfigs - singular: kokumetricsconfig - scope: Namespaced - versions: - - name: v1beta1 - schema: - openAPIV3Schema: - description: KokuMetricsConfig is the Schema for the kokumetricsconfig API - properties: - apiVersion: - description: 'APIVersion defines the versioned schema of this representation - of an object. Servers should convert recognized schemas to the latest - internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' - type: string - kind: - description: 'Kind is a string value representing the REST resource this - object represents. Servers may infer this from the endpoint the client - submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' - type: string - metadata: - type: object - spec: - description: KokuMetricsConfigSpec defines the desired state of KokuMetricsConfig. - properties: - api_url: - default: https://cloud.redhat.com - description: FOR DEVELOPMENT ONLY. APIURL is a field of KokuMetricsConfig - to represent the url of the API endpoint for service interaction. - The default is `https://cloud.redhat.com`. - type: string - authentication: - description: Authentication is a field of KokuMetricsConfig to represent - the authentication object. - properties: - secret_name: - description: AuthenticationSecretName is a field of KokuMetricsConfig - to represent the secret with the user and password used for - uploads. - type: string - type: - default: token - description: 'AuthType is a field of KokuMetricsConfig to represent - the authentication type to be used basic or token. Valid values - are: - "basic" : Enables authentication using user and password - from authentication secret. - "token" (default): Uses cluster - token for authentication.' - enum: - - token - - basic - type: string - required: - - type - type: object - clusterID: - description: ClusterID is a field of KokuMetricsConfig to represent - the cluster UUID. Normally this value should not be specified. Only - set this value if the clusterID cannot be obtained from the ClusterVersion. - type: string - clusterVersion: - description: ClusterVersion is a field of KokuMetricsConfig to represent - the cluster version. Normally this value should not be specified. - Only set this value if the clusterVersion cannot be obtained from - the ClusterVersion. - type: string - packaging: - description: Packaging is a field of KokuMetricsConfig to represent - the packaging object. - properties: - max_reports_to_store: - default: 30 - description: MaxReports is a field of KokuMetricsConfig to represent - the maximum number of reports to store. The default is 30 reports - which corresponds to approximately 7 days worth of data given - the other default values. - format: int64 - minimum: 1 - type: integer - max_size_MB: - default: 100 - description: MaxSize is a field of KokuMetricsConfig to represent - the max file size in megabytes that will be compressed for upload - to Ingress. The default is 100. - format: int64 - maximum: 100 - minimum: 1 - type: integer - required: - - max_reports_to_store - - max_size_MB - type: object - prometheus_config: - description: PrometheusConfig is a field of KokuMetricsConfig to represent - the configuration of Prometheus connection. - properties: - service_address: - default: https://thanos-querier.openshift-monitoring.svc:9091 - description: FOR DEVELOPMENT ONLY. SvcAddress is a field of KokuMetricsConfig - to represent the thanos-querier address. The default is `https://thanos-querier.openshift-monitoring.svc:9091`. - type: string - skip_tls_verification: - default: false - description: FOR DEVELOPMENT ONLY. SkipTLSVerification is a field - of KokuMetricsConfig to represent if the thanos-querier endpoint - must be certificate validated. The default is false. - type: boolean - required: - - service_address - - skip_tls_verification - type: object - source: - description: Source is a field of KokuMetricsConfig to represent the - desired source on cloud.redhat.com. - properties: - check_cycle: - default: 1440 - description: CheckCycle is a field of KokuMetricsConfig to represent - the number of minutes between each source check schedule The - default is 1440 min (24 hours). - format: int64 - minimum: 0 - type: integer - create_source: - default: false - description: CreateSource is a field of KokuMetricsConfigSpec - to represent if the source should be created if not found. - type: boolean - name: - description: SourceName is a field of KokuMetricsConfigSpec to - represent the source name on cloud.redhat.com. - type: string - sources_path: - default: /api/sources/v1.0/ - description: FOR DEVELOPMENT ONLY. SourcesAPIPath is a field of - KokuMetricsConfig to represent the path of the Sources API service. - The default is `/api/sources/v1.0/`. - type: string - required: - - check_cycle - - create_source - - sources_path - type: object - upload: - description: Upload is a field of KokuMetricsConfig to represent the - upload object. - properties: - ingress_path: - default: /api/ingress/v1/upload - description: FOR DEVELOPMENT ONLY. IngressAPIPath is a field of - KokuMetricsConfig to represent the path of the Ingress API service. - The default is `/api/ingress/v1/upload`. - type: string - upload_cycle: - default: 360 - description: UploadCycle is a field of KokuMetricsConfig to represent - the number of minutes between each upload schedule. The default - is 360 min (6 hours). - format: int64 - minimum: 0 - type: integer - upload_toggle: - default: true - description: UploadToggle is a field of KokuMetricsConfig to represent - if the operator is installed in a restricted-network. If `false`, - the operator will not upload to cloud.redhat.com or check/create - sources. The default is true. - type: boolean - upload_wait: - description: UploadWait is a field of KokuMetricsConfig to represent - the time to wait before sending an upload. - format: int64 - minimum: 0 - type: integer - validate_cert: - default: true - description: ValidateCert is a field of KokuMetricsConfig to represent - if the Ingress endpoint must be certificate validated. - type: boolean - required: - - ingress_path - - upload_cycle - - upload_toggle - - validate_cert - type: object - volume_claim_template: - description: VolumeClaimTemplate is a field of KokuMetricsConfig to - represent a PVC template. - properties: - apiVersion: - description: 'APIVersion defines the versioned schema of this - representation of an object. Servers should convert recognized - schemas to the latest internal value, and may reject unrecognized - values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' - type: string - kind: - description: 'Kind is a string value representing the REST resource - this object represents. Servers may infer this from the endpoint - the client submits requests to. Cannot be updated. In CamelCase. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' - type: string - metadata: - description: EmbeddedMetadata contains metadata relevant to an - EmbeddedResource. - properties: - annotations: - additionalProperties: - type: string - description: 'Annotations is an unstructured key value map - stored with a resource that may be set by external tools - to store and retrieve arbitrary metadata. They are not queryable - and should be preserved when modifying objects. More info: - http://kubernetes.io/docs/user-guide/annotations' - type: object - labels: - additionalProperties: - type: string - description: 'Map of string keys and values that can be used - to organize and categorize (scope and select) objects. May - match selectors of replication controllers and services. - More info: http://kubernetes.io/docs/user-guide/labels' - type: object - name: - description: 'Name must be unique within a namespace. Is required - when creating resources, although some resources may allow - a client to request the generation of an appropriate name - automatically. Name is primarily intended for creation idempotence - and configuration definition. Cannot be updated. More info: - http://kubernetes.io/docs/user-guide/identifiers#names' - type: string - type: object - spec: - description: 'Spec defines the desired characteristics of a volume - requested by a pod author. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims' - properties: - accessModes: - description: 'AccessModes contains the desired access modes - the volume should have. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes-1' - items: - type: string - type: array - dataSource: - description: 'This field can be used to specify either: * - An existing VolumeSnapshot object (snapshot.storage.k8s.io/VolumeSnapshot) - * An existing PVC (PersistentVolumeClaim) * An existing - custom resource that implements data population (Alpha) - In order to use custom resource types that implement data - population, the AnyVolumeDataSource feature gate must be - enabled. If the provisioner or an external controller can - support the specified data source, it will create a new - volume based on the contents of the specified data source.' - properties: - apiGroup: - description: APIGroup is the group for the resource being - referenced. If APIGroup is not specified, the specified - Kind must be in the core API group. For any other third-party - types, APIGroup is required. - type: string - kind: - description: Kind is the type of resource being referenced - type: string - name: - description: Name is the name of resource being referenced - type: string - required: - - kind - - name - type: object - resources: - description: 'Resources represents the minimum resources the - volume should have. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources' - properties: - limits: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - description: 'Limits describes the maximum amount of compute - resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/' - type: object - requests: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - description: 'Requests describes the minimum amount of - compute resources required. If Requests is omitted for - a container, it defaults to Limits if that is explicitly - specified, otherwise to an implementation-defined value. - More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/' - type: object - type: object - selector: - description: A label query over volumes to consider for binding. - properties: - matchExpressions: - description: matchExpressions is a list of label selector - requirements. The requirements are ANDed. - items: - description: A label selector requirement is a selector - that contains values, a key, and an operator that - relates the key and values. - properties: - key: - description: key is the label key that the selector - applies to. - type: string - operator: - description: operator represents a key's relationship - to a set of values. Valid operators are In, NotIn, - Exists and DoesNotExist. - type: string - values: - description: values is an array of string values. - If the operator is In or NotIn, the values array - must be non-empty. If the operator is Exists or - DoesNotExist, the values array must be empty. - This array is replaced during a strategic merge - patch. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - description: matchLabels is a map of {key,value} pairs. - A single {key,value} in the matchLabels map is equivalent - to an element of matchExpressions, whose key field is - "key", the operator is "In", and the values array contains - only "value". The requirements are ANDed. - type: object - type: object - storageClassName: - description: 'Name of the StorageClass required by the claim. - More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#class-1' - type: string - volumeMode: - description: volumeMode defines what type of volume is required - by the claim. Value of Filesystem is implied when not included - in claim spec. - type: string - volumeName: - description: VolumeName is the binding reference to the PersistentVolume - backing this claim. - type: string - type: object - type: object - required: - - authentication - - packaging - - prometheus_config - - source - - upload - type: object - status: - description: KokuMetricsConfigStatus defines the observed state of KokuMetricsConfig. - properties: - api_url: - description: APIURL is a field of KokuMetricsConfig to represent the - url of the API endpoint for service interaction. - type: string - authentication: - description: Authentication is a field of KokuMetricsConfig to represent - the authentication status. - properties: - credentials_found: - description: AuthenticationCredentialsFound is a field of KokuMetricsConfig - to represent if used for uploads were found. - type: boolean - error: - description: AuthErrorMessage is a field of KokuMetricsConfig - to represent an `invalid credentials` error message. - type: string - last_credential_verification_time: - description: LastVerificationTime is a field of KokuMetricsConfig - to represent the last time credentials were verified. - format: date-time - nullable: true - type: string - secret_name: - description: AuthenticationSecretName is a field of KokuMetricsConfig - to represent the secret with the user and password used for - uploads. - type: string - type: - description: AuthType is a field of KokuMetricsConfig to represent - the authentication type to be used basic or token. - enum: - - token - - basic - type: string - valid_basic_auth: - description: ValidBasicAuth is a field of KokuMetricsConfig to - represent if the given basic auth credentials are valid. - type: boolean - type: object - clusterID: - description: ClusterID is a field of KokuMetricsConfig to represent - the cluster UUID. - type: string - clusterVersion: - description: ClusterVersion is a field of KokuMetricsConfig to represent - the cluster version. - type: string - operator_commit: - description: OperatorCommit is a field of KokuMetricsConfig that shows - the commit hash of the operator. - type: string - packaging: - description: Packaging is a field of KokuMetricsConfig to represent - the packaging status - properties: - error: - description: PackagingError is a field of KokuMetricsConfig to - represent the error encountered packaging the reports. - type: string - last_successful_packaging_time: - description: LastSuccessfulPackagingTime is a field of KokuMetricsConfig - that shows the time of the last successful file packaging. - format: date-time - nullable: true - type: string - max_reports_to_store: - description: MaxReports is a field of KokuMetricsConfig to represent - the maximum number of reports to store. - format: int64 - type: integer - max_size_MB: - description: MaxSize is a field of KokuMetricsConfig to represent - the max file size in megabytes that will be compressed for upload - to Ingress. - format: int64 - type: integer - number_reports_stored: - description: ReportCount is a field of KokuMetricsConfig to represent - the number of reports in storage. - format: int64 - type: integer - packaged_files: - description: PackagedFiles is a field of KokuMetricsConfig to - represent the list of file packages in storage. - items: - type: string - type: array - type: object - persistent_volume_claim: - description: PersistentVolumeClaim is a field of KokuMetricsConfig - to represent a PVC. - properties: - apiVersion: - description: 'APIVersion defines the versioned schema of this - representation of an object. Servers should convert recognized - schemas to the latest internal value, and may reject unrecognized - values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' - type: string - kind: - description: 'Kind is a string value representing the REST resource - this object represents. Servers may infer this from the endpoint - the client submits requests to. Cannot be updated. In CamelCase. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' - type: string - metadata: - description: EmbeddedMetadata contains metadata relevant to an - EmbeddedResource. - properties: - annotations: - additionalProperties: - type: string - description: 'Annotations is an unstructured key value map - stored with a resource that may be set by external tools - to store and retrieve arbitrary metadata. They are not queryable - and should be preserved when modifying objects. More info: - http://kubernetes.io/docs/user-guide/annotations' - type: object - labels: - additionalProperties: - type: string - description: 'Map of string keys and values that can be used - to organize and categorize (scope and select) objects. May - match selectors of replication controllers and services. - More info: http://kubernetes.io/docs/user-guide/labels' - type: object - name: - description: 'Name must be unique within a namespace. Is required - when creating resources, although some resources may allow - a client to request the generation of an appropriate name - automatically. Name is primarily intended for creation idempotence - and configuration definition. Cannot be updated. More info: - http://kubernetes.io/docs/user-guide/identifiers#names' - type: string - type: object - spec: - description: 'Spec defines the desired characteristics of a volume - requested by a pod author. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims' - properties: - accessModes: - description: 'AccessModes contains the desired access modes - the volume should have. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes-1' - items: - type: string - type: array - dataSource: - description: 'This field can be used to specify either: * - An existing VolumeSnapshot object (snapshot.storage.k8s.io/VolumeSnapshot) - * An existing PVC (PersistentVolumeClaim) * An existing - custom resource that implements data population (Alpha) - In order to use custom resource types that implement data - population, the AnyVolumeDataSource feature gate must be - enabled. If the provisioner or an external controller can - support the specified data source, it will create a new - volume based on the contents of the specified data source.' - properties: - apiGroup: - description: APIGroup is the group for the resource being - referenced. If APIGroup is not specified, the specified - Kind must be in the core API group. For any other third-party - types, APIGroup is required. - type: string - kind: - description: Kind is the type of resource being referenced - type: string - name: - description: Name is the name of resource being referenced - type: string - required: - - kind - - name - type: object - resources: - description: 'Resources represents the minimum resources the - volume should have. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources' - properties: - limits: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - description: 'Limits describes the maximum amount of compute - resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/' - type: object - requests: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - description: 'Requests describes the minimum amount of - compute resources required. If Requests is omitted for - a container, it defaults to Limits if that is explicitly - specified, otherwise to an implementation-defined value. - More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/' - type: object - type: object - selector: - description: A label query over volumes to consider for binding. - properties: - matchExpressions: - description: matchExpressions is a list of label selector - requirements. The requirements are ANDed. - items: - description: A label selector requirement is a selector - that contains values, a key, and an operator that - relates the key and values. - properties: - key: - description: key is the label key that the selector - applies to. - type: string - operator: - description: operator represents a key's relationship - to a set of values. Valid operators are In, NotIn, - Exists and DoesNotExist. - type: string - values: - description: values is an array of string values. - If the operator is In or NotIn, the values array - must be non-empty. If the operator is Exists or - DoesNotExist, the values array must be empty. - This array is replaced during a strategic merge - patch. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - description: matchLabels is a map of {key,value} pairs. - A single {key,value} in the matchLabels map is equivalent - to an element of matchExpressions, whose key field is - "key", the operator is "In", and the values array contains - only "value". The requirements are ANDed. - type: object - type: object - storageClassName: - description: 'Name of the StorageClass required by the claim. - More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#class-1' - type: string - volumeMode: - description: volumeMode defines what type of volume is required - by the claim. Value of Filesystem is implied when not included - in claim spec. - type: string - volumeName: - description: VolumeName is the binding reference to the PersistentVolume - backing this claim. - type: string - type: object - type: object - prometheus: - description: Prometheus represents the status of premetheus queries. - properties: - configuration_error: - description: ConfigError is a field of KokuMetricsConfigStatus - to represent errors during prometheus configuration. - type: string - last_query_start_time: - description: LastQueryStartTime is a field of KokuMetricsConfigStatus - to represent the last time queries were started. - format: date-time - nullable: true - type: string - last_query_success_time: - description: LastQuerySuccessTime is a field of KokuMetricsConfigStatus - to represent the last time queries were successful. - format: date-time - nullable: true - type: string - prometheus_configured: - description: PrometheusConfigured is a field of KokuMetricsConfigStatus - to represent if the operator is configured to connect to prometheus. - type: boolean - prometheus_connected: - description: PrometheusConnected is a field of KokuMetricsConfigStatus - to represent if prometheus can be queried. - type: boolean - prometheus_connection_error: - description: ConnectionError is a field of KokuMetricsConfigStatus - to represent errors during prometheus test query. - type: string - service_address: - description: SvcAddress is the internal thanos-querier address. - type: string - skip_tls_verification: - description: SkipTLSVerification is a field of KokuMetricsConfigStatus - to represent if the thanos-querier endpoint must be certificate - validated. - type: boolean - required: - - prometheus_configured - - prometheus_connected - type: object - reports: - description: Reports represents the status of report generation. - properties: - data_collected: - description: DataCollected is a field of KokuMetricsConfigStatus - to represent whether or not data was collected for the last - query. - type: boolean - data_collection_message: - description: DataCollectionMessage is a field of KokuMetricsConfigStatus - to represent a message associated with the data_collected status. - type: string - last_hour_queried: - description: LastHourQueried is a field of KokuMetricsConfigStatus - to represent the time range for which metrics were last queried. - type: string - report_month: - description: ReportMonth is a field of KokuMetricsConfigStatus - to represent the month for which reports are being generated. - type: string - type: object - source: - description: Source is a field of KokuMetricsConfig to represent the - observed state of the source on cloud.redhat.com. - properties: - check_cycle: - description: CheckCycle is a field of KokuMetricsConfig to represent - the number of minutes between each source check schedule. The - default is 1440 min (24 hours). - format: int64 - type: integer - create_source: - description: CreateSource is a field of KokuMetricsConfigStatus - to represent if the source should be created if not found. A - source will not be created if upload_toggle is `false`. - type: boolean - error: - description: SourceError is a field of KokuMetricsConfigStatus - to represent the error encountered creating the source. - type: string - last_check_time: - description: LastSourceCheckTime is a field of KokuMetricsConfig - that shows the time that the last check was attempted. - format: date-time - nullable: true - type: string - name: - description: SourceName is a field of KokuMetricsConfigStatus - to represent the source name on cloud.redhat.com. - type: string - source_defined: - description: SourceDefined is a field of KokuMetricsConfigStatus - to represent if the source exists as defined on cloud.redhat.com. - type: boolean - sources_path: - description: SourcesAPIPath is a field of KokuMetricsConfig to - represent the path of the Sources API service. - type: string - type: object - storage: - description: Storage is a field - properties: - volume_mounted: - description: VolumeMounted is a bool to indicate if storage volume - was mounted. - type: boolean - volume_type: - description: VolumeType is the string representation of the volume - type. - type: string - type: object - upload: - description: Upload is a field of KokuMetricsConfig to represent the - upload object. - properties: - error: - description: UploadError is a field of KokuMetricsConfigStatus - to represent the error encountered uploading reports. - type: string - ingress_path: - description: IngressAPIPath is a field of KokuMetricsConfig to - represent the path of the Ingress API service. - type: string - last_payload_files: - description: LastPayloadFiles is a field of KokuMetricsConfig - to represent the list of files in the last payload that was - sent. - items: - type: string - type: array - last_payload_manifest_id: - description: LastPayloadManifest is a field of KokuMetricsConfig - that shows the manifestID of the last payload. - type: string - last_payload_name: - description: LastPayloadName is a field of KokuMetricsConfig that - shows the name of the last payload file. - type: string - last_payload_request_id: - description: LastPayloadRequestID is a field of KokuMetricsConfig - that shows the insights request id of the last payload. - type: string - last_successful_upload_time: - description: LastSuccessfulUploadTime is a field of KokuMetricsConfig - that shows the time of the last successful upload. - format: date-time - nullable: true - type: string - last_upload_status: - description: LastUploadStatus is a field of KokuMetricsConfig - that shows the http status of the last upload. - type: string - upload: - description: UploadToggle is a field of KokuMetricsConfig to represent - if the operator should upload to cloud.redhat.com. The default - is true - type: boolean - upload_cycle: - description: UploadCycle is a field of KokuMetricsConfig to represent - the number of minutes between each upload schedule. The default - is 360 min (6 hours). - format: int64 - type: integer - upload_wait: - description: UploadWait is a field of KokuMetricsConfig to represent - the time to wait before sending an upload. - format: int64 - type: integer - validate_cert: - description: ValidateCert is a field of KokuMetricsConfig to represent - if the Ingress endpoint must be certificate validated. - type: boolean - type: object - type: object - required: - - spec - type: object - served: true - storage: true - subresources: - status: {} -status: - acceptedNames: - kind: "" - plural: "" - conditions: [] - storedVersions: [] diff --git a/koku-metrics-operator/1.1.2/manifests/koku-metrics-operator.clusterserviceversion.yaml b/koku-metrics-operator/1.1.2/manifests/koku-metrics-operator.clusterserviceversion.yaml deleted file mode 100644 index 169eb514e..000000000 --- a/koku-metrics-operator/1.1.2/manifests/koku-metrics-operator.clusterserviceversion.yaml +++ /dev/null @@ -1,469 +0,0 @@ -apiVersion: operators.coreos.com/v1alpha1 -kind: ClusterServiceVersion -metadata: - annotations: - alm-examples: |- - [ - { - "apiVersion": "koku-metrics-cfg.openshift.io/v1beta1", - "kind": "KokuMetricsConfig", - "metadata": { - "name": "kokumetricscfg-sample-v1beta1" - }, - "spec": { - "authentication": { - "type": "token" - }, - "packaging": { - "max_reports_to_store": 30, - "max_size_MB": 100 - }, - "prometheus_config": {}, - "source": { - "check_cycle": 1440, - "create_source": false, - "name": "INSERT-SOURCE-NAME" - }, - "upload": { - "upload_cycle": 360, - "upload_toggle": true - } - } - } - ] - capabilities: Seamless Upgrades - categories: Monitoring - certified: "false" - containerImage: quay.io/project-koku/koku-metrics-operator@sha256:db8bd2e848df4bce714ad5e7b8a414cc91edc4749e0fa7f951304d07c02852ba - createdAt: "2021-12-15T20:28:18Z" - description: A Golang-based OpenShift Operator that generates and uploads OpenShift - usage metrics to cost management. - operatorframework.io/suggested-namespace: koku-metrics-operator - operators.openshift.io/infrastructure-features: '["Disconnected"]' - operators.operatorframework.io/builder: operator-sdk-v1.10.0+git - operators.operatorframework.io/project_layout: go.kubebuilder.io/v2 - repository: https://github.com/project-koku/koku-metrics-operator - support: Cost Management - name: koku-metrics-operator.v1.1.2 - namespace: placeholder -spec: - apiservicedefinitions: {} - customresourcedefinitions: - owned: - - description: KokuMetricsConfig is the Schema for the kokumetricsconfig API - displayName: Koku Metrics Config - kind: KokuMetricsConfig - name: kokumetricsconfigs.koku-metrics-cfg.openshift.io - version: v1beta1 - description: |- - # Koku Metrics Operator - ## Introduction - The `koku-metrics-operator` is a component of the [cost managment](https://access.redhat.com/documentation/en-us/openshift_container_platform/4.5/html/getting_started_with_cost_management/assembly_introduction_cost_management) service for Openshift, used to gather the required information from the cluster. It is recommended to be installed in OpenShift 4.5+. This operator obtains OpenShift usage data by querying Prometheus and uploads it to cost management to be processed. The Operator queries Prometheus every hour to create metric reports, which are then packaged and uploaded to cost management at [cloud.redhat.com](https://cloud.redhat.com). For more information, reach out to . - - This operator is capable of functioning within a disconnected/restricted network (aka air-gapped mode). In this mode, the operator will store the packaged reports for manual retrieval instead of being uploaded to cost management. Documentation for installing an operator within a restricted network can be found [here](https://docs.openshift.com/container-platform/4.5/operators/admin/olm-restricted-networks.html). - - For more information, reach out to . - ## Features and Capabilities - #### Metrics collection: - The Koku Metrics Operator (`koku-metrics-operator`) collects the metrics required for cost management by: - * Querying Prometheus to gather the necessary metrics for cost management. - * Writing Prometheus queries to CSV report files. - * Packaging the CSV report files into tarballs. - - #### Additional Capabilities: - * The operator can be configured to automatically upload the packaged reports to cost management through Red Hat Insights Ingress service. - * The operator can create a source in cloud.redhat.com. A source is required for cost management to process the uploaded packages. - * PersistentVolumeClaim (PVC) configuration: The KokuMetricsConfig CR can accept a PVC definition and the operator will create and mount the PVC. If one is not provided, a default PVC will be created. - * Restricted network installation: this operator can function on a restricted network. In this mode, the operator stores the packaged reports for manual retrieval. - - ## Limitations and Pre-Requisites - #### Limitations (Potential for metrics data loss) - * A source **must** exist in cloud.redhat.com for an uploaded payload to be processed by cost management. The operator sends the payload to the Red Hat Insights Ingress service which usually returns successfully, but the operator does not currently confirm with cost management that the payload was processed. After Ingress accepts the uploaded payload, the payload is removed from the operator and is gone forever. If the data within the payload is not processed, a gap will be introduced in the usage metrics. - - **Note** The following limitations are specific to operators configured to run in a restricted network: - * The `koku-metrics-operator` will not be able to generate new reports if the PVC storage is filled. If this occurs, the reports must be manually deleted from the PVC so that the operator can function as normal. - * The default report retention is 30 reports (about one week's worth of data). The reports must be manually downloaded and uploaded to cloud.redhat.com every week, or they will be deleted and the data will be lost. - - #### Storage configuration prerequisite - The operator will attempt to create and use the following PVC when installed: - - volume_claim_template: - apiVersion: v1 - kind: PersistentVolumeClaim - metadata: - name: koku-metrics-operator-data - spec: - accessModes: - - ReadWriteOnce - resources: - requests: - storage: 10Gi - - If a different PVC should be utilized, a valid PVC should be specified in the KokuMetricsConfig CR as described in the appropriate section below. The PVC to be used may exist already, or the operator will attempt to create it. - - To use the default specification, the follow assumptions must be met: - 1. A default StorageClass is defined. - 2. Dynamic provisioning for that default StorageClass is enabled. - - If these assumptions are not met, the operator will not deploy correctly. In these cases, storage must be manually configured. After configuring storage, a valid PVC template should be supplied in the `volume_claim_template` spec of the KokuMetricsConfig CR. - - ## Configure the koku-metrics-operator - **Note** There are separate instructions for configuring the `koku-metrics-operator` to run in a restricted network. - ##### Configure authentication - The default authentication for the operator is `token`. No further steps are required to configure token authentication. If `basic` is the preferred authentication method, a Secret must be created which holds username and password credentials: - 1. On the left navigation pane, select `Workloads` -> `Secrets` -> select Project: `koku-metrics-operator` -> `Create` -> `Key/Value Secret` - 2. Give the Secret a name and add 2 keys: `username` and `password` (all lowercase). The values for these keys correspond to cloud.redhat.com credentials. - 3. Select `Create`. - ##### Create the KokuMetricsConfig - Configure the koku-metrics-operator by creating a `KokuMetricsConfig`. - 1. On the left navigation pane, select `Operators` -> `Installed Operators` -> `koku-metrics-operator` -> `KokuMetricsConfig` -> `Create Instance`. - 2. For `basic` authentication, edit the following values in the spec: - * Replace `authentication: type:` with `basic`. - * Add the `secret_name` field under `authentication`, and set it equal to the name of the authentication Secret that was created above. The spec should look similar to the following: - - ``` - authentication: - secret_name: SECRET-NAME - type: basic - ``` - - 3. To configure the koku-metrics-operator to create a cost management source, edit the following values in the `source` field: - * Replace `INSERT-SOURCE-NAME` with the preferred name of the source to be created. - * Replace the `create_source` field value with `true`. - - **Note:** if the source already exists, replace `INSERT-SOURCE-NAME` with the existing name, and leave `create_source` as false. This will allow the operator to confirm the source exists. - 4. If not specified, the operator will create a default PersistentVolumeClaim called `koku-metrics-operator-data` with 10Gi of storage. To configure the koku-metrics-operator to use or create a different PVC, edit the following in the spec: - * Add the desired configuration to the `volume_claim_template` field in the spec: - - ``` - volume_claim_template: - apiVersion: v1 - kind: PersistentVolumeClaim - metadata: - name: - spec: - accessModes: - - ReadWriteOnce - resources: - requests: - storage: 10Gi - ``` - - **Note:** If using the YAML View, the `volume_claim_template` field must be added to the spec - 5. Select `Create`. - - # Restricted Network Usage (disconnected/air-gapped mode) - ## Installation - To install the `koku-metrics-operator` in a restricted network, follow the [olm documentation](https://docs.openshift.com/container-platform/4.5/operators/admin/olm-restricted-networks.html). The operator is found in the `community-operators` Catalog in the `registry.redhat.io/redhat/community-operator-index:latest` Index. If pruning the index before pushing to the mirrored registry, keep the `koku-metrics-operator` package. - - Within a restricted network, the operator queries prometheus to gather the necessary usage metrics, writes the query results to CSV files, and packages the reports for storage in the PVC. These reports then need to be manually downloaded from the cluster and uploaded to [cloud.redhat.com](https://cloud.redhat.com). - - For more information, reach out to . - ## Configure the koku-metrics-operator for a restricted network - ##### Create the KokuMetricsConfig - Configure the koku-metrics-operator by creating a `KokuMetricsConfig`. - 1. On the left navigation pane, select `Operators` -> `Installed Operators` -> `koku-metrics-operator` -> `KokuMetricsConfig` -> `Create Instance`. - 2. Specify the desired storage. If not specified, the operator will create a default Persistent Volume Claim called `koku-metrics-operator-data` with 10Gi of storage. To configure the koku-metrics-operator to use or create a different PVC, edit the following in the spec: - * Add the desired configuration to the `volume_claim_template` field in the spec: - - ``` - volume_claim_template: - apiVersion: v1 - kind: PersistentVolumeClaim - metadata: - name: - spec: - storageClassName: - accessModes: - - ReadWriteOnce - resources: - requests: - storage: 10Gi - ``` - - **Note:** If using the YAML View, the `volume_claim_template` field must be added to the spec - 3. (Optional) Specify the desired report retention. The operator will retain 30 reports by default. This corresponds to approximately one week's worth of data if using the default packaging cycle. To modify the number of retained reports: - * Change the `packaging` spec field `max_reports_to_store` to the desired number of reports to retain. Once this max number is reached, the operator will start removing the oldest packages remaining on the PVC: - - ``` - packaging: - max_size_MB: 100 - max_reports_to_store: 30 - ``` - - **Note:** The number of retained reports directly affects the frequency that reports must be manually downloaded from the PVC. Take caution in setting this to a higher number of reports, as the operator cannot write data to the PVC if the storage is full. - 4. To configure the operator to perform in a restricted network, set the `upload_toggle` to `false`: - - ``` - upload: - upload_cycle: 360, - upload_toggle: false - ``` - - 5. Select `Create`. - - ## Download reports from the Operator & clean up the PVC - If the `koku-metrics-operator` is configured to run in a restricted network, the metric reports will not automatically upload to cost managment. Instead, they need to be manually copied from the PVC for upload to [cloud.redhat.com](https://cloud.redhat.com). The default configuration saves one week of reports which means the process of downloading and uploading reports should be repeated weekly to prevent loss of metrics data. To download the reports, complete the following steps: - 1. Create the following Pod, ensuring the `claimName` matches the PVC containing the report data: - - ``` - kind: Pod - apiVersion: v1 - metadata: - name: volume-shell - namespace: koku-metrics-operator - spec: - volumes: - - name: koku-metrics-operator-reports - persistentVolumeClaim: - claimName: koku-metrics-operator-data - containers: - - name: volume-shell - image: busybox - command: ['sleep', 'infinity'] - volumeMounts: - - name: koku-metrics-operator-reports - mountPath: /tmp/koku-metrics-operator-reports - ``` - - 2. Use rsync to copy all of the files ready for upload from the PVC to a local folder: - - ``` - $ oc rsync volume-shell:/tmp/koku-metrics-operator-reports/upload local/path/to/save/folder - ``` - - 3. Once confirming that the files have been successfully copied, use rsh to connect to the pod and delete the contents of the upload folder so that they are no longer in storage: - - ``` - $ oc rsh volume-shell - $ rm /tmp/koku-metrics-operator-reports/upload/* - ``` - - 4. (Optional) Delete the pod that was used to connect to the PVC: - - ``` - $ oc delete -f volume-shell.yaml - ``` - - ## Create a source - In a restricted network, the `koku-metrics-operator` cannot automatically create a source. This process must be done manually. In the cloud.redhat.com platform, open the [Sources menu](https://cloud.redhat.com/settings/sources/) to begin adding an OpenShift source to cost management: - - Prerequisites: - * The cluster identifier which can be found in the KokuMetricsConfig CR, the cluster Overview page, or the cluster Help > About. - - Create source: - 1. Navigate to the Sources menu - 2. Select the `Red Hat sources` tab - 3. Create a new `Red Hat Openshift Container Platform` source: - * give the source a unique name - * add the Cost Management application - * add the cluster identifier - 4. In the Sources wizard, review the details and click `Finish` to create the Source. - - ## Upload the reports to cost managment - Uploading reports to cost managment is done through curl: - - $ curl -vvvv -F "file=@FILE_NAME.tar.gz;type=application/vnd.redhat.hccm.tar+tgz" https://cloud.redhat.com/api/ingress/v1/upload -u USERNAME:PASS - - where `USERNAME` and `PASS` correspond to the user credentials for [cloud.redhat.com](https://cloud.redhat.com), and `FILE_NAME` is the name of the report to upload. - - displayName: Koku Metrics Operator - icon: - - base64data: PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4KPCEtLSBHZW5lcmF0b3I6IEFkb2JlIElsbHVzdHJhdG9yIDIyLjEuMCwgU1ZHIEV4cG9ydCBQbHVnLUluIC4gU1ZHIFZlcnNpb246IDYuMDAgQnVpbGQgMCkgIC0tPgo8c3ZnIHZlcnNpb249IjEuMSIgaWQ9IkxheWVyXzEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4IgoJIHZpZXdCb3g9IjAgMCAzMDAgMzAwIiBzdHlsZT0iZW5hYmxlLWJhY2tncm91bmQ6bmV3IDAgMCAzMDAgMzAwOyIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSI+CjxzdHlsZSB0eXBlPSJ0ZXh0L2NzcyI+Cgkuc3Qwe2ZpbGw6I0VFMDAwMDt9Cjwvc3R5bGU+Cjx0aXRsZT5Db3N0LWljb248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TMsMS4xNDcyOTMxLDkuODYwMzgyMSwzLjQzNzMwMTZjMC40NTYxNzY4LDAuMzgyNDQ2MywwLjcyMzQxOTIsMC44NDMyMDA3LDAuODAxNzQyNiwxLjM3NzY4NTUKCQkJYzAuMDczNzE1MiwwLjUzNDUwMDEtMC4xMTUyMDM5LDAuOTkwNjQ2NC0wLjU3MTM1MDEsMS4zNzMwNzc0bC0zLjg5ODA4NjUsNC4wMTMyNzUxCgkJCWMtMC4zMDg3MTU4LDAuMjMwMzkyNS0wLjY2ODEwNjEsMC4zODI0MzEtMS4wOTIwMTA1LDAuNDU2MTYxNWMtMC40MTkyOTYzLDAuMDc4MzIzNC0wLjgyMDE1OTksMC0xLjIwMjU5MDktMC4yMjU3NjkKCQkJYy0xLjE0MjcxNTUtMC44NDMyMDA3LTIuNDQyMDc3Ni0xLjI2MjQ5NjktMy44OTgwODY1LTEuMjYyNDk2OWgtNy42NzYzNjExYy0wLjkxNjkxNTksMC0xLjcwMDIyNTgsMC4zMjI1MjUtMi4zNDk4OTkzLDAuOTcyMjEzNwoJCQljLTAuNjQ5Njg4NywwLjY0OTY3MzUtMC45NzY4MjE5LDEuNDc0NDQxNS0wLjk3NjgyMTksMi40NjUwODc5YzAsMC42ODY1NTQsMC4yMzAzOTI1LDEuMzM2MjEyMiwwLjY5MTE0NjksMS45NDkwMzU2CgkJCWMwLjQ1NjE2MTUsMC42MTI4MjM1LDEuMDMyMTE5OCwxLjAzMjExOTgsMS43MTg2NTg0LDEuMjYyNDk2OUwxNzQuMjgwNjM5NiwxODUuODczNjExNXoiLz4KCTwvZz4KPC9nPgo8L3N2Zz4K - mediatype: image/svg+xml - install: - spec: - clusterPermissions: - - rules: - - apiGroups: - - config.openshift.io - resources: - - clusterversions - verbs: - - get - - list - - watch - - apiGroups: - - "" - resources: - - namespaces - verbs: - - get - - list - - watch - - apiGroups: - - "" - resources: - - secrets - verbs: - - get - serviceAccountName: koku-metrics-controller-manager - deployments: - - name: koku-metrics-controller-manager - spec: - replicas: 1 - selector: - matchLabels: - control-plane: controller-manager - strategy: {} - template: - metadata: - labels: - control-plane: controller-manager - spec: - containers: - - args: - - --enable-leader-election - command: - - /manager - env: - - name: IN_CLUSTER - value: "true" - - name: WATCH_NAMESPACE - valueFrom: - fieldRef: - fieldPath: metadata.annotations['olm.targetNamespaces'] - image: quay.io/project-koku/koku-metrics-operator@sha256:db8bd2e848df4bce714ad5e7b8a414cc91edc4749e0fa7f951304d07c02852ba - name: manager - resources: - limits: - cpu: 500m - memory: 500Mi - requests: - cpu: 100m - memory: 20Mi - terminationMessagePolicy: FallbackToLogsOnError - volumeMounts: - - mountPath: /tmp/koku-metrics-operator-reports - name: koku-metrics-operator-reports - serviceAccountName: koku-metrics-controller-manager - terminationGracePeriodSeconds: 10 - volumes: - - name: koku-metrics-operator-reports - permissions: - - rules: - - apiGroups: - - "" - resources: - - configmaps - verbs: - - get - - list - - watch - - create - - update - - patch - - delete - - apiGroups: - - "" - resources: - - configmaps/status - verbs: - - get - - update - - patch - - apiGroups: - - "" - resources: - - events - verbs: - - create - - patch - - apiGroups: - - coordination.k8s.io - resources: - - leases - verbs: - - get - - list - - watch - - create - - update - - patch - - delete - - apiGroups: - - apps - resources: - - deployments - verbs: - - get - - list - - patch - - watch - - apiGroups: - - "" - resources: - - configmaps - - endpoints - - events - - persistentvolumeclaims - - pods - - secrets - - serviceaccounts - - services - - services/finalizers - verbs: - - create - - delete - - get - - list - - patch - - update - - watch - - apiGroups: - - koku-metrics-cfg.openshift.io - resources: - - kokumetricsconfigs - verbs: - - create - - delete - - get - - list - - patch - - update - - watch - - apiGroups: - - koku-metrics-cfg.openshift.io - resources: - - kokumetricsconfigs/status - verbs: - - get - - patch - - update - - apiGroups: - - operators.coreos.com - resources: - - clusterserviceversions - verbs: - - get - - list - - patch - - update - - watch - serviceAccountName: koku-metrics-controller-manager - strategy: deployment - installModes: - - supported: true - type: OwnNamespace - - supported: true - type: SingleNamespace - - supported: false - type: MultiNamespace - - supported: false - type: AllNamespaces - relatedImages: - - name: koku-metrics-operator - image: quay.io/project-koku/koku-metrics-operator@sha256:db8bd2e848df4bce714ad5e7b8a414cc91edc4749e0fa7f951304d07c02852ba - keywords: - - cost - - management - - usage - - monitor - maintainers: - - email: costmanagement@redhat.com - name: costmanagement - maturity: alpha - provider: - name: Red Hat - replaces: koku-metrics-operator.v1.1.1 - version: 1.1.2 diff --git a/koku-metrics-operator/1.1.2/metadata/annotations.yaml b/koku-metrics-operator/1.1.2/metadata/annotations.yaml deleted file mode 100644 index 5e2f30385..000000000 --- a/koku-metrics-operator/1.1.2/metadata/annotations.yaml +++ /dev/null @@ -1,15 +0,0 @@ -annotations: - # Core bundle annotations. - operators.operatorframework.io.bundle.mediatype.v1: registry+v1 - operators.operatorframework.io.bundle.manifests.v1: manifests/ - operators.operatorframework.io.bundle.metadata.v1: metadata/ - operators.operatorframework.io.bundle.package.v1: koku-metrics-operator - operators.operatorframework.io.bundle.channels.v1: alpha,beta - operators.operatorframework.io.bundle.channel.default.v1: beta - operators.operatorframework.io.metrics.builder: operator-sdk-v1.10.0+git - operators.operatorframework.io.metrics.mediatype.v1: metrics+v1 - operators.operatorframework.io.metrics.project_layout: go.kubebuilder.io/v2 - - # Annotations for testing. - operators.operatorframework.io.test.mediatype.v1: scorecard+v1 - operators.operatorframework.io.test.config.v1: tests/scorecard/ diff --git a/koku-metrics-operator/1.1.2/tests/scorecard/config.yaml b/koku-metrics-operator/1.1.2/tests/scorecard/config.yaml deleted file mode 100644 index e2d83b262..000000000 --- a/koku-metrics-operator/1.1.2/tests/scorecard/config.yaml +++ /dev/null @@ -1,28 +0,0 @@ -apiVersion: scorecard.operatorframework.io/v1alpha3 -kind: Configuration -metadata: - name: config -stages: -- parallel: true - tests: - - entrypoint: - - scorecard-test - - basic-check-spec - image: quay.io/operator-framework/scorecard-test:v1.10.1 - labels: - suite: basic - test: basic-check-spec-test - - entrypoint: - - scorecard-test - - olm-bundle-validation - image: quay.io/operator-framework/scorecard-test:v1.10.1 - labels: - suite: olm - test: olm-bundle-validation-test - - entrypoint: - - scorecard-test - - olm-crds-have-validation - image: quay.io/operator-framework/scorecard-test:v1.10.1 - labels: - suite: olm - test: olm-crds-have-validation-test diff --git a/koku-metrics-operator/1.1.3/Dockerfile b/koku-metrics-operator/1.1.3/Dockerfile deleted file mode 100644 index 7147fd722..000000000 --- a/koku-metrics-operator/1.1.3/Dockerfile +++ /dev/null @@ -1,21 +0,0 @@ -FROM scratch - -# Core bundle labels. -LABEL operators.operatorframework.io.bundle.mediatype.v1=registry+v1 -LABEL operators.operatorframework.io.bundle.manifests.v1=manifests/ -LABEL operators.operatorframework.io.bundle.metadata.v1=metadata/ -LABEL operators.operatorframework.io.bundle.package.v1=koku-metrics-operator -LABEL operators.operatorframework.io.bundle.channels.v1=alpha,beta -LABEL operators.operatorframework.io.bundle.channel.default.v1=beta -LABEL operators.operatorframework.io.metrics.builder=operator-sdk-v1.10.0+git -LABEL operators.operatorframework.io.metrics.mediatype.v1=metrics+v1 -LABEL operators.operatorframework.io.metrics.project_layout=go.kubebuilder.io/v2 - -# Labels for testing. -LABEL operators.operatorframework.io.test.mediatype.v1=scorecard+v1 -LABEL operators.operatorframework.io.test.config.v1=tests/scorecard/ - -# Copy files to locations specified by labels. -COPY manifests /manifests/ -COPY metadata /metadata/ -COPY tests/scorecard /tests/scorecard/ diff --git a/koku-metrics-operator/1.1.3/manifests/koku-metrics-cfg.openshift.io_kokumetricsconfigs.yaml b/koku-metrics-operator/1.1.3/manifests/koku-metrics-cfg.openshift.io_kokumetricsconfigs.yaml deleted file mode 100644 index f0a62933b..000000000 --- a/koku-metrics-operator/1.1.3/manifests/koku-metrics-cfg.openshift.io_kokumetricsconfigs.yaml +++ /dev/null @@ -1,825 +0,0 @@ -apiVersion: apiextensions.k8s.io/v1 -kind: CustomResourceDefinition -metadata: - annotations: - controller-gen.kubebuilder.io/version: v0.3.0 - creationTimestamp: null - name: kokumetricsconfigs.koku-metrics-cfg.openshift.io -spec: - group: koku-metrics-cfg.openshift.io - names: - kind: KokuMetricsConfig - listKind: KokuMetricsConfigList - plural: kokumetricsconfigs - singular: kokumetricsconfig - scope: Namespaced - versions: - - name: v1beta1 - schema: - openAPIV3Schema: - description: KokuMetricsConfig is the Schema for the kokumetricsconfig API - properties: - apiVersion: - description: 'APIVersion defines the versioned schema of this representation - of an object. Servers should convert recognized schemas to the latest - internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' - type: string - kind: - description: 'Kind is a string value representing the REST resource this - object represents. Servers may infer this from the endpoint the client - submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' - type: string - metadata: - type: object - spec: - description: KokuMetricsConfigSpec defines the desired state of KokuMetricsConfig. - properties: - api_url: - default: https://cloud.redhat.com - description: FOR DEVELOPMENT ONLY. APIURL is a field of KokuMetricsConfig - to represent the url of the API endpoint for service interaction. - The default is `https://cloud.redhat.com`. - type: string - authentication: - description: Authentication is a field of KokuMetricsConfig to represent - the authentication object. - properties: - secret_name: - description: AuthenticationSecretName is a field of KokuMetricsConfig - to represent the secret with the user and password used for - uploads. - type: string - type: - default: token - description: 'AuthType is a field of KokuMetricsConfig to represent - the authentication type to be used basic or token. Valid values - are: - "basic" : Enables authentication using user and password - from authentication secret. - "token" (default): Uses cluster - token for authentication.' - enum: - - token - - basic - type: string - required: - - type - type: object - clusterID: - description: ClusterID is a field of KokuMetricsConfig to represent - the cluster UUID. Normally this value should not be specified. Only - set this value if the clusterID cannot be obtained from the ClusterVersion. - type: string - clusterVersion: - description: ClusterVersion is a field of KokuMetricsConfig to represent - the cluster version. Normally this value should not be specified. - Only set this value if the clusterVersion cannot be obtained from - the ClusterVersion. - type: string - packaging: - description: Packaging is a field of KokuMetricsConfig to represent - the packaging object. - properties: - max_reports_to_store: - default: 30 - description: MaxReports is a field of KokuMetricsConfig to represent - the maximum number of reports to store. The default is 30 reports - which corresponds to approximately 7 days worth of data given - the other default values. - format: int64 - minimum: 1 - type: integer - max_size_MB: - default: 100 - description: MaxSize is a field of KokuMetricsConfig to represent - the max file size in megabytes that will be compressed for upload - to Ingress. The default is 100. - format: int64 - maximum: 100 - minimum: 1 - type: integer - required: - - max_reports_to_store - - max_size_MB - type: object - prometheus_config: - description: PrometheusConfig is a field of KokuMetricsConfig to represent - the configuration of Prometheus connection. - properties: - service_address: - default: https://thanos-querier.openshift-monitoring.svc:9091 - description: FOR DEVELOPMENT ONLY. SvcAddress is a field of KokuMetricsConfig - to represent the thanos-querier address. The default is `https://thanos-querier.openshift-monitoring.svc:9091`. - type: string - skip_tls_verification: - default: false - description: FOR DEVELOPMENT ONLY. SkipTLSVerification is a field - of KokuMetricsConfig to represent if the thanos-querier endpoint - must be certificate validated. The default is false. - type: boolean - required: - - service_address - - skip_tls_verification - type: object - source: - description: Source is a field of KokuMetricsConfig to represent the - desired source on cloud.redhat.com. - properties: - check_cycle: - default: 1440 - description: CheckCycle is a field of KokuMetricsConfig to represent - the number of minutes between each source check schedule The - default is 1440 min (24 hours). - format: int64 - minimum: 0 - type: integer - create_source: - default: false - description: CreateSource is a field of KokuMetricsConfigSpec - to represent if the source should be created if not found. - type: boolean - name: - description: SourceName is a field of KokuMetricsConfigSpec to - represent the source name on cloud.redhat.com. - type: string - sources_path: - default: /api/sources/v1.0/ - description: FOR DEVELOPMENT ONLY. SourcesAPIPath is a field of - KokuMetricsConfig to represent the path of the Sources API service. - The default is `/api/sources/v1.0/`. - type: string - required: - - check_cycle - - create_source - - sources_path - type: object - upload: - description: Upload is a field of KokuMetricsConfig to represent the - upload object. - properties: - ingress_path: - default: /api/ingress/v1/upload - description: FOR DEVELOPMENT ONLY. IngressAPIPath is a field of - KokuMetricsConfig to represent the path of the Ingress API service. - The default is `/api/ingress/v1/upload`. - type: string - upload_cycle: - default: 360 - description: UploadCycle is a field of KokuMetricsConfig to represent - the number of minutes between each upload schedule. The default - is 360 min (6 hours). - format: int64 - minimum: 0 - type: integer - upload_toggle: - default: true - description: UploadToggle is a field of KokuMetricsConfig to represent - if the operator is installed in a restricted-network. If `false`, - the operator will not upload to cloud.redhat.com or check/create - sources. The default is true. - type: boolean - upload_wait: - description: UploadWait is a field of KokuMetricsConfig to represent - the time to wait before sending an upload. - format: int64 - minimum: 0 - type: integer - validate_cert: - default: true - description: ValidateCert is a field of KokuMetricsConfig to represent - if the Ingress endpoint must be certificate validated. - type: boolean - required: - - ingress_path - - upload_cycle - - upload_toggle - - validate_cert - type: object - volume_claim_template: - description: VolumeClaimTemplate is a field of KokuMetricsConfig to - represent a PVC template. - properties: - apiVersion: - description: 'APIVersion defines the versioned schema of this - representation of an object. Servers should convert recognized - schemas to the latest internal value, and may reject unrecognized - values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' - type: string - kind: - description: 'Kind is a string value representing the REST resource - this object represents. Servers may infer this from the endpoint - the client submits requests to. Cannot be updated. In CamelCase. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' - type: string - metadata: - description: EmbeddedMetadata contains metadata relevant to an - EmbeddedResource. - properties: - annotations: - additionalProperties: - type: string - description: 'Annotations is an unstructured key value map - stored with a resource that may be set by external tools - to store and retrieve arbitrary metadata. They are not queryable - and should be preserved when modifying objects. More info: - http://kubernetes.io/docs/user-guide/annotations' - type: object - labels: - additionalProperties: - type: string - description: 'Map of string keys and values that can be used - to organize and categorize (scope and select) objects. May - match selectors of replication controllers and services. - More info: http://kubernetes.io/docs/user-guide/labels' - type: object - name: - description: 'Name must be unique within a namespace. Is required - when creating resources, although some resources may allow - a client to request the generation of an appropriate name - automatically. Name is primarily intended for creation idempotence - and configuration definition. Cannot be updated. More info: - http://kubernetes.io/docs/user-guide/identifiers#names' - type: string - type: object - spec: - description: 'Spec defines the desired characteristics of a volume - requested by a pod author. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims' - properties: - accessModes: - description: 'AccessModes contains the desired access modes - the volume should have. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes-1' - items: - type: string - type: array - dataSource: - description: 'This field can be used to specify either: * - An existing VolumeSnapshot object (snapshot.storage.k8s.io/VolumeSnapshot) - * An existing PVC (PersistentVolumeClaim) * An existing - custom resource that implements data population (Alpha) - In order to use custom resource types that implement data - population, the AnyVolumeDataSource feature gate must be - enabled. If the provisioner or an external controller can - support the specified data source, it will create a new - volume based on the contents of the specified data source.' - properties: - apiGroup: - description: APIGroup is the group for the resource being - referenced. If APIGroup is not specified, the specified - Kind must be in the core API group. For any other third-party - types, APIGroup is required. - type: string - kind: - description: Kind is the type of resource being referenced - type: string - name: - description: Name is the name of resource being referenced - type: string - required: - - kind - - name - type: object - resources: - description: 'Resources represents the minimum resources the - volume should have. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources' - properties: - limits: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - description: 'Limits describes the maximum amount of compute - resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/' - type: object - requests: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - description: 'Requests describes the minimum amount of - compute resources required. If Requests is omitted for - a container, it defaults to Limits if that is explicitly - specified, otherwise to an implementation-defined value. - More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/' - type: object - type: object - selector: - description: A label query over volumes to consider for binding. - properties: - matchExpressions: - description: matchExpressions is a list of label selector - requirements. The requirements are ANDed. - items: - description: A label selector requirement is a selector - that contains values, a key, and an operator that - relates the key and values. - properties: - key: - description: key is the label key that the selector - applies to. - type: string - operator: - description: operator represents a key's relationship - to a set of values. Valid operators are In, NotIn, - Exists and DoesNotExist. - type: string - values: - description: values is an array of string values. - If the operator is In or NotIn, the values array - must be non-empty. If the operator is Exists or - DoesNotExist, the values array must be empty. - This array is replaced during a strategic merge - patch. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - description: matchLabels is a map of {key,value} pairs. - A single {key,value} in the matchLabels map is equivalent - to an element of matchExpressions, whose key field is - "key", the operator is "In", and the values array contains - only "value". The requirements are ANDed. - type: object - type: object - storageClassName: - description: 'Name of the StorageClass required by the claim. - More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#class-1' - type: string - volumeMode: - description: volumeMode defines what type of volume is required - by the claim. Value of Filesystem is implied when not included - in claim spec. - type: string - volumeName: - description: VolumeName is the binding reference to the PersistentVolume - backing this claim. - type: string - type: object - type: object - required: - - authentication - - packaging - - prometheus_config - - source - - upload - type: object - status: - description: KokuMetricsConfigStatus defines the observed state of KokuMetricsConfig. - properties: - api_url: - description: APIURL is a field of KokuMetricsConfig to represent the - url of the API endpoint for service interaction. - type: string - authentication: - description: Authentication is a field of KokuMetricsConfig to represent - the authentication status. - properties: - credentials_found: - description: AuthenticationCredentialsFound is a field of KokuMetricsConfig - to represent if used for uploads were found. - type: boolean - error: - description: AuthErrorMessage is a field of KokuMetricsConfig - to represent an `invalid credentials` error message. - type: string - last_credential_verification_time: - description: LastVerificationTime is a field of KokuMetricsConfig - to represent the last time credentials were verified. - format: date-time - nullable: true - type: string - secret_name: - description: AuthenticationSecretName is a field of KokuMetricsConfig - to represent the secret with the user and password used for - uploads. - type: string - type: - description: AuthType is a field of KokuMetricsConfig to represent - the authentication type to be used basic or token. - enum: - - token - - basic - type: string - valid_basic_auth: - description: ValidBasicAuth is a field of KokuMetricsConfig to - represent if the given basic auth credentials are valid. - type: boolean - type: object - clusterID: - description: ClusterID is a field of KokuMetricsConfig to represent - the cluster UUID. - type: string - clusterVersion: - description: ClusterVersion is a field of KokuMetricsConfig to represent - the cluster version. - type: string - operator_commit: - description: OperatorCommit is a field of KokuMetricsConfig that shows - the commit hash of the operator. - type: string - packaging: - description: Packaging is a field of KokuMetricsConfig to represent - the packaging status - properties: - error: - description: PackagingError is a field of KokuMetricsConfig to - represent the error encountered packaging the reports. - type: string - last_successful_packaging_time: - description: LastSuccessfulPackagingTime is a field of KokuMetricsConfig - that shows the time of the last successful file packaging. - format: date-time - nullable: true - type: string - max_reports_to_store: - description: MaxReports is a field of KokuMetricsConfig to represent - the maximum number of reports to store. - format: int64 - type: integer - max_size_MB: - description: MaxSize is a field of KokuMetricsConfig to represent - the max file size in megabytes that will be compressed for upload - to Ingress. - format: int64 - type: integer - number_reports_stored: - description: ReportCount is a field of KokuMetricsConfig to represent - the number of reports in storage. - format: int64 - type: integer - packaged_files: - description: PackagedFiles is a field of KokuMetricsConfig to - represent the list of file packages in storage. - items: - type: string - type: array - type: object - persistent_volume_claim: - description: PersistentVolumeClaim is a field of KokuMetricsConfig - to represent a PVC. - properties: - apiVersion: - description: 'APIVersion defines the versioned schema of this - representation of an object. Servers should convert recognized - schemas to the latest internal value, and may reject unrecognized - values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' - type: string - kind: - description: 'Kind is a string value representing the REST resource - this object represents. Servers may infer this from the endpoint - the client submits requests to. Cannot be updated. In CamelCase. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' - type: string - metadata: - description: EmbeddedMetadata contains metadata relevant to an - EmbeddedResource. - properties: - annotations: - additionalProperties: - type: string - description: 'Annotations is an unstructured key value map - stored with a resource that may be set by external tools - to store and retrieve arbitrary metadata. They are not queryable - and should be preserved when modifying objects. More info: - http://kubernetes.io/docs/user-guide/annotations' - type: object - labels: - additionalProperties: - type: string - description: 'Map of string keys and values that can be used - to organize and categorize (scope and select) objects. May - match selectors of replication controllers and services. - More info: http://kubernetes.io/docs/user-guide/labels' - type: object - name: - description: 'Name must be unique within a namespace. Is required - when creating resources, although some resources may allow - a client to request the generation of an appropriate name - automatically. Name is primarily intended for creation idempotence - and configuration definition. Cannot be updated. More info: - http://kubernetes.io/docs/user-guide/identifiers#names' - type: string - type: object - spec: - description: 'Spec defines the desired characteristics of a volume - requested by a pod author. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims' - properties: - accessModes: - description: 'AccessModes contains the desired access modes - the volume should have. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes-1' - items: - type: string - type: array - dataSource: - description: 'This field can be used to specify either: * - An existing VolumeSnapshot object (snapshot.storage.k8s.io/VolumeSnapshot) - * An existing PVC (PersistentVolumeClaim) * An existing - custom resource that implements data population (Alpha) - In order to use custom resource types that implement data - population, the AnyVolumeDataSource feature gate must be - enabled. If the provisioner or an external controller can - support the specified data source, it will create a new - volume based on the contents of the specified data source.' - properties: - apiGroup: - description: APIGroup is the group for the resource being - referenced. If APIGroup is not specified, the specified - Kind must be in the core API group. For any other third-party - types, APIGroup is required. - type: string - kind: - description: Kind is the type of resource being referenced - type: string - name: - description: Name is the name of resource being referenced - type: string - required: - - kind - - name - type: object - resources: - description: 'Resources represents the minimum resources the - volume should have. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources' - properties: - limits: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - description: 'Limits describes the maximum amount of compute - resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/' - type: object - requests: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - description: 'Requests describes the minimum amount of - compute resources required. If Requests is omitted for - a container, it defaults to Limits if that is explicitly - specified, otherwise to an implementation-defined value. - More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/' - type: object - type: object - selector: - description: A label query over volumes to consider for binding. - properties: - matchExpressions: - description: matchExpressions is a list of label selector - requirements. The requirements are ANDed. - items: - description: A label selector requirement is a selector - that contains values, a key, and an operator that - relates the key and values. - properties: - key: - description: key is the label key that the selector - applies to. - type: string - operator: - description: operator represents a key's relationship - to a set of values. Valid operators are In, NotIn, - Exists and DoesNotExist. - type: string - values: - description: values is an array of string values. - If the operator is In or NotIn, the values array - must be non-empty. If the operator is Exists or - DoesNotExist, the values array must be empty. - This array is replaced during a strategic merge - patch. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - description: matchLabels is a map of {key,value} pairs. - A single {key,value} in the matchLabels map is equivalent - to an element of matchExpressions, whose key field is - "key", the operator is "In", and the values array contains - only "value". The requirements are ANDed. - type: object - type: object - storageClassName: - description: 'Name of the StorageClass required by the claim. - More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#class-1' - type: string - volumeMode: - description: volumeMode defines what type of volume is required - by the claim. Value of Filesystem is implied when not included - in claim spec. - type: string - volumeName: - description: VolumeName is the binding reference to the PersistentVolume - backing this claim. - type: string - type: object - type: object - prometheus: - description: Prometheus represents the status of premetheus queries. - properties: - configuration_error: - description: ConfigError is a field of KokuMetricsConfigStatus - to represent errors during prometheus configuration. - type: string - last_query_start_time: - description: LastQueryStartTime is a field of KokuMetricsConfigStatus - to represent the last time queries were started. - format: date-time - nullable: true - type: string - last_query_success_time: - description: LastQuerySuccessTime is a field of KokuMetricsConfigStatus - to represent the last time queries were successful. - format: date-time - nullable: true - type: string - prometheus_configured: - description: PrometheusConfigured is a field of KokuMetricsConfigStatus - to represent if the operator is configured to connect to prometheus. - type: boolean - prometheus_connected: - description: PrometheusConnected is a field of KokuMetricsConfigStatus - to represent if prometheus can be queried. - type: boolean - prometheus_connection_error: - description: ConnectionError is a field of KokuMetricsConfigStatus - to represent errors during prometheus test query. - type: string - service_address: - description: SvcAddress is the internal thanos-querier address. - type: string - skip_tls_verification: - description: SkipTLSVerification is a field of KokuMetricsConfigStatus - to represent if the thanos-querier endpoint must be certificate - validated. - type: boolean - required: - - prometheus_configured - - prometheus_connected - type: object - reports: - description: Reports represents the status of report generation. - properties: - data_collected: - description: DataCollected is a field of KokuMetricsConfigStatus - to represent whether or not data was collected for the last - query. - type: boolean - data_collection_message: - description: DataCollectionMessage is a field of KokuMetricsConfigStatus - to represent a message associated with the data_collected status. - type: string - last_hour_queried: - description: LastHourQueried is a field of KokuMetricsConfigStatus - to represent the time range for which metrics were last queried. - type: string - report_month: - description: ReportMonth is a field of KokuMetricsConfigStatus - to represent the month for which reports are being generated. - type: string - type: object - source: - description: Source is a field of KokuMetricsConfig to represent the - observed state of the source on cloud.redhat.com. - properties: - check_cycle: - description: CheckCycle is a field of KokuMetricsConfig to represent - the number of minutes between each source check schedule. The - default is 1440 min (24 hours). - format: int64 - type: integer - create_source: - description: CreateSource is a field of KokuMetricsConfigStatus - to represent if the source should be created if not found. A - source will not be created if upload_toggle is `false`. - type: boolean - error: - description: SourceError is a field of KokuMetricsConfigStatus - to represent the error encountered creating the source. - type: string - last_check_time: - description: LastSourceCheckTime is a field of KokuMetricsConfig - that shows the time that the last check was attempted. - format: date-time - nullable: true - type: string - name: - description: SourceName is a field of KokuMetricsConfigStatus - to represent the source name on cloud.redhat.com. - type: string - source_defined: - description: SourceDefined is a field of KokuMetricsConfigStatus - to represent if the source exists as defined on cloud.redhat.com. - type: boolean - sources_path: - description: SourcesAPIPath is a field of KokuMetricsConfig to - represent the path of the Sources API service. - type: string - type: object - storage: - description: Storage is a field - properties: - volume_mounted: - description: VolumeMounted is a bool to indicate if storage volume - was mounted. - type: boolean - volume_type: - description: VolumeType is the string representation of the volume - type. - type: string - type: object - upload: - description: Upload is a field of KokuMetricsConfig to represent the - upload object. - properties: - error: - description: UploadError is a field of KokuMetricsConfigStatus - to represent the error encountered uploading reports. - type: string - ingress_path: - description: IngressAPIPath is a field of KokuMetricsConfig to - represent the path of the Ingress API service. - type: string - last_payload_files: - description: LastPayloadFiles is a field of KokuMetricsConfig - to represent the list of files in the last payload that was - sent. - items: - type: string - type: array - last_payload_manifest_id: - description: LastPayloadManifest is a field of KokuMetricsConfig - that shows the manifestID of the last payload. - type: string - last_payload_name: - description: LastPayloadName is a field of KokuMetricsConfig that - shows the name of the last payload file. - type: string - last_payload_request_id: - description: LastPayloadRequestID is a field of KokuMetricsConfig - that shows the insights request id of the last payload. - type: string - last_successful_upload_time: - description: LastSuccessfulUploadTime is a field of KokuMetricsConfig - that shows the time of the last successful upload. - format: date-time - nullable: true - type: string - last_upload_status: - description: LastUploadStatus is a field of KokuMetricsConfig - that shows the http status of the last upload. - type: string - upload: - description: UploadToggle is a field of KokuMetricsConfig to represent - if the operator should upload to cloud.redhat.com. The default - is true - type: boolean - upload_cycle: - description: UploadCycle is a field of KokuMetricsConfig to represent - the number of minutes between each upload schedule. The default - is 360 min (6 hours). - format: int64 - type: integer - upload_wait: - description: UploadWait is a field of KokuMetricsConfig to represent - the time to wait before sending an upload. - format: int64 - type: integer - validate_cert: - description: ValidateCert is a field of KokuMetricsConfig to represent - if the Ingress endpoint must be certificate validated. - type: boolean - type: object - type: object - required: - - spec - type: object - served: true - storage: true - subresources: - status: {} -status: - acceptedNames: - kind: "" - plural: "" - conditions: [] - storedVersions: [] diff --git a/koku-metrics-operator/1.1.3/manifests/koku-metrics-operator.clusterserviceversion.yaml b/koku-metrics-operator/1.1.3/manifests/koku-metrics-operator.clusterserviceversion.yaml deleted file mode 100644 index 8fdf12cd8..000000000 --- a/koku-metrics-operator/1.1.3/manifests/koku-metrics-operator.clusterserviceversion.yaml +++ /dev/null @@ -1,469 +0,0 @@ -apiVersion: operators.coreos.com/v1alpha1 -kind: ClusterServiceVersion -metadata: - annotations: - alm-examples: |- - [ - { - "apiVersion": "koku-metrics-cfg.openshift.io/v1beta1", - "kind": "KokuMetricsConfig", - "metadata": { - "name": "kokumetricscfg-sample-v1beta1" - }, - "spec": { - "authentication": { - "type": "token" - }, - "packaging": { - "max_reports_to_store": 30, - "max_size_MB": 100 - }, - "prometheus_config": {}, - "source": { - "check_cycle": 1440, - "create_source": false, - "name": "INSERT-SOURCE-NAME" - }, - "upload": { - "upload_cycle": 360, - "upload_toggle": true - } - } - } - ] - capabilities: Seamless Upgrades - categories: Monitoring - certified: "false" - containerImage: quay.io/project-koku/koku-metrics-operator@sha256:9cc13ad5cf9d0572eaa3887374dd5659459a7ca75b5d83c2498635cd2aa7fcfa - createdAt: "2022-01-18T20:00:43Z" - description: A Golang-based OpenShift Operator that generates and uploads OpenShift - usage metrics to cost management. - operatorframework.io/suggested-namespace: koku-metrics-operator - operators.openshift.io/infrastructure-features: '["Disconnected"]' - operators.operatorframework.io/builder: operator-sdk-v1.10.0+git - operators.operatorframework.io/project_layout: go.kubebuilder.io/v2 - repository: https://github.com/project-koku/koku-metrics-operator - support: Cost Management - name: koku-metrics-operator.v1.1.3 - namespace: placeholder -spec: - apiservicedefinitions: {} - customresourcedefinitions: - owned: - - description: KokuMetricsConfig is the Schema for the kokumetricsconfig API - displayName: Koku Metrics Config - kind: KokuMetricsConfig - name: kokumetricsconfigs.koku-metrics-cfg.openshift.io - version: v1beta1 - description: |- - # Koku Metrics Operator - ## Introduction - The `koku-metrics-operator` is a component of the [cost managment](https://access.redhat.com/documentation/en-us/cost_management_service) service for Openshift, used to gather the required information from the cluster. It is recommended to be installed in OpenShift 4.5+. This operator obtains OpenShift usage data by querying Prometheus and uploads it to cost management to be processed. The Operator queries Prometheus every hour to create metric reports, which are then packaged and uploaded to cost management at [console.redhat.com](https://console.redhat.com). For more information, reach out to . - - This operator is capable of functioning within a disconnected/restricted network (aka air-gapped mode). In this mode, the operator will store the packaged reports for manual retrieval instead of being uploaded to cost management. Documentation for installing an operator within a restricted network can be found [here](https://docs.openshift.com/container-platform/latest/operators/admin/olm-restricted-networks.html). - - For more information, reach out to . - ## Features and Capabilities - #### Metrics collection: - The Koku Metrics Operator (`koku-metrics-operator`) collects the metrics required for cost management by: - * Querying Prometheus to gather the necessary metrics for cost management. - * Writing Prometheus queries to CSV report files. - * Packaging the CSV report files into tarballs. - - #### Additional Capabilities: - * The operator can be configured to automatically upload the packaged reports to cost management through Red Hat Insights Ingress service. - * The operator can create a source in console.redhat.com. A source is required for cost management to process the uploaded packages. - * PersistentVolumeClaim (PVC) configuration: The KokuMetricsConfig CR can accept a PVC definition and the operator will create and mount the PVC. If one is not provided, a default PVC will be created. - * Restricted network installation: this operator can function on a restricted network. In this mode, the operator stores the packaged reports for manual retrieval. - - ## Limitations and Pre-Requisites - #### Limitations (Potential for metrics data loss) - * A source **must** exist in console.redhat.com for an uploaded payload to be processed by cost management. The operator sends the payload to the Red Hat Insights Ingress service which usually returns successfully, but the operator does not currently confirm with cost management that the payload was processed. After Ingress accepts the uploaded payload, the payload is removed from the operator and is gone forever. If the data within the payload is not processed, a gap will be introduced in the usage metrics. - - **Note** The following limitations are specific to operators configured to run in a restricted network: - * The `koku-metrics-operator` will not be able to generate new reports if the PVC storage is filled. If this occurs, the reports must be manually deleted from the PVC so that the operator can function as normal. - * The default report retention is 30 reports (about one week's worth of data). The reports must be manually downloaded and uploaded to console.redhat.com every week, or they will be deleted and the data will be lost. - - #### Storage configuration prerequisite - The operator will attempt to create and use the following PVC when installed: - - volume_claim_template: - apiVersion: v1 - kind: PersistentVolumeClaim - metadata: - name: koku-metrics-operator-data - spec: - accessModes: - - ReadWriteOnce - resources: - requests: - storage: 10Gi - - If a different PVC should be utilized, a valid PVC should be specified in the KokuMetricsConfig CR as described in the appropriate section below. The PVC to be used may exist already, or the operator will attempt to create it. - - To use the default specification, the follow assumptions must be met: - 1. A default StorageClass is defined. - 2. Dynamic provisioning for that default StorageClass is enabled. - - If these assumptions are not met, the operator will not deploy correctly. In these cases, storage must be manually configured. After configuring storage, a valid PVC template should be supplied in the `volume_claim_template` spec of the KokuMetricsConfig CR. - - ## Configure the koku-metrics-operator - **Note** There are separate instructions for configuring the `koku-metrics-operator` to run in a restricted network. - ##### Configure authentication - The default authentication for the operator is `token`. No further steps are required to configure token authentication. If `basic` is the preferred authentication method, a Secret must be created which holds username and password credentials: - 1. On the left navigation pane, select `Workloads` -> `Secrets` -> select Project: `koku-metrics-operator` -> `Create` -> `Key/Value Secret` - 2. Give the Secret a name and add 2 keys: `username` and `password` (all lowercase). The values for these keys correspond to console.redhat.com credentials. - 3. Select `Create`. - ##### Create the KokuMetricsConfig - Configure the koku-metrics-operator by creating a `KokuMetricsConfig`. - 1. On the left navigation pane, select `Operators` -> `Installed Operators` -> `koku-metrics-operator` -> `KokuMetricsConfig` -> `Create Instance`. - 2. For `basic` authentication, edit the following values in the spec: - * Replace `authentication: type:` with `basic`. - * Add the `secret_name` field under `authentication`, and set it equal to the name of the authentication Secret that was created above. The spec should look similar to the following: - - ``` - authentication: - secret_name: SECRET-NAME - type: basic - ``` - - 3. To configure the koku-metrics-operator to create a cost management source, edit the following values in the `source` field: - * Replace `INSERT-SOURCE-NAME` with the preferred name of the source to be created. - * Replace the `create_source` field value with `true`. - - **Note:** if the source already exists, replace `INSERT-SOURCE-NAME` with the existing name, and leave `create_source` as false. This will allow the operator to confirm the source exists. - 4. If not specified, the operator will create a default PersistentVolumeClaim called `koku-metrics-operator-data` with 10Gi of storage. To configure the koku-metrics-operator to use or create a different PVC, edit the following in the spec: - * Add the desired configuration to the `volume_claim_template` field in the spec: - - ``` - volume_claim_template: - apiVersion: v1 - kind: PersistentVolumeClaim - metadata: - name: - spec: - accessModes: - - ReadWriteOnce - resources: - requests: - storage: 10Gi - ``` - - **Note:** If using the YAML View, the `volume_claim_template` field must be added to the spec - 5. Select `Create`. - - # Restricted Network Usage (disconnected/air-gapped mode) - ## Installation - To install the `koku-metrics-operator` in a restricted network, follow the [olm documentation](https://docs.openshift.com/container-platform/4.5/operators/admin/olm-restricted-networks.html). The operator is found in the `community-operators` Catalog in the `registry.redhat.io/redhat/community-operator-index:latest` Index. If pruning the index before pushing to the mirrored registry, keep the `koku-metrics-operator` package. - - Within a restricted network, the operator queries prometheus to gather the necessary usage metrics, writes the query results to CSV files, and packages the reports for storage in the PVC. These reports then need to be manually downloaded from the cluster and uploaded to [console.redhat.com](https://console.redhat.com). - - For more information, reach out to . - ## Configure the koku-metrics-operator for a restricted network - ##### Create the KokuMetricsConfig - Configure the koku-metrics-operator by creating a `KokuMetricsConfig`. - 1. On the left navigation pane, select `Operators` -> `Installed Operators` -> `koku-metrics-operator` -> `KokuMetricsConfig` -> `Create Instance`. - 2. Specify the desired storage. If not specified, the operator will create a default Persistent Volume Claim called `koku-metrics-operator-data` with 10Gi of storage. To configure the koku-metrics-operator to use or create a different PVC, edit the following in the spec: - * Add the desired configuration to the `volume_claim_template` field in the spec: - - ``` - volume_claim_template: - apiVersion: v1 - kind: PersistentVolumeClaim - metadata: - name: - spec: - storageClassName: - accessModes: - - ReadWriteOnce - resources: - requests: - storage: 10Gi - ``` - - **Note:** If using the YAML View, the `volume_claim_template` field must be added to the spec - 3. (Optional) Specify the desired report retention. The operator will retain 30 reports by default. This corresponds to approximately one week's worth of data if using the default packaging cycle. To modify the number of retained reports: - * Change the `packaging` spec field `max_reports_to_store` to the desired number of reports to retain. Once this max number is reached, the operator will start removing the oldest packages remaining on the PVC: - - ``` - packaging: - max_size_MB: 100 - max_reports_to_store: 30 - ``` - - **Note:** The number of retained reports directly affects the frequency that reports must be manually downloaded from the PVC. Take caution in setting this to a higher number of reports, as the operator cannot write data to the PVC if the storage is full. - 4. To configure the operator to perform in a restricted network, set the `upload_toggle` to `false`: - - ``` - upload: - upload_cycle: 360, - upload_toggle: false - ``` - - 5. Select `Create`. - - ## Download reports from the Operator & clean up the PVC - If the `koku-metrics-operator` is configured to run in a restricted network, the metric reports will not automatically upload to cost managment. Instead, they need to be manually copied from the PVC for upload to [console.redhat.com](https://console.redhat.com). The default configuration saves one week of reports which means the process of downloading and uploading reports should be repeated weekly to prevent loss of metrics data. To download the reports, complete the following steps: - 1. Create the following Pod, ensuring the `claimName` matches the PVC containing the report data: - - ``` - kind: Pod - apiVersion: v1 - metadata: - name: volume-shell - namespace: koku-metrics-operator - spec: - volumes: - - name: koku-metrics-operator-reports - persistentVolumeClaim: - claimName: koku-metrics-operator-data - containers: - - name: volume-shell - image: busybox - command: ['sleep', 'infinity'] - volumeMounts: - - name: koku-metrics-operator-reports - mountPath: /tmp/koku-metrics-operator-reports - ``` - - 2. Use rsync to copy all of the files ready for upload from the PVC to a local folder: - - ``` - $ oc rsync volume-shell:/tmp/koku-metrics-operator-reports/upload local/path/to/save/folder - ``` - - 3. Once confirming that the files have been successfully copied, use rsh to connect to the pod and delete the contents of the upload folder so that they are no longer in storage: - - ``` - $ oc rsh volume-shell - $ rm /tmp/koku-metrics-operator-reports/upload/* - ``` - - 4. (Optional) Delete the pod that was used to connect to the PVC: - - ``` - $ oc delete -f volume-shell.yaml - ``` - - ## Create a source - In a restricted network, the `koku-metrics-operator` cannot automatically create a source. This process must be done manually. In the console.redhat.com platform, open the [Sources menu](https://console.redhat.com/settings/sources/) to begin adding an OpenShift source to cost management: - - Prerequisites: - * The cluster identifier which can be found in the KokuMetricsConfig CR, the cluster Overview page, or the cluster Help > About. - - Create source: - 1. Navigate to the Sources menu - 2. Select the `Red Hat sources` tab - 3. Create a new `Red Hat Openshift Container Platform` source: - * give the source a unique name - * add the Cost Management application - * add the cluster identifier - 4. In the Sources wizard, review the details and click `Finish` to create the Source. - - ## Upload the reports to cost managment - Uploading reports to cost managment is done through curl: - - $ curl -vvvv -F "file=@FILE_NAME.tar.gz;type=application/vnd.redhat.hccm.tar+tgz" https://cloud.redhat.com/api/ingress/v1/upload -u USERNAME:PASS - - where `USERNAME` and `PASS` correspond to the user credentials for [console.redhat.com](https://console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NDQyMDc3Ni0xLjI2MjQ5NjktMy44OTgwODY1LTEuMjYyNDk2OWgtNy42NzYzNjExYy0wLjkxNjkxNTksMC0xLjcwMDIyNTgsMC4zMjI1MjUtMi4zNDk4OTkzLDAuOTcyMjEzNwoJCQljLTAuNjQ5Njg4NywwLjY0OTY3MzUtMC45NzY4MjE5LDEuNDc0NDQxNS0wLjk3NjgyMTksMi40NjUwODc5YzAsMC42ODY1NTQsMC4yMzAzOTI1LDEuMzM2MjEyMiwwLjY5MTE0NjksMS45NDkwMzU2CgkJCWMwLjQ1NjE2MTUsMC42MTI4MjM1LDEuMDMyMTE5OCwxLjAzMjExOTgsMS43MTg2NTg0LDEuMjYyNDk2OUwxNzQuMjgwNjM5NiwxODUuODczNjExNXoiLz4KCTwvZz4KPC9nPgo8L3N2Zz4K - mediatype: image/svg+xml - install: - spec: - clusterPermissions: - - rules: - - apiGroups: - - config.openshift.io - resources: - - clusterversions - verbs: - - get - - list - - watch - - apiGroups: - - "" - resources: - - namespaces - verbs: - - get - - list - - watch - - apiGroups: - - "" - resources: - - secrets - verbs: - - get - serviceAccountName: koku-metrics-controller-manager - deployments: - - name: koku-metrics-controller-manager - spec: - replicas: 1 - selector: - matchLabels: - control-plane: controller-manager - strategy: {} - template: - metadata: - labels: - control-plane: controller-manager - spec: - containers: - - args: - - --enable-leader-election - command: - - /manager - env: - - name: IN_CLUSTER - value: "true" - - name: WATCH_NAMESPACE - valueFrom: - fieldRef: - fieldPath: metadata.annotations['olm.targetNamespaces'] - image: quay.io/project-koku/koku-metrics-operator@sha256:9cc13ad5cf9d0572eaa3887374dd5659459a7ca75b5d83c2498635cd2aa7fcfa - name: manager - resources: - limits: - cpu: 500m - memory: 500Mi - requests: - cpu: 100m - memory: 20Mi - terminationMessagePolicy: FallbackToLogsOnError - volumeMounts: - - mountPath: /tmp/koku-metrics-operator-reports - name: koku-metrics-operator-reports - serviceAccountName: koku-metrics-controller-manager - terminationGracePeriodSeconds: 10 - volumes: - - name: koku-metrics-operator-reports - permissions: - - rules: - - apiGroups: - - "" - resources: - - configmaps - verbs: - - get - - list - - watch - - create - - update - - patch - - delete - - apiGroups: - - "" - resources: - - configmaps/status - verbs: - - get - - update - - patch - - apiGroups: - - "" - resources: - - events - verbs: - - create - - patch - - apiGroups: - - coordination.k8s.io - resources: - - leases - verbs: - - get - - list - - watch - - create - - update - - patch - - delete - - apiGroups: - - apps - resources: - - deployments - verbs: - - get - - list - - patch - - watch - - apiGroups: - - "" - resources: - - configmaps - - endpoints - - events - - persistentvolumeclaims - - pods - - secrets - - serviceaccounts - - services - - services/finalizers - verbs: - - create - - delete - - get - - list - - patch - - update - - watch - - apiGroups: - - koku-metrics-cfg.openshift.io - resources: - - kokumetricsconfigs - verbs: - - create - - delete - - get - - list - - patch - - update - - watch - - apiGroups: - - koku-metrics-cfg.openshift.io - resources: - - kokumetricsconfigs/status - verbs: - - get - - patch - - update - - apiGroups: - - operators.coreos.com - resources: - - clusterserviceversions - verbs: - - get - - list - - patch - - update - - watch - serviceAccountName: koku-metrics-controller-manager - strategy: deployment - installModes: - - supported: true - type: OwnNamespace - - supported: true - type: SingleNamespace - - supported: false - type: MultiNamespace - - supported: false - type: AllNamespaces - relatedImages: - - name: koku-metrics-operator - image: quay.io/project-koku/koku-metrics-operator@sha256:9cc13ad5cf9d0572eaa3887374dd5659459a7ca75b5d83c2498635cd2aa7fcfa - keywords: - - cost - - management - - usage - - monitor - maintainers: - - email: costmanagement@redhat.com - name: costmanagement - maturity: alpha - provider: - name: Red Hat - replaces: koku-metrics-operator.v1.1.2 - version: 1.1.3 diff --git a/koku-metrics-operator/1.1.3/metadata/annotations.yaml b/koku-metrics-operator/1.1.3/metadata/annotations.yaml deleted file mode 100644 index 5e2f30385..000000000 --- a/koku-metrics-operator/1.1.3/metadata/annotations.yaml +++ /dev/null @@ -1,15 +0,0 @@ -annotations: - # Core bundle annotations. - operators.operatorframework.io.bundle.mediatype.v1: registry+v1 - operators.operatorframework.io.bundle.manifests.v1: manifests/ - operators.operatorframework.io.bundle.metadata.v1: metadata/ - operators.operatorframework.io.bundle.package.v1: koku-metrics-operator - operators.operatorframework.io.bundle.channels.v1: alpha,beta - operators.operatorframework.io.bundle.channel.default.v1: beta - operators.operatorframework.io.metrics.builder: operator-sdk-v1.10.0+git - operators.operatorframework.io.metrics.mediatype.v1: metrics+v1 - operators.operatorframework.io.metrics.project_layout: go.kubebuilder.io/v2 - - # Annotations for testing. - operators.operatorframework.io.test.mediatype.v1: scorecard+v1 - operators.operatorframework.io.test.config.v1: tests/scorecard/ diff --git a/koku-metrics-operator/1.1.3/tests/scorecard/config.yaml b/koku-metrics-operator/1.1.3/tests/scorecard/config.yaml deleted file mode 100644 index e2d83b262..000000000 --- a/koku-metrics-operator/1.1.3/tests/scorecard/config.yaml +++ /dev/null @@ -1,28 +0,0 @@ -apiVersion: scorecard.operatorframework.io/v1alpha3 -kind: Configuration -metadata: - name: config -stages: -- parallel: true - tests: - - entrypoint: - - scorecard-test - - basic-check-spec - image: quay.io/operator-framework/scorecard-test:v1.10.1 - labels: - suite: basic - test: basic-check-spec-test - - entrypoint: - - scorecard-test - - olm-bundle-validation - image: quay.io/operator-framework/scorecard-test:v1.10.1 - labels: - suite: olm - test: olm-bundle-validation-test - - entrypoint: - - scorecard-test - - olm-crds-have-validation - image: quay.io/operator-framework/scorecard-test:v1.10.1 - labels: - suite: olm - test: olm-crds-have-validation-test diff --git a/koku-metrics-operator/1.1.4/Dockerfile b/koku-metrics-operator/1.1.4/Dockerfile deleted file mode 100644 index 7147fd722..000000000 --- a/koku-metrics-operator/1.1.4/Dockerfile +++ /dev/null @@ -1,21 +0,0 @@ -FROM scratch - -# Core bundle labels. -LABEL operators.operatorframework.io.bundle.mediatype.v1=registry+v1 -LABEL operators.operatorframework.io.bundle.manifests.v1=manifests/ -LABEL operators.operatorframework.io.bundle.metadata.v1=metadata/ -LABEL operators.operatorframework.io.bundle.package.v1=koku-metrics-operator -LABEL operators.operatorframework.io.bundle.channels.v1=alpha,beta -LABEL operators.operatorframework.io.bundle.channel.default.v1=beta -LABEL operators.operatorframework.io.metrics.builder=operator-sdk-v1.10.0+git -LABEL operators.operatorframework.io.metrics.mediatype.v1=metrics+v1 -LABEL operators.operatorframework.io.metrics.project_layout=go.kubebuilder.io/v2 - -# Labels for testing. -LABEL operators.operatorframework.io.test.mediatype.v1=scorecard+v1 -LABEL operators.operatorframework.io.test.config.v1=tests/scorecard/ - -# Copy files to locations specified by labels. -COPY manifests /manifests/ -COPY metadata /metadata/ -COPY tests/scorecard /tests/scorecard/ diff --git a/koku-metrics-operator/1.1.4/manifests/koku-metrics-cfg.openshift.io_kokumetricsconfigs.yaml b/koku-metrics-operator/1.1.4/manifests/koku-metrics-cfg.openshift.io_kokumetricsconfigs.yaml deleted file mode 100644 index 16c6ad481..000000000 --- a/koku-metrics-operator/1.1.4/manifests/koku-metrics-cfg.openshift.io_kokumetricsconfigs.yaml +++ /dev/null @@ -1,840 +0,0 @@ -apiVersion: apiextensions.k8s.io/v1 -kind: CustomResourceDefinition -metadata: - annotations: - controller-gen.kubebuilder.io/version: v0.3.0 - creationTimestamp: null - name: kokumetricsconfigs.koku-metrics-cfg.openshift.io -spec: - group: koku-metrics-cfg.openshift.io - names: - kind: KokuMetricsConfig - listKind: KokuMetricsConfigList - plural: kokumetricsconfigs - singular: kokumetricsconfig - scope: Namespaced - versions: - - name: v1beta1 - schema: - openAPIV3Schema: - description: KokuMetricsConfig is the Schema for the kokumetricsconfig API - properties: - apiVersion: - description: 'APIVersion defines the versioned schema of this representation - of an object. Servers should convert recognized schemas to the latest - internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' - type: string - kind: - description: 'Kind is a string value representing the REST resource this - object represents. Servers may infer this from the endpoint the client - submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' - type: string - metadata: - type: object - spec: - description: KokuMetricsConfigSpec defines the desired state of KokuMetricsConfig. - properties: - api_url: - default: https://cloud.redhat.com - description: FOR DEVELOPMENT ONLY. APIURL is a field of KokuMetricsConfig - to represent the url of the API endpoint for service interaction. - The default is `https://cloud.redhat.com`. - type: string - authentication: - description: Authentication is a field of KokuMetricsConfig to represent - the authentication object. - properties: - secret_name: - description: AuthenticationSecretName is a field of KokuMetricsConfig - to represent the secret with the user and password used for - uploads. - type: string - type: - default: token - description: 'AuthType is a field of KokuMetricsConfig to represent - the authentication type to be used basic or token. Valid values - are: - "basic" : Enables authentication using user and password - from authentication secret. - "token" (default): Uses cluster - token for authentication.' - enum: - - token - - basic - type: string - required: - - type - type: object - clusterID: - description: ClusterID is a field of KokuMetricsConfig to represent - the cluster UUID. Normally this value should not be specified. Only - set this value if the clusterID cannot be obtained from the ClusterVersion. - type: string - clusterVersion: - description: ClusterVersion is a field of KokuMetricsConfig to represent - the cluster version. Normally this value should not be specified. - Only set this value if the clusterVersion cannot be obtained from - the ClusterVersion. - type: string - packaging: - description: Packaging is a field of KokuMetricsConfig to represent - the packaging object. - properties: - max_reports_to_store: - default: 30 - description: MaxReports is a field of KokuMetricsConfig to represent - the maximum number of reports to store. The default is 30 reports - which corresponds to approximately 7 days worth of data given - the other default values. - format: int64 - minimum: 1 - type: integer - max_size_MB: - default: 100 - description: MaxSize is a field of KokuMetricsConfig to represent - the max file size in megabytes that will be compressed for upload - to Ingress. The default is 100. - format: int64 - maximum: 100 - minimum: 1 - type: integer - required: - - max_reports_to_store - - max_size_MB - type: object - prometheus_config: - description: PrometheusConfig is a field of KokuMetricsConfig to represent - the configuration of Prometheus connection. - properties: - context_timeout: - default: 120 - description: ContextTimeout is a field of KokuMetricsConfig to - represent how long a query to prometheus should run in seconds - before timing out. The default is 120 seconds. - format: int64 - maximum: 180 - minimum: 10 - type: integer - service_address: - default: https://thanos-querier.openshift-monitoring.svc:9091 - description: FOR DEVELOPMENT ONLY. SvcAddress is a field of KokuMetricsConfig - to represent the thanos-querier address. The default is `https://thanos-querier.openshift-monitoring.svc:9091`. - type: string - skip_tls_verification: - default: false - description: FOR DEVELOPMENT ONLY. SkipTLSVerification is a field - of KokuMetricsConfig to represent if the thanos-querier endpoint - must be certificate validated. The default is false. - type: boolean - required: - - service_address - - skip_tls_verification - type: object - source: - description: Source is a field of KokuMetricsConfig to represent the - desired source on cloud.redhat.com. - properties: - check_cycle: - default: 1440 - description: CheckCycle is a field of KokuMetricsConfig to represent - the number of minutes between each source check schedule The - default is 1440 min (24 hours). - format: int64 - minimum: 0 - type: integer - create_source: - default: false - description: CreateSource is a field of KokuMetricsConfigSpec - to represent if the source should be created if not found. - type: boolean - name: - description: SourceName is a field of KokuMetricsConfigSpec to - represent the source name on cloud.redhat.com. - type: string - sources_path: - default: /api/sources/v1.0/ - description: FOR DEVELOPMENT ONLY. SourcesAPIPath is a field of - KokuMetricsConfig to represent the path of the Sources API service. - The default is `/api/sources/v1.0/`. - type: string - required: - - check_cycle - - create_source - - sources_path - type: object - upload: - description: Upload is a field of KokuMetricsConfig to represent the - upload object. - properties: - ingress_path: - default: /api/ingress/v1/upload - description: FOR DEVELOPMENT ONLY. IngressAPIPath is a field of - KokuMetricsConfig to represent the path of the Ingress API service. - The default is `/api/ingress/v1/upload`. - type: string - upload_cycle: - default: 360 - description: UploadCycle is a field of KokuMetricsConfig to represent - the number of minutes between each upload schedule. The default - is 360 min (6 hours). - format: int64 - minimum: 0 - type: integer - upload_toggle: - default: true - description: UploadToggle is a field of KokuMetricsConfig to represent - if the operator is installed in a restricted-network. If `false`, - the operator will not upload to cloud.redhat.com or check/create - sources. The default is true. - type: boolean - upload_wait: - description: UploadWait is a field of KokuMetricsConfig to represent - the time to wait before sending an upload. - format: int64 - minimum: 0 - type: integer - validate_cert: - default: true - description: ValidateCert is a field of KokuMetricsConfig to represent - if the Ingress endpoint must be certificate validated. - type: boolean - required: - - ingress_path - - upload_cycle - - upload_toggle - - validate_cert - type: object - volume_claim_template: - description: VolumeClaimTemplate is a field of KokuMetricsConfig to - represent a PVC template. - properties: - apiVersion: - description: 'APIVersion defines the versioned schema of this - representation of an object. Servers should convert recognized - schemas to the latest internal value, and may reject unrecognized - values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' - type: string - kind: - description: 'Kind is a string value representing the REST resource - this object represents. Servers may infer this from the endpoint - the client submits requests to. Cannot be updated. In CamelCase. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' - type: string - metadata: - description: EmbeddedMetadata contains metadata relevant to an - EmbeddedResource. - properties: - annotations: - additionalProperties: - type: string - description: 'Annotations is an unstructured key value map - stored with a resource that may be set by external tools - to store and retrieve arbitrary metadata. They are not queryable - and should be preserved when modifying objects. More info: - http://kubernetes.io/docs/user-guide/annotations' - type: object - labels: - additionalProperties: - type: string - description: 'Map of string keys and values that can be used - to organize and categorize (scope and select) objects. May - match selectors of replication controllers and services. - More info: http://kubernetes.io/docs/user-guide/labels' - type: object - name: - description: 'Name must be unique within a namespace. Is required - when creating resources, although some resources may allow - a client to request the generation of an appropriate name - automatically. Name is primarily intended for creation idempotence - and configuration definition. Cannot be updated. More info: - http://kubernetes.io/docs/user-guide/identifiers#names' - type: string - type: object - spec: - description: 'Spec defines the desired characteristics of a volume - requested by a pod author. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims' - properties: - accessModes: - description: 'AccessModes contains the desired access modes - the volume should have. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes-1' - items: - type: string - type: array - dataSource: - description: 'This field can be used to specify either: * - An existing VolumeSnapshot object (snapshot.storage.k8s.io/VolumeSnapshot) - * An existing PVC (PersistentVolumeClaim) * An existing - custom resource that implements data population (Alpha) - In order to use custom resource types that implement data - population, the AnyVolumeDataSource feature gate must be - enabled. If the provisioner or an external controller can - support the specified data source, it will create a new - volume based on the contents of the specified data source.' - properties: - apiGroup: - description: APIGroup is the group for the resource being - referenced. If APIGroup is not specified, the specified - Kind must be in the core API group. For any other third-party - types, APIGroup is required. - type: string - kind: - description: Kind is the type of resource being referenced - type: string - name: - description: Name is the name of resource being referenced - type: string - required: - - kind - - name - type: object - resources: - description: 'Resources represents the minimum resources the - volume should have. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources' - properties: - limits: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - description: 'Limits describes the maximum amount of compute - resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/' - type: object - requests: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - description: 'Requests describes the minimum amount of - compute resources required. If Requests is omitted for - a container, it defaults to Limits if that is explicitly - specified, otherwise to an implementation-defined value. - More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/' - type: object - type: object - selector: - description: A label query over volumes to consider for binding. - properties: - matchExpressions: - description: matchExpressions is a list of label selector - requirements. The requirements are ANDed. - items: - description: A label selector requirement is a selector - that contains values, a key, and an operator that - relates the key and values. - properties: - key: - description: key is the label key that the selector - applies to. - type: string - operator: - description: operator represents a key's relationship - to a set of values. Valid operators are In, NotIn, - Exists and DoesNotExist. - type: string - values: - description: values is an array of string values. - If the operator is In or NotIn, the values array - must be non-empty. If the operator is Exists or - DoesNotExist, the values array must be empty. - This array is replaced during a strategic merge - patch. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - description: matchLabels is a map of {key,value} pairs. - A single {key,value} in the matchLabels map is equivalent - to an element of matchExpressions, whose key field is - "key", the operator is "In", and the values array contains - only "value". The requirements are ANDed. - type: object - type: object - storageClassName: - description: 'Name of the StorageClass required by the claim. - More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#class-1' - type: string - volumeMode: - description: volumeMode defines what type of volume is required - by the claim. Value of Filesystem is implied when not included - in claim spec. - type: string - volumeName: - description: VolumeName is the binding reference to the PersistentVolume - backing this claim. - type: string - type: object - type: object - required: - - authentication - - packaging - - prometheus_config - - source - - upload - type: object - status: - description: KokuMetricsConfigStatus defines the observed state of KokuMetricsConfig. - properties: - api_url: - description: APIURL is a field of KokuMetricsConfig to represent the - url of the API endpoint for service interaction. - type: string - authentication: - description: Authentication is a field of KokuMetricsConfig to represent - the authentication status. - properties: - credentials_found: - description: AuthenticationCredentialsFound is a field of KokuMetricsConfig - to represent if used for uploads were found. - type: boolean - error: - description: AuthErrorMessage is a field of KokuMetricsConfig - to represent an `invalid credentials` error message. - type: string - last_credential_verification_time: - description: LastVerificationTime is a field of KokuMetricsConfig - to represent the last time credentials were verified. - format: date-time - nullable: true - type: string - secret_name: - description: AuthenticationSecretName is a field of KokuMetricsConfig - to represent the secret with the user and password used for - uploads. - type: string - type: - description: AuthType is a field of KokuMetricsConfig to represent - the authentication type to be used basic or token. - enum: - - token - - basic - type: string - valid_basic_auth: - description: ValidBasicAuth is a field of KokuMetricsConfig to - represent if the given basic auth credentials are valid. - type: boolean - type: object - clusterID: - description: ClusterID is a field of KokuMetricsConfig to represent - the cluster UUID. - type: string - clusterVersion: - description: ClusterVersion is a field of KokuMetricsConfig to represent - the cluster version. - type: string - operator_commit: - description: OperatorCommit is a field of KokuMetricsConfig that shows - the commit hash of the operator. - type: string - packaging: - description: Packaging is a field of KokuMetricsConfig to represent - the packaging status - properties: - error: - description: PackagingError is a field of KokuMetricsConfig to - represent the error encountered packaging the reports. - type: string - last_successful_packaging_time: - description: LastSuccessfulPackagingTime is a field of KokuMetricsConfig - that shows the time of the last successful file packaging. - format: date-time - nullable: true - type: string - max_reports_to_store: - description: MaxReports is a field of KokuMetricsConfig to represent - the maximum number of reports to store. - format: int64 - type: integer - max_size_MB: - description: MaxSize is a field of KokuMetricsConfig to represent - the max file size in megabytes that will be compressed for upload - to Ingress. - format: int64 - type: integer - number_reports_stored: - description: ReportCount is a field of KokuMetricsConfig to represent - the number of reports in storage. - format: int64 - type: integer - packaged_files: - description: PackagedFiles is a field of KokuMetricsConfig to - represent the list of file packages in storage. - items: - type: string - type: array - type: object - persistent_volume_claim: - description: PersistentVolumeClaim is a field of KokuMetricsConfig - to represent a PVC. - properties: - apiVersion: - description: 'APIVersion defines the versioned schema of this - representation of an object. Servers should convert recognized - schemas to the latest internal value, and may reject unrecognized - values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' - type: string - kind: - description: 'Kind is a string value representing the REST resource - this object represents. Servers may infer this from the endpoint - the client submits requests to. Cannot be updated. In CamelCase. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' - type: string - metadata: - description: EmbeddedMetadata contains metadata relevant to an - EmbeddedResource. - properties: - annotations: - additionalProperties: - type: string - description: 'Annotations is an unstructured key value map - stored with a resource that may be set by external tools - to store and retrieve arbitrary metadata. They are not queryable - and should be preserved when modifying objects. More info: - http://kubernetes.io/docs/user-guide/annotations' - type: object - labels: - additionalProperties: - type: string - description: 'Map of string keys and values that can be used - to organize and categorize (scope and select) objects. May - match selectors of replication controllers and services. - More info: http://kubernetes.io/docs/user-guide/labels' - type: object - name: - description: 'Name must be unique within a namespace. Is required - when creating resources, although some resources may allow - a client to request the generation of an appropriate name - automatically. Name is primarily intended for creation idempotence - and configuration definition. Cannot be updated. More info: - http://kubernetes.io/docs/user-guide/identifiers#names' - type: string - type: object - spec: - description: 'Spec defines the desired characteristics of a volume - requested by a pod author. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims' - properties: - accessModes: - description: 'AccessModes contains the desired access modes - the volume should have. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes-1' - items: - type: string - type: array - dataSource: - description: 'This field can be used to specify either: * - An existing VolumeSnapshot object (snapshot.storage.k8s.io/VolumeSnapshot) - * An existing PVC (PersistentVolumeClaim) * An existing - custom resource that implements data population (Alpha) - In order to use custom resource types that implement data - population, the AnyVolumeDataSource feature gate must be - enabled. If the provisioner or an external controller can - support the specified data source, it will create a new - volume based on the contents of the specified data source.' - properties: - apiGroup: - description: APIGroup is the group for the resource being - referenced. If APIGroup is not specified, the specified - Kind must be in the core API group. For any other third-party - types, APIGroup is required. - type: string - kind: - description: Kind is the type of resource being referenced - type: string - name: - description: Name is the name of resource being referenced - type: string - required: - - kind - - name - type: object - resources: - description: 'Resources represents the minimum resources the - volume should have. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources' - properties: - limits: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - description: 'Limits describes the maximum amount of compute - resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/' - type: object - requests: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - description: 'Requests describes the minimum amount of - compute resources required. If Requests is omitted for - a container, it defaults to Limits if that is explicitly - specified, otherwise to an implementation-defined value. - More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/' - type: object - type: object - selector: - description: A label query over volumes to consider for binding. - properties: - matchExpressions: - description: matchExpressions is a list of label selector - requirements. The requirements are ANDed. - items: - description: A label selector requirement is a selector - that contains values, a key, and an operator that - relates the key and values. - properties: - key: - description: key is the label key that the selector - applies to. - type: string - operator: - description: operator represents a key's relationship - to a set of values. Valid operators are In, NotIn, - Exists and DoesNotExist. - type: string - values: - description: values is an array of string values. - If the operator is In or NotIn, the values array - must be non-empty. If the operator is Exists or - DoesNotExist, the values array must be empty. - This array is replaced during a strategic merge - patch. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - description: matchLabels is a map of {key,value} pairs. - A single {key,value} in the matchLabels map is equivalent - to an element of matchExpressions, whose key field is - "key", the operator is "In", and the values array contains - only "value". The requirements are ANDed. - type: object - type: object - storageClassName: - description: 'Name of the StorageClass required by the claim. - More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#class-1' - type: string - volumeMode: - description: volumeMode defines what type of volume is required - by the claim. Value of Filesystem is implied when not included - in claim spec. - type: string - volumeName: - description: VolumeName is the binding reference to the PersistentVolume - backing this claim. - type: string - type: object - type: object - prometheus: - description: Prometheus represents the status of premetheus queries. - properties: - configuration_error: - description: ConfigError is a field of KokuMetricsConfigStatus - to represent errors during prometheus configuration. - type: string - context_timeout: - description: ContextTimeout is a field of KokuMetricsConfigState - to represent how long a query to prometheus should run in seconds - before timing out. - format: int64 - type: integer - last_query_start_time: - description: LastQueryStartTime is a field of KokuMetricsConfigStatus - to represent the last time queries were started. - format: date-time - nullable: true - type: string - last_query_success_time: - description: LastQuerySuccessTime is a field of KokuMetricsConfigStatus - to represent the last time queries were successful. - format: date-time - nullable: true - type: string - prometheus_configured: - description: PrometheusConfigured is a field of KokuMetricsConfigStatus - to represent if the operator is configured to connect to prometheus. - type: boolean - prometheus_connected: - description: PrometheusConnected is a field of KokuMetricsConfigStatus - to represent if prometheus can be queried. - type: boolean - prometheus_connection_error: - description: ConnectionError is a field of KokuMetricsConfigStatus - to represent errors during prometheus test query. - type: string - service_address: - description: SvcAddress is the internal thanos-querier address. - type: string - skip_tls_verification: - description: SkipTLSVerification is a field of KokuMetricsConfigStatus - to represent if the thanos-querier endpoint must be certificate - validated. - type: boolean - required: - - prometheus_configured - - prometheus_connected - type: object - reports: - description: Reports represents the status of report generation. - properties: - data_collected: - description: DataCollected is a field of KokuMetricsConfigStatus - to represent whether or not data was collected for the last - query. - type: boolean - data_collection_message: - description: DataCollectionMessage is a field of KokuMetricsConfigStatus - to represent a message associated with the data_collected status. - type: string - last_hour_queried: - description: LastHourQueried is a field of KokuMetricsConfigStatus - to represent the time range for which metrics were last queried. - type: string - report_month: - description: ReportMonth is a field of KokuMetricsConfigStatus - to represent the month for which reports are being generated. - type: string - type: object - source: - description: Source is a field of KokuMetricsConfig to represent the - observed state of the source on cloud.redhat.com. - properties: - check_cycle: - description: CheckCycle is a field of KokuMetricsConfig to represent - the number of minutes between each source check schedule. The - default is 1440 min (24 hours). - format: int64 - type: integer - create_source: - description: CreateSource is a field of KokuMetricsConfigStatus - to represent if the source should be created if not found. A - source will not be created if upload_toggle is `false`. - type: boolean - error: - description: SourceError is a field of KokuMetricsConfigStatus - to represent the error encountered creating the source. - type: string - last_check_time: - description: LastSourceCheckTime is a field of KokuMetricsConfig - that shows the time that the last check was attempted. - format: date-time - nullable: true - type: string - name: - description: SourceName is a field of KokuMetricsConfigStatus - to represent the source name on cloud.redhat.com. - type: string - source_defined: - description: SourceDefined is a field of KokuMetricsConfigStatus - to represent if the source exists as defined on cloud.redhat.com. - type: boolean - sources_path: - description: SourcesAPIPath is a field of KokuMetricsConfig to - represent the path of the Sources API service. - type: string - type: object - storage: - description: Storage is a field - properties: - volume_mounted: - description: VolumeMounted is a bool to indicate if storage volume - was mounted. - type: boolean - volume_type: - description: VolumeType is the string representation of the volume - type. - type: string - type: object - upload: - description: Upload is a field of KokuMetricsConfig to represent the - upload object. - properties: - error: - description: UploadError is a field of KokuMetricsConfigStatus - to represent the error encountered uploading reports. - type: string - ingress_path: - description: IngressAPIPath is a field of KokuMetricsConfig to - represent the path of the Ingress API service. - type: string - last_payload_files: - description: LastPayloadFiles is a field of KokuMetricsConfig - to represent the list of files in the last payload that was - sent. - items: - type: string - type: array - last_payload_manifest_id: - description: LastPayloadManifest is a field of KokuMetricsConfig - that shows the manifestID of the last payload. - type: string - last_payload_name: - description: LastPayloadName is a field of KokuMetricsConfig that - shows the name of the last payload file. - type: string - last_payload_request_id: - description: LastPayloadRequestID is a field of KokuMetricsConfig - that shows the insights request id of the last payload. - type: string - last_successful_upload_time: - description: LastSuccessfulUploadTime is a field of KokuMetricsConfig - that shows the time of the last successful upload. - format: date-time - nullable: true - type: string - last_upload_status: - description: LastUploadStatus is a field of KokuMetricsConfig - that shows the http status of the last upload. - type: string - upload: - description: UploadToggle is a field of KokuMetricsConfig to represent - if the operator should upload to cloud.redhat.com. The default - is true - type: boolean - upload_cycle: - description: UploadCycle is a field of KokuMetricsConfig to represent - the number of minutes between each upload schedule. The default - is 360 min (6 hours). - format: int64 - type: integer - upload_wait: - description: UploadWait is a field of KokuMetricsConfig to represent - the time to wait before sending an upload. - format: int64 - type: integer - validate_cert: - description: ValidateCert is a field of KokuMetricsConfig to represent - if the Ingress endpoint must be certificate validated. - type: boolean - type: object - type: object - required: - - spec - type: object - served: true - storage: true - subresources: - status: {} -status: - acceptedNames: - kind: "" - plural: "" - conditions: [] - storedVersions: [] diff --git a/koku-metrics-operator/1.1.4/manifests/koku-metrics-operator.clusterserviceversion.yaml b/koku-metrics-operator/1.1.4/manifests/koku-metrics-operator.clusterserviceversion.yaml deleted file mode 100644 index 25b31663d..000000000 --- a/koku-metrics-operator/1.1.4/manifests/koku-metrics-operator.clusterserviceversion.yaml +++ /dev/null @@ -1,469 +0,0 @@ -apiVersion: operators.coreos.com/v1alpha1 -kind: ClusterServiceVersion -metadata: - annotations: - alm-examples: |- - [ - { - "apiVersion": "koku-metrics-cfg.openshift.io/v1beta1", - "kind": "KokuMetricsConfig", - "metadata": { - "name": "kokumetricscfg-sample-v1beta1" - }, - "spec": { - "authentication": { - "type": "token" - }, - "packaging": { - "max_reports_to_store": 30, - "max_size_MB": 100 - }, - "prometheus_config": {}, - "source": { - "check_cycle": 1440, - "create_source": false, - "name": "INSERT-SOURCE-NAME" - }, - "upload": { - "upload_cycle": 360, - "upload_toggle": true - } - } - } - ] - capabilities: Seamless Upgrades - categories: Monitoring - certified: "false" - containerImage: quay.io/project-koku/koku-metrics-operator@sha256:d254d58685d0495bd404cb740084758a5bcd80b1aa5ecee66b5608801d43feb5 - createdAt: "2022-01-25T19:02:20Z" - description: A Golang-based OpenShift Operator that generates and uploads OpenShift - usage metrics to cost management. - operatorframework.io/suggested-namespace: koku-metrics-operator - operators.openshift.io/infrastructure-features: '["Disconnected"]' - operators.operatorframework.io/builder: operator-sdk-v1.10.0+git - operators.operatorframework.io/project_layout: go.kubebuilder.io/v2 - repository: https://github.com/project-koku/koku-metrics-operator - support: Cost Management - name: koku-metrics-operator.v1.1.4 - namespace: placeholder -spec: - apiservicedefinitions: {} - customresourcedefinitions: - owned: - - description: KokuMetricsConfig is the Schema for the kokumetricsconfig API - displayName: Koku Metrics Config - kind: KokuMetricsConfig - name: kokumetricsconfigs.koku-metrics-cfg.openshift.io - version: v1beta1 - description: |- - # Koku Metrics Operator - ## Introduction - The `koku-metrics-operator` is a component of the [cost managment](https://access.redhat.com/documentation/en-us/cost_management_service) service for Openshift, used to gather the required information from the cluster. It is recommended to be installed in OpenShift 4.5+. This operator obtains OpenShift usage data by querying Prometheus and uploads it to cost management to be processed. The Operator queries Prometheus every hour to create metric reports, which are then packaged and uploaded to cost management at [console.redhat.com](https://console.redhat.com). For more information, reach out to . - - This operator is capable of functioning within a disconnected/restricted network (aka air-gapped mode). In this mode, the operator will store the packaged reports for manual retrieval instead of being uploaded to cost management. Documentation for installing an operator within a restricted network can be found [here](https://docs.openshift.com/container-platform/latest/operators/admin/olm-restricted-networks.html). - - For more information, reach out to . - ## Features and Capabilities - #### Metrics collection: - The Koku Metrics Operator (`koku-metrics-operator`) collects the metrics required for cost management by: - * Querying Prometheus to gather the necessary metrics for cost management. - * Writing Prometheus queries to CSV report files. - * Packaging the CSV report files into tarballs. - - #### Additional Capabilities: - * The operator can be configured to automatically upload the packaged reports to cost management through Red Hat Insights Ingress service. - * The operator can create a source in console.redhat.com. A source is required for cost management to process the uploaded packages. - * PersistentVolumeClaim (PVC) configuration: The KokuMetricsConfig CR can accept a PVC definition and the operator will create and mount the PVC. If one is not provided, a default PVC will be created. - * Restricted network installation: this operator can function on a restricted network. In this mode, the operator stores the packaged reports for manual retrieval. - - ## Limitations and Pre-Requisites - #### Limitations (Potential for metrics data loss) - * A source **must** exist in console.redhat.com for an uploaded payload to be processed by cost management. The operator sends the payload to the Red Hat Insights Ingress service which usually returns successfully, but the operator does not currently confirm with cost management that the payload was processed. After Ingress accepts the uploaded payload, the payload is removed from the operator and is gone forever. If the data within the payload is not processed, a gap will be introduced in the usage metrics. - - **Note** The following limitations are specific to operators configured to run in a restricted network: - * The `koku-metrics-operator` will not be able to generate new reports if the PVC storage is filled. If this occurs, the reports must be manually deleted from the PVC so that the operator can function as normal. - * The default report retention is 30 reports (about one week's worth of data). The reports must be manually downloaded and uploaded to console.redhat.com every week, or they will be deleted and the data will be lost. - - #### Storage configuration prerequisite - The operator will attempt to create and use the following PVC when installed: - - volume_claim_template: - apiVersion: v1 - kind: PersistentVolumeClaim - metadata: - name: koku-metrics-operator-data - spec: - accessModes: - - ReadWriteOnce - resources: - requests: - storage: 10Gi - - If a different PVC should be utilized, a valid PVC should be specified in the KokuMetricsConfig CR as described in the appropriate section below. The PVC to be used may exist already, or the operator will attempt to create it. - - To use the default specification, the follow assumptions must be met: - 1. A default StorageClass is defined. - 2. Dynamic provisioning for that default StorageClass is enabled. - - If these assumptions are not met, the operator will not deploy correctly. In these cases, storage must be manually configured. After configuring storage, a valid PVC template should be supplied in the `volume_claim_template` spec of the KokuMetricsConfig CR. - - ## Configure the koku-metrics-operator - **Note** There are separate instructions for configuring the `koku-metrics-operator` to run in a restricted network. - ##### Configure authentication - The default authentication for the operator is `token`. No further steps are required to configure token authentication. If `basic` is the preferred authentication method, a Secret must be created which holds username and password credentials: - 1. On the left navigation pane, select `Workloads` -> `Secrets` -> select Project: `koku-metrics-operator` -> `Create` -> `Key/Value Secret` - 2. Give the Secret a name and add 2 keys: `username` and `password` (all lowercase). The values for these keys correspond to console.redhat.com credentials. - 3. Select `Create`. - ##### Create the KokuMetricsConfig - Configure the koku-metrics-operator by creating a `KokuMetricsConfig`. - 1. On the left navigation pane, select `Operators` -> `Installed Operators` -> `koku-metrics-operator` -> `KokuMetricsConfig` -> `Create Instance`. - 2. For `basic` authentication, edit the following values in the spec: - * Replace `authentication: type:` with `basic`. - * Add the `secret_name` field under `authentication`, and set it equal to the name of the authentication Secret that was created above. The spec should look similar to the following: - - ``` - authentication: - secret_name: SECRET-NAME - type: basic - ``` - - 3. To configure the koku-metrics-operator to create a cost management source, edit the following values in the `source` field: - * Replace `INSERT-SOURCE-NAME` with the preferred name of the source to be created. - * Replace the `create_source` field value with `true`. - - **Note:** if the source already exists, replace `INSERT-SOURCE-NAME` with the existing name, and leave `create_source` as false. This will allow the operator to confirm the source exists. - 4. If not specified, the operator will create a default PersistentVolumeClaim called `koku-metrics-operator-data` with 10Gi of storage. To configure the koku-metrics-operator to use or create a different PVC, edit the following in the spec: - * Add the desired configuration to the `volume_claim_template` field in the spec: - - ``` - volume_claim_template: - apiVersion: v1 - kind: PersistentVolumeClaim - metadata: - name: - spec: - accessModes: - - ReadWriteOnce - resources: - requests: - storage: 10Gi - ``` - - **Note:** If using the YAML View, the `volume_claim_template` field must be added to the spec - 5. Select `Create`. - - # Restricted Network Usage (disconnected/air-gapped mode) - ## Installation - To install the `koku-metrics-operator` in a restricted network, follow the [olm documentation](https://docs.openshift.com/container-platform/4.5/operators/admin/olm-restricted-networks.html). The operator is found in the `community-operators` Catalog in the `registry.redhat.io/redhat/community-operator-index:latest` Index. If pruning the index before pushing to the mirrored registry, keep the `koku-metrics-operator` package. - - Within a restricted network, the operator queries prometheus to gather the necessary usage metrics, writes the query results to CSV files, and packages the reports for storage in the PVC. These reports then need to be manually downloaded from the cluster and uploaded to [console.redhat.com](https://console.redhat.com). - - For more information, reach out to . - ## Configure the koku-metrics-operator for a restricted network - ##### Create the KokuMetricsConfig - Configure the koku-metrics-operator by creating a `KokuMetricsConfig`. - 1. On the left navigation pane, select `Operators` -> `Installed Operators` -> `koku-metrics-operator` -> `KokuMetricsConfig` -> `Create Instance`. - 2. Specify the desired storage. If not specified, the operator will create a default Persistent Volume Claim called `koku-metrics-operator-data` with 10Gi of storage. To configure the koku-metrics-operator to use or create a different PVC, edit the following in the spec: - * Add the desired configuration to the `volume_claim_template` field in the spec: - - ``` - volume_claim_template: - apiVersion: v1 - kind: PersistentVolumeClaim - metadata: - name: - spec: - storageClassName: - accessModes: - - ReadWriteOnce - resources: - requests: - storage: 10Gi - ``` - - **Note:** If using the YAML View, the `volume_claim_template` field must be added to the spec - 3. (Optional) Specify the desired report retention. The operator will retain 30 reports by default. This corresponds to approximately one week's worth of data if using the default packaging cycle. To modify the number of retained reports: - * Change the `packaging` spec field `max_reports_to_store` to the desired number of reports to retain. Once this max number is reached, the operator will start removing the oldest packages remaining on the PVC: - - ``` - packaging: - max_size_MB: 100 - max_reports_to_store: 30 - ``` - - **Note:** The number of retained reports directly affects the frequency that reports must be manually downloaded from the PVC. Take caution in setting this to a higher number of reports, as the operator cannot write data to the PVC if the storage is full. - 4. To configure the operator to perform in a restricted network, set the `upload_toggle` to `false`: - - ``` - upload: - upload_cycle: 360, - upload_toggle: false - ``` - - 5. Select `Create`. - - ## Download reports from the Operator & clean up the PVC - If the `koku-metrics-operator` is configured to run in a restricted network, the metric reports will not automatically upload to cost managment. Instead, they need to be manually copied from the PVC for upload to [console.redhat.com](https://console.redhat.com). The default configuration saves one week of reports which means the process of downloading and uploading reports should be repeated weekly to prevent loss of metrics data. To download the reports, complete the following steps: - 1. Create the following Pod, ensuring the `claimName` matches the PVC containing the report data: - - ``` - kind: Pod - apiVersion: v1 - metadata: - name: volume-shell - namespace: koku-metrics-operator - spec: - volumes: - - name: koku-metrics-operator-reports - persistentVolumeClaim: - claimName: koku-metrics-operator-data - containers: - - name: volume-shell - image: busybox - command: ['sleep', 'infinity'] - volumeMounts: - - name: koku-metrics-operator-reports - mountPath: /tmp/koku-metrics-operator-reports - ``` - - 2. Use rsync to copy all of the files ready for upload from the PVC to a local folder: - - ``` - $ oc rsync volume-shell:/tmp/koku-metrics-operator-reports/upload local/path/to/save/folder - ``` - - 3. Once confirming that the files have been successfully copied, use rsh to connect to the pod and delete the contents of the upload folder so that they are no longer in storage: - - ``` - $ oc rsh volume-shell - $ rm /tmp/koku-metrics-operator-reports/upload/* - ``` - - 4. (Optional) Delete the pod that was used to connect to the PVC: - - ``` - $ oc delete -f volume-shell.yaml - ``` - - ## Create a source - In a restricted network, the `koku-metrics-operator` cannot automatically create a source. This process must be done manually. In the console.redhat.com platform, open the [Sources menu](https://console.redhat.com/settings/sources/) to begin adding an OpenShift source to cost management: - - Prerequisites: - * The cluster identifier which can be found in the KokuMetricsConfig CR, the cluster Overview page, or the cluster Help > About. - - Create source: - 1. Navigate to the Sources menu - 2. Select the `Red Hat sources` tab - 3. Create a new `Red Hat Openshift Container Platform` source: - * give the source a unique name - * add the Cost Management application - * add the cluster identifier - 4. In the Sources wizard, review the details and click `Finish` to create the Source. - - ## Upload the reports to cost managment - Uploading reports to cost managment is done through curl: - - $ curl -vvvv -F "file=@FILE_NAME.tar.gz;type=application/vnd.redhat.hccm.tar+tgz" https://cloud.redhat.com/api/ingress/v1/upload -u USERNAME:PASS - - where `USERNAME` and `PASS` correspond to the user credentials for [console.redhat.com](https://console.redhat.com), and `FILE_NAME` is the name of the report to upload. - - displayName: Koku Metrics Operator - icon: - - base64data: PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4KPCEtLSBHZW5lcmF0b3I6IEFkb2JlIElsbHVzdHJhdG9yIDIyLjEuMCwgU1ZHIEV4cG9ydCBQbHVnLUluIC4gU1ZHIFZlcnNpb246IDYuMDAgQnVpbGQgMCkgIC0tPgo8c3ZnIHZlcnNpb249IjEuMSIg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iwwLjY5MTE0NjksMS45NDkwMzU2CgkJCWMwLjQ1NjE2MTUsMC42MTI4MjM1LDEuMDMyMTE5OCwxLjAzMjExOTgsMS43MTg2NTg0LDEuMjYyNDk2OUwxNzQuMjgwNjM5NiwxODUuODczNjExNXoiLz4KCTwvZz4KPC9nPgo8L3N2Zz4K - mediatype: image/svg+xml - install: - spec: - clusterPermissions: - - rules: - - apiGroups: - - config.openshift.io - resources: - - clusterversions - verbs: - - get - - list - - watch - - apiGroups: - - "" - resources: - - namespaces - verbs: - - get - - list - - watch - - apiGroups: - - "" - resources: - - secrets - verbs: - - get - serviceAccountName: koku-metrics-controller-manager - deployments: - - name: koku-metrics-controller-manager - spec: - replicas: 1 - selector: - matchLabels: - control-plane: controller-manager - strategy: {} - template: - metadata: - labels: - control-plane: controller-manager - spec: - containers: - - args: - - --enable-leader-election - command: - - /manager - env: - - name: IN_CLUSTER - value: "true" - - name: WATCH_NAMESPACE - valueFrom: - fieldRef: - fieldPath: metadata.annotations['olm.targetNamespaces'] - image: quay.io/project-koku/koku-metrics-operator@sha256:d254d58685d0495bd404cb740084758a5bcd80b1aa5ecee66b5608801d43feb5 - name: manager - resources: - limits: - cpu: 500m - memory: 500Mi - requests: - cpu: 100m - memory: 20Mi - terminationMessagePolicy: FallbackToLogsOnError - volumeMounts: - - mountPath: /tmp/koku-metrics-operator-reports - name: koku-metrics-operator-reports - serviceAccountName: koku-metrics-controller-manager - terminationGracePeriodSeconds: 10 - volumes: - - name: koku-metrics-operator-reports - permissions: - - rules: - - apiGroups: - - "" - resources: - - configmaps - verbs: - - get - - list - - watch - - create - - update - - patch - - delete - - apiGroups: - - "" - resources: - - configmaps/status - verbs: - - get - - update - - patch - - apiGroups: - - "" - resources: - - events - verbs: - - create - - patch - - apiGroups: - - coordination.k8s.io - resources: - - leases - verbs: - - get - - list - - watch - - create - - update - - patch - - delete - - apiGroups: - - apps - resources: - - deployments - verbs: - - get - - list - - patch - - watch - - apiGroups: - - "" - resources: - - configmaps - - endpoints - - events - - persistentvolumeclaims - - pods - - secrets - - serviceaccounts - - services - - services/finalizers - verbs: - - create - - delete - - get - - list - - patch - - update - - watch - - apiGroups: - - koku-metrics-cfg.openshift.io - resources: - - kokumetricsconfigs - verbs: - - create - - delete - - get - - list - - patch - - update - - watch - - apiGroups: - - koku-metrics-cfg.openshift.io - resources: - - kokumetricsconfigs/status - verbs: - - get - - patch - - update - - apiGroups: - - operators.coreos.com - resources: - - clusterserviceversions - verbs: - - get - - list - - patch - - update - - watch - serviceAccountName: koku-metrics-controller-manager - strategy: deployment - installModes: - - supported: true - type: OwnNamespace - - supported: true - type: SingleNamespace - - supported: false - type: MultiNamespace - - supported: false - type: AllNamespaces - relatedImages: - - name: koku-metrics-operator - image: quay.io/project-koku/koku-metrics-operator@sha256:d254d58685d0495bd404cb740084758a5bcd80b1aa5ecee66b5608801d43feb5 - keywords: - - cost - - management - - usage - - monitor - maintainers: - - email: costmanagement@redhat.com - name: costmanagement - maturity: alpha - provider: - name: Red Hat - replaces: koku-metrics-operator.v1.1.3 - version: 1.1.4 diff --git a/koku-metrics-operator/1.1.4/metadata/annotations.yaml b/koku-metrics-operator/1.1.4/metadata/annotations.yaml deleted file mode 100644 index 5e2f30385..000000000 --- a/koku-metrics-operator/1.1.4/metadata/annotations.yaml +++ /dev/null @@ -1,15 +0,0 @@ -annotations: - # Core bundle annotations. - operators.operatorframework.io.bundle.mediatype.v1: registry+v1 - operators.operatorframework.io.bundle.manifests.v1: manifests/ - operators.operatorframework.io.bundle.metadata.v1: metadata/ - operators.operatorframework.io.bundle.package.v1: koku-metrics-operator - operators.operatorframework.io.bundle.channels.v1: alpha,beta - operators.operatorframework.io.bundle.channel.default.v1: beta - operators.operatorframework.io.metrics.builder: operator-sdk-v1.10.0+git - operators.operatorframework.io.metrics.mediatype.v1: metrics+v1 - operators.operatorframework.io.metrics.project_layout: go.kubebuilder.io/v2 - - # Annotations for testing. - operators.operatorframework.io.test.mediatype.v1: scorecard+v1 - operators.operatorframework.io.test.config.v1: tests/scorecard/ diff --git a/koku-metrics-operator/1.1.4/tests/scorecard/config.yaml b/koku-metrics-operator/1.1.4/tests/scorecard/config.yaml deleted file mode 100644 index e2d83b262..000000000 --- a/koku-metrics-operator/1.1.4/tests/scorecard/config.yaml +++ /dev/null @@ -1,28 +0,0 @@ -apiVersion: scorecard.operatorframework.io/v1alpha3 -kind: Configuration -metadata: - name: config -stages: -- parallel: true - tests: - - entrypoint: - - scorecard-test - - basic-check-spec - image: quay.io/operator-framework/scorecard-test:v1.10.1 - labels: - suite: basic - test: basic-check-spec-test - - entrypoint: - - scorecard-test - - olm-bundle-validation - image: quay.io/operator-framework/scorecard-test:v1.10.1 - labels: - suite: olm - test: olm-bundle-validation-test - - entrypoint: - - scorecard-test - - olm-crds-have-validation - image: quay.io/operator-framework/scorecard-test:v1.10.1 - labels: - suite: olm - test: olm-crds-have-validation-test diff --git a/koku-metrics-operator/1.1.5/Dockerfile b/koku-metrics-operator/1.1.5/Dockerfile deleted file mode 100644 index 2cb31c24d..000000000 --- a/koku-metrics-operator/1.1.5/Dockerfile +++ /dev/null @@ -1,21 +0,0 @@ -FROM scratch - -# Core bundle labels. -LABEL operators.operatorframework.io.bundle.mediatype.v1=registry+v1 -LABEL operators.operatorframework.io.bundle.manifests.v1=manifests/ -LABEL operators.operatorframework.io.bundle.metadata.v1=metadata/ -LABEL operators.operatorframework.io.bundle.package.v1=koku-metrics-operator -LABEL operators.operatorframework.io.bundle.channels.v1=alpha,beta -LABEL operators.operatorframework.io.bundle.channel.default.v1=beta -LABEL operators.operatorframework.io.metrics.builder=operator-sdk-v1.19.0+git -LABEL operators.operatorframework.io.metrics.mediatype.v1=metrics+v1 -LABEL operators.operatorframework.io.metrics.project_layout=go.kubebuilder.io/v2 - -# Labels for testing. -LABEL operators.operatorframework.io.test.mediatype.v1=scorecard+v1 -LABEL operators.operatorframework.io.test.config.v1=tests/scorecard/ - -# Copy files to locations specified by labels. -COPY manifests /manifests/ -COPY metadata /metadata/ -COPY tests/scorecard /tests/scorecard/ diff --git a/koku-metrics-operator/1.1.5/manifests/koku-metrics-cfg.openshift.io_kokumetricsconfigs.yaml b/koku-metrics-operator/1.1.5/manifests/koku-metrics-cfg.openshift.io_kokumetricsconfigs.yaml deleted file mode 100644 index 16c6ad481..000000000 --- a/koku-metrics-operator/1.1.5/manifests/koku-metrics-cfg.openshift.io_kokumetricsconfigs.yaml +++ /dev/null @@ -1,840 +0,0 @@ -apiVersion: apiextensions.k8s.io/v1 -kind: CustomResourceDefinition -metadata: - annotations: - controller-gen.kubebuilder.io/version: v0.3.0 - creationTimestamp: null - name: kokumetricsconfigs.koku-metrics-cfg.openshift.io -spec: - group: koku-metrics-cfg.openshift.io - names: - kind: KokuMetricsConfig - listKind: KokuMetricsConfigList - plural: kokumetricsconfigs - singular: kokumetricsconfig - scope: Namespaced - versions: - - name: v1beta1 - schema: - openAPIV3Schema: - description: KokuMetricsConfig is the Schema for the kokumetricsconfig API - properties: - apiVersion: - description: 'APIVersion defines the versioned schema of this representation - of an object. Servers should convert recognized schemas to the latest - internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' - type: string - kind: - description: 'Kind is a string value representing the REST resource this - object represents. Servers may infer this from the endpoint the client - submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' - type: string - metadata: - type: object - spec: - description: KokuMetricsConfigSpec defines the desired state of KokuMetricsConfig. - properties: - api_url: - default: https://cloud.redhat.com - description: FOR DEVELOPMENT ONLY. APIURL is a field of KokuMetricsConfig - to represent the url of the API endpoint for service interaction. - The default is `https://cloud.redhat.com`. - type: string - authentication: - description: Authentication is a field of KokuMetricsConfig to represent - the authentication object. - properties: - secret_name: - description: AuthenticationSecretName is a field of KokuMetricsConfig - to represent the secret with the user and password used for - uploads. - type: string - type: - default: token - description: 'AuthType is a field of KokuMetricsConfig to represent - the authentication type to be used basic or token. Valid values - are: - "basic" : Enables authentication using user and password - from authentication secret. - "token" (default): Uses cluster - token for authentication.' - enum: - - token - - basic - type: string - required: - - type - type: object - clusterID: - description: ClusterID is a field of KokuMetricsConfig to represent - the cluster UUID. Normally this value should not be specified. Only - set this value if the clusterID cannot be obtained from the ClusterVersion. - type: string - clusterVersion: - description: ClusterVersion is a field of KokuMetricsConfig to represent - the cluster version. Normally this value should not be specified. - Only set this value if the clusterVersion cannot be obtained from - the ClusterVersion. - type: string - packaging: - description: Packaging is a field of KokuMetricsConfig to represent - the packaging object. - properties: - max_reports_to_store: - default: 30 - description: MaxReports is a field of KokuMetricsConfig to represent - the maximum number of reports to store. The default is 30 reports - which corresponds to approximately 7 days worth of data given - the other default values. - format: int64 - minimum: 1 - type: integer - max_size_MB: - default: 100 - description: MaxSize is a field of KokuMetricsConfig to represent - the max file size in megabytes that will be compressed for upload - to Ingress. The default is 100. - format: int64 - maximum: 100 - minimum: 1 - type: integer - required: - - max_reports_to_store - - max_size_MB - type: object - prometheus_config: - description: PrometheusConfig is a field of KokuMetricsConfig to represent - the configuration of Prometheus connection. - properties: - context_timeout: - default: 120 - description: ContextTimeout is a field of KokuMetricsConfig to - represent how long a query to prometheus should run in seconds - before timing out. The default is 120 seconds. - format: int64 - maximum: 180 - minimum: 10 - type: integer - service_address: - default: https://thanos-querier.openshift-monitoring.svc:9091 - description: FOR DEVELOPMENT ONLY. SvcAddress is a field of KokuMetricsConfig - to represent the thanos-querier address. The default is `https://thanos-querier.openshift-monitoring.svc:9091`. - type: string - skip_tls_verification: - default: false - description: FOR DEVELOPMENT ONLY. SkipTLSVerification is a field - of KokuMetricsConfig to represent if the thanos-querier endpoint - must be certificate validated. The default is false. - type: boolean - required: - - service_address - - skip_tls_verification - type: object - source: - description: Source is a field of KokuMetricsConfig to represent the - desired source on cloud.redhat.com. - properties: - check_cycle: - default: 1440 - description: CheckCycle is a field of KokuMetricsConfig to represent - the number of minutes between each source check schedule The - default is 1440 min (24 hours). - format: int64 - minimum: 0 - type: integer - create_source: - default: false - description: CreateSource is a field of KokuMetricsConfigSpec - to represent if the source should be created if not found. - type: boolean - name: - description: SourceName is a field of KokuMetricsConfigSpec to - represent the source name on cloud.redhat.com. - type: string - sources_path: - default: /api/sources/v1.0/ - description: FOR DEVELOPMENT ONLY. SourcesAPIPath is a field of - KokuMetricsConfig to represent the path of the Sources API service. - The default is `/api/sources/v1.0/`. - type: string - required: - - check_cycle - - create_source - - sources_path - type: object - upload: - description: Upload is a field of KokuMetricsConfig to represent the - upload object. - properties: - ingress_path: - default: /api/ingress/v1/upload - description: FOR DEVELOPMENT ONLY. IngressAPIPath is a field of - KokuMetricsConfig to represent the path of the Ingress API service. - The default is `/api/ingress/v1/upload`. - type: string - upload_cycle: - default: 360 - description: UploadCycle is a field of KokuMetricsConfig to represent - the number of minutes between each upload schedule. The default - is 360 min (6 hours). - format: int64 - minimum: 0 - type: integer - upload_toggle: - default: true - description: UploadToggle is a field of KokuMetricsConfig to represent - if the operator is installed in a restricted-network. If `false`, - the operator will not upload to cloud.redhat.com or check/create - sources. The default is true. - type: boolean - upload_wait: - description: UploadWait is a field of KokuMetricsConfig to represent - the time to wait before sending an upload. - format: int64 - minimum: 0 - type: integer - validate_cert: - default: true - description: ValidateCert is a field of KokuMetricsConfig to represent - if the Ingress endpoint must be certificate validated. - type: boolean - required: - - ingress_path - - upload_cycle - - upload_toggle - - validate_cert - type: object - volume_claim_template: - description: VolumeClaimTemplate is a field of KokuMetricsConfig to - represent a PVC template. - properties: - apiVersion: - description: 'APIVersion defines the versioned schema of this - representation of an object. Servers should convert recognized - schemas to the latest internal value, and may reject unrecognized - values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' - type: string - kind: - description: 'Kind is a string value representing the REST resource - this object represents. Servers may infer this from the endpoint - the client submits requests to. Cannot be updated. In CamelCase. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' - type: string - metadata: - description: EmbeddedMetadata contains metadata relevant to an - EmbeddedResource. - properties: - annotations: - additionalProperties: - type: string - description: 'Annotations is an unstructured key value map - stored with a resource that may be set by external tools - to store and retrieve arbitrary metadata. They are not queryable - and should be preserved when modifying objects. More info: - http://kubernetes.io/docs/user-guide/annotations' - type: object - labels: - additionalProperties: - type: string - description: 'Map of string keys and values that can be used - to organize and categorize (scope and select) objects. May - match selectors of replication controllers and services. - More info: http://kubernetes.io/docs/user-guide/labels' - type: object - name: - description: 'Name must be unique within a namespace. Is required - when creating resources, although some resources may allow - a client to request the generation of an appropriate name - automatically. Name is primarily intended for creation idempotence - and configuration definition. Cannot be updated. More info: - http://kubernetes.io/docs/user-guide/identifiers#names' - type: string - type: object - spec: - description: 'Spec defines the desired characteristics of a volume - requested by a pod author. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims' - properties: - accessModes: - description: 'AccessModes contains the desired access modes - the volume should have. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes-1' - items: - type: string - type: array - dataSource: - description: 'This field can be used to specify either: * - An existing VolumeSnapshot object (snapshot.storage.k8s.io/VolumeSnapshot) - * An existing PVC (PersistentVolumeClaim) * An existing - custom resource that implements data population (Alpha) - In order to use custom resource types that implement data - population, the AnyVolumeDataSource feature gate must be - enabled. If the provisioner or an external controller can - support the specified data source, it will create a new - volume based on the contents of the specified data source.' - properties: - apiGroup: - description: APIGroup is the group for the resource being - referenced. If APIGroup is not specified, the specified - Kind must be in the core API group. For any other third-party - types, APIGroup is required. - type: string - kind: - description: Kind is the type of resource being referenced - type: string - name: - description: Name is the name of resource being referenced - type: string - required: - - kind - - name - type: object - resources: - description: 'Resources represents the minimum resources the - volume should have. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources' - properties: - limits: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - description: 'Limits describes the maximum amount of compute - resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/' - type: object - requests: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - description: 'Requests describes the minimum amount of - compute resources required. If Requests is omitted for - a container, it defaults to Limits if that is explicitly - specified, otherwise to an implementation-defined value. - More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/' - type: object - type: object - selector: - description: A label query over volumes to consider for binding. - properties: - matchExpressions: - description: matchExpressions is a list of label selector - requirements. The requirements are ANDed. - items: - description: A label selector requirement is a selector - that contains values, a key, and an operator that - relates the key and values. - properties: - key: - description: key is the label key that the selector - applies to. - type: string - operator: - description: operator represents a key's relationship - to a set of values. Valid operators are In, NotIn, - Exists and DoesNotExist. - type: string - values: - description: values is an array of string values. - If the operator is In or NotIn, the values array - must be non-empty. If the operator is Exists or - DoesNotExist, the values array must be empty. - This array is replaced during a strategic merge - patch. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - description: matchLabels is a map of {key,value} pairs. - A single {key,value} in the matchLabels map is equivalent - to an element of matchExpressions, whose key field is - "key", the operator is "In", and the values array contains - only "value". The requirements are ANDed. - type: object - type: object - storageClassName: - description: 'Name of the StorageClass required by the claim. - More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#class-1' - type: string - volumeMode: - description: volumeMode defines what type of volume is required - by the claim. Value of Filesystem is implied when not included - in claim spec. - type: string - volumeName: - description: VolumeName is the binding reference to the PersistentVolume - backing this claim. - type: string - type: object - type: object - required: - - authentication - - packaging - - prometheus_config - - source - - upload - type: object - status: - description: KokuMetricsConfigStatus defines the observed state of KokuMetricsConfig. - properties: - api_url: - description: APIURL is a field of KokuMetricsConfig to represent the - url of the API endpoint for service interaction. - type: string - authentication: - description: Authentication is a field of KokuMetricsConfig to represent - the authentication status. - properties: - credentials_found: - description: AuthenticationCredentialsFound is a field of KokuMetricsConfig - to represent if used for uploads were found. - type: boolean - error: - description: AuthErrorMessage is a field of KokuMetricsConfig - to represent an `invalid credentials` error message. - type: string - last_credential_verification_time: - description: LastVerificationTime is a field of KokuMetricsConfig - to represent the last time credentials were verified. - format: date-time - nullable: true - type: string - secret_name: - description: AuthenticationSecretName is a field of KokuMetricsConfig - to represent the secret with the user and password used for - uploads. - type: string - type: - description: AuthType is a field of KokuMetricsConfig to represent - the authentication type to be used basic or token. - enum: - - token - - basic - type: string - valid_basic_auth: - description: ValidBasicAuth is a field of KokuMetricsConfig to - represent if the given basic auth credentials are valid. - type: boolean - type: object - clusterID: - description: ClusterID is a field of KokuMetricsConfig to represent - the cluster UUID. - type: string - clusterVersion: - description: ClusterVersion is a field of KokuMetricsConfig to represent - the cluster version. - type: string - operator_commit: - description: OperatorCommit is a field of KokuMetricsConfig that shows - the commit hash of the operator. - type: string - packaging: - description: Packaging is a field of KokuMetricsConfig to represent - the packaging status - properties: - error: - description: PackagingError is a field of KokuMetricsConfig to - represent the error encountered packaging the reports. - type: string - last_successful_packaging_time: - description: LastSuccessfulPackagingTime is a field of KokuMetricsConfig - that shows the time of the last successful file packaging. - format: date-time - nullable: true - type: string - max_reports_to_store: - description: MaxReports is a field of KokuMetricsConfig to represent - the maximum number of reports to store. - format: int64 - type: integer - max_size_MB: - description: MaxSize is a field of KokuMetricsConfig to represent - the max file size in megabytes that will be compressed for upload - to Ingress. - format: int64 - type: integer - number_reports_stored: - description: ReportCount is a field of KokuMetricsConfig to represent - the number of reports in storage. - format: int64 - type: integer - packaged_files: - description: PackagedFiles is a field of KokuMetricsConfig to - represent the list of file packages in storage. - items: - type: string - type: array - type: object - persistent_volume_claim: - description: PersistentVolumeClaim is a field of KokuMetricsConfig - to represent a PVC. - properties: - apiVersion: - description: 'APIVersion defines the versioned schema of this - representation of an object. Servers should convert recognized - schemas to the latest internal value, and may reject unrecognized - values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' - type: string - kind: - description: 'Kind is a string value representing the REST resource - this object represents. Servers may infer this from the endpoint - the client submits requests to. Cannot be updated. In CamelCase. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' - type: string - metadata: - description: EmbeddedMetadata contains metadata relevant to an - EmbeddedResource. - properties: - annotations: - additionalProperties: - type: string - description: 'Annotations is an unstructured key value map - stored with a resource that may be set by external tools - to store and retrieve arbitrary metadata. They are not queryable - and should be preserved when modifying objects. More info: - http://kubernetes.io/docs/user-guide/annotations' - type: object - labels: - additionalProperties: - type: string - description: 'Map of string keys and values that can be used - to organize and categorize (scope and select) objects. May - match selectors of replication controllers and services. - More info: http://kubernetes.io/docs/user-guide/labels' - type: object - name: - description: 'Name must be unique within a namespace. Is required - when creating resources, although some resources may allow - a client to request the generation of an appropriate name - automatically. Name is primarily intended for creation idempotence - and configuration definition. Cannot be updated. More info: - http://kubernetes.io/docs/user-guide/identifiers#names' - type: string - type: object - spec: - description: 'Spec defines the desired characteristics of a volume - requested by a pod author. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims' - properties: - accessModes: - description: 'AccessModes contains the desired access modes - the volume should have. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes-1' - items: - type: string - type: array - dataSource: - description: 'This field can be used to specify either: * - An existing VolumeSnapshot object (snapshot.storage.k8s.io/VolumeSnapshot) - * An existing PVC (PersistentVolumeClaim) * An existing - custom resource that implements data population (Alpha) - In order to use custom resource types that implement data - population, the AnyVolumeDataSource feature gate must be - enabled. If the provisioner or an external controller can - support the specified data source, it will create a new - volume based on the contents of the specified data source.' - properties: - apiGroup: - description: APIGroup is the group for the resource being - referenced. If APIGroup is not specified, the specified - Kind must be in the core API group. For any other third-party - types, APIGroup is required. - type: string - kind: - description: Kind is the type of resource being referenced - type: string - name: - description: Name is the name of resource being referenced - type: string - required: - - kind - - name - type: object - resources: - description: 'Resources represents the minimum resources the - volume should have. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources' - properties: - limits: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - description: 'Limits describes the maximum amount of compute - resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/' - type: object - requests: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - description: 'Requests describes the minimum amount of - compute resources required. If Requests is omitted for - a container, it defaults to Limits if that is explicitly - specified, otherwise to an implementation-defined value. - More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/' - type: object - type: object - selector: - description: A label query over volumes to consider for binding. - properties: - matchExpressions: - description: matchExpressions is a list of label selector - requirements. The requirements are ANDed. - items: - description: A label selector requirement is a selector - that contains values, a key, and an operator that - relates the key and values. - properties: - key: - description: key is the label key that the selector - applies to. - type: string - operator: - description: operator represents a key's relationship - to a set of values. Valid operators are In, NotIn, - Exists and DoesNotExist. - type: string - values: - description: values is an array of string values. - If the operator is In or NotIn, the values array - must be non-empty. If the operator is Exists or - DoesNotExist, the values array must be empty. - This array is replaced during a strategic merge - patch. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - description: matchLabels is a map of {key,value} pairs. - A single {key,value} in the matchLabels map is equivalent - to an element of matchExpressions, whose key field is - "key", the operator is "In", and the values array contains - only "value". The requirements are ANDed. - type: object - type: object - storageClassName: - description: 'Name of the StorageClass required by the claim. - More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#class-1' - type: string - volumeMode: - description: volumeMode defines what type of volume is required - by the claim. Value of Filesystem is implied when not included - in claim spec. - type: string - volumeName: - description: VolumeName is the binding reference to the PersistentVolume - backing this claim. - type: string - type: object - type: object - prometheus: - description: Prometheus represents the status of premetheus queries. - properties: - configuration_error: - description: ConfigError is a field of KokuMetricsConfigStatus - to represent errors during prometheus configuration. - type: string - context_timeout: - description: ContextTimeout is a field of KokuMetricsConfigState - to represent how long a query to prometheus should run in seconds - before timing out. - format: int64 - type: integer - last_query_start_time: - description: LastQueryStartTime is a field of KokuMetricsConfigStatus - to represent the last time queries were started. - format: date-time - nullable: true - type: string - last_query_success_time: - description: LastQuerySuccessTime is a field of KokuMetricsConfigStatus - to represent the last time queries were successful. - format: date-time - nullable: true - type: string - prometheus_configured: - description: PrometheusConfigured is a field of KokuMetricsConfigStatus - to represent if the operator is configured to connect to prometheus. - type: boolean - prometheus_connected: - description: PrometheusConnected is a field of KokuMetricsConfigStatus - to represent if prometheus can be queried. - type: boolean - prometheus_connection_error: - description: ConnectionError is a field of KokuMetricsConfigStatus - to represent errors during prometheus test query. - type: string - service_address: - description: SvcAddress is the internal thanos-querier address. - type: string - skip_tls_verification: - description: SkipTLSVerification is a field of KokuMetricsConfigStatus - to represent if the thanos-querier endpoint must be certificate - validated. - type: boolean - required: - - prometheus_configured - - prometheus_connected - type: object - reports: - description: Reports represents the status of report generation. - properties: - data_collected: - description: DataCollected is a field of KokuMetricsConfigStatus - to represent whether or not data was collected for the last - query. - type: boolean - data_collection_message: - description: DataCollectionMessage is a field of KokuMetricsConfigStatus - to represent a message associated with the data_collected status. - type: string - last_hour_queried: - description: LastHourQueried is a field of KokuMetricsConfigStatus - to represent the time range for which metrics were last queried. - type: string - report_month: - description: ReportMonth is a field of KokuMetricsConfigStatus - to represent the month for which reports are being generated. - type: string - type: object - source: - description: Source is a field of KokuMetricsConfig to represent the - observed state of the source on cloud.redhat.com. - properties: - check_cycle: - description: CheckCycle is a field of KokuMetricsConfig to represent - the number of minutes between each source check schedule. The - default is 1440 min (24 hours). - format: int64 - type: integer - create_source: - description: CreateSource is a field of KokuMetricsConfigStatus - to represent if the source should be created if not found. A - source will not be created if upload_toggle is `false`. - type: boolean - error: - description: SourceError is a field of KokuMetricsConfigStatus - to represent the error encountered creating the source. - type: string - last_check_time: - description: LastSourceCheckTime is a field of KokuMetricsConfig - that shows the time that the last check was attempted. - format: date-time - nullable: true - type: string - name: - description: SourceName is a field of KokuMetricsConfigStatus - to represent the source name on cloud.redhat.com. - type: string - source_defined: - description: SourceDefined is a field of KokuMetricsConfigStatus - to represent if the source exists as defined on cloud.redhat.com. - type: boolean - sources_path: - description: SourcesAPIPath is a field of KokuMetricsConfig to - represent the path of the Sources API service. - type: string - type: object - storage: - description: Storage is a field - properties: - volume_mounted: - description: VolumeMounted is a bool to indicate if storage volume - was mounted. - type: boolean - volume_type: - description: VolumeType is the string representation of the volume - type. - type: string - type: object - upload: - description: Upload is a field of KokuMetricsConfig to represent the - upload object. - properties: - error: - description: UploadError is a field of KokuMetricsConfigStatus - to represent the error encountered uploading reports. - type: string - ingress_path: - description: IngressAPIPath is a field of KokuMetricsConfig to - represent the path of the Ingress API service. - type: string - last_payload_files: - description: LastPayloadFiles is a field of KokuMetricsConfig - to represent the list of files in the last payload that was - sent. - items: - type: string - type: array - last_payload_manifest_id: - description: LastPayloadManifest is a field of KokuMetricsConfig - that shows the manifestID of the last payload. - type: string - last_payload_name: - description: LastPayloadName is a field of KokuMetricsConfig that - shows the name of the last payload file. - type: string - last_payload_request_id: - description: LastPayloadRequestID is a field of KokuMetricsConfig - that shows the insights request id of the last payload. - type: string - last_successful_upload_time: - description: LastSuccessfulUploadTime is a field of KokuMetricsConfig - that shows the time of the last successful upload. - format: date-time - nullable: true - type: string - last_upload_status: - description: LastUploadStatus is a field of KokuMetricsConfig - that shows the http status of the last upload. - type: string - upload: - description: UploadToggle is a field of KokuMetricsConfig to represent - if the operator should upload to cloud.redhat.com. The default - is true - type: boolean - upload_cycle: - description: UploadCycle is a field of KokuMetricsConfig to represent - the number of minutes between each upload schedule. The default - is 360 min (6 hours). - format: int64 - type: integer - upload_wait: - description: UploadWait is a field of KokuMetricsConfig to represent - the time to wait before sending an upload. - format: int64 - type: integer - validate_cert: - description: ValidateCert is a field of KokuMetricsConfig to represent - if the Ingress endpoint must be certificate validated. - type: boolean - type: object - type: object - required: - - spec - type: object - served: true - storage: true - subresources: - status: {} -status: - acceptedNames: - kind: "" - plural: "" - conditions: [] - storedVersions: [] diff --git a/koku-metrics-operator/1.1.5/manifests/koku-metrics-operator.clusterserviceversion.yaml b/koku-metrics-operator/1.1.5/manifests/koku-metrics-operator.clusterserviceversion.yaml deleted file mode 100644 index d8a6fff11..000000000 --- a/koku-metrics-operator/1.1.5/manifests/koku-metrics-operator.clusterserviceversion.yaml +++ /dev/null @@ -1,471 +0,0 @@ -apiVersion: operators.coreos.com/v1alpha1 -kind: ClusterServiceVersion -metadata: - annotations: - alm-examples: |- - [ - { - "apiVersion": "koku-metrics-cfg.openshift.io/v1beta1", - "kind": "KokuMetricsConfig", - "metadata": { - "name": "kokumetricscfg-sample-v1beta1" - }, - "spec": { - "authentication": { - "type": "token" - }, - "packaging": { - "max_reports_to_store": 30, - "max_size_MB": 100 - }, - "prometheus_config": {}, - "source": { - "check_cycle": 1440, - "create_source": false, - "name": "INSERT-SOURCE-NAME" - }, - "upload": { - "upload_cycle": 360, - "upload_toggle": true - } - } - } - ] - capabilities: Seamless Upgrades - categories: Monitoring - certified: "false" - containerImage: quay.io/project-koku/koku-metrics-operator@sha256:248f0cfa043d3637d3c7210390f5b4b916a85ddc9cb04cfdb1138abeeeaa6ae6 - createdAt: "2022-05-11T13:49:37Z" - description: A Golang-based OpenShift Operator that generates and uploads OpenShift - usage metrics to cost management. - operatorframework.io/suggested-namespace: koku-metrics-operator - operators.openshift.io/infrastructure-features: '["Disconnected"]' - operators.operatorframework.io/builder: operator-sdk-v1.19.0+git - operators.operatorframework.io/project_layout: go.kubebuilder.io/v2 - repository: https://github.com/project-koku/koku-metrics-operator - support: Cost Management - name: koku-metrics-operator.v1.1.5 - namespace: placeholder -spec: - apiservicedefinitions: {} - customresourcedefinitions: - owned: - - description: KokuMetricsConfig is the Schema for the kokumetricsconfig API - displayName: Koku Metrics Config - kind: KokuMetricsConfig - name: kokumetricsconfigs.koku-metrics-cfg.openshift.io - version: v1beta1 - description: |- - # Koku Metrics Operator - ## Introduction - The `koku-metrics-operator` is a component of the [cost managment](https://access.redhat.com/documentation/en-us/cost_management_service) service for Openshift, used to gather the required information from the cluster. It is recommended to be installed in OpenShift 4.5+. This operator obtains OpenShift usage data by querying Prometheus and uploads it to cost management to be processed. The Operator queries Prometheus every hour to create metric reports, which are then packaged and uploaded to cost management at [console.redhat.com](https://console.redhat.com). For more information, reach out to . - - This operator is capable of functioning within a disconnected/restricted network (aka air-gapped mode). In this mode, the operator will store the packaged reports for manual retrieval instead of being uploaded to cost management. Documentation for installing an operator within a restricted network can be found [here](https://docs.openshift.com/container-platform/latest/operators/admin/olm-restricted-networks.html). - - For more information, reach out to . - ## Features and Capabilities - #### Metrics collection: - The Koku Metrics Operator (`koku-metrics-operator`) collects the metrics required for cost management by: - * Querying Prometheus to gather the necessary metrics for cost management. - * Writing Prometheus queries to CSV report files. - * Packaging the CSV report files into tarballs. - - #### Additional Capabilities: - * The operator can be configured to automatically upload the packaged reports to cost management through Red Hat Insights Ingress service. - * The operator can create a source in console.redhat.com. A source is required for cost management to process the uploaded packages. - * PersistentVolumeClaim (PVC) configuration: The KokuMetricsConfig CR can accept a PVC definition and the operator will create and mount the PVC. If one is not provided, a default PVC will be created. - * Restricted network installation: this operator can function on a restricted network. In this mode, the operator stores the packaged reports for manual retrieval. - - ## Limitations and Pre-Requisites - #### Limitations (Potential for metrics data loss) - * A source **must** exist in console.redhat.com for an uploaded payload to be processed by cost management. The operator sends the payload to the Red Hat Insights Ingress service which usually returns successfully, but the operator does not currently confirm with cost management that the payload was processed. After Ingress accepts the uploaded payload, the payload is removed from the operator and is gone forever. If the data within the payload is not processed, a gap will be introduced in the usage metrics. - - **Note** The following limitations are specific to operators configured to run in a restricted network: - * The `koku-metrics-operator` will not be able to generate new reports if the PVC storage is filled. If this occurs, the reports must be manually deleted from the PVC so that the operator can function as normal. - * The default report retention is 30 reports (about one week's worth of data). The reports must be manually downloaded and uploaded to console.redhat.com every week, or they will be deleted and the data will be lost. - - #### Storage configuration prerequisite - The operator will attempt to create and use the following PVC when installed: - - volume_claim_template: - apiVersion: v1 - kind: PersistentVolumeClaim - metadata: - name: koku-metrics-operator-data - spec: - accessModes: - - ReadWriteOnce - resources: - requests: - storage: 10Gi - - If a different PVC should be utilized, a valid PVC should be specified in the KokuMetricsConfig CR as described in the appropriate section below. The PVC to be used may exist already, or the operator will attempt to create it. - - To use the default specification, the follow assumptions must be met: - 1. A default StorageClass is defined. - 2. Dynamic provisioning for that default StorageClass is enabled. - - If these assumptions are not met, the operator will not deploy correctly. In these cases, storage must be manually configured. After configuring storage, a valid PVC template should be supplied in the `volume_claim_template` spec of the KokuMetricsConfig CR. - - ## Configure the koku-metrics-operator - **Note** There are separate instructions for configuring the `koku-metrics-operator` to run in a restricted network. - ##### Configure authentication - The default authentication for the operator is `token`. No further steps are required to configure token authentication. If `basic` is the preferred authentication method, a Secret must be created which holds username and password credentials: - 1. On the left navigation pane, select `Workloads` -> `Secrets` -> select Project: `koku-metrics-operator` -> `Create` -> `Key/Value Secret` - 2. Give the Secret a name and add 2 keys: `username` and `password` (all lowercase). The values for these keys correspond to console.redhat.com credentials. - 3. Select `Create`. - ##### Create the KokuMetricsConfig - Configure the koku-metrics-operator by creating a `KokuMetricsConfig`. - 1. On the left navigation pane, select `Operators` -> `Installed Operators` -> `koku-metrics-operator` -> `KokuMetricsConfig` -> `Create Instance`. - 2. For `basic` authentication, edit the following values in the spec: - * Replace `authentication: type:` with `basic`. - * Add the `secret_name` field under `authentication`, and set it equal to the name of the authentication Secret that was created above. The spec should look similar to the following: - - ``` - authentication: - secret_name: SECRET-NAME - type: basic - ``` - - 3. To configure the koku-metrics-operator to create a cost management source, edit the following values in the `source` field: - * Replace `INSERT-SOURCE-NAME` with the preferred name of the source to be created. - * Replace the `create_source` field value with `true`. - - **Note:** if the source already exists, replace `INSERT-SOURCE-NAME` with the existing name, and leave `create_source` as false. This will allow the operator to confirm the source exists. - 4. If not specified, the operator will create a default PersistentVolumeClaim called `koku-metrics-operator-data` with 10Gi of storage. To configure the koku-metrics-operator to use or create a different PVC, edit the following in the spec: - * Add the desired configuration to the `volume_claim_template` field in the spec: - - ``` - volume_claim_template: - apiVersion: v1 - kind: PersistentVolumeClaim - metadata: - name: - spec: - accessModes: - - ReadWriteOnce - resources: - requests: - storage: 10Gi - ``` - - **Note:** If using the YAML View, the `volume_claim_template` field must be added to the spec - 5. Select `Create`. - - # Restricted Network Usage (disconnected/air-gapped mode) - ## Installation - To install the `koku-metrics-operator` in a restricted network, follow the [olm documentation](https://docs.openshift.com/container-platform/4.5/operators/admin/olm-restricted-networks.html). The operator is found in the `community-operators` Catalog in the `registry.redhat.io/redhat/community-operator-index:latest` Index. If pruning the index before pushing to the mirrored registry, keep the `koku-metrics-operator` package. - - Within a restricted network, the operator queries prometheus to gather the necessary usage metrics, writes the query results to CSV files, and packages the reports for storage in the PVC. These reports then need to be manually downloaded from the cluster and uploaded to [console.redhat.com](https://console.redhat.com). - - For more information, reach out to . - ## Configure the koku-metrics-operator for a restricted network - ##### Create the KokuMetricsConfig - Configure the koku-metrics-operator by creating a `KokuMetricsConfig`. - 1. On the left navigation pane, select `Operators` -> `Installed Operators` -> `koku-metrics-operator` -> `KokuMetricsConfig` -> `Create Instance`. - 2. Specify the desired storage. If not specified, the operator will create a default Persistent Volume Claim called `koku-metrics-operator-data` with 10Gi of storage. To configure the koku-metrics-operator to use or create a different PVC, edit the following in the spec: - * Add the desired configuration to the `volume_claim_template` field in the spec: - - ``` - volume_claim_template: - apiVersion: v1 - kind: PersistentVolumeClaim - metadata: - name: - spec: - storageClassName: - accessModes: - - ReadWriteOnce - resources: - requests: - storage: 10Gi - ``` - - **Note:** If using the YAML View, the `volume_claim_template` field must be added to the spec - 3. (Optional) Specify the desired report retention. The operator will retain 30 reports by default. This corresponds to approximately one week's worth of data if using the default packaging cycle. To modify the number of retained reports: - * Change the `packaging` spec field `max_reports_to_store` to the desired number of reports to retain. Once this max number is reached, the operator will start removing the oldest packages remaining on the PVC: - - ``` - packaging: - max_size_MB: 100 - max_reports_to_store: 30 - ``` - - **Note:** The number of retained reports directly affects the frequency that reports must be manually downloaded from the PVC. Take caution in setting this to a higher number of reports, as the operator cannot write data to the PVC if the storage is full. - 4. To configure the operator to perform in a restricted network, set the `upload_toggle` to `false`: - - ``` - upload: - upload_cycle: 360, - upload_toggle: false - ``` - - 5. Select `Create`. - - ## Download reports from the Operator & clean up the PVC - If the `koku-metrics-operator` is configured to run in a restricted network, the metric reports will not automatically upload to cost managment. Instead, they need to be manually copied from the PVC for upload to [console.redhat.com](https://console.redhat.com). The default configuration saves one week of reports which means the process of downloading and uploading reports should be repeated weekly to prevent loss of metrics data. To download the reports, complete the following steps: - 1. Create the following Pod, ensuring the `claimName` matches the PVC containing the report data: - - ``` - kind: Pod - apiVersion: v1 - metadata: - name: volume-shell - namespace: koku-metrics-operator - spec: - volumes: - - name: koku-metrics-operator-reports - persistentVolumeClaim: - claimName: koku-metrics-operator-data - containers: - - name: volume-shell - image: busybox - command: ['sleep', 'infinity'] - volumeMounts: - - name: koku-metrics-operator-reports - mountPath: /tmp/koku-metrics-operator-reports - ``` - - 2. Use rsync to copy all of the files ready for upload from the PVC to a local folder: - - ``` - $ oc rsync volume-shell:/tmp/koku-metrics-operator-reports/upload local/path/to/save/folder - ``` - - 3. Once confirming that the files have been successfully copied, use rsh to connect to the pod and delete the contents of the upload folder so that they are no longer in storage: - - ``` - $ oc rsh volume-shell - $ rm /tmp/koku-metrics-operator-reports/upload/* - ``` - - 4. (Optional) Delete the pod that was used to connect to the PVC: - - ``` - $ oc delete -f volume-shell.yaml - ``` - - ## Create a source - In a restricted network, the `koku-metrics-operator` cannot automatically create a source. This process must be done manually. In the console.redhat.com platform, open the [Sources menu](https://console.redhat.com/settings/sources/) to begin adding an OpenShift source to cost management: - - Prerequisites: - * The cluster identifier which can be found in the KokuMetricsConfig CR, the cluster Overview page, or the cluster Help > About. - - Create source: - 1. Navigate to the Sources menu - 2. Select the `Red Hat sources` tab - 3. Create a new `Red Hat Openshift Container Platform` source: - * give the source a unique name - * add the Cost Management application - * add the cluster identifier - 4. In the Sources wizard, review the details and click `Finish` to create the Source. - - ## Upload the reports to cost managment - Uploading reports to cost managment is done through curl: - - $ curl -vvvv -F "file=@FILE_NAME.tar.gz;type=application/vnd.redhat.hccm.tar+tgz" https://cloud.redhat.com/api/ingress/v1/upload -u USERNAME:PASS - - where `USERNAME` and `PASS` correspond to the user credentials for [console.redhat.com](https://console.redhat.com), and `FILE_NAME` is the name of the report to upload. - - displayName: Koku Metrics Operator - icon: - - base64data: PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4KPCEtLSBHZW5lcmF0b3I6IEFkb2JlIElsbHVzdHJhdG9yIDIyLjEuMCwgU1ZHIEV4cG9ydCBQbHVnLUluIC4gU1ZHIFZlcnNpb246IDYuMDAgQnVpbGQgMCkgIC0tPgo8c3ZnIHZlcnNpb249IjEuMSIgaWQ9IkxheWVyXzEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4IgoJIHZpZXdCb3g9IjAgMCAzMDAgMzAwIiBzdHlsZT0iZW5hYmxlLWJhY2tncm91bmQ6bmV3IDAgMCAzMDAgMzAwOyIgeG1sOnNwYWNlPSJwcmVzZXJ2ZS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Y1OCwwLjUxMTQ1OTQsMC43ODMyOTQ3LDAuNTExNDU5NCwxLjMxNzc5NDh2NS41MDE1NDExCgkJCWMzLjY2NzY5NDEsMCw2Ljk1NzU2NTMsMS4xNDcyOTMxLDkuODYwMzgyMSwzLjQzNzMwMTZjMC40NTYxNzY4LDAuMzgyNDQ2MywwLjcyMzQxOTIsMC44NDMyMDA3LDAuODAxNzQyNiwxLjM3NzY4NTUKCQkJYzAuMDczNzE1MiwwLjUzNDUwMDEtMC4xMTUyMDM5LDAuOTkwNjQ2NC0wLjU3MTM1MDEsMS4zNzMwNzc0bC0zLjg5ODA4NjUsNC4wMTMyNzUxCgkJCWMtMC4zMDg3MTU4LDAuMjMwMzkyNS0wLjY2ODEwNjEsMC4zODI0MzEtMS4wOTIwMTA1LDAuNDU2MTYxNWMtMC40MTkyOTYzLDAuMDc4MzIzNC0wLjgyMDE1OTksMC0xLjIwMjU5MDktMC4yMjU3NjkKCQkJYy0xLjE0MjcxNTUtMC44NDMyMDA3LTIuNDQyMDc3Ni0xLjI2MjQ5NjktMy44OTgwODY1LTEuMjYyNDk2OWgtNy42NzYzNjExYy0wLjkxNjkxNTksMC0xLjcwMDIyNTgsMC4zMjI1MjUtMi4zNDk4OTkzLDAuOTcyMjEzNwoJCQljLTAuNjQ5Njg4NywwLjY0OTY3MzUtMC45NzY4MjE5LDEuNDc0NDQxNS0wLjk3NjgyMTksMi40NjUwODc5YzAsMC42ODY1NTQsMC4yMzAzOTI1LDEuMzM2MjEyMiwwLjY5MTE0NjksMS45NDkwMzU2CgkJCWMwLjQ1NjE2MTUsMC42MTI4MjM1LDEuMDMyMTE5OCwxLjAzMjExOTgsMS43MTg2NTg0LDEuMjYyNDk2OUwxNzQuMjgwNjM5NiwxODUuODczNjExNXoiLz4KCTwvZz4KPC9nPgo8L3N2Zz4K - mediatype: image/svg+xml - install: - spec: - clusterPermissions: - - rules: - - apiGroups: - - config.openshift.io - resources: - - clusterversions - verbs: - - get - - list - - watch - - apiGroups: - - "" - resources: - - namespaces - verbs: - - get - - list - - watch - - apiGroups: - - "" - resources: - - secrets - verbs: - - get - serviceAccountName: koku-metrics-controller-manager - deployments: - - label: - control-plane: controller-manager - name: koku-metrics-controller-manager - spec: - replicas: 1 - selector: - matchLabels: - control-plane: controller-manager - strategy: {} - template: - metadata: - labels: - control-plane: controller-manager - spec: - containers: - - args: - - --enable-leader-election - command: - - /manager - env: - - name: IN_CLUSTER - value: "true" - - name: WATCH_NAMESPACE - valueFrom: - fieldRef: - fieldPath: metadata.annotations['olm.targetNamespaces'] - image: quay.io/project-koku/koku-metrics-operator@sha256:248f0cfa043d3637d3c7210390f5b4b916a85ddc9cb04cfdb1138abeeeaa6ae6 - name: manager - resources: - limits: - cpu: 500m - memory: 500Mi - requests: - cpu: 100m - memory: 20Mi - terminationMessagePolicy: FallbackToLogsOnError - volumeMounts: - - mountPath: /tmp/koku-metrics-operator-reports - name: koku-metrics-operator-reports - serviceAccountName: koku-metrics-controller-manager - terminationGracePeriodSeconds: 10 - volumes: - - name: koku-metrics-operator-reports - permissions: - - rules: - - apiGroups: - - "" - resources: - - configmaps - verbs: - - get - - list - - watch - - create - - update - - patch - - delete - - apiGroups: - - "" - resources: - - configmaps/status - verbs: - - get - - update - - patch - - apiGroups: - - "" - resources: - - events - verbs: - - create - - patch - - apiGroups: - - coordination.k8s.io - resources: - - leases - verbs: - - get - - list - - watch - - create - - update - - patch - - delete - - apiGroups: - - apps - resources: - - deployments - verbs: - - get - - list - - patch - - watch - - apiGroups: - - "" - resources: - - configmaps - - endpoints - - events - - persistentvolumeclaims - - pods - - secrets - - serviceaccounts - - services - - services/finalizers - verbs: - - create - - delete - - get - - list - - patch - - update - - watch - - apiGroups: - - koku-metrics-cfg.openshift.io - resources: - - kokumetricsconfigs - verbs: - - create - - delete - - get - - list - - patch - - update - - watch - - apiGroups: - - koku-metrics-cfg.openshift.io - resources: - - kokumetricsconfigs/status - verbs: - - get - - patch - - update - - apiGroups: - - operators.coreos.com - resources: - - clusterserviceversions - verbs: - - get - - list - - patch - - update - - watch - serviceAccountName: koku-metrics-controller-manager - strategy: deployment - installModes: - - supported: true - type: OwnNamespace - - supported: true - type: SingleNamespace - - supported: false - type: MultiNamespace - - supported: false - type: AllNamespaces - relatedImages: - - name: koku-metrics-operator - image: quay.io/project-koku/koku-metrics-operator@sha256:248f0cfa043d3637d3c7210390f5b4b916a85ddc9cb04cfdb1138abeeeaa6ae6 - keywords: - - cost - - management - - usage - - monitor - maintainers: - - email: costmanagement@redhat.com - name: costmanagement - maturity: alpha - provider: - name: Red Hat - replaces: koku-metrics-operator.v1.1.4 - version: 1.1.5 diff --git a/koku-metrics-operator/1.1.5/metadata/annotations.yaml b/koku-metrics-operator/1.1.5/metadata/annotations.yaml deleted file mode 100644 index 010899d23..000000000 --- a/koku-metrics-operator/1.1.5/metadata/annotations.yaml +++ /dev/null @@ -1,15 +0,0 @@ -annotations: - # Core bundle annotations. - operators.operatorframework.io.bundle.mediatype.v1: registry+v1 - operators.operatorframework.io.bundle.manifests.v1: manifests/ - operators.operatorframework.io.bundle.metadata.v1: metadata/ - operators.operatorframework.io.bundle.package.v1: koku-metrics-operator - operators.operatorframework.io.bundle.channels.v1: alpha,beta - operators.operatorframework.io.bundle.channel.default.v1: beta - operators.operatorframework.io.metrics.builder: operator-sdk-v1.19.0+git - operators.operatorframework.io.metrics.mediatype.v1: metrics+v1 - operators.operatorframework.io.metrics.project_layout: go.kubebuilder.io/v2 - - # Annotations for testing. - operators.operatorframework.io.test.mediatype.v1: scorecard+v1 - operators.operatorframework.io.test.config.v1: tests/scorecard/ diff --git a/koku-metrics-operator/1.1.5/tests/scorecard/config.yaml b/koku-metrics-operator/1.1.5/tests/scorecard/config.yaml deleted file mode 100644 index a19cb8f47..000000000 --- a/koku-metrics-operator/1.1.5/tests/scorecard/config.yaml +++ /dev/null @@ -1,40 +0,0 @@ -apiVersion: scorecard.operatorframework.io/v1alpha3 -kind: Configuration -metadata: - name: config -stages: -- parallel: true - tests: - - entrypoint: - - scorecard-test - - basic-check-spec - image: quay.io/operator-framework/scorecard-test:v1.10.1 - labels: - suite: basic - test: basic-check-spec-test - storage: - spec: - mountPath: {} - - entrypoint: - - scorecard-test - - olm-bundle-validation - image: quay.io/operator-framework/scorecard-test:v1.10.1 - labels: - suite: olm - test: olm-bundle-validation-test - storage: - spec: - mountPath: {} - - entrypoint: - - scorecard-test - - olm-crds-have-validation - image: quay.io/operator-framework/scorecard-test:v1.10.1 - labels: - suite: olm - test: olm-crds-have-validation-test - storage: - spec: - mountPath: {} -storage: - spec: - mountPath: {} diff --git a/koku-metrics-operator/1.1.6/Dockerfile b/koku-metrics-operator/1.1.6/Dockerfile deleted file mode 100644 index 7147fd722..000000000 --- a/koku-metrics-operator/1.1.6/Dockerfile +++ /dev/null @@ -1,21 +0,0 @@ -FROM scratch - -# Core bundle labels. -LABEL operators.operatorframework.io.bundle.mediatype.v1=registry+v1 -LABEL operators.operatorframework.io.bundle.manifests.v1=manifests/ -LABEL operators.operatorframework.io.bundle.metadata.v1=metadata/ -LABEL operators.operatorframework.io.bundle.package.v1=koku-metrics-operator -LABEL operators.operatorframework.io.bundle.channels.v1=alpha,beta -LABEL operators.operatorframework.io.bundle.channel.default.v1=beta -LABEL operators.operatorframework.io.metrics.builder=operator-sdk-v1.10.0+git -LABEL operators.operatorframework.io.metrics.mediatype.v1=metrics+v1 -LABEL operators.operatorframework.io.metrics.project_layout=go.kubebuilder.io/v2 - -# Labels for testing. -LABEL operators.operatorframework.io.test.mediatype.v1=scorecard+v1 -LABEL operators.operatorframework.io.test.config.v1=tests/scorecard/ - -# Copy files to locations specified by labels. -COPY manifests /manifests/ -COPY metadata /metadata/ -COPY tests/scorecard /tests/scorecard/ diff --git a/koku-metrics-operator/1.1.6/manifests/koku-metrics-cfg.openshift.io_kokumetricsconfigs.yaml b/koku-metrics-operator/1.1.6/manifests/koku-metrics-cfg.openshift.io_kokumetricsconfigs.yaml deleted file mode 100644 index 651ae1bba..000000000 --- a/koku-metrics-operator/1.1.6/manifests/koku-metrics-cfg.openshift.io_kokumetricsconfigs.yaml +++ /dev/null @@ -1,842 +0,0 @@ -apiVersion: apiextensions.k8s.io/v1 -kind: CustomResourceDefinition -metadata: - annotations: - controller-gen.kubebuilder.io/version: v0.3.0 - creationTimestamp: null - labels: - app: koku-metrics-operator - name: kokumetricsconfigs.koku-metrics-cfg.openshift.io -spec: - group: koku-metrics-cfg.openshift.io - names: - kind: KokuMetricsConfig - listKind: KokuMetricsConfigList - plural: kokumetricsconfigs - singular: kokumetricsconfig - scope: Namespaced - versions: - - name: v1beta1 - schema: - openAPIV3Schema: - description: KokuMetricsConfig is the Schema for the kokumetricsconfig API - properties: - apiVersion: - description: 'APIVersion defines the versioned schema of this representation - of an object. Servers should convert recognized schemas to the latest - internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' - type: string - kind: - description: 'Kind is a string value representing the REST resource this - object represents. Servers may infer this from the endpoint the client - submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' - type: string - metadata: - type: object - spec: - description: KokuMetricsConfigSpec defines the desired state of KokuMetricsConfig. - properties: - api_url: - default: https://cloud.redhat.com - description: FOR DEVELOPMENT ONLY. APIURL is a field of KokuMetricsConfig - to represent the url of the API endpoint for service interaction. - The default is `https://cloud.redhat.com`. - type: string - authentication: - description: Authentication is a field of KokuMetricsConfig to represent - the authentication object. - properties: - secret_name: - description: AuthenticationSecretName is a field of KokuMetricsConfig - to represent the secret with the user and password used for - uploads. - type: string - type: - default: token - description: 'AuthType is a field of KokuMetricsConfig to represent - the authentication type to be used basic or token. Valid values - are: - "basic" : Enables authentication using user and password - from authentication secret. - "token" (default): Uses cluster - token for authentication.' - enum: - - token - - basic - type: string - required: - - type - type: object - clusterID: - description: ClusterID is a field of KokuMetricsConfig to represent - the cluster UUID. Normally this value should not be specified. Only - set this value if the clusterID cannot be obtained from the ClusterVersion. - type: string - clusterVersion: - description: ClusterVersion is a field of KokuMetricsConfig to represent - the cluster version. Normally this value should not be specified. - Only set this value if the clusterVersion cannot be obtained from - the ClusterVersion. - type: string - packaging: - description: Packaging is a field of KokuMetricsConfig to represent - the packaging object. - properties: - max_reports_to_store: - default: 30 - description: MaxReports is a field of KokuMetricsConfig to represent - the maximum number of reports to store. The default is 30 reports - which corresponds to approximately 7 days worth of data given - the other default values. - format: int64 - minimum: 1 - type: integer - max_size_MB: - default: 100 - description: MaxSize is a field of KokuMetricsConfig to represent - the max file size in megabytes that will be compressed for upload - to Ingress. The default is 100. - format: int64 - maximum: 100 - minimum: 1 - type: integer - required: - - max_reports_to_store - - max_size_MB - type: object - prometheus_config: - description: PrometheusConfig is a field of KokuMetricsConfig to represent - the configuration of Prometheus connection. - properties: - context_timeout: - default: 120 - description: ContextTimeout is a field of KokuMetricsConfig to - represent how long a query to prometheus should run in seconds - before timing out. The default is 120 seconds. - format: int64 - maximum: 180 - minimum: 10 - type: integer - service_address: - default: https://thanos-querier.openshift-monitoring.svc:9091 - description: FOR DEVELOPMENT ONLY. SvcAddress is a field of KokuMetricsConfig - to represent the thanos-querier address. The default is `https://thanos-querier.openshift-monitoring.svc:9091`. - type: string - skip_tls_verification: - default: false - description: FOR DEVELOPMENT ONLY. SkipTLSVerification is a field - of KokuMetricsConfig to represent if the thanos-querier endpoint - must be certificate validated. The default is false. - type: boolean - required: - - service_address - - skip_tls_verification - type: object - source: - description: Source is a field of KokuMetricsConfig to represent the - desired source on cloud.redhat.com. - properties: - check_cycle: - default: 1440 - description: CheckCycle is a field of KokuMetricsConfig to represent - the number of minutes between each source check schedule The - default is 1440 min (24 hours). - format: int64 - minimum: 0 - type: integer - create_source: - default: false - description: CreateSource is a field of KokuMetricsConfigSpec - to represent if the source should be created if not found. - type: boolean - name: - description: SourceName is a field of KokuMetricsConfigSpec to - represent the source name on cloud.redhat.com. - type: string - sources_path: - default: /api/sources/v1.0/ - description: FOR DEVELOPMENT ONLY. SourcesAPIPath is a field of - KokuMetricsConfig to represent the path of the Sources API service. - The default is `/api/sources/v1.0/`. - type: string - required: - - check_cycle - - create_source - - sources_path - type: object - upload: - description: Upload is a field of KokuMetricsConfig to represent the - upload object. - properties: - ingress_path: - default: /api/ingress/v1/upload - description: FOR DEVELOPMENT ONLY. IngressAPIPath is a field of - KokuMetricsConfig to represent the path of the Ingress API service. - The default is `/api/ingress/v1/upload`. - type: string - upload_cycle: - default: 360 - description: UploadCycle is a field of KokuMetricsConfig to represent - the number of minutes between each upload schedule. The default - is 360 min (6 hours). - format: int64 - minimum: 0 - type: integer - upload_toggle: - default: true - description: UploadToggle is a field of KokuMetricsConfig to represent - if the operator is installed in a restricted-network. If `false`, - the operator will not upload to cloud.redhat.com or check/create - sources. The default is true. - type: boolean - upload_wait: - description: UploadWait is a field of KokuMetricsConfig to represent - the time to wait before sending an upload. - format: int64 - minimum: 0 - type: integer - validate_cert: - default: true - description: ValidateCert is a field of KokuMetricsConfig to represent - if the Ingress endpoint must be certificate validated. - type: boolean - required: - - ingress_path - - upload_cycle - - upload_toggle - - validate_cert - type: object - volume_claim_template: - description: VolumeClaimTemplate is a field of KokuMetricsConfig to - represent a PVC template. - properties: - apiVersion: - description: 'APIVersion defines the versioned schema of this - representation of an object. Servers should convert recognized - schemas to the latest internal value, and may reject unrecognized - values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' - type: string - kind: - description: 'Kind is a string value representing the REST resource - this object represents. Servers may infer this from the endpoint - the client submits requests to. Cannot be updated. In CamelCase. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' - type: string - metadata: - description: EmbeddedMetadata contains metadata relevant to an - EmbeddedResource. - properties: - annotations: - additionalProperties: - type: string - description: 'Annotations is an unstructured key value map - stored with a resource that may be set by external tools - to store and retrieve arbitrary metadata. They are not queryable - and should be preserved when modifying objects. More info: - http://kubernetes.io/docs/user-guide/annotations' - type: object - labels: - additionalProperties: - type: string - description: 'Map of string keys and values that can be used - to organize and categorize (scope and select) objects. May - match selectors of replication controllers and services. - More info: http://kubernetes.io/docs/user-guide/labels' - type: object - name: - description: 'Name must be unique within a namespace. Is required - when creating resources, although some resources may allow - a client to request the generation of an appropriate name - automatically. Name is primarily intended for creation idempotence - and configuration definition. Cannot be updated. More info: - http://kubernetes.io/docs/user-guide/identifiers#names' - type: string - type: object - spec: - description: 'Spec defines the desired characteristics of a volume - requested by a pod author. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims' - properties: - accessModes: - description: 'AccessModes contains the desired access modes - the volume should have. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes-1' - items: - type: string - type: array - dataSource: - description: 'This field can be used to specify either: * - An existing VolumeSnapshot object (snapshot.storage.k8s.io/VolumeSnapshot) - * An existing PVC (PersistentVolumeClaim) * An existing - custom resource that implements data population (Alpha) - In order to use custom resource types that implement data - population, the AnyVolumeDataSource feature gate must be - enabled. If the provisioner or an external controller can - support the specified data source, it will create a new - volume based on the contents of the specified data source.' - properties: - apiGroup: - description: APIGroup is the group for the resource being - referenced. If APIGroup is not specified, the specified - Kind must be in the core API group. For any other third-party - types, APIGroup is required. - type: string - kind: - description: Kind is the type of resource being referenced - type: string - name: - description: Name is the name of resource being referenced - type: string - required: - - kind - - name - type: object - resources: - description: 'Resources represents the minimum resources the - volume should have. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources' - properties: - limits: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - description: 'Limits describes the maximum amount of compute - resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/' - type: object - requests: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - description: 'Requests describes the minimum amount of - compute resources required. If Requests is omitted for - a container, it defaults to Limits if that is explicitly - specified, otherwise to an implementation-defined value. - More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/' - type: object - type: object - selector: - description: A label query over volumes to consider for binding. - properties: - matchExpressions: - description: matchExpressions is a list of label selector - requirements. The requirements are ANDed. - items: - description: A label selector requirement is a selector - that contains values, a key, and an operator that - relates the key and values. - properties: - key: - description: key is the label key that the selector - applies to. - type: string - operator: - description: operator represents a key's relationship - to a set of values. Valid operators are In, NotIn, - Exists and DoesNotExist. - type: string - values: - description: values is an array of string values. - If the operator is In or NotIn, the values array - must be non-empty. If the operator is Exists or - DoesNotExist, the values array must be empty. - This array is replaced during a strategic merge - patch. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - description: matchLabels is a map of {key,value} pairs. - A single {key,value} in the matchLabels map is equivalent - to an element of matchExpressions, whose key field is - "key", the operator is "In", and the values array contains - only "value". The requirements are ANDed. - type: object - type: object - storageClassName: - description: 'Name of the StorageClass required by the claim. - More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#class-1' - type: string - volumeMode: - description: volumeMode defines what type of volume is required - by the claim. Value of Filesystem is implied when not included - in claim spec. - type: string - volumeName: - description: VolumeName is the binding reference to the PersistentVolume - backing this claim. - type: string - type: object - type: object - required: - - authentication - - packaging - - prometheus_config - - source - - upload - type: object - status: - description: KokuMetricsConfigStatus defines the observed state of KokuMetricsConfig. - properties: - api_url: - description: APIURL is a field of KokuMetricsConfig to represent the - url of the API endpoint for service interaction. - type: string - authentication: - description: Authentication is a field of KokuMetricsConfig to represent - the authentication status. - properties: - credentials_found: - description: AuthenticationCredentialsFound is a field of KokuMetricsConfig - to represent if used for uploads were found. - type: boolean - error: - description: AuthErrorMessage is a field of KokuMetricsConfig - to represent an `invalid credentials` error message. - type: string - last_credential_verification_time: - description: LastVerificationTime is a field of KokuMetricsConfig - to represent the last time credentials were verified. - format: date-time - nullable: true - type: string - secret_name: - description: AuthenticationSecretName is a field of KokuMetricsConfig - to represent the secret with the user and password used for - uploads. - type: string - type: - description: AuthType is a field of KokuMetricsConfig to represent - the authentication type to be used basic or token. - enum: - - token - - basic - type: string - valid_basic_auth: - description: ValidBasicAuth is a field of KokuMetricsConfig to - represent if the given basic auth credentials are valid. - type: boolean - type: object - clusterID: - description: ClusterID is a field of KokuMetricsConfig to represent - the cluster UUID. - type: string - clusterVersion: - description: ClusterVersion is a field of KokuMetricsConfig to represent - the cluster version. - type: string - operator_commit: - description: OperatorCommit is a field of KokuMetricsConfig that shows - the commit hash of the operator. - type: string - packaging: - description: Packaging is a field of KokuMetricsConfig to represent - the packaging status - properties: - error: - description: PackagingError is a field of KokuMetricsConfig to - represent the error encountered packaging the reports. - type: string - last_successful_packaging_time: - description: LastSuccessfulPackagingTime is a field of KokuMetricsConfig - that shows the time of the last successful file packaging. - format: date-time - nullable: true - type: string - max_reports_to_store: - description: MaxReports is a field of KokuMetricsConfig to represent - the maximum number of reports to store. - format: int64 - type: integer - max_size_MB: - description: MaxSize is a field of KokuMetricsConfig to represent - the max file size in megabytes that will be compressed for upload - to Ingress. - format: int64 - type: integer - number_reports_stored: - description: ReportCount is a field of KokuMetricsConfig to represent - the number of reports in storage. - format: int64 - type: integer - packaged_files: - description: PackagedFiles is a field of KokuMetricsConfig to - represent the list of file packages in storage. - items: - type: string - type: array - type: object - persistent_volume_claim: - description: PersistentVolumeClaim is a field of KokuMetricsConfig - to represent a PVC. - properties: - apiVersion: - description: 'APIVersion defines the versioned schema of this - representation of an object. Servers should convert recognized - schemas to the latest internal value, and may reject unrecognized - values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' - type: string - kind: - description: 'Kind is a string value representing the REST resource - this object represents. Servers may infer this from the endpoint - the client submits requests to. Cannot be updated. In CamelCase. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' - type: string - metadata: - description: EmbeddedMetadata contains metadata relevant to an - EmbeddedResource. - properties: - annotations: - additionalProperties: - type: string - description: 'Annotations is an unstructured key value map - stored with a resource that may be set by external tools - to store and retrieve arbitrary metadata. They are not queryable - and should be preserved when modifying objects. More info: - http://kubernetes.io/docs/user-guide/annotations' - type: object - labels: - additionalProperties: - type: string - description: 'Map of string keys and values that can be used - to organize and categorize (scope and select) objects. May - match selectors of replication controllers and services. - More info: http://kubernetes.io/docs/user-guide/labels' - type: object - name: - description: 'Name must be unique within a namespace. Is required - when creating resources, although some resources may allow - a client to request the generation of an appropriate name - automatically. Name is primarily intended for creation idempotence - and configuration definition. Cannot be updated. More info: - http://kubernetes.io/docs/user-guide/identifiers#names' - type: string - type: object - spec: - description: 'Spec defines the desired characteristics of a volume - requested by a pod author. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims' - properties: - accessModes: - description: 'AccessModes contains the desired access modes - the volume should have. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes-1' - items: - type: string - type: array - dataSource: - description: 'This field can be used to specify either: * - An existing VolumeSnapshot object (snapshot.storage.k8s.io/VolumeSnapshot) - * An existing PVC (PersistentVolumeClaim) * An existing - custom resource that implements data population (Alpha) - In order to use custom resource types that implement data - population, the AnyVolumeDataSource feature gate must be - enabled. If the provisioner or an external controller can - support the specified data source, it will create a new - volume based on the contents of the specified data source.' - properties: - apiGroup: - description: APIGroup is the group for the resource being - referenced. If APIGroup is not specified, the specified - Kind must be in the core API group. For any other third-party - types, APIGroup is required. - type: string - kind: - description: Kind is the type of resource being referenced - type: string - name: - description: Name is the name of resource being referenced - type: string - required: - - kind - - name - type: object - resources: - description: 'Resources represents the minimum resources the - volume should have. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources' - properties: - limits: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - description: 'Limits describes the maximum amount of compute - resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/' - type: object - requests: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - description: 'Requests describes the minimum amount of - compute resources required. If Requests is omitted for - a container, it defaults to Limits if that is explicitly - specified, otherwise to an implementation-defined value. - More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/' - type: object - type: object - selector: - description: A label query over volumes to consider for binding. - properties: - matchExpressions: - description: matchExpressions is a list of label selector - requirements. The requirements are ANDed. - items: - description: A label selector requirement is a selector - that contains values, a key, and an operator that - relates the key and values. - properties: - key: - description: key is the label key that the selector - applies to. - type: string - operator: - description: operator represents a key's relationship - to a set of values. Valid operators are In, NotIn, - Exists and DoesNotExist. - type: string - values: - description: values is an array of string values. - If the operator is In or NotIn, the values array - must be non-empty. If the operator is Exists or - DoesNotExist, the values array must be empty. - This array is replaced during a strategic merge - patch. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - description: matchLabels is a map of {key,value} pairs. - A single {key,value} in the matchLabels map is equivalent - to an element of matchExpressions, whose key field is - "key", the operator is "In", and the values array contains - only "value". The requirements are ANDed. - type: object - type: object - storageClassName: - description: 'Name of the StorageClass required by the claim. - More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#class-1' - type: string - volumeMode: - description: volumeMode defines what type of volume is required - by the claim. Value of Filesystem is implied when not included - in claim spec. - type: string - volumeName: - description: VolumeName is the binding reference to the PersistentVolume - backing this claim. - type: string - type: object - type: object - prometheus: - description: Prometheus represents the status of premetheus queries. - properties: - configuration_error: - description: ConfigError is a field of KokuMetricsConfigStatus - to represent errors during prometheus configuration. - type: string - context_timeout: - description: ContextTimeout is a field of KokuMetricsConfigState - to represent how long a query to prometheus should run in seconds - before timing out. - format: int64 - type: integer - last_query_start_time: - description: LastQueryStartTime is a field of KokuMetricsConfigStatus - to represent the last time queries were started. - format: date-time - nullable: true - type: string - last_query_success_time: - description: LastQuerySuccessTime is a field of KokuMetricsConfigStatus - to represent the last time queries were successful. - format: date-time - nullable: true - type: string - prometheus_configured: - description: PrometheusConfigured is a field of KokuMetricsConfigStatus - to represent if the operator is configured to connect to prometheus. - type: boolean - prometheus_connected: - description: PrometheusConnected is a field of KokuMetricsConfigStatus - to represent if prometheus can be queried. - type: boolean - prometheus_connection_error: - description: ConnectionError is a field of KokuMetricsConfigStatus - to represent errors during prometheus test query. - type: string - service_address: - description: SvcAddress is the internal thanos-querier address. - type: string - skip_tls_verification: - description: SkipTLSVerification is a field of KokuMetricsConfigStatus - to represent if the thanos-querier endpoint must be certificate - validated. - type: boolean - required: - - prometheus_configured - - prometheus_connected - type: object - reports: - description: Reports represents the status of report generation. - properties: - data_collected: - description: DataCollected is a field of KokuMetricsConfigStatus - to represent whether or not data was collected for the last - query. - type: boolean - data_collection_message: - description: DataCollectionMessage is a field of KokuMetricsConfigStatus - to represent a message associated with the data_collected status. - type: string - last_hour_queried: - description: LastHourQueried is a field of KokuMetricsConfigStatus - to represent the time range for which metrics were last queried. - type: string - report_month: - description: ReportMonth is a field of KokuMetricsConfigStatus - to represent the month for which reports are being generated. - type: string - type: object - source: - description: Source is a field of KokuMetricsConfig to represent the - observed state of the source on cloud.redhat.com. - properties: - check_cycle: - description: CheckCycle is a field of KokuMetricsConfig to represent - the number of minutes between each source check schedule. The - default is 1440 min (24 hours). - format: int64 - type: integer - create_source: - description: CreateSource is a field of KokuMetricsConfigStatus - to represent if the source should be created if not found. A - source will not be created if upload_toggle is `false`. - type: boolean - error: - description: SourceError is a field of KokuMetricsConfigStatus - to represent the error encountered creating the source. - type: string - last_check_time: - description: LastSourceCheckTime is a field of KokuMetricsConfig - that shows the time that the last check was attempted. - format: date-time - nullable: true - type: string - name: - description: SourceName is a field of KokuMetricsConfigStatus - to represent the source name on cloud.redhat.com. - type: string - source_defined: - description: SourceDefined is a field of KokuMetricsConfigStatus - to represent if the source exists as defined on cloud.redhat.com. - type: boolean - sources_path: - description: SourcesAPIPath is a field of KokuMetricsConfig to - represent the path of the Sources API service. - type: string - type: object - storage: - description: Storage is a field - properties: - volume_mounted: - description: VolumeMounted is a bool to indicate if storage volume - was mounted. - type: boolean - volume_type: - description: VolumeType is the string representation of the volume - type. - type: string - type: object - upload: - description: Upload is a field of KokuMetricsConfig to represent the - upload object. - properties: - error: - description: UploadError is a field of KokuMetricsConfigStatus - to represent the error encountered uploading reports. - type: string - ingress_path: - description: IngressAPIPath is a field of KokuMetricsConfig to - represent the path of the Ingress API service. - type: string - last_payload_files: - description: LastPayloadFiles is a field of KokuMetricsConfig - to represent the list of files in the last payload that was - sent. - items: - type: string - type: array - last_payload_manifest_id: - description: LastPayloadManifest is a field of KokuMetricsConfig - that shows the manifestID of the last payload. - type: string - last_payload_name: - description: LastPayloadName is a field of KokuMetricsConfig that - shows the name of the last payload file. - type: string - last_payload_request_id: - description: LastPayloadRequestID is a field of KokuMetricsConfig - that shows the insights request id of the last payload. - type: string - last_successful_upload_time: - description: LastSuccessfulUploadTime is a field of KokuMetricsConfig - that shows the time of the last successful upload. - format: date-time - nullable: true - type: string - last_upload_status: - description: LastUploadStatus is a field of KokuMetricsConfig - that shows the http status of the last upload. - type: string - upload: - description: UploadToggle is a field of KokuMetricsConfig to represent - if the operator should upload to cloud.redhat.com. The default - is true - type: boolean - upload_cycle: - description: UploadCycle is a field of KokuMetricsConfig to represent - the number of minutes between each upload schedule. The default - is 360 min (6 hours). - format: int64 - type: integer - upload_wait: - description: UploadWait is a field of KokuMetricsConfig to represent - the time to wait before sending an upload. - format: int64 - type: integer - validate_cert: - description: ValidateCert is a field of KokuMetricsConfig to represent - if the Ingress endpoint must be certificate validated. - type: boolean - type: object - type: object - required: - - spec - type: object - served: true - storage: true - subresources: - status: {} -status: - acceptedNames: - kind: "" - plural: "" - conditions: [] - storedVersions: [] diff --git a/koku-metrics-operator/1.1.6/manifests/koku-metrics-operator.clusterserviceversion.yaml b/koku-metrics-operator/1.1.6/manifests/koku-metrics-operator.clusterserviceversion.yaml deleted file mode 100644 index efd1184e1..000000000 --- a/koku-metrics-operator/1.1.6/manifests/koku-metrics-operator.clusterserviceversion.yaml +++ /dev/null @@ -1,491 +0,0 @@ -apiVersion: operators.coreos.com/v1alpha1 -kind: ClusterServiceVersion -metadata: - annotations: - alm-examples: |- - [ - { - "apiVersion": "koku-metrics-cfg.openshift.io/v1beta1", - "kind": "KokuMetricsConfig", - "metadata": { - "name": "kokumetricscfg-sample-v1beta1" - }, - "spec": { - "authentication": { - "type": "token" - }, - "packaging": { - "max_reports_to_store": 30, - "max_size_MB": 100 - }, - "prometheus_config": {}, - "source": { - "check_cycle": 1440, - "create_source": false, - "name": "INSERT-SOURCE-NAME" - }, - "upload": { - "upload_cycle": 360, - "upload_toggle": true - } - } - } - ] - capabilities: Seamless Upgrades - categories: Monitoring - certified: "false" - containerImage: quay.io/project-koku/koku-metrics-operator@sha256:812b3be055f76913e0e00ef3bccb3c866bbc93e49fa439556d6298f83492fc6f - createdAt: "2022-06-28T15:17:37Z" - description: A Golang-based OpenShift Operator that generates and uploads OpenShift - usage metrics to cost management. - operatorframework.io/suggested-namespace: koku-metrics-operator - operators.openshift.io/infrastructure-features: '["Disconnected"]' - operators.operatorframework.io/builder: operator-sdk-v1.10.0+git - operators.operatorframework.io/project_layout: go.kubebuilder.io/v2 - repository: https://github.com/project-koku/koku-metrics-operator - support: Cost Management - name: koku-metrics-operator.v1.1.6 - namespace: placeholder -spec: - apiservicedefinitions: {} - customresourcedefinitions: - owned: - - description: KokuMetricsConfig is the Schema for the kokumetricsconfig API - displayName: Koku Metrics Config - kind: KokuMetricsConfig - name: kokumetricsconfigs.koku-metrics-cfg.openshift.io - version: v1beta1 - description: |- - # Koku Metrics Operator - ## Introduction - The `koku-metrics-operator` is a component of the [cost managment](https://access.redhat.com/documentation/en-us/cost_management_service) service for Openshift, used to gather the required information from the cluster. It is recommended to be installed in OpenShift 4.5+. This operator obtains OpenShift usage data by querying Prometheus and uploads it to cost management to be processed. The Operator queries Prometheus every hour to create metric reports, which are then packaged and uploaded to cost management at [console.redhat.com](https://console.redhat.com). For more information, reach out to . - - This operator is capable of functioning within a disconnected/restricted network (aka air-gapped mode). In this mode, the operator will store the packaged reports for manual retrieval instead of being uploaded to cost management. Documentation for installing an operator within a restricted network can be found [here](https://docs.openshift.com/container-platform/latest/operators/admin/olm-restricted-networks.html). - - ## Features and Capabilities - #### Metrics collection: - The Koku Metrics Operator (`koku-metrics-operator`) collects the metrics required for cost management by: - * Querying Prometheus to gather the necessary metrics for cost management. - * Writing Prometheus queries to CSV report files. - * Packaging the CSV report files into tarballs. - - #### Additional Capabilities: - * The operator can be configured to automatically upload the packaged reports to cost management through Red Hat Insights Ingress service. - * The operator can create a source in console.redhat.com. A source is required for cost management to process the uploaded packages. - * PersistentVolumeClaim (PVC) configuration: The KokuMetricsConfig CR can accept a PVC definition and the operator will create and mount the PVC. If one is not provided, a default PVC will be created. - * Restricted network installation: this operator can function on a restricted network. In this mode, the operator stores the packaged reports for manual retrieval. - - ## Limitations and Pre-Requisites - #### Limitations (Potential for metrics data loss) - * A source **must** exist in console.redhat.com for an uploaded payload to be processed by cost management. The operator sends the payload to the Red Hat Insights Ingress service which usually returns successfully, but the operator does not currently confirm with cost management that the payload was processed. After Ingress accepts the uploaded payload, the payload is removed from the operator and is gone forever. If the data within the payload is not processed, a gap will be introduced in the usage metrics. - - **Note** The following limitations are specific to operators configured to run in a restricted network: - * The `koku-metrics-operator` will not be able to generate new reports if the PVC storage is filled. If this occurs, the reports must be manually deleted from the PVC so that the operator can function as normal. - * The default report retention is 30 reports (about one week's worth of data). The reports must be manually downloaded and uploaded to console.redhat.com every week, or they will be deleted and the data will be lost. - - #### Storage configuration prerequisite - The operator will attempt to create and use the following PVC when installed: - - volume_claim_template: - apiVersion: v1 - kind: PersistentVolumeClaim - metadata: - name: koku-metrics-operator-data - spec: - accessModes: - - ReadWriteOnce - resources: - requests: - storage: 10Gi - - If a different PVC should be utilized, a valid PVC should be specified in the KokuMetricsConfig CR as described in the appropriate section below. The PVC to be used may exist already, or the operator will attempt to create it. - - To use the default specification, the follow assumptions must be met: - 1. A default StorageClass is defined. - 2. Dynamic provisioning for that default StorageClass is enabled. - - If these assumptions are not met, the operator will not deploy correctly. In these cases, storage must be manually configured. After configuring storage, a valid PVC template should be supplied in the `volume_claim_template` spec of the KokuMetricsConfig CR. - - ## Configure the koku-metrics-operator - **Note** There are separate instructions for configuring the `koku-metrics-operator` to run in a restricted network. - ##### Configure authentication - The default authentication for the operator is `token`. No further steps are required to configure token authentication. If `basic` is the preferred authentication method, a Secret must be created which holds username and password credentials: - 1. On the left navigation pane, select `Workloads` -> `Secrets` -> select Project: `koku-metrics-operator` -> `Create` -> `Key/Value Secret` - 2. Give the Secret a name and add 2 keys: `username` and `password` (all lowercase). The values for these keys correspond to console.redhat.com credentials. - 3. Select `Create`. - ##### Create the KokuMetricsConfig - Configure the koku-metrics-operator by creating a `KokuMetricsConfig`. - 1. On the left navigation pane, select `Operators` -> `Installed Operators` -> `koku-metrics-operator` -> `KokuMetricsConfig` -> `Create Instance`. - 2. For `basic` authentication, edit the following values in the spec: - * Replace `authentication: type:` with `basic`. - * Add the `secret_name` field under `authentication`, and set it equal to the name of the authentication Secret that was created above. The spec should look similar to the following: - - ``` - authentication: - secret_name: SECRET-NAME - type: basic - ``` - - 3. To configure the koku-metrics-operator to create a cost management source, edit the following values in the `source` field: - * Replace `INSERT-SOURCE-NAME` with the preferred name of the source to be created. - * Replace the `create_source` field value with `true`. - - **Note:** if the source already exists, replace `INSERT-SOURCE-NAME` with the existing name, and leave `create_source` as false. This will allow the operator to confirm the source exists. - 4. If not specified, the operator will create a default PersistentVolumeClaim called `koku-metrics-operator-data` with 10Gi of storage. To configure the koku-metrics-operator to use or create a different PVC, edit the following in the spec: - * Add the desired configuration to the `volume_claim_template` field in the spec: - - ``` - volume_claim_template: - apiVersion: v1 - kind: PersistentVolumeClaim - metadata: - name: - spec: - accessModes: - - ReadWriteOnce - resources: - requests: - storage: 10Gi - ``` - - **Note:** If using the YAML View, the `volume_claim_template` field must be added to the spec - 5. Select `Create`. - - # Restricted Network Usage (disconnected/air-gapped mode) - ## Installation - To install the `koku-metrics-operator` in a restricted network, follow the [olm documentation](https://docs.openshift.com/container-platform/latest/operators/admin/olm-restricted-networks.html). The operator is found in the `community-operators` Catalog in the `registry.redhat.io/redhat/community-operator-index:latest` Index. If pruning the index before pushing to the mirrored registry, keep the `koku-metrics-operator` package. - - Within a restricted network, the operator queries prometheus to gather the necessary usage metrics, writes the query results to CSV files, and packages the reports for storage in the PVC. These reports then need to be manually downloaded from the cluster and uploaded to [console.redhat.com](https://console.redhat.com). - - ## Configure the koku-metrics-operator for a restricted network - ##### Create the KokuMetricsConfig - Configure the koku-metrics-operator by creating a `KokuMetricsConfig`. - 1. On the left navigation pane, select `Operators` -> `Installed Operators` -> `koku-metrics-operator` -> `KokuMetricsConfig` -> `Create Instance`. - 2. Specify the desired storage. If not specified, the operator will create a default Persistent Volume Claim called `koku-metrics-operator-data` with 10Gi of storage. To configure the koku-metrics-operator to use or create a different PVC, edit the following in the spec: - * Add the desired configuration to the `volume_claim_template` field in the spec: - - ``` - volume_claim_template: - apiVersion: v1 - kind: PersistentVolumeClaim - metadata: - name: - spec: - storageClassName: - accessModes: - - ReadWriteOnce - resources: - requests: - storage: 10Gi - ``` - - **Note:** If using the YAML View, the `volume_claim_template` field must be added to the spec - 3. (Optional) Specify the desired report retention. The operator will retain 30 reports by default. This corresponds to approximately one week's worth of data if using the default packaging cycle. To modify the number of retained reports: - * Change the `packaging` spec field `max_reports_to_store` to the desired number of reports to retain. Once this max number is reached, the operator will start removing the oldest packages remaining on the PVC: - - ``` - packaging: - max_size_MB: 100 - max_reports_to_store: 30 - ``` - - **Note:** The number of retained reports directly affects the frequency that reports must be manually downloaded from the PVC. Take caution in setting this to a higher number of reports, as the operator cannot write data to the PVC if the storage is full. - 4. To configure the operator to perform in a restricted network, set the `upload_toggle` to `false`: - - ``` - upload: - upload_cycle: 360, - upload_toggle: false - ``` - - 5. Select `Create`. - - ## Download reports from the Operator & clean up the PVC - If the `koku-metrics-operator` is configured to run in a restricted network, the metric reports will not automatically upload to cost managment. Instead, they need to be manually copied from the PVC for upload to [console.redhat.com](https://console.redhat.com). The default configuration saves one week of reports which means the process of downloading and uploading reports should be repeated weekly to prevent loss of metrics data. To download the reports, complete the following steps: - 1. Create the following Pod, ensuring the `claimName` matches the PVC containing the report data: - - ``` - kind: Pod - apiVersion: v1 - metadata: - name: volume-shell - namespace: koku-metrics-operator - labels: - app: koku-metrics-operator - spec: - affinity: - podAffinity: - requiredDuringSchedulingIgnoredDuringExecution: - - labelSelector: - matchExpressions: - - key: app - operator: In - values: - - koku-metrics-operator - topologyKey: kubernetes.io/hostname - volumes: - - name: koku-metrics-operator-reports - persistentVolumeClaim: - claimName: koku-metrics-operator-data - containers: - - name: volume-shell - image: busybox - command: ['sleep', 'infinity'] - volumeMounts: - - name: koku-metrics-operator-reports - mountPath: /tmp/koku-metrics-operator-reports - ``` - - 2. Use rsync to copy all of the files ready for upload from the PVC to a local folder: - - ``` - $ oc rsync volume-shell:/tmp/koku-metrics-operator-reports/upload local/path/to/save/folder - ``` - - 3. Once confirming that the files have been successfully copied, use rsh to connect to the pod and delete the contents of the upload folder so that they are no longer in storage: - - ``` - $ oc rsh volume-shell - $ rm /tmp/koku-metrics-operator-reports/upload/* - ``` - - 4. (Optional) Delete the pod that was used to connect to the PVC: - - ``` - $ oc delete -f volume-shell.yaml - ``` - - ## Create a source - In a restricted network, the `koku-metrics-operator` cannot automatically create a source. This process must be done manually. In the console.redhat.com platform, open the [Sources menu](https://console.redhat.com/settings/sources/) to begin adding an OpenShift source to cost management: - - Prerequisites: - * The cluster identifier which can be found in the KokuMetricsConfig CR, the cluster Overview page, or the cluster Help > About. - - Create source: - 1. Navigate to the Sources menu - 2. Select the `Red Hat sources` tab - 3. Create a new `Red Hat Openshift Container Platform` source: - * give the source a unique name - * add the Cost Management application - * add the cluster identifier - 4. In the Sources wizard, review the details and click `Finish` to create the Source. - - ## Upload the reports to cost managment - Uploading reports to cost managment is done through curl: - - $ curl -vvvv -F "file=@FILE_NAME.tar.gz;type=application/vnd.redhat.hccm.tar+tgz" https://cloud.redhat.com/api/ingress/v1/upload -u USERNAME:PASS - - where `USERNAME` and `PASS` correspond to the user credentials for [console.redhat.com](https://console.redhat.com), and `FILE_NAME` is the name of the report to upload. - - displayName: Koku Metrics Operator - icon: - - base64data: PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4KPCEtLSBHZW5lcmF0b3I6IEFkb2JlIElsbHVzdHJhdG9yIDIyLjEuMCwgU1ZHIEV4cG9ydCBQbHVnLUluIC4gU1ZHIFZlcnNpb246IDYuMDAgQnVpbGQgMCkgIC0tPgo8c3ZnIHZlcnNpb249IjEuMSIgaWQ9IkxheWVyXzEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4IgoJIHZpZXdCb3g9IjAgMCAzMDAgMzAwIiBzdHlsZT0iZW5hYmxlLWJhY2tncm91bmQ6bmV3IDAgMCAzMDAgMzAwOyIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSI+CjxzdHlsZSB0eXBlPSJ0ZXh0L2NzcyI+Cgkuc3Qwe2ZpbGw6I0VFMDAwMDt9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ExCgkJCWMzLjY2NzY5NDEsMCw2Ljk1NzU2NTMsMS4xNDcyOTMxLDkuODYwMzgyMSwzLjQzNzMwMTZjMC40NTYxNzY4LDAuMzgyNDQ2MywwLjcyMzQxOTIsMC44NDMyMDA3LDAuODAxNzQyNiwxLjM3NzY4NTUKCQkJYzAuMDczNzE1MiwwLjUzNDUwMDEtMC4xMTUyMDM5LDAuOTkwNjQ2NC0wLjU3MTM1MDEsMS4zNzMwNzc0bC0zLjg5ODA4NjUsNC4wMTMyNzUxCgkJCWMtMC4zMDg3MTU4LDAuMjMwMzkyNS0wLjY2ODEwNjEsMC4zODI0MzEtMS4wOTIwMTA1LDAuNDU2MTYxNWMtMC40MTkyOTYzLDAuMDc4MzIzNC0wLjgyMDE1OTksMC0xLjIwMjU5MDktMC4yMjU3NjkKCQkJYy0xLjE0MjcxNTUtMC44NDMyMDA3LTIuNDQyMDc3Ni0xLjI2MjQ5NjktMy44OTgwODY1LTEuMjYyNDk2OWgtNy42NzYzNjExYy0wLjkxNjkxNTksMC0xLjcwMDIyNTgsMC4zMjI1MjUtMi4zNDk4OTkzLDAuOTcyMjEzNwoJCQljLTAuNjQ5Njg4NywwLjY0OTY3MzUtMC45NzY4MjE5LDEuNDc0NDQxNS0wLjk3NjgyMTksMi40NjUwODc5YzAsMC42ODY1NTQsMC4yMzAzOTI1LDEuMzM2MjEyMiwwLjY5MTE0NjksMS45NDkwMzU2CgkJCWMwLjQ1NjE2MTUsMC42MTI4MjM1LDEuMDMyMTE5OCwxLjAzMjExOTgsMS43MTg2NTg0LDEuMjYyNDk2OUwxNzQuMjgwNjM5NiwxODUuODczNjExNXoiLz4KCTwvZz4KPC9nPgo8L3N2Zz4K - mediatype: image/svg+xml - install: - spec: - clusterPermissions: - - rules: - - apiGroups: - - config.openshift.io - resources: - - clusterversions - verbs: - - get - - list - - watch - - apiGroups: - - "" - resources: - - namespaces - verbs: - - get - - list - - watch - - apiGroups: - - "" - resources: - - secrets - verbs: - - get - serviceAccountName: koku-metrics-controller-manager - deployments: - - name: koku-metrics-operator - spec: - replicas: 1 - selector: - matchLabels: - app: koku-metrics-operator - control-plane: controller-manager - strategy: {} - template: - metadata: - labels: - app: koku-metrics-operator - control-plane: controller-manager - spec: - affinity: - podAffinity: - requiredDuringSchedulingIgnoredDuringExecution: - - labelSelector: - matchExpressions: - - key: app - operator: In - values: - - koku-metrics-operator - topologyKey: kubernetes.io/hostname - containers: - - args: - - --enable-leader-election - command: - - /manager - env: - - name: IN_CLUSTER - value: "true" - - name: WATCH_NAMESPACE - valueFrom: - fieldRef: - fieldPath: metadata.annotations['olm.targetNamespaces'] - image: quay.io/project-koku/koku-metrics-operator@sha256:812b3be055f76913e0e00ef3bccb3c866bbc93e49fa439556d6298f83492fc6f - name: manager - resources: - limits: - cpu: 500m - memory: 500Mi - requests: - cpu: 100m - memory: 20Mi - terminationMessagePolicy: FallbackToLogsOnError - volumeMounts: - - mountPath: /tmp/koku-metrics-operator-reports - name: koku-metrics-operator-reports - serviceAccountName: koku-metrics-controller-manager - terminationGracePeriodSeconds: 10 - volumes: - - name: koku-metrics-operator-reports - permissions: - - rules: - - apiGroups: - - "" - resources: - - configmaps - verbs: - - get - - list - - watch - - create - - update - - patch - - delete - - apiGroups: - - "" - resources: - - configmaps/status - verbs: - - get - - update - - patch - - apiGroups: - - "" - resources: - - events - verbs: - - create - - patch - - apiGroups: - - coordination.k8s.io - resources: - - leases - verbs: - - get - - list - - watch - - create - - update - - patch - - delete - - apiGroups: - - apps - resources: - - deployments - verbs: - - get - - list - - patch - - watch - - apiGroups: - - "" - resources: - - configmaps - - endpoints - - events - - persistentvolumeclaims - - pods - - secrets - - serviceaccounts - - services - - services/finalizers - verbs: - - create - - delete - - get - - list - - patch - - update - - watch - - apiGroups: - - koku-metrics-cfg.openshift.io - resources: - - kokumetricsconfigs - verbs: - - create - - delete - - get - - list - - patch - - update - - watch - - apiGroups: - - koku-metrics-cfg.openshift.io - resources: - - kokumetricsconfigs/status - verbs: - - get - - patch - - update - - apiGroups: - - operators.coreos.com - resources: - - clusterserviceversions - verbs: - - get - - list - - patch - - update - - watch - serviceAccountName: koku-metrics-controller-manager - strategy: deployment - installModes: - - supported: true - type: OwnNamespace - - supported: true - type: SingleNamespace - - supported: false - type: MultiNamespace - - supported: false - type: AllNamespaces - relatedImages: - - name: koku-metrics-operator - image: quay.io/project-koku/koku-metrics-operator@sha256:812b3be055f76913e0e00ef3bccb3c866bbc93e49fa439556d6298f83492fc6f - keywords: - - cost - - management - - usage - - monitor - maintainers: - - email: costmanagement@redhat.com - name: costmanagement - maturity: alpha - provider: - name: Red Hat - replaces: koku-metrics-operator.v1.1.5 - version: 1.1.6 diff --git a/koku-metrics-operator/1.1.6/metadata/annotations.yaml b/koku-metrics-operator/1.1.6/metadata/annotations.yaml deleted file mode 100644 index 5e2f30385..000000000 --- a/koku-metrics-operator/1.1.6/metadata/annotations.yaml +++ /dev/null @@ -1,15 +0,0 @@ -annotations: - # Core bundle annotations. - operators.operatorframework.io.bundle.mediatype.v1: registry+v1 - operators.operatorframework.io.bundle.manifests.v1: manifests/ - operators.operatorframework.io.bundle.metadata.v1: metadata/ - operators.operatorframework.io.bundle.package.v1: koku-metrics-operator - operators.operatorframework.io.bundle.channels.v1: alpha,beta - operators.operatorframework.io.bundle.channel.default.v1: beta - operators.operatorframework.io.metrics.builder: operator-sdk-v1.10.0+git - operators.operatorframework.io.metrics.mediatype.v1: metrics+v1 - operators.operatorframework.io.metrics.project_layout: go.kubebuilder.io/v2 - - # Annotations for testing. - operators.operatorframework.io.test.mediatype.v1: scorecard+v1 - operators.operatorframework.io.test.config.v1: tests/scorecard/ diff --git a/koku-metrics-operator/1.1.6/tests/scorecard/config.yaml b/koku-metrics-operator/1.1.6/tests/scorecard/config.yaml deleted file mode 100644 index e2d83b262..000000000 --- a/koku-metrics-operator/1.1.6/tests/scorecard/config.yaml +++ /dev/null @@ -1,28 +0,0 @@ -apiVersion: scorecard.operatorframework.io/v1alpha3 -kind: Configuration -metadata: - name: config -stages: -- parallel: true - tests: - - entrypoint: - - scorecard-test - - basic-check-spec - image: quay.io/operator-framework/scorecard-test:v1.10.1 - labels: - suite: basic - test: basic-check-spec-test - - entrypoint: - - scorecard-test - - olm-bundle-validation - image: quay.io/operator-framework/scorecard-test:v1.10.1 - labels: - suite: olm - test: olm-bundle-validation-test - - entrypoint: - - scorecard-test - - olm-crds-have-validation - image: quay.io/operator-framework/scorecard-test:v1.10.1 - labels: - suite: olm - test: olm-crds-have-validation-test diff --git a/koku-metrics-operator/1.1.7/Dockerfile b/koku-metrics-operator/1.1.7/Dockerfile deleted file mode 100644 index 7147fd722..000000000 --- a/koku-metrics-operator/1.1.7/Dockerfile +++ /dev/null @@ -1,21 +0,0 @@ -FROM scratch - -# Core bundle labels. -LABEL operators.operatorframework.io.bundle.mediatype.v1=registry+v1 -LABEL operators.operatorframework.io.bundle.manifests.v1=manifests/ -LABEL operators.operatorframework.io.bundle.metadata.v1=metadata/ -LABEL operators.operatorframework.io.bundle.package.v1=koku-metrics-operator -LABEL operators.operatorframework.io.bundle.channels.v1=alpha,beta -LABEL operators.operatorframework.io.bundle.channel.default.v1=beta -LABEL operators.operatorframework.io.metrics.builder=operator-sdk-v1.10.0+git -LABEL operators.operatorframework.io.metrics.mediatype.v1=metrics+v1 -LABEL operators.operatorframework.io.metrics.project_layout=go.kubebuilder.io/v2 - -# Labels for testing. -LABEL operators.operatorframework.io.test.mediatype.v1=scorecard+v1 -LABEL operators.operatorframework.io.test.config.v1=tests/scorecard/ - -# Copy files to locations specified by labels. -COPY manifests /manifests/ -COPY metadata /metadata/ -COPY tests/scorecard /tests/scorecard/ diff --git a/koku-metrics-operator/1.1.7/manifests/koku-metrics-cfg.openshift.io_kokumetricsconfigs.yaml b/koku-metrics-operator/1.1.7/manifests/koku-metrics-cfg.openshift.io_kokumetricsconfigs.yaml deleted file mode 100644 index 651ae1bba..000000000 --- a/koku-metrics-operator/1.1.7/manifests/koku-metrics-cfg.openshift.io_kokumetricsconfigs.yaml +++ /dev/null @@ -1,842 +0,0 @@ -apiVersion: apiextensions.k8s.io/v1 -kind: CustomResourceDefinition -metadata: - annotations: - controller-gen.kubebuilder.io/version: v0.3.0 - creationTimestamp: null - labels: - app: koku-metrics-operator - name: kokumetricsconfigs.koku-metrics-cfg.openshift.io -spec: - group: koku-metrics-cfg.openshift.io - names: - kind: KokuMetricsConfig - listKind: KokuMetricsConfigList - plural: kokumetricsconfigs - singular: kokumetricsconfig - scope: Namespaced - versions: - - name: v1beta1 - schema: - openAPIV3Schema: - description: KokuMetricsConfig is the Schema for the kokumetricsconfig API - properties: - apiVersion: - description: 'APIVersion defines the versioned schema of this representation - of an object. Servers should convert recognized schemas to the latest - internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' - type: string - kind: - description: 'Kind is a string value representing the REST resource this - object represents. Servers may infer this from the endpoint the client - submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' - type: string - metadata: - type: object - spec: - description: KokuMetricsConfigSpec defines the desired state of KokuMetricsConfig. - properties: - api_url: - default: https://cloud.redhat.com - description: FOR DEVELOPMENT ONLY. APIURL is a field of KokuMetricsConfig - to represent the url of the API endpoint for service interaction. - The default is `https://cloud.redhat.com`. - type: string - authentication: - description: Authentication is a field of KokuMetricsConfig to represent - the authentication object. - properties: - secret_name: - description: AuthenticationSecretName is a field of KokuMetricsConfig - to represent the secret with the user and password used for - uploads. - type: string - type: - default: token - description: 'AuthType is a field of KokuMetricsConfig to represent - the authentication type to be used basic or token. Valid values - are: - "basic" : Enables authentication using user and password - from authentication secret. - "token" (default): Uses cluster - token for authentication.' - enum: - - token - - basic - type: string - required: - - type - type: object - clusterID: - description: ClusterID is a field of KokuMetricsConfig to represent - the cluster UUID. Normally this value should not be specified. Only - set this value if the clusterID cannot be obtained from the ClusterVersion. - type: string - clusterVersion: - description: ClusterVersion is a field of KokuMetricsConfig to represent - the cluster version. Normally this value should not be specified. - Only set this value if the clusterVersion cannot be obtained from - the ClusterVersion. - type: string - packaging: - description: Packaging is a field of KokuMetricsConfig to represent - the packaging object. - properties: - max_reports_to_store: - default: 30 - description: MaxReports is a field of KokuMetricsConfig to represent - the maximum number of reports to store. The default is 30 reports - which corresponds to approximately 7 days worth of data given - the other default values. - format: int64 - minimum: 1 - type: integer - max_size_MB: - default: 100 - description: MaxSize is a field of KokuMetricsConfig to represent - the max file size in megabytes that will be compressed for upload - to Ingress. The default is 100. - format: int64 - maximum: 100 - minimum: 1 - type: integer - required: - - max_reports_to_store - - max_size_MB - type: object - prometheus_config: - description: PrometheusConfig is a field of KokuMetricsConfig to represent - the configuration of Prometheus connection. - properties: - context_timeout: - default: 120 - description: ContextTimeout is a field of KokuMetricsConfig to - represent how long a query to prometheus should run in seconds - before timing out. The default is 120 seconds. - format: int64 - maximum: 180 - minimum: 10 - type: integer - service_address: - default: https://thanos-querier.openshift-monitoring.svc:9091 - description: FOR DEVELOPMENT ONLY. SvcAddress is a field of KokuMetricsConfig - to represent the thanos-querier address. The default is `https://thanos-querier.openshift-monitoring.svc:9091`. - type: string - skip_tls_verification: - default: false - description: FOR DEVELOPMENT ONLY. SkipTLSVerification is a field - of KokuMetricsConfig to represent if the thanos-querier endpoint - must be certificate validated. The default is false. - type: boolean - required: - - service_address - - skip_tls_verification - type: object - source: - description: Source is a field of KokuMetricsConfig to represent the - desired source on cloud.redhat.com. - properties: - check_cycle: - default: 1440 - description: CheckCycle is a field of KokuMetricsConfig to represent - the number of minutes between each source check schedule The - default is 1440 min (24 hours). - format: int64 - minimum: 0 - type: integer - create_source: - default: false - description: CreateSource is a field of KokuMetricsConfigSpec - to represent if the source should be created if not found. - type: boolean - name: - description: SourceName is a field of KokuMetricsConfigSpec to - represent the source name on cloud.redhat.com. - type: string - sources_path: - default: /api/sources/v1.0/ - description: FOR DEVELOPMENT ONLY. SourcesAPIPath is a field of - KokuMetricsConfig to represent the path of the Sources API service. - The default is `/api/sources/v1.0/`. - type: string - required: - - check_cycle - - create_source - - sources_path - type: object - upload: - description: Upload is a field of KokuMetricsConfig to represent the - upload object. - properties: - ingress_path: - default: /api/ingress/v1/upload - description: FOR DEVELOPMENT ONLY. IngressAPIPath is a field of - KokuMetricsConfig to represent the path of the Ingress API service. - The default is `/api/ingress/v1/upload`. - type: string - upload_cycle: - default: 360 - description: UploadCycle is a field of KokuMetricsConfig to represent - the number of minutes between each upload schedule. The default - is 360 min (6 hours). - format: int64 - minimum: 0 - type: integer - upload_toggle: - default: true - description: UploadToggle is a field of KokuMetricsConfig to represent - if the operator is installed in a restricted-network. If `false`, - the operator will not upload to cloud.redhat.com or check/create - sources. The default is true. - type: boolean - upload_wait: - description: UploadWait is a field of KokuMetricsConfig to represent - the time to wait before sending an upload. - format: int64 - minimum: 0 - type: integer - validate_cert: - default: true - description: ValidateCert is a field of KokuMetricsConfig to represent - if the Ingress endpoint must be certificate validated. - type: boolean - required: - - ingress_path - - upload_cycle - - upload_toggle - - validate_cert - type: object - volume_claim_template: - description: VolumeClaimTemplate is a field of KokuMetricsConfig to - represent a PVC template. - properties: - apiVersion: - description: 'APIVersion defines the versioned schema of this - representation of an object. Servers should convert recognized - schemas to the latest internal value, and may reject unrecognized - values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' - type: string - kind: - description: 'Kind is a string value representing the REST resource - this object represents. Servers may infer this from the endpoint - the client submits requests to. Cannot be updated. In CamelCase. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' - type: string - metadata: - description: EmbeddedMetadata contains metadata relevant to an - EmbeddedResource. - properties: - annotations: - additionalProperties: - type: string - description: 'Annotations is an unstructured key value map - stored with a resource that may be set by external tools - to store and retrieve arbitrary metadata. They are not queryable - and should be preserved when modifying objects. More info: - http://kubernetes.io/docs/user-guide/annotations' - type: object - labels: - additionalProperties: - type: string - description: 'Map of string keys and values that can be used - to organize and categorize (scope and select) objects. May - match selectors of replication controllers and services. - More info: http://kubernetes.io/docs/user-guide/labels' - type: object - name: - description: 'Name must be unique within a namespace. Is required - when creating resources, although some resources may allow - a client to request the generation of an appropriate name - automatically. Name is primarily intended for creation idempotence - and configuration definition. Cannot be updated. More info: - http://kubernetes.io/docs/user-guide/identifiers#names' - type: string - type: object - spec: - description: 'Spec defines the desired characteristics of a volume - requested by a pod author. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims' - properties: - accessModes: - description: 'AccessModes contains the desired access modes - the volume should have. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes-1' - items: - type: string - type: array - dataSource: - description: 'This field can be used to specify either: * - An existing VolumeSnapshot object (snapshot.storage.k8s.io/VolumeSnapshot) - * An existing PVC (PersistentVolumeClaim) * An existing - custom resource that implements data population (Alpha) - In order to use custom resource types that implement data - population, the AnyVolumeDataSource feature gate must be - enabled. If the provisioner or an external controller can - support the specified data source, it will create a new - volume based on the contents of the specified data source.' - properties: - apiGroup: - description: APIGroup is the group for the resource being - referenced. If APIGroup is not specified, the specified - Kind must be in the core API group. For any other third-party - types, APIGroup is required. - type: string - kind: - description: Kind is the type of resource being referenced - type: string - name: - description: Name is the name of resource being referenced - type: string - required: - - kind - - name - type: object - resources: - description: 'Resources represents the minimum resources the - volume should have. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources' - properties: - limits: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - description: 'Limits describes the maximum amount of compute - resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/' - type: object - requests: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - description: 'Requests describes the minimum amount of - compute resources required. If Requests is omitted for - a container, it defaults to Limits if that is explicitly - specified, otherwise to an implementation-defined value. - More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/' - type: object - type: object - selector: - description: A label query over volumes to consider for binding. - properties: - matchExpressions: - description: matchExpressions is a list of label selector - requirements. The requirements are ANDed. - items: - description: A label selector requirement is a selector - that contains values, a key, and an operator that - relates the key and values. - properties: - key: - description: key is the label key that the selector - applies to. - type: string - operator: - description: operator represents a key's relationship - to a set of values. Valid operators are In, NotIn, - Exists and DoesNotExist. - type: string - values: - description: values is an array of string values. - If the operator is In or NotIn, the values array - must be non-empty. If the operator is Exists or - DoesNotExist, the values array must be empty. - This array is replaced during a strategic merge - patch. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - description: matchLabels is a map of {key,value} pairs. - A single {key,value} in the matchLabels map is equivalent - to an element of matchExpressions, whose key field is - "key", the operator is "In", and the values array contains - only "value". The requirements are ANDed. - type: object - type: object - storageClassName: - description: 'Name of the StorageClass required by the claim. - More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#class-1' - type: string - volumeMode: - description: volumeMode defines what type of volume is required - by the claim. Value of Filesystem is implied when not included - in claim spec. - type: string - volumeName: - description: VolumeName is the binding reference to the PersistentVolume - backing this claim. - type: string - type: object - type: object - required: - - authentication - - packaging - - prometheus_config - - source - - upload - type: object - status: - description: KokuMetricsConfigStatus defines the observed state of KokuMetricsConfig. - properties: - api_url: - description: APIURL is a field of KokuMetricsConfig to represent the - url of the API endpoint for service interaction. - type: string - authentication: - description: Authentication is a field of KokuMetricsConfig to represent - the authentication status. - properties: - credentials_found: - description: AuthenticationCredentialsFound is a field of KokuMetricsConfig - to represent if used for uploads were found. - type: boolean - error: - description: AuthErrorMessage is a field of KokuMetricsConfig - to represent an `invalid credentials` error message. - type: string - last_credential_verification_time: - description: LastVerificationTime is a field of KokuMetricsConfig - to represent the last time credentials were verified. - format: date-time - nullable: true - type: string - secret_name: - description: AuthenticationSecretName is a field of KokuMetricsConfig - to represent the secret with the user and password used for - uploads. - type: string - type: - description: AuthType is a field of KokuMetricsConfig to represent - the authentication type to be used basic or token. - enum: - - token - - basic - type: string - valid_basic_auth: - description: ValidBasicAuth is a field of KokuMetricsConfig to - represent if the given basic auth credentials are valid. - type: boolean - type: object - clusterID: - description: ClusterID is a field of KokuMetricsConfig to represent - the cluster UUID. - type: string - clusterVersion: - description: ClusterVersion is a field of KokuMetricsConfig to represent - the cluster version. - type: string - operator_commit: - description: OperatorCommit is a field of KokuMetricsConfig that shows - the commit hash of the operator. - type: string - packaging: - description: Packaging is a field of KokuMetricsConfig to represent - the packaging status - properties: - error: - description: PackagingError is a field of KokuMetricsConfig to - represent the error encountered packaging the reports. - type: string - last_successful_packaging_time: - description: LastSuccessfulPackagingTime is a field of KokuMetricsConfig - that shows the time of the last successful file packaging. - format: date-time - nullable: true - type: string - max_reports_to_store: - description: MaxReports is a field of KokuMetricsConfig to represent - the maximum number of reports to store. - format: int64 - type: integer - max_size_MB: - description: MaxSize is a field of KokuMetricsConfig to represent - the max file size in megabytes that will be compressed for upload - to Ingress. - format: int64 - type: integer - number_reports_stored: - description: ReportCount is a field of KokuMetricsConfig to represent - the number of reports in storage. - format: int64 - type: integer - packaged_files: - description: PackagedFiles is a field of KokuMetricsConfig to - represent the list of file packages in storage. - items: - type: string - type: array - type: object - persistent_volume_claim: - description: PersistentVolumeClaim is a field of KokuMetricsConfig - to represent a PVC. - properties: - apiVersion: - description: 'APIVersion defines the versioned schema of this - representation of an object. Servers should convert recognized - schemas to the latest internal value, and may reject unrecognized - values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' - type: string - kind: - description: 'Kind is a string value representing the REST resource - this object represents. Servers may infer this from the endpoint - the client submits requests to. Cannot be updated. In CamelCase. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' - type: string - metadata: - description: EmbeddedMetadata contains metadata relevant to an - EmbeddedResource. - properties: - annotations: - additionalProperties: - type: string - description: 'Annotations is an unstructured key value map - stored with a resource that may be set by external tools - to store and retrieve arbitrary metadata. They are not queryable - and should be preserved when modifying objects. More info: - http://kubernetes.io/docs/user-guide/annotations' - type: object - labels: - additionalProperties: - type: string - description: 'Map of string keys and values that can be used - to organize and categorize (scope and select) objects. May - match selectors of replication controllers and services. - More info: http://kubernetes.io/docs/user-guide/labels' - type: object - name: - description: 'Name must be unique within a namespace. Is required - when creating resources, although some resources may allow - a client to request the generation of an appropriate name - automatically. Name is primarily intended for creation idempotence - and configuration definition. Cannot be updated. More info: - http://kubernetes.io/docs/user-guide/identifiers#names' - type: string - type: object - spec: - description: 'Spec defines the desired characteristics of a volume - requested by a pod author. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims' - properties: - accessModes: - description: 'AccessModes contains the desired access modes - the volume should have. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes-1' - items: - type: string - type: array - dataSource: - description: 'This field can be used to specify either: * - An existing VolumeSnapshot object (snapshot.storage.k8s.io/VolumeSnapshot) - * An existing PVC (PersistentVolumeClaim) * An existing - custom resource that implements data population (Alpha) - In order to use custom resource types that implement data - population, the AnyVolumeDataSource feature gate must be - enabled. If the provisioner or an external controller can - support the specified data source, it will create a new - volume based on the contents of the specified data source.' - properties: - apiGroup: - description: APIGroup is the group for the resource being - referenced. If APIGroup is not specified, the specified - Kind must be in the core API group. For any other third-party - types, APIGroup is required. - type: string - kind: - description: Kind is the type of resource being referenced - type: string - name: - description: Name is the name of resource being referenced - type: string - required: - - kind - - name - type: object - resources: - description: 'Resources represents the minimum resources the - volume should have. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources' - properties: - limits: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - description: 'Limits describes the maximum amount of compute - resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/' - type: object - requests: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - description: 'Requests describes the minimum amount of - compute resources required. If Requests is omitted for - a container, it defaults to Limits if that is explicitly - specified, otherwise to an implementation-defined value. - More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/' - type: object - type: object - selector: - description: A label query over volumes to consider for binding. - properties: - matchExpressions: - description: matchExpressions is a list of label selector - requirements. The requirements are ANDed. - items: - description: A label selector requirement is a selector - that contains values, a key, and an operator that - relates the key and values. - properties: - key: - description: key is the label key that the selector - applies to. - type: string - operator: - description: operator represents a key's relationship - to a set of values. Valid operators are In, NotIn, - Exists and DoesNotExist. - type: string - values: - description: values is an array of string values. - If the operator is In or NotIn, the values array - must be non-empty. If the operator is Exists or - DoesNotExist, the values array must be empty. - This array is replaced during a strategic merge - patch. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - description: matchLabels is a map of {key,value} pairs. - A single {key,value} in the matchLabels map is equivalent - to an element of matchExpressions, whose key field is - "key", the operator is "In", and the values array contains - only "value". The requirements are ANDed. - type: object - type: object - storageClassName: - description: 'Name of the StorageClass required by the claim. - More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#class-1' - type: string - volumeMode: - description: volumeMode defines what type of volume is required - by the claim. Value of Filesystem is implied when not included - in claim spec. - type: string - volumeName: - description: VolumeName is the binding reference to the PersistentVolume - backing this claim. - type: string - type: object - type: object - prometheus: - description: Prometheus represents the status of premetheus queries. - properties: - configuration_error: - description: ConfigError is a field of KokuMetricsConfigStatus - to represent errors during prometheus configuration. - type: string - context_timeout: - description: ContextTimeout is a field of KokuMetricsConfigState - to represent how long a query to prometheus should run in seconds - before timing out. - format: int64 - type: integer - last_query_start_time: - description: LastQueryStartTime is a field of KokuMetricsConfigStatus - to represent the last time queries were started. - format: date-time - nullable: true - type: string - last_query_success_time: - description: LastQuerySuccessTime is a field of KokuMetricsConfigStatus - to represent the last time queries were successful. - format: date-time - nullable: true - type: string - prometheus_configured: - description: PrometheusConfigured is a field of KokuMetricsConfigStatus - to represent if the operator is configured to connect to prometheus. - type: boolean - prometheus_connected: - description: PrometheusConnected is a field of KokuMetricsConfigStatus - to represent if prometheus can be queried. - type: boolean - prometheus_connection_error: - description: ConnectionError is a field of KokuMetricsConfigStatus - to represent errors during prometheus test query. - type: string - service_address: - description: SvcAddress is the internal thanos-querier address. - type: string - skip_tls_verification: - description: SkipTLSVerification is a field of KokuMetricsConfigStatus - to represent if the thanos-querier endpoint must be certificate - validated. - type: boolean - required: - - prometheus_configured - - prometheus_connected - type: object - reports: - description: Reports represents the status of report generation. - properties: - data_collected: - description: DataCollected is a field of KokuMetricsConfigStatus - to represent whether or not data was collected for the last - query. - type: boolean - data_collection_message: - description: DataCollectionMessage is a field of KokuMetricsConfigStatus - to represent a message associated with the data_collected status. - type: string - last_hour_queried: - description: LastHourQueried is a field of KokuMetricsConfigStatus - to represent the time range for which metrics were last queried. - type: string - report_month: - description: ReportMonth is a field of KokuMetricsConfigStatus - to represent the month for which reports are being generated. - type: string - type: object - source: - description: Source is a field of KokuMetricsConfig to represent the - observed state of the source on cloud.redhat.com. - properties: - check_cycle: - description: CheckCycle is a field of KokuMetricsConfig to represent - the number of minutes between each source check schedule. The - default is 1440 min (24 hours). - format: int64 - type: integer - create_source: - description: CreateSource is a field of KokuMetricsConfigStatus - to represent if the source should be created if not found. A - source will not be created if upload_toggle is `false`. - type: boolean - error: - description: SourceError is a field of KokuMetricsConfigStatus - to represent the error encountered creating the source. - type: string - last_check_time: - description: LastSourceCheckTime is a field of KokuMetricsConfig - that shows the time that the last check was attempted. - format: date-time - nullable: true - type: string - name: - description: SourceName is a field of KokuMetricsConfigStatus - to represent the source name on cloud.redhat.com. - type: string - source_defined: - description: SourceDefined is a field of KokuMetricsConfigStatus - to represent if the source exists as defined on cloud.redhat.com. - type: boolean - sources_path: - description: SourcesAPIPath is a field of KokuMetricsConfig to - represent the path of the Sources API service. - type: string - type: object - storage: - description: Storage is a field - properties: - volume_mounted: - description: VolumeMounted is a bool to indicate if storage volume - was mounted. - type: boolean - volume_type: - description: VolumeType is the string representation of the volume - type. - type: string - type: object - upload: - description: Upload is a field of KokuMetricsConfig to represent the - upload object. - properties: - error: - description: UploadError is a field of KokuMetricsConfigStatus - to represent the error encountered uploading reports. - type: string - ingress_path: - description: IngressAPIPath is a field of KokuMetricsConfig to - represent the path of the Ingress API service. - type: string - last_payload_files: - description: LastPayloadFiles is a field of KokuMetricsConfig - to represent the list of files in the last payload that was - sent. - items: - type: string - type: array - last_payload_manifest_id: - description: LastPayloadManifest is a field of KokuMetricsConfig - that shows the manifestID of the last payload. - type: string - last_payload_name: - description: LastPayloadName is a field of KokuMetricsConfig that - shows the name of the last payload file. - type: string - last_payload_request_id: - description: LastPayloadRequestID is a field of KokuMetricsConfig - that shows the insights request id of the last payload. - type: string - last_successful_upload_time: - description: LastSuccessfulUploadTime is a field of KokuMetricsConfig - that shows the time of the last successful upload. - format: date-time - nullable: true - type: string - last_upload_status: - description: LastUploadStatus is a field of KokuMetricsConfig - that shows the http status of the last upload. - type: string - upload: - description: UploadToggle is a field of KokuMetricsConfig to represent - if the operator should upload to cloud.redhat.com. The default - is true - type: boolean - upload_cycle: - description: UploadCycle is a field of KokuMetricsConfig to represent - the number of minutes between each upload schedule. The default - is 360 min (6 hours). - format: int64 - type: integer - upload_wait: - description: UploadWait is a field of KokuMetricsConfig to represent - the time to wait before sending an upload. - format: int64 - type: integer - validate_cert: - description: ValidateCert is a field of KokuMetricsConfig to represent - if the Ingress endpoint must be certificate validated. - type: boolean - type: object - type: object - required: - - spec - type: object - served: true - storage: true - subresources: - status: {} -status: - acceptedNames: - kind: "" - plural: "" - conditions: [] - storedVersions: [] diff --git a/koku-metrics-operator/1.1.7/manifests/koku-metrics-operator.clusterserviceversion.yaml b/koku-metrics-operator/1.1.7/manifests/koku-metrics-operator.clusterserviceversion.yaml deleted file mode 100644 index 3934e9072..000000000 --- a/koku-metrics-operator/1.1.7/manifests/koku-metrics-operator.clusterserviceversion.yaml +++ /dev/null @@ -1,471 +0,0 @@ -apiVersion: operators.coreos.com/v1alpha1 -kind: ClusterServiceVersion -metadata: - annotations: - alm-examples: |- - [ - { - "apiVersion": "koku-metrics-cfg.openshift.io/v1beta1", - "kind": "KokuMetricsConfig", - "metadata": { - "name": "kokumetricscfg-sample-v1beta1" - }, - "spec": { - "authentication": { - "type": "token" - }, - "packaging": { - "max_reports_to_store": 30, - "max_size_MB": 100 - }, - "prometheus_config": {}, - "source": { - "check_cycle": 1440, - "create_source": false, - "name": "INSERT-SOURCE-NAME" - }, - "upload": { - "upload_cycle": 360, - "upload_toggle": true - } - } - } - ] - capabilities: Seamless Upgrades - categories: Monitoring - certified: "false" - containerImage: quay.io/project-koku/koku-metrics-operator@sha256:4bebd4f6a2bc65732c2d9b488931669312669387b196e64ef0c0afb4180d2c3f - createdAt: "2022-07-05T16:48:40Z" - description: A Golang-based OpenShift Operator that generates and uploads OpenShift - usage metrics to cost management. - operatorframework.io/suggested-namespace: koku-metrics-operator - operators.openshift.io/infrastructure-features: '["Disconnected"]' - operators.operatorframework.io/builder: operator-sdk-v1.10.0+git - operators.operatorframework.io/project_layout: go.kubebuilder.io/v2 - repository: https://github.com/project-koku/koku-metrics-operator - support: Cost Management - name: koku-metrics-operator.v1.1.7 - namespace: placeholder -spec: - apiservicedefinitions: {} - customresourcedefinitions: - owned: - - description: KokuMetricsConfig is the Schema for the kokumetricsconfig API - displayName: Koku Metrics Config - kind: KokuMetricsConfig - name: kokumetricsconfigs.koku-metrics-cfg.openshift.io - version: v1beta1 - description: |- - # Koku Metrics Operator - ## Introduction - The `koku-metrics-operator` is a component of the [cost managment](https://access.redhat.com/documentation/en-us/cost_management_service) service for Openshift, used to gather the required information from the cluster. It is recommended to be installed in OpenShift 4.5+. This operator obtains OpenShift usage data by querying Prometheus and uploads it to cost management to be processed. The Operator queries Prometheus every hour to create metric reports, which are then packaged and uploaded to cost management at [console.redhat.com](https://console.redhat.com). For more information, reach out to . - - This operator is capable of functioning within a disconnected/restricted network (aka air-gapped mode). In this mode, the operator will store the packaged reports for manual retrieval instead of being uploaded to cost management. Documentation for installing an operator within a restricted network can be found [here](https://docs.openshift.com/container-platform/latest/operators/admin/olm-restricted-networks.html). - - ## Features and Capabilities - #### Metrics collection: - The Koku Metrics Operator (`koku-metrics-operator`) collects the metrics required for cost management by: - * Querying Prometheus to gather the necessary metrics for cost management. - * Writing Prometheus queries to CSV report files. - * Packaging the CSV report files into tarballs. - - #### Additional Capabilities: - * The operator can be configured to automatically upload the packaged reports to cost management through Red Hat Insights Ingress service. - * The operator can create a source in console.redhat.com. A source is required for cost management to process the uploaded packages. - * PersistentVolumeClaim (PVC) configuration: The KokuMetricsConfig CR can accept a PVC definition and the operator will create and mount the PVC. If one is not provided, a default PVC will be created. - * Restricted network installation: this operator can function on a restricted network. In this mode, the operator stores the packaged reports for manual retrieval. - - ## Limitations and Pre-Requisites - #### Limitations (Potential for metrics data loss) - * A source **must** exist in console.redhat.com for an uploaded payload to be processed by cost management. The operator sends the payload to the Red Hat Insights Ingress service which usually returns successfully, but the operator does not currently confirm with cost management that the payload was processed. After Ingress accepts the uploaded payload, the payload is removed from the operator and is gone forever. If the data within the payload is not processed, a gap will be introduced in the usage metrics. - - **Note** The following limitations are specific to operators configured to run in a restricted network: - * The `koku-metrics-operator` will not be able to generate new reports if the PVC storage is filled. If this occurs, the reports must be manually deleted from the PVC so that the operator can function as normal. - * The default report retention is 30 reports (about one week's worth of data). The reports must be manually downloaded and uploaded to console.redhat.com every week, or they will be deleted and the data will be lost. - - #### Storage configuration prerequisite - The operator will attempt to create and use the following PVC when installed: - - volume_claim_template: - apiVersion: v1 - kind: PersistentVolumeClaim - metadata: - name: koku-metrics-operator-data - spec: - accessModes: - - ReadWriteOnce - resources: - requests: - storage: 10Gi - - If a different PVC should be utilized, a valid PVC should be specified in the KokuMetricsConfig CR as described in the appropriate section below. The PVC to be used may exist already, or the operator will attempt to create it. - - To use the default specification, the follow assumptions must be met: - 1. A default StorageClass is defined. - 2. Dynamic provisioning for that default StorageClass is enabled. - - If these assumptions are not met, the operator will not deploy correctly. In these cases, storage must be manually configured. After configuring storage, a valid PVC template should be supplied in the `volume_claim_template` spec of the KokuMetricsConfig CR. - - ## Configure the koku-metrics-operator - **Note** There are separate instructions for configuring the `koku-metrics-operator` to run in a restricted network. - ##### Configure authentication - The default authentication for the operator is `token`. No further steps are required to configure token authentication. If `basic` is the preferred authentication method, a Secret must be created which holds username and password credentials: - 1. On the left navigation pane, select `Workloads` -> `Secrets` -> select Project: `koku-metrics-operator` -> `Create` -> `Key/Value Secret` - 2. Give the Secret a name and add 2 keys: `username` and `password` (all lowercase). The values for these keys correspond to console.redhat.com credentials. - 3. Select `Create`. - ##### Create the KokuMetricsConfig - Configure the koku-metrics-operator by creating a `KokuMetricsConfig`. - 1. On the left navigation pane, select `Operators` -> `Installed Operators` -> `koku-metrics-operator` -> `KokuMetricsConfig` -> `Create Instance`. - 2. For `basic` authentication, edit the following values in the spec: - * Replace `authentication: type:` with `basic`. - * Add the `secret_name` field under `authentication`, and set it equal to the name of the authentication Secret that was created above. The spec should look similar to the following: - - ``` - authentication: - secret_name: SECRET-NAME - type: basic - ``` - - 3. To configure the koku-metrics-operator to create a cost management source, edit the following values in the `source` field: - * Replace `INSERT-SOURCE-NAME` with the preferred name of the source to be created. - * Replace the `create_source` field value with `true`. - - **Note:** if the source already exists, replace `INSERT-SOURCE-NAME` with the existing name, and leave `create_source` as false. This will allow the operator to confirm the source exists. - 4. If not specified, the operator will create a default PersistentVolumeClaim called `koku-metrics-operator-data` with 10Gi of storage. To configure the koku-metrics-operator to use or create a different PVC, edit the following in the spec: - * Add the desired configuration to the `volume_claim_template` field in the spec: - - ``` - volume_claim_template: - apiVersion: v1 - kind: PersistentVolumeClaim - metadata: - name: - spec: - accessModes: - - ReadWriteOnce - resources: - requests: - storage: 10Gi - ``` - - **Note:** If using the YAML View, the `volume_claim_template` field must be added to the spec - 5. Select `Create`. - - # Restricted Network Usage (disconnected/air-gapped mode) - ## Installation - To install the `koku-metrics-operator` in a restricted network, follow the [olm documentation](https://docs.openshift.com/container-platform/latest/operators/admin/olm-restricted-networks.html). The operator is found in the `community-operators` Catalog in the `registry.redhat.io/redhat/community-operator-index:latest` Index. If pruning the index before pushing to the mirrored registry, keep the `koku-metrics-operator` package. - - Within a restricted network, the operator queries prometheus to gather the necessary usage metrics, writes the query results to CSV files, and packages the reports for storage in the PVC. These reports then need to be manually downloaded from the cluster and uploaded to [console.redhat.com](https://console.redhat.com). - - ## Configure the koku-metrics-operator for a restricted network - ##### Create the KokuMetricsConfig - Configure the koku-metrics-operator by creating a `KokuMetricsConfig`. - 1. On the left navigation pane, select `Operators` -> `Installed Operators` -> `koku-metrics-operator` -> `KokuMetricsConfig` -> `Create Instance`. - 2. Specify the desired storage. If not specified, the operator will create a default Persistent Volume Claim called `koku-metrics-operator-data` with 10Gi of storage. To configure the koku-metrics-operator to use or create a different PVC, edit the following in the spec: - * Add the desired configuration to the `volume_claim_template` field in the spec: - - ``` - volume_claim_template: - apiVersion: v1 - kind: PersistentVolumeClaim - metadata: - name: - spec: - storageClassName: - accessModes: - - ReadWriteOnce - resources: - requests: - storage: 10Gi - ``` - - **Note:** If using the YAML View, the `volume_claim_template` field must be added to the spec - 3. (Optional) Specify the desired report retention. The operator will retain 30 reports by default. This corresponds to approximately one week's worth of data if using the default packaging cycle. To modify the number of retained reports: - * Change the `packaging` spec field `max_reports_to_store` to the desired number of reports to retain. Once this max number is reached, the operator will start removing the oldest packages remaining on the PVC: - - ``` - packaging: - max_size_MB: 100 - max_reports_to_store: 30 - ``` - - **Note:** The number of retained reports directly affects the frequency that reports must be manually downloaded from the PVC. Take caution in setting this to a higher number of reports, as the operator cannot write data to the PVC if the storage is full. - 4. To configure the operator to perform in a restricted network, set the `upload_toggle` to `false`: - - ``` - upload: - upload_cycle: 360, - upload_toggle: false - ``` - - 5. Select `Create`. - - ## Download reports from the Operator & clean up the PVC - If the `koku-metrics-operator` is configured to run in a restricted network, the metric reports will not automatically upload to cost managment. Instead, they need to be manually copied from the PVC for upload to [console.redhat.com](https://console.redhat.com). The default configuration saves one week of reports which means the process of downloading and uploading reports should be repeated weekly to prevent loss of metrics data. To download the reports, complete the following steps: - 1. Create the following Pod, ensuring the `claimName` matches the PVC containing the report data: - - ``` - kind: Pod - apiVersion: v1 - metadata: - name: volume-shell - namespace: koku-metrics-operator - labels: - app: koku-metrics-operator - spec: - volumes: - - name: koku-metrics-operator-reports - persistentVolumeClaim: - claimName: koku-metrics-operator-data - containers: - - name: volume-shell - image: busybox - command: ['sleep', 'infinity'] - volumeMounts: - - name: koku-metrics-operator-reports - mountPath: /tmp/koku-metrics-operator-reports - ``` - - 2. Use rsync to copy all of the files ready for upload from the PVC to a local folder: - - ``` - $ oc rsync volume-shell:/tmp/koku-metrics-operator-reports/upload local/path/to/save/folder - ``` - - 3. Once confirming that the files have been successfully copied, use rsh to connect to the pod and delete the contents of the upload folder so that they are no longer in storage: - - ``` - $ oc rsh volume-shell - $ rm /tmp/koku-metrics-operator-reports/upload/* - ``` - - 4. (Optional) Delete the pod that was used to connect to the PVC: - - ``` - $ oc delete -f volume-shell.yaml - ``` - - ## Create a source - In a restricted network, the `koku-metrics-operator` cannot automatically create a source. This process must be done manually. In the console.redhat.com platform, open the [Sources menu](https://console.redhat.com/settings/sources/) to begin adding an OpenShift source to cost management: - - Prerequisites: - * The cluster identifier which can be found in the KokuMetricsConfig CR, the cluster Overview page, or the cluster Help > About. - - Create source: - 1. Navigate to the Sources menu - 2. Select the `Red Hat sources` tab - 3. Create a new `Red Hat Openshift Container Platform` source: - * give the source a unique name - * add the Cost Management application - * add the cluster identifier - 4. In the Sources wizard, review the details and click `Finish` to create the Source. - - ## Upload the reports to cost managment - Uploading reports to cost managment is done through curl: - - $ curl -vvvv -F "file=@FILE_NAME.tar.gz;type=application/vnd.redhat.hccm.tar+tgz" https://cloud.redhat.com/api/ingress/v1/upload -u USERNAME:PASS - - where `USERNAME` and `PASS` correspond to the user credentials for [console.redhat.com](https://console.redhat.com), and `FILE_NAME` is the name of the report to upload. - - displayName: Koku Metrics Operator - icon: - - base64data: PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4KPCEtLSBHZW5lcmF0b3I6IEFkb2JlIElsbHVzdHJhdG9yIDIyLjEuMCwgU1ZHIEV4cG9ydCBQbHVnLUluIC4gU1ZHIFZlcnNpb246IDYuMDAgQnVpbGQgMCkgIC0tPgo8c3ZnIHZlcnNpb249IjEuMSIgaWQ9IkxheWVyXzEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4IgoJIHZpZXdCb3g9IjAgMCAzMDAgMzAwIiBzdHlsZT0iZW5hYmxlLWJhY2tncm91bmQ6bmV3IDAgMCAzMDAgMzAwOyIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSI+CjxzdHlsZSB0eXBlPSJ0ZXh0L2NzcyI+Cgkuc3Qwe2ZpbGw6I0VFMDAwMDt9Cjwvc3R5bGU+Cjx0aXRsZT5Db3N0LWljb248L3RpdGxlPgo8ZGVzYz5DcmVhdGVkIHdpdGggU2tldGNoLjwvZGVzYz4KPGc+Cgk8Zz4KCQk8cGF0aCBjbGFzcz0ic3QwIiBkPSJN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QyNiwxLjM3NzY4NTUKCQkJYzAuMDczNzE1MiwwLjUzNDUwMDEtMC4xMTUyMDM5LDAuOTkwNjQ2NC0wLjU3MTM1MDEsMS4zNzMwNzc0bC0zLjg5ODA4NjUsNC4wMTMyNzUxCgkJCWMtMC4zMDg3MTU4LDAuMjMwMzkyNS0wLjY2ODEwNjEsMC4zODI0MzEtMS4wOTIwMTA1LDAuNDU2MTYxNWMtMC40MTkyOTYzLDAuMDc4MzIzNC0wLjgyMDE1OTksMC0xLjIwMjU5MDktMC4yMjU3NjkKCQkJYy0xLjE0MjcxNTUtMC44NDMyMDA3LTIuNDQyMDc3Ni0xLjI2MjQ5NjktMy44OTgwODY1LTEuMjYyNDk2OWgtNy42NzYzNjExYy0wLjkxNjkxNTksMC0xLjcwMDIyNTgsMC4zMjI1MjUtMi4zNDk4OTkzLDAuOTcyMjEzNwoJCQljLTAuNjQ5Njg4NywwLjY0OTY3MzUtMC45NzY4MjE5LDEuNDc0NDQxNS0wLjk3NjgyMTksMi40NjUwODc5YzAsMC42ODY1NTQsMC4yMzAzOTI1LDEuMzM2MjEyMiwwLjY5MTE0NjksMS45NDkwMzU2CgkJCWMwLjQ1NjE2MTUsMC42MTI4MjM1LDEuMDMyMTE5OCwxLjAzMjExOTgsMS43MTg2NTg0LDEuMjYyNDk2OUwxNzQuMjgwNjM5NiwxODUuODczNjExNXoiLz4KCTwvZz4KPC9nPgo8L3N2Zz4K - mediatype: image/svg+xml - install: - spec: - clusterPermissions: - - rules: - - apiGroups: - - config.openshift.io - resources: - - clusterversions - verbs: - - get - - list - - watch - - apiGroups: - - "" - resources: - - namespaces - verbs: - - get - - list - - watch - - apiGroups: - - "" - resources: - - secrets - verbs: - - get - serviceAccountName: koku-metrics-controller-manager - deployments: - - name: koku-metrics-operator - spec: - replicas: 1 - selector: - matchLabels: - app: koku-metrics-operator - control-plane: controller-manager - strategy: {} - template: - metadata: - labels: - app: koku-metrics-operator - control-plane: controller-manager - spec: - containers: - - args: - - --enable-leader-election - command: - - /manager - env: - - name: IN_CLUSTER - value: "true" - - name: WATCH_NAMESPACE - valueFrom: - fieldRef: - fieldPath: metadata.annotations['olm.targetNamespaces'] - image: quay.io/project-koku/koku-metrics-operator@sha256:4bebd4f6a2bc65732c2d9b488931669312669387b196e64ef0c0afb4180d2c3f - name: manager - resources: - limits: - cpu: 500m - memory: 500Mi - requests: - cpu: 100m - memory: 20Mi - terminationMessagePolicy: FallbackToLogsOnError - volumeMounts: - - mountPath: /tmp/koku-metrics-operator-reports - name: koku-metrics-operator-reports - serviceAccountName: koku-metrics-controller-manager - terminationGracePeriodSeconds: 10 - volumes: - - name: koku-metrics-operator-reports - permissions: - - rules: - - apiGroups: - - "" - resources: - - configmaps - verbs: - - get - - list - - watch - - create - - update - - patch - - delete - - apiGroups: - - "" - resources: - - configmaps/status - verbs: - - get - - update - - patch - - apiGroups: - - "" - resources: - - events - verbs: - - create - - patch - - apiGroups: - - coordination.k8s.io - resources: - - leases - verbs: - - get - - list - - watch - - create - - update - - patch - - delete - - apiGroups: - - apps - resources: - - deployments - verbs: - - get - - list - - patch - - watch - - apiGroups: - - "" - resources: - - configmaps - - endpoints - - events - - persistentvolumeclaims - - pods - - secrets - - serviceaccounts - - services - - services/finalizers - verbs: - - create - - delete - - get - - list - - patch - - update - - watch - - apiGroups: - - koku-metrics-cfg.openshift.io - resources: - - kokumetricsconfigs - verbs: - - create - - delete - - get - - list - - patch - - update - - watch - - apiGroups: - - koku-metrics-cfg.openshift.io - resources: - - kokumetricsconfigs/status - verbs: - - get - - patch - - update - - apiGroups: - - operators.coreos.com - resources: - - clusterserviceversions - verbs: - - get - - list - - patch - - update - - watch - serviceAccountName: koku-metrics-controller-manager - strategy: deployment - installModes: - - supported: true - type: OwnNamespace - - supported: true - type: SingleNamespace - - supported: false - type: MultiNamespace - - supported: false - type: AllNamespaces - relatedImages: - - name: koku-metrics-operator - image: quay.io/project-koku/koku-metrics-operator@sha256:4bebd4f6a2bc65732c2d9b488931669312669387b196e64ef0c0afb4180d2c3f - keywords: - - cost - - management - - usage - - monitor - maintainers: - - email: costmanagement@redhat.com - name: costmanagement - maturity: alpha - provider: - name: Red Hat - replaces: koku-metrics-operator.v1.1.6 - version: 1.1.7 diff --git a/koku-metrics-operator/1.1.7/metadata/annotations.yaml b/koku-metrics-operator/1.1.7/metadata/annotations.yaml deleted file mode 100644 index 5e2f30385..000000000 --- a/koku-metrics-operator/1.1.7/metadata/annotations.yaml +++ /dev/null @@ -1,15 +0,0 @@ -annotations: - # Core bundle annotations. - operators.operatorframework.io.bundle.mediatype.v1: registry+v1 - operators.operatorframework.io.bundle.manifests.v1: manifests/ - operators.operatorframework.io.bundle.metadata.v1: metadata/ - operators.operatorframework.io.bundle.package.v1: koku-metrics-operator - operators.operatorframework.io.bundle.channels.v1: alpha,beta - operators.operatorframework.io.bundle.channel.default.v1: beta - operators.operatorframework.io.metrics.builder: operator-sdk-v1.10.0+git - operators.operatorframework.io.metrics.mediatype.v1: metrics+v1 - operators.operatorframework.io.metrics.project_layout: go.kubebuilder.io/v2 - - # Annotations for testing. - operators.operatorframework.io.test.mediatype.v1: scorecard+v1 - operators.operatorframework.io.test.config.v1: tests/scorecard/ diff --git a/koku-metrics-operator/1.1.7/tests/scorecard/config.yaml b/koku-metrics-operator/1.1.7/tests/scorecard/config.yaml deleted file mode 100644 index e2d83b262..000000000 --- a/koku-metrics-operator/1.1.7/tests/scorecard/config.yaml +++ /dev/null @@ -1,28 +0,0 @@ -apiVersion: scorecard.operatorframework.io/v1alpha3 -kind: Configuration -metadata: - name: config -stages: -- parallel: true - tests: - - entrypoint: - - scorecard-test - - basic-check-spec - image: quay.io/operator-framework/scorecard-test:v1.10.1 - labels: - suite: basic - test: basic-check-spec-test - - entrypoint: - - scorecard-test - - olm-bundle-validation - image: quay.io/operator-framework/scorecard-test:v1.10.1 - labels: - suite: olm - test: olm-bundle-validation-test - - entrypoint: - - scorecard-test - - olm-crds-have-validation - image: quay.io/operator-framework/scorecard-test:v1.10.1 - labels: - suite: olm - test: olm-crds-have-validation-test diff --git a/koku-metrics-operator/1.1.8/Dockerfile b/koku-metrics-operator/1.1.8/Dockerfile deleted file mode 100644 index 10a0e6ae5..000000000 --- a/koku-metrics-operator/1.1.8/Dockerfile +++ /dev/null @@ -1,21 +0,0 @@ -FROM scratch - -# Core bundle labels. -LABEL operators.operatorframework.io.bundle.mediatype.v1=registry+v1 -LABEL operators.operatorframework.io.bundle.manifests.v1=manifests/ -LABEL operators.operatorframework.io.bundle.metadata.v1=metadata/ -LABEL operators.operatorframework.io.bundle.package.v1=koku-metrics-operator -LABEL operators.operatorframework.io.bundle.channels.v1=alpha,beta -LABEL operators.operatorframework.io.bundle.channel.default.v1=beta -LABEL operators.operatorframework.io.metrics.builder=operator-sdk-v1.23.0 -LABEL operators.operatorframework.io.metrics.mediatype.v1=metrics+v1 -LABEL operators.operatorframework.io.metrics.project_layout=go.kubebuilder.io/v2 - -# Labels for testing. -LABEL operators.operatorframework.io.test.mediatype.v1=scorecard+v1 -LABEL operators.operatorframework.io.test.config.v1=tests/scorecard/ - -# Copy files to locations specified by labels. -COPY manifests /manifests/ -COPY metadata /metadata/ -COPY tests/scorecard /tests/scorecard/ diff --git a/koku-metrics-operator/1.1.8/manifests/koku-metrics-cfg.openshift.io_kokumetricsconfigs.yaml b/koku-metrics-operator/1.1.8/manifests/koku-metrics-cfg.openshift.io_kokumetricsconfigs.yaml deleted file mode 100644 index 651ae1bba..000000000 --- a/koku-metrics-operator/1.1.8/manifests/koku-metrics-cfg.openshift.io_kokumetricsconfigs.yaml +++ /dev/null @@ -1,842 +0,0 @@ -apiVersion: apiextensions.k8s.io/v1 -kind: CustomResourceDefinition -metadata: - annotations: - controller-gen.kubebuilder.io/version: v0.3.0 - creationTimestamp: null - labels: - app: koku-metrics-operator - name: kokumetricsconfigs.koku-metrics-cfg.openshift.io -spec: - group: koku-metrics-cfg.openshift.io - names: - kind: KokuMetricsConfig - listKind: KokuMetricsConfigList - plural: kokumetricsconfigs - singular: kokumetricsconfig - scope: Namespaced - versions: - - name: v1beta1 - schema: - openAPIV3Schema: - description: KokuMetricsConfig is the Schema for the kokumetricsconfig API - properties: - apiVersion: - description: 'APIVersion defines the versioned schema of this representation - of an object. Servers should convert recognized schemas to the latest - internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' - type: string - kind: - description: 'Kind is a string value representing the REST resource this - object represents. Servers may infer this from the endpoint the client - submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' - type: string - metadata: - type: object - spec: - description: KokuMetricsConfigSpec defines the desired state of KokuMetricsConfig. - properties: - api_url: - default: https://cloud.redhat.com - description: FOR DEVELOPMENT ONLY. APIURL is a field of KokuMetricsConfig - to represent the url of the API endpoint for service interaction. - The default is `https://cloud.redhat.com`. - type: string - authentication: - description: Authentication is a field of KokuMetricsConfig to represent - the authentication object. - properties: - secret_name: - description: AuthenticationSecretName is a field of KokuMetricsConfig - to represent the secret with the user and password used for - uploads. - type: string - type: - default: token - description: 'AuthType is a field of KokuMetricsConfig to represent - the authentication type to be used basic or token. Valid values - are: - "basic" : Enables authentication using user and password - from authentication secret. - "token" (default): Uses cluster - token for authentication.' - enum: - - token - - basic - type: string - required: - - type - type: object - clusterID: - description: ClusterID is a field of KokuMetricsConfig to represent - the cluster UUID. Normally this value should not be specified. Only - set this value if the clusterID cannot be obtained from the ClusterVersion. - type: string - clusterVersion: - description: ClusterVersion is a field of KokuMetricsConfig to represent - the cluster version. Normally this value should not be specified. - Only set this value if the clusterVersion cannot be obtained from - the ClusterVersion. - type: string - packaging: - description: Packaging is a field of KokuMetricsConfig to represent - the packaging object. - properties: - max_reports_to_store: - default: 30 - description: MaxReports is a field of KokuMetricsConfig to represent - the maximum number of reports to store. The default is 30 reports - which corresponds to approximately 7 days worth of data given - the other default values. - format: int64 - minimum: 1 - type: integer - max_size_MB: - default: 100 - description: MaxSize is a field of KokuMetricsConfig to represent - the max file size in megabytes that will be compressed for upload - to Ingress. The default is 100. - format: int64 - maximum: 100 - minimum: 1 - type: integer - required: - - max_reports_to_store - - max_size_MB - type: object - prometheus_config: - description: PrometheusConfig is a field of KokuMetricsConfig to represent - the configuration of Prometheus connection. - properties: - context_timeout: - default: 120 - description: ContextTimeout is a field of KokuMetricsConfig to - represent how long a query to prometheus should run in seconds - before timing out. The default is 120 seconds. - format: int64 - maximum: 180 - minimum: 10 - type: integer - service_address: - default: https://thanos-querier.openshift-monitoring.svc:9091 - description: FOR DEVELOPMENT ONLY. SvcAddress is a field of KokuMetricsConfig - to represent the thanos-querier address. The default is `https://thanos-querier.openshift-monitoring.svc:9091`. - type: string - skip_tls_verification: - default: false - description: FOR DEVELOPMENT ONLY. SkipTLSVerification is a field - of KokuMetricsConfig to represent if the thanos-querier endpoint - must be certificate validated. The default is false. - type: boolean - required: - - service_address - - skip_tls_verification - type: object - source: - description: Source is a field of KokuMetricsConfig to represent the - desired source on cloud.redhat.com. - properties: - check_cycle: - default: 1440 - description: CheckCycle is a field of KokuMetricsConfig to represent - the number of minutes between each source check schedule The - default is 1440 min (24 hours). - format: int64 - minimum: 0 - type: integer - create_source: - default: false - description: CreateSource is a field of KokuMetricsConfigSpec - to represent if the source should be created if not found. - type: boolean - name: - description: SourceName is a field of KokuMetricsConfigSpec to - represent the source name on cloud.redhat.com. - type: string - sources_path: - default: /api/sources/v1.0/ - description: FOR DEVELOPMENT ONLY. SourcesAPIPath is a field of - KokuMetricsConfig to represent the path of the Sources API service. - The default is `/api/sources/v1.0/`. - type: string - required: - - check_cycle - - create_source - - sources_path - type: object - upload: - description: Upload is a field of KokuMetricsConfig to represent the - upload object. - properties: - ingress_path: - default: /api/ingress/v1/upload - description: FOR DEVELOPMENT ONLY. IngressAPIPath is a field of - KokuMetricsConfig to represent the path of the Ingress API service. - The default is `/api/ingress/v1/upload`. - type: string - upload_cycle: - default: 360 - description: UploadCycle is a field of KokuMetricsConfig to represent - the number of minutes between each upload schedule. The default - is 360 min (6 hours). - format: int64 - minimum: 0 - type: integer - upload_toggle: - default: true - description: UploadToggle is a field of KokuMetricsConfig to represent - if the operator is installed in a restricted-network. If `false`, - the operator will not upload to cloud.redhat.com or check/create - sources. The default is true. - type: boolean - upload_wait: - description: UploadWait is a field of KokuMetricsConfig to represent - the time to wait before sending an upload. - format: int64 - minimum: 0 - type: integer - validate_cert: - default: true - description: ValidateCert is a field of KokuMetricsConfig to represent - if the Ingress endpoint must be certificate validated. - type: boolean - required: - - ingress_path - - upload_cycle - - upload_toggle - - validate_cert - type: object - volume_claim_template: - description: VolumeClaimTemplate is a field of KokuMetricsConfig to - represent a PVC template. - properties: - apiVersion: - description: 'APIVersion defines the versioned schema of this - representation of an object. Servers should convert recognized - schemas to the latest internal value, and may reject unrecognized - values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' - type: string - kind: - description: 'Kind is a string value representing the REST resource - this object represents. Servers may infer this from the endpoint - the client submits requests to. Cannot be updated. In CamelCase. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' - type: string - metadata: - description: EmbeddedMetadata contains metadata relevant to an - EmbeddedResource. - properties: - annotations: - additionalProperties: - type: string - description: 'Annotations is an unstructured key value map - stored with a resource that may be set by external tools - to store and retrieve arbitrary metadata. They are not queryable - and should be preserved when modifying objects. More info: - http://kubernetes.io/docs/user-guide/annotations' - type: object - labels: - additionalProperties: - type: string - description: 'Map of string keys and values that can be used - to organize and categorize (scope and select) objects. May - match selectors of replication controllers and services. - More info: http://kubernetes.io/docs/user-guide/labels' - type: object - name: - description: 'Name must be unique within a namespace. Is required - when creating resources, although some resources may allow - a client to request the generation of an appropriate name - automatically. Name is primarily intended for creation idempotence - and configuration definition. Cannot be updated. More info: - http://kubernetes.io/docs/user-guide/identifiers#names' - type: string - type: object - spec: - description: 'Spec defines the desired characteristics of a volume - requested by a pod author. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims' - properties: - accessModes: - description: 'AccessModes contains the desired access modes - the volume should have. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes-1' - items: - type: string - type: array - dataSource: - description: 'This field can be used to specify either: * - An existing VolumeSnapshot object (snapshot.storage.k8s.io/VolumeSnapshot) - * An existing PVC (PersistentVolumeClaim) * An existing - custom resource that implements data population (Alpha) - In order to use custom resource types that implement data - population, the AnyVolumeDataSource feature gate must be - enabled. If the provisioner or an external controller can - support the specified data source, it will create a new - volume based on the contents of the specified data source.' - properties: - apiGroup: - description: APIGroup is the group for the resource being - referenced. If APIGroup is not specified, the specified - Kind must be in the core API group. For any other third-party - types, APIGroup is required. - type: string - kind: - description: Kind is the type of resource being referenced - type: string - name: - description: Name is the name of resource being referenced - type: string - required: - - kind - - name - type: object - resources: - description: 'Resources represents the minimum resources the - volume should have. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources' - properties: - limits: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - description: 'Limits describes the maximum amount of compute - resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/' - type: object - requests: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - description: 'Requests describes the minimum amount of - compute resources required. If Requests is omitted for - a container, it defaults to Limits if that is explicitly - specified, otherwise to an implementation-defined value. - More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/' - type: object - type: object - selector: - description: A label query over volumes to consider for binding. - properties: - matchExpressions: - description: matchExpressions is a list of label selector - requirements. The requirements are ANDed. - items: - description: A label selector requirement is a selector - that contains values, a key, and an operator that - relates the key and values. - properties: - key: - description: key is the label key that the selector - applies to. - type: string - operator: - description: operator represents a key's relationship - to a set of values. Valid operators are In, NotIn, - Exists and DoesNotExist. - type: string - values: - description: values is an array of string values. - If the operator is In or NotIn, the values array - must be non-empty. If the operator is Exists or - DoesNotExist, the values array must be empty. - This array is replaced during a strategic merge - patch. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - description: matchLabels is a map of {key,value} pairs. - A single {key,value} in the matchLabels map is equivalent - to an element of matchExpressions, whose key field is - "key", the operator is "In", and the values array contains - only "value". The requirements are ANDed. - type: object - type: object - storageClassName: - description: 'Name of the StorageClass required by the claim. - More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#class-1' - type: string - volumeMode: - description: volumeMode defines what type of volume is required - by the claim. Value of Filesystem is implied when not included - in claim spec. - type: string - volumeName: - description: VolumeName is the binding reference to the PersistentVolume - backing this claim. - type: string - type: object - type: object - required: - - authentication - - packaging - - prometheus_config - - source - - upload - type: object - status: - description: KokuMetricsConfigStatus defines the observed state of KokuMetricsConfig. - properties: - api_url: - description: APIURL is a field of KokuMetricsConfig to represent the - url of the API endpoint for service interaction. - type: string - authentication: - description: Authentication is a field of KokuMetricsConfig to represent - the authentication status. - properties: - credentials_found: - description: AuthenticationCredentialsFound is a field of KokuMetricsConfig - to represent if used for uploads were found. - type: boolean - error: - description: AuthErrorMessage is a field of KokuMetricsConfig - to represent an `invalid credentials` error message. - type: string - last_credential_verification_time: - description: LastVerificationTime is a field of KokuMetricsConfig - to represent the last time credentials were verified. - format: date-time - nullable: true - type: string - secret_name: - description: AuthenticationSecretName is a field of KokuMetricsConfig - to represent the secret with the user and password used for - uploads. - type: string - type: - description: AuthType is a field of KokuMetricsConfig to represent - the authentication type to be used basic or token. - enum: - - token - - basic - type: string - valid_basic_auth: - description: ValidBasicAuth is a field of KokuMetricsConfig to - represent if the given basic auth credentials are valid. - type: boolean - type: object - clusterID: - description: ClusterID is a field of KokuMetricsConfig to represent - the cluster UUID. - type: string - clusterVersion: - description: ClusterVersion is a field of KokuMetricsConfig to represent - the cluster version. - type: string - operator_commit: - description: OperatorCommit is a field of KokuMetricsConfig that shows - the commit hash of the operator. - type: string - packaging: - description: Packaging is a field of KokuMetricsConfig to represent - the packaging status - properties: - error: - description: PackagingError is a field of KokuMetricsConfig to - represent the error encountered packaging the reports. - type: string - last_successful_packaging_time: - description: LastSuccessfulPackagingTime is a field of KokuMetricsConfig - that shows the time of the last successful file packaging. - format: date-time - nullable: true - type: string - max_reports_to_store: - description: MaxReports is a field of KokuMetricsConfig to represent - the maximum number of reports to store. - format: int64 - type: integer - max_size_MB: - description: MaxSize is a field of KokuMetricsConfig to represent - the max file size in megabytes that will be compressed for upload - to Ingress. - format: int64 - type: integer - number_reports_stored: - description: ReportCount is a field of KokuMetricsConfig to represent - the number of reports in storage. - format: int64 - type: integer - packaged_files: - description: PackagedFiles is a field of KokuMetricsConfig to - represent the list of file packages in storage. - items: - type: string - type: array - type: object - persistent_volume_claim: - description: PersistentVolumeClaim is a field of KokuMetricsConfig - to represent a PVC. - properties: - apiVersion: - description: 'APIVersion defines the versioned schema of this - representation of an object. Servers should convert recognized - schemas to the latest internal value, and may reject unrecognized - values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' - type: string - kind: - description: 'Kind is a string value representing the REST resource - this object represents. Servers may infer this from the endpoint - the client submits requests to. Cannot be updated. In CamelCase. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' - type: string - metadata: - description: EmbeddedMetadata contains metadata relevant to an - EmbeddedResource. - properties: - annotations: - additionalProperties: - type: string - description: 'Annotations is an unstructured key value map - stored with a resource that may be set by external tools - to store and retrieve arbitrary metadata. They are not queryable - and should be preserved when modifying objects. More info: - http://kubernetes.io/docs/user-guide/annotations' - type: object - labels: - additionalProperties: - type: string - description: 'Map of string keys and values that can be used - to organize and categorize (scope and select) objects. May - match selectors of replication controllers and services. - More info: http://kubernetes.io/docs/user-guide/labels' - type: object - name: - description: 'Name must be unique within a namespace. Is required - when creating resources, although some resources may allow - a client to request the generation of an appropriate name - automatically. Name is primarily intended for creation idempotence - and configuration definition. Cannot be updated. More info: - http://kubernetes.io/docs/user-guide/identifiers#names' - type: string - type: object - spec: - description: 'Spec defines the desired characteristics of a volume - requested by a pod author. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims' - properties: - accessModes: - description: 'AccessModes contains the desired access modes - the volume should have. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes-1' - items: - type: string - type: array - dataSource: - description: 'This field can be used to specify either: * - An existing VolumeSnapshot object (snapshot.storage.k8s.io/VolumeSnapshot) - * An existing PVC (PersistentVolumeClaim) * An existing - custom resource that implements data population (Alpha) - In order to use custom resource types that implement data - population, the AnyVolumeDataSource feature gate must be - enabled. If the provisioner or an external controller can - support the specified data source, it will create a new - volume based on the contents of the specified data source.' - properties: - apiGroup: - description: APIGroup is the group for the resource being - referenced. If APIGroup is not specified, the specified - Kind must be in the core API group. For any other third-party - types, APIGroup is required. - type: string - kind: - description: Kind is the type of resource being referenced - type: string - name: - description: Name is the name of resource being referenced - type: string - required: - - kind - - name - type: object - resources: - description: 'Resources represents the minimum resources the - volume should have. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources' - properties: - limits: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - description: 'Limits describes the maximum amount of compute - resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/' - type: object - requests: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - description: 'Requests describes the minimum amount of - compute resources required. If Requests is omitted for - a container, it defaults to Limits if that is explicitly - specified, otherwise to an implementation-defined value. - More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/' - type: object - type: object - selector: - description: A label query over volumes to consider for binding. - properties: - matchExpressions: - description: matchExpressions is a list of label selector - requirements. The requirements are ANDed. - items: - description: A label selector requirement is a selector - that contains values, a key, and an operator that - relates the key and values. - properties: - key: - description: key is the label key that the selector - applies to. - type: string - operator: - description: operator represents a key's relationship - to a set of values. Valid operators are In, NotIn, - Exists and DoesNotExist. - type: string - values: - description: values is an array of string values. - If the operator is In or NotIn, the values array - must be non-empty. If the operator is Exists or - DoesNotExist, the values array must be empty. - This array is replaced during a strategic merge - patch. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - description: matchLabels is a map of {key,value} pairs. - A single {key,value} in the matchLabels map is equivalent - to an element of matchExpressions, whose key field is - "key", the operator is "In", and the values array contains - only "value". The requirements are ANDed. - type: object - type: object - storageClassName: - description: 'Name of the StorageClass required by the claim. - More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#class-1' - type: string - volumeMode: - description: volumeMode defines what type of volume is required - by the claim. Value of Filesystem is implied when not included - in claim spec. - type: string - volumeName: - description: VolumeName is the binding reference to the PersistentVolume - backing this claim. - type: string - type: object - type: object - prometheus: - description: Prometheus represents the status of premetheus queries. - properties: - configuration_error: - description: ConfigError is a field of KokuMetricsConfigStatus - to represent errors during prometheus configuration. - type: string - context_timeout: - description: ContextTimeout is a field of KokuMetricsConfigState - to represent how long a query to prometheus should run in seconds - before timing out. - format: int64 - type: integer - last_query_start_time: - description: LastQueryStartTime is a field of KokuMetricsConfigStatus - to represent the last time queries were started. - format: date-time - nullable: true - type: string - last_query_success_time: - description: LastQuerySuccessTime is a field of KokuMetricsConfigStatus - to represent the last time queries were successful. - format: date-time - nullable: true - type: string - prometheus_configured: - description: PrometheusConfigured is a field of KokuMetricsConfigStatus - to represent if the operator is configured to connect to prometheus. - type: boolean - prometheus_connected: - description: PrometheusConnected is a field of KokuMetricsConfigStatus - to represent if prometheus can be queried. - type: boolean - prometheus_connection_error: - description: ConnectionError is a field of KokuMetricsConfigStatus - to represent errors during prometheus test query. - type: string - service_address: - description: SvcAddress is the internal thanos-querier address. - type: string - skip_tls_verification: - description: SkipTLSVerification is a field of KokuMetricsConfigStatus - to represent if the thanos-querier endpoint must be certificate - validated. - type: boolean - required: - - prometheus_configured - - prometheus_connected - type: object - reports: - description: Reports represents the status of report generation. - properties: - data_collected: - description: DataCollected is a field of KokuMetricsConfigStatus - to represent whether or not data was collected for the last - query. - type: boolean - data_collection_message: - description: DataCollectionMessage is a field of KokuMetricsConfigStatus - to represent a message associated with the data_collected status. - type: string - last_hour_queried: - description: LastHourQueried is a field of KokuMetricsConfigStatus - to represent the time range for which metrics were last queried. - type: string - report_month: - description: ReportMonth is a field of KokuMetricsConfigStatus - to represent the month for which reports are being generated. - type: string - type: object - source: - description: Source is a field of KokuMetricsConfig to represent the - observed state of the source on cloud.redhat.com. - properties: - check_cycle: - description: CheckCycle is a field of KokuMetricsConfig to represent - the number of minutes between each source check schedule. The - default is 1440 min (24 hours). - format: int64 - type: integer - create_source: - description: CreateSource is a field of KokuMetricsConfigStatus - to represent if the source should be created if not found. A - source will not be created if upload_toggle is `false`. - type: boolean - error: - description: SourceError is a field of KokuMetricsConfigStatus - to represent the error encountered creating the source. - type: string - last_check_time: - description: LastSourceCheckTime is a field of KokuMetricsConfig - that shows the time that the last check was attempted. - format: date-time - nullable: true - type: string - name: - description: SourceName is a field of KokuMetricsConfigStatus - to represent the source name on cloud.redhat.com. - type: string - source_defined: - description: SourceDefined is a field of KokuMetricsConfigStatus - to represent if the source exists as defined on cloud.redhat.com. - type: boolean - sources_path: - description: SourcesAPIPath is a field of KokuMetricsConfig to - represent the path of the Sources API service. - type: string - type: object - storage: - description: Storage is a field - properties: - volume_mounted: - description: VolumeMounted is a bool to indicate if storage volume - was mounted. - type: boolean - volume_type: - description: VolumeType is the string representation of the volume - type. - type: string - type: object - upload: - description: Upload is a field of KokuMetricsConfig to represent the - upload object. - properties: - error: - description: UploadError is a field of KokuMetricsConfigStatus - to represent the error encountered uploading reports. - type: string - ingress_path: - description: IngressAPIPath is a field of KokuMetricsConfig to - represent the path of the Ingress API service. - type: string - last_payload_files: - description: LastPayloadFiles is a field of KokuMetricsConfig - to represent the list of files in the last payload that was - sent. - items: - type: string - type: array - last_payload_manifest_id: - description: LastPayloadManifest is a field of KokuMetricsConfig - that shows the manifestID of the last payload. - type: string - last_payload_name: - description: LastPayloadName is a field of KokuMetricsConfig that - shows the name of the last payload file. - type: string - last_payload_request_id: - description: LastPayloadRequestID is a field of KokuMetricsConfig - that shows the insights request id of the last payload. - type: string - last_successful_upload_time: - description: LastSuccessfulUploadTime is a field of KokuMetricsConfig - that shows the time of the last successful upload. - format: date-time - nullable: true - type: string - last_upload_status: - description: LastUploadStatus is a field of KokuMetricsConfig - that shows the http status of the last upload. - type: string - upload: - description: UploadToggle is a field of KokuMetricsConfig to represent - if the operator should upload to cloud.redhat.com. The default - is true - type: boolean - upload_cycle: - description: UploadCycle is a field of KokuMetricsConfig to represent - the number of minutes between each upload schedule. The default - is 360 min (6 hours). - format: int64 - type: integer - upload_wait: - description: UploadWait is a field of KokuMetricsConfig to represent - the time to wait before sending an upload. - format: int64 - type: integer - validate_cert: - description: ValidateCert is a field of KokuMetricsConfig to represent - if the Ingress endpoint must be certificate validated. - type: boolean - type: object - type: object - required: - - spec - type: object - served: true - storage: true - subresources: - status: {} -status: - acceptedNames: - kind: "" - plural: "" - conditions: [] - storedVersions: [] diff --git a/koku-metrics-operator/1.1.8/manifests/koku-metrics-operator.clusterserviceversion.yaml b/koku-metrics-operator/1.1.8/manifests/koku-metrics-operator.clusterserviceversion.yaml deleted file mode 100644 index 251c590d9..000000000 --- a/koku-metrics-operator/1.1.8/manifests/koku-metrics-operator.clusterserviceversion.yaml +++ /dev/null @@ -1,474 +0,0 @@ -apiVersion: operators.coreos.com/v1alpha1 -kind: ClusterServiceVersion -metadata: - annotations: - alm-examples: |- - [ - { - "apiVersion": "koku-metrics-cfg.openshift.io/v1beta1", - "kind": "KokuMetricsConfig", - "metadata": { - "name": "kokumetricscfg-sample-v1beta1" - }, - "spec": { - "authentication": { - "type": "token" - }, - "packaging": { - "max_reports_to_store": 30, - "max_size_MB": 100 - }, - "prometheus_config": {}, - "source": { - "check_cycle": 1440, - "create_source": false, - "name": "INSERT-SOURCE-NAME" - }, - "upload": { - "upload_cycle": 360, - "upload_toggle": true - } - } - } - ] - capabilities: Seamless Upgrades - categories: Monitoring - certified: "false" - containerImage: quay.io/project-koku/koku-metrics-operator@sha256:39941913cb80c7a75ee5614e223f51634af13388a3865ec2c2d0663b5efbe484 - createdAt: "2022-10-10T17:06:23Z" - description: A Golang-based OpenShift Operator that generates and uploads OpenShift - usage metrics to cost management. - operatorframework.io/suggested-namespace: koku-metrics-operator - operators.openshift.io/infrastructure-features: '["Disconnected"]' - operators.operatorframework.io/builder: operator-sdk-v1.23.0 - operators.operatorframework.io/project_layout: go.kubebuilder.io/v2 - repository: https://github.com/project-koku/koku-metrics-operator - support: Cost Management - name: koku-metrics-operator.v1.1.8 - namespace: placeholder -spec: - apiservicedefinitions: {} - customresourcedefinitions: - owned: - - description: KokuMetricsConfig is the Schema for the kokumetricsconfig API - displayName: Koku Metrics Config - kind: KokuMetricsConfig - name: kokumetricsconfigs.koku-metrics-cfg.openshift.io - version: v1beta1 - description: |- - # Koku Metrics Operator - ## Introduction - The `koku-metrics-operator` is a component of the [cost managment](https://access.redhat.com/documentation/en-us/cost_management_service) service for Openshift, used to gather the required information from the cluster. It is recommended to be installed in OpenShift 4.5+. This operator obtains OpenShift usage data by querying Prometheus and uploads it to cost management to be processed. The Operator queries Prometheus every hour to create metric reports, which are then packaged and uploaded to cost management at [console.redhat.com](https://console.redhat.com). For more information, reach out to . - - This operator is capable of functioning within a disconnected/restricted network (aka air-gapped mode). In this mode, the operator will store the packaged reports for manual retrieval instead of being uploaded to cost management. Documentation for installing an operator within a restricted network can be found [here](https://docs.openshift.com/container-platform/latest/operators/admin/olm-restricted-networks.html). - - ## Features and Capabilities - #### Metrics collection: - The Koku Metrics Operator (`koku-metrics-operator`) collects the metrics required for cost management by: - * Querying Prometheus to gather the necessary metrics for cost management. - * Writing Prometheus queries to CSV report files. - * Packaging the CSV report files into tarballs. - - #### Additional Capabilities: - * The operator can be configured to automatically upload the packaged reports to cost management through Red Hat Insights Ingress service. - * The operator can create a source in console.redhat.com. A source is required for cost management to process the uploaded packages. - * PersistentVolumeClaim (PVC) configuration: The KokuMetricsConfig CR can accept a PVC definition and the operator will create and mount the PVC. If one is not provided, a default PVC will be created. - * Restricted network installation: this operator can function on a restricted network. In this mode, the operator stores the packaged reports for manual retrieval. - - ## Limitations and Pre-Requisites - #### Limitations (Potential for metrics data loss) - * A source **must** exist in console.redhat.com for an uploaded payload to be processed by cost management. The operator sends the payload to the Red Hat Insights Ingress service which usually returns successfully, but the operator does not currently confirm with cost management that the payload was processed. After Ingress accepts the uploaded payload, the payload is removed from the operator and is gone forever. If the data within the payload is not processed, a gap will be introduced in the usage metrics. - - **Note** The following limitations are specific to operators configured to run in a restricted network: - * The `koku-metrics-operator` will not be able to generate new reports if the PVC storage is filled. If this occurs, the reports must be manually deleted from the PVC so that the operator can function as normal. - * The default report retention is 30 reports (about one week's worth of data). The reports must be manually downloaded and uploaded to console.redhat.com every week, or they will be deleted and the data will be lost. - - #### Storage configuration prerequisite - The operator will attempt to create and use the following PVC when installed: - - volume_claim_template: - apiVersion: v1 - kind: PersistentVolumeClaim - metadata: - name: koku-metrics-operator-data - spec: - accessModes: - - ReadWriteOnce - resources: - requests: - storage: 10Gi - - If a different PVC should be utilized, a valid PVC should be specified in the KokuMetricsConfig CR as described in the appropriate section below. The PVC to be used may exist already, or the operator will attempt to create it. - - To use the default specification, the follow assumptions must be met: - 1. A default StorageClass is defined. - 2. Dynamic provisioning for that default StorageClass is enabled. - - If these assumptions are not met, the operator will not deploy correctly. In these cases, storage must be manually configured. After configuring storage, a valid PVC template should be supplied in the `volume_claim_template` spec of the KokuMetricsConfig CR. - - ## Configure the koku-metrics-operator - **Note** There are separate instructions for configuring the `koku-metrics-operator` to run in a restricted network. - ##### Configure authentication - The default authentication for the operator is `token`. No further steps are required to configure token authentication. If `basic` is the preferred authentication method, a Secret must be created which holds username and password credentials: - 1. On the left navigation pane, select `Workloads` -> `Secrets` -> select Project: `koku-metrics-operator` -> `Create` -> `Key/Value Secret` - 2. Give the Secret a name and add 2 keys: `username` and `password` (all lowercase). The values for these keys correspond to console.redhat.com credentials. - 3. Select `Create`. - ##### Create the KokuMetricsConfig - Configure the koku-metrics-operator by creating a `KokuMetricsConfig`. - 1. On the left navigation pane, select `Operators` -> `Installed Operators` -> `koku-metrics-operator` -> `KokuMetricsConfig` -> `Create Instance`. - 2. For `basic` authentication, edit the following values in the spec: - * Replace `authentication: type:` with `basic`. - * Add the `secret_name` field under `authentication`, and set it equal to the name of the authentication Secret that was created above. The spec should look similar to the following: - - ``` - authentication: - secret_name: SECRET-NAME - type: basic - ``` - - 3. To configure the koku-metrics-operator to create a cost management source, edit the following values in the `source` field: - * Replace `INSERT-SOURCE-NAME` with the preferred name of the source to be created. - * Replace the `create_source` field value with `true`. - - **Note:** if the source already exists, replace `INSERT-SOURCE-NAME` with the existing name, and leave `create_source` as false. This will allow the operator to confirm the source exists. - 4. If not specified, the operator will create a default PersistentVolumeClaim called `koku-metrics-operator-data` with 10Gi of storage. To configure the koku-metrics-operator to use or create a different PVC, edit the following in the spec: - * Add the desired configuration to the `volume_claim_template` field in the spec: - - ``` - volume_claim_template: - apiVersion: v1 - kind: PersistentVolumeClaim - metadata: - name: - spec: - accessModes: - - ReadWriteOnce - resources: - requests: - storage: 10Gi - ``` - - **Note:** If using the YAML View, the `volume_claim_template` field must be added to the spec - 5. Select `Create`. - - # Restricted Network Usage (disconnected/air-gapped mode) - ## Installation - To install the `koku-metrics-operator` in a restricted network, follow the [olm documentation](https://docs.openshift.com/container-platform/latest/operators/admin/olm-restricted-networks.html). The operator is found in the `community-operators` Catalog in the `registry.redhat.io/redhat/community-operator-index:latest` Index. If pruning the index before pushing to the mirrored registry, keep the `koku-metrics-operator` package. - - Within a restricted network, the operator queries prometheus to gather the necessary usage metrics, writes the query results to CSV files, and packages the reports for storage in the PVC. These reports then need to be manually downloaded from the cluster and uploaded to [console.redhat.com](https://console.redhat.com). - - ## Configure the koku-metrics-operator for a restricted network - ##### Create the KokuMetricsConfig - Configure the koku-metrics-operator by creating a `KokuMetricsConfig`. - 1. On the left navigation pane, select `Operators` -> `Installed Operators` -> `koku-metrics-operator` -> `KokuMetricsConfig` -> `Create Instance`. - 2. Specify the desired storage. If not specified, the operator will create a default Persistent Volume Claim called `koku-metrics-operator-data` with 10Gi of storage. To configure the koku-metrics-operator to use or create a different PVC, edit the following in the spec: - * Add the desired configuration to the `volume_claim_template` field in the spec: - - ``` - volume_claim_template: - apiVersion: v1 - kind: PersistentVolumeClaim - metadata: - name: - spec: - storageClassName: - accessModes: - - ReadWriteOnce - resources: - requests: - storage: 10Gi - ``` - - **Note:** If using the YAML View, the `volume_claim_template` field must be added to the spec - 3. (Optional) Specify the desired report retention. The operator will retain 30 reports by default. This corresponds to approximately one week's worth of data if using the default packaging cycle. To modify the number of retained reports: - * Change the `packaging` spec field `max_reports_to_store` to the desired number of reports to retain. Once this max number is reached, the operator will start removing the oldest packages remaining on the PVC: - - ``` - packaging: - max_size_MB: 100 - max_reports_to_store: 30 - ``` - - **Note:** The number of retained reports directly affects the frequency that reports must be manually downloaded from the PVC. Take caution in setting this to a higher number of reports, as the operator cannot write data to the PVC if the storage is full. - 4. To configure the operator to perform in a restricted network, set the `upload_toggle` to `false`: - - ``` - upload: - upload_cycle: 360, - upload_toggle: false - ``` - - 5. Select `Create`. - - ## Download reports from the Operator & clean up the PVC - If the `koku-metrics-operator` is configured to run in a restricted network, the metric reports will not automatically upload to cost managment. Instead, they need to be manually copied from the PVC for upload to [console.redhat.com](https://console.redhat.com). The default configuration saves one week of reports which means the process of downloading and uploading reports should be repeated weekly to prevent loss of metrics data. To download the reports, complete the following steps: - 1. Create the following Pod, ensuring the `claimName` matches the PVC containing the report data: - - ``` - kind: Pod - apiVersion: v1 - metadata: - name: volume-shell - namespace: koku-metrics-operator - labels: - app: koku-metrics-operator - spec: - volumes: - - name: koku-metrics-operator-reports - persistentVolumeClaim: - claimName: koku-metrics-operator-data - containers: - - name: volume-shell - image: busybox - command: ['sleep', 'infinity'] - volumeMounts: - - name: koku-metrics-operator-reports - mountPath: /tmp/koku-metrics-operator-reports - ``` - - 2. Use rsync to copy all of the files ready for upload from the PVC to a local folder: - - ``` - $ oc rsync volume-shell:/tmp/koku-metrics-operator-reports/upload local/path/to/save/folder - ``` - - 3. Once confirming that the files have been successfully copied, use rsh to connect to the pod and delete the contents of the upload folder so that they are no longer in storage: - - ``` - $ oc rsh volume-shell - $ rm /tmp/koku-metrics-operator-reports/upload/* - ``` - - 4. (Optional) Delete the pod that was used to connect to the PVC: - - ``` - $ oc delete -f volume-shell.yaml - ``` - - ## Create a source - In a restricted network, the `koku-metrics-operator` cannot automatically create a source. This process must be done manually. In the console.redhat.com platform, open the [Sources menu](https://console.redhat.com/settings/sources/) to begin adding an OpenShift source to cost management: - - Prerequisites: - * The cluster identifier which can be found in the KokuMetricsConfig CR, the cluster Overview page, or the cluster Help > About. - - Create source: - 1. Navigate to the Sources menu - 2. Select the `Red Hat sources` tab - 3. Create a new `Red Hat Openshift Container Platform` source: - * give the source a unique name - * add the Cost Management application - * add the cluster identifier - 4. In the Sources wizard, review the details and click `Finish` to create the Source. - - ## Upload the reports to cost managment - Uploading reports to cost managment is done through curl: - - $ curl -vvvv -F "file=@FILE_NAME.tar.gz;type=application/vnd.redhat.hccm.tar+tgz" https://cloud.redhat.com/api/ingress/v1/upload -u USERNAME:PASS - - where `USERNAME` and `PASS` correspond to the user credentials for [console.redhat.com](https://console.redhat.com), and `FILE_NAME` is the name of the report to upload. - - displayName: Koku Metrics Operator - icon: - - base64data: PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4KPCEtLSBHZW5lcmF0b3I6IEFkb2JlIElsbHVzdHJhdG9yIDIyLjEuMCwgU1ZHIEV4cG9ydCBQbHVnLUluIC4gU1ZHIFZlcnNpb246IDYuMDAgQnVpbGQgMCkgIC0tPgo8c3ZnIHZlcnNpb249IjEuMSIgaWQ9IkxheWVyXzEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4IgoJIHZpZXdCb3g9IjAgMCAzMDAgMzAwIiBzdHlsZT0iZW5hYmxlLWJhY2tncm91bmQ6bmV3IDAgMCAzMDAgMzAwOyIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSI+CjxzdHlsZSB0eXBlPSJ0ZXh0L2NzcyI+Cgkuc3Qwe2ZpbGw6I0VFMDAwMDt9Cjwvc3R5bGU+Cjx0aXRsZT5Db3N0LWljb248L3RpdGxlPgo8ZGVzYz5DcmVhdGVkIHdpdGggU2tldGNoLjwvZGVzYz4KPGc+Cgk8Zz4KCQk8cGF0aCBjbGFzcz0ic3QwIiBkPSJNMjM5LjAzNzAzMzEsMTE3LjI3NTE3N2MtMy4yNjU4MDgxLTQxLjk4OTA1MTgtMzguMjU2NjgzMy03NC42NDcyMDE1LTgxLjE3ODgzMy03NC42NDcyMDE1CgkJCWMtMjcuNTI2MTUzNiwwLTUzLjE4NjEyNjcsMTMuOTk2MzQ5My02OC4xMTU1NzAxLDM3LjMyMzYwMDhjLTEuODY2MTgwNCwwLTMuNzMyMzUzMi0wLjQ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DAuMDc4MzIzNC0wLjgyMDE1OTksMC0xLjIwMjU5MDktMC4yMjU3NjkKCQkJYy0xLjE0MjcxNTUtMC44NDMyMDA3LTIuNDQyMDc3Ni0xLjI2MjQ5NjktMy44OTgwODY1LTEuMjYyNDk2OWgtNy42NzYzNjExYy0wLjkxNjkxNTksMC0xLjcwMDIyNTgsMC4zMjI1MjUtMi4zNDk4OTkzLDAuOTcyMjEzNwoJCQljLTAuNjQ5Njg4NywwLjY0OTY3MzUtMC45NzY4MjE5LDEuNDc0NDQxNS0wLjk3NjgyMTksMi40NjUwODc5YzAsMC42ODY1NTQsMC4yMzAzOTI1LDEuMzM2MjEyMiwwLjY5MTE0NjksMS45NDkwMzU2CgkJCWMwLjQ1NjE2MTUsMC42MTI4MjM1LDEuMDMyMTE5OCwxLjAzMjExOTgsMS43MTg2NTg0LDEuMjYyNDk2OUwxNzQuMjgwNjM5NiwxODUuODczNjExNXoiLz4KCTwvZz4KPC9nPgo8L3N2Zz4K - mediatype: image/svg+xml - install: - spec: - clusterPermissions: - - rules: - - apiGroups: - - config.openshift.io - resources: - - clusterversions - verbs: - - get - - list - - watch - - apiGroups: - - "" - resources: - - namespaces - verbs: - - get - - list - - watch - - apiGroups: - - "" - resources: - - secrets - verbs: - - get - serviceAccountName: koku-metrics-controller-manager - deployments: - - label: - app: koku-metrics-operator - control-plane: controller-manager - name: koku-metrics-operator - spec: - replicas: 1 - selector: - matchLabels: - app: koku-metrics-operator - control-plane: controller-manager - strategy: {} - template: - metadata: - labels: - app: koku-metrics-operator - control-plane: controller-manager - spec: - containers: - - args: - - --enable-leader-election - command: - - /manager - env: - - name: IN_CLUSTER - value: "true" - - name: WATCH_NAMESPACE - valueFrom: - fieldRef: - fieldPath: metadata.annotations['olm.targetNamespaces'] - image: quay.io/project-koku/koku-metrics-operator@sha256:39941913cb80c7a75ee5614e223f51634af13388a3865ec2c2d0663b5efbe484 - name: manager - resources: - limits: - cpu: 500m - memory: 500Mi - requests: - cpu: 100m - memory: 20Mi - terminationMessagePolicy: FallbackToLogsOnError - volumeMounts: - - mountPath: /tmp/koku-metrics-operator-reports - name: koku-metrics-operator-reports - serviceAccountName: koku-metrics-controller-manager - terminationGracePeriodSeconds: 10 - volumes: - - name: koku-metrics-operator-reports - permissions: - - rules: - - apiGroups: - - "" - resources: - - configmaps - verbs: - - get - - list - - watch - - create - - update - - patch - - delete - - apiGroups: - - "" - resources: - - configmaps/status - verbs: - - get - - update - - patch - - apiGroups: - - "" - resources: - - events - verbs: - - create - - patch - - apiGroups: - - coordination.k8s.io - resources: - - leases - verbs: - - get - - list - - watch - - create - - update - - patch - - delete - - apiGroups: - - apps - resources: - - deployments - verbs: - - get - - list - - patch - - watch - - apiGroups: - - "" - resources: - - configmaps - - endpoints - - events - - persistentvolumeclaims - - pods - - secrets - - serviceaccounts - - services - - services/finalizers - verbs: - - create - - delete - - get - - list - - patch - - update - - watch - - apiGroups: - - koku-metrics-cfg.openshift.io - resources: - - kokumetricsconfigs - verbs: - - create - - delete - - get - - list - - patch - - update - - watch - - apiGroups: - - koku-metrics-cfg.openshift.io - resources: - - kokumetricsconfigs/status - verbs: - - get - - patch - - update - - apiGroups: - - operators.coreos.com - resources: - - clusterserviceversions - verbs: - - get - - list - - patch - - update - - watch - serviceAccountName: koku-metrics-controller-manager - strategy: deployment - installModes: - - supported: true - type: OwnNamespace - - supported: true - type: SingleNamespace - - supported: false - type: MultiNamespace - - supported: false - type: AllNamespaces - relatedImages: - - name: koku-metrics-operator - image: quay.io/project-koku/koku-metrics-operator@sha256:39941913cb80c7a75ee5614e223f51634af13388a3865ec2c2d0663b5efbe484 - keywords: - - cost - - management - - usage - - monitor - maintainers: - - email: costmanagement@redhat.com - name: costmanagement - maturity: alpha - provider: - name: Red Hat - replaces: koku-metrics-operator.v1.1.7 - version: 1.1.8 diff --git a/koku-metrics-operator/1.1.8/metadata/annotations.yaml b/koku-metrics-operator/1.1.8/metadata/annotations.yaml deleted file mode 100644 index 36bda31b1..000000000 --- a/koku-metrics-operator/1.1.8/metadata/annotations.yaml +++ /dev/null @@ -1,15 +0,0 @@ -annotations: - # Core bundle annotations. - operators.operatorframework.io.bundle.mediatype.v1: registry+v1 - operators.operatorframework.io.bundle.manifests.v1: manifests/ - operators.operatorframework.io.bundle.metadata.v1: metadata/ - operators.operatorframework.io.bundle.package.v1: koku-metrics-operator - operators.operatorframework.io.bundle.channels.v1: alpha,beta - operators.operatorframework.io.bundle.channel.default.v1: beta - operators.operatorframework.io.metrics.builder: operator-sdk-v1.23.0 - operators.operatorframework.io.metrics.mediatype.v1: metrics+v1 - operators.operatorframework.io.metrics.project_layout: go.kubebuilder.io/v2 - - # Annotations for testing. - operators.operatorframework.io.test.mediatype.v1: scorecard+v1 - operators.operatorframework.io.test.config.v1: tests/scorecard/ diff --git a/koku-metrics-operator/1.1.8/tests/scorecard/config.yaml b/koku-metrics-operator/1.1.8/tests/scorecard/config.yaml deleted file mode 100644 index a19cb8f47..000000000 --- a/koku-metrics-operator/1.1.8/tests/scorecard/config.yaml +++ /dev/null @@ -1,40 +0,0 @@ -apiVersion: scorecard.operatorframework.io/v1alpha3 -kind: Configuration -metadata: - name: config -stages: -- parallel: true - tests: - - entrypoint: - - scorecard-test - - basic-check-spec - image: quay.io/operator-framework/scorecard-test:v1.10.1 - labels: - suite: basic - test: basic-check-spec-test - storage: - spec: - mountPath: {} - - entrypoint: - - scorecard-test - - olm-bundle-validation - image: quay.io/operator-framework/scorecard-test:v1.10.1 - labels: - suite: olm - test: olm-bundle-validation-test - storage: - spec: - mountPath: {} - - entrypoint: - - scorecard-test - - olm-crds-have-validation - image: quay.io/operator-framework/scorecard-test:v1.10.1 - labels: - suite: olm - test: olm-crds-have-validation-test - storage: - spec: - mountPath: {} -storage: - spec: - mountPath: {} diff --git a/koku-metrics-operator/1.1.9/Dockerfile b/koku-metrics-operator/1.1.9/Dockerfile deleted file mode 100644 index 7eaf8b9fc..000000000 --- a/koku-metrics-operator/1.1.9/Dockerfile +++ /dev/null @@ -1,21 +0,0 @@ -FROM scratch - -# Core bundle labels. -LABEL operators.operatorframework.io.bundle.mediatype.v1=registry+v1 -LABEL operators.operatorframework.io.bundle.manifests.v1=manifests/ -LABEL operators.operatorframework.io.bundle.metadata.v1=metadata/ -LABEL operators.operatorframework.io.bundle.package.v1=koku-metrics-operator -LABEL operators.operatorframework.io.bundle.channels.v1=alpha,beta -LABEL operators.operatorframework.io.bundle.channel.default.v1=beta -LABEL operators.operatorframework.io.metrics.builder=operator-sdk-v1.25.0 -LABEL operators.operatorframework.io.metrics.mediatype.v1=metrics+v1 -LABEL operators.operatorframework.io.metrics.project_layout=go.kubebuilder.io/v2 - -# Labels for testing. -LABEL operators.operatorframework.io.test.mediatype.v1=scorecard+v1 -LABEL operators.operatorframework.io.test.config.v1=tests/scorecard/ - -# Copy files to locations specified by labels. -COPY manifests /manifests/ -COPY metadata /metadata/ -COPY tests/scorecard /tests/scorecard/ diff --git a/koku-metrics-operator/1.1.9/manifests/koku-metrics-cfg.openshift.io_kokumetricsconfigs.yaml b/koku-metrics-operator/1.1.9/manifests/koku-metrics-cfg.openshift.io_kokumetricsconfigs.yaml deleted file mode 100644 index 651ae1bba..000000000 --- a/koku-metrics-operator/1.1.9/manifests/koku-metrics-cfg.openshift.io_kokumetricsconfigs.yaml +++ /dev/null @@ -1,842 +0,0 @@ -apiVersion: apiextensions.k8s.io/v1 -kind: CustomResourceDefinition -metadata: - annotations: - controller-gen.kubebuilder.io/version: v0.3.0 - creationTimestamp: null - labels: - app: koku-metrics-operator - name: kokumetricsconfigs.koku-metrics-cfg.openshift.io -spec: - group: koku-metrics-cfg.openshift.io - names: - kind: KokuMetricsConfig - listKind: KokuMetricsConfigList - plural: kokumetricsconfigs - singular: kokumetricsconfig - scope: Namespaced - versions: - - name: v1beta1 - schema: - openAPIV3Schema: - description: KokuMetricsConfig is the Schema for the kokumetricsconfig API - properties: - apiVersion: - description: 'APIVersion defines the versioned schema of this representation - of an object. Servers should convert recognized schemas to the latest - internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' - type: string - kind: - description: 'Kind is a string value representing the REST resource this - object represents. Servers may infer this from the endpoint the client - submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' - type: string - metadata: - type: object - spec: - description: KokuMetricsConfigSpec defines the desired state of KokuMetricsConfig. - properties: - api_url: - default: https://cloud.redhat.com - description: FOR DEVELOPMENT ONLY. APIURL is a field of KokuMetricsConfig - to represent the url of the API endpoint for service interaction. - The default is `https://cloud.redhat.com`. - type: string - authentication: - description: Authentication is a field of KokuMetricsConfig to represent - the authentication object. - properties: - secret_name: - description: AuthenticationSecretName is a field of KokuMetricsConfig - to represent the secret with the user and password used for - uploads. - type: string - type: - default: token - description: 'AuthType is a field of KokuMetricsConfig to represent - the authentication type to be used basic or token. Valid values - are: - "basic" : Enables authentication using user and password - from authentication secret. - "token" (default): Uses cluster - token for authentication.' - enum: - - token - - basic - type: string - required: - - type - type: object - clusterID: - description: ClusterID is a field of KokuMetricsConfig to represent - the cluster UUID. Normally this value should not be specified. Only - set this value if the clusterID cannot be obtained from the ClusterVersion. - type: string - clusterVersion: - description: ClusterVersion is a field of KokuMetricsConfig to represent - the cluster version. Normally this value should not be specified. - Only set this value if the clusterVersion cannot be obtained from - the ClusterVersion. - type: string - packaging: - description: Packaging is a field of KokuMetricsConfig to represent - the packaging object. - properties: - max_reports_to_store: - default: 30 - description: MaxReports is a field of KokuMetricsConfig to represent - the maximum number of reports to store. The default is 30 reports - which corresponds to approximately 7 days worth of data given - the other default values. - format: int64 - minimum: 1 - type: integer - max_size_MB: - default: 100 - description: MaxSize is a field of KokuMetricsConfig to represent - the max file size in megabytes that will be compressed for upload - to Ingress. The default is 100. - format: int64 - maximum: 100 - minimum: 1 - type: integer - required: - - max_reports_to_store - - max_size_MB - type: object - prometheus_config: - description: PrometheusConfig is a field of KokuMetricsConfig to represent - the configuration of Prometheus connection. - properties: - context_timeout: - default: 120 - description: ContextTimeout is a field of KokuMetricsConfig to - represent how long a query to prometheus should run in seconds - before timing out. The default is 120 seconds. - format: int64 - maximum: 180 - minimum: 10 - type: integer - service_address: - default: https://thanos-querier.openshift-monitoring.svc:9091 - description: FOR DEVELOPMENT ONLY. SvcAddress is a field of KokuMetricsConfig - to represent the thanos-querier address. The default is `https://thanos-querier.openshift-monitoring.svc:9091`. - type: string - skip_tls_verification: - default: false - description: FOR DEVELOPMENT ONLY. SkipTLSVerification is a field - of KokuMetricsConfig to represent if the thanos-querier endpoint - must be certificate validated. The default is false. - type: boolean - required: - - service_address - - skip_tls_verification - type: object - source: - description: Source is a field of KokuMetricsConfig to represent the - desired source on cloud.redhat.com. - properties: - check_cycle: - default: 1440 - description: CheckCycle is a field of KokuMetricsConfig to represent - the number of minutes between each source check schedule The - default is 1440 min (24 hours). - format: int64 - minimum: 0 - type: integer - create_source: - default: false - description: CreateSource is a field of KokuMetricsConfigSpec - to represent if the source should be created if not found. - type: boolean - name: - description: SourceName is a field of KokuMetricsConfigSpec to - represent the source name on cloud.redhat.com. - type: string - sources_path: - default: /api/sources/v1.0/ - description: FOR DEVELOPMENT ONLY. SourcesAPIPath is a field of - KokuMetricsConfig to represent the path of the Sources API service. - The default is `/api/sources/v1.0/`. - type: string - required: - - check_cycle - - create_source - - sources_path - type: object - upload: - description: Upload is a field of KokuMetricsConfig to represent the - upload object. - properties: - ingress_path: - default: /api/ingress/v1/upload - description: FOR DEVELOPMENT ONLY. IngressAPIPath is a field of - KokuMetricsConfig to represent the path of the Ingress API service. - The default is `/api/ingress/v1/upload`. - type: string - upload_cycle: - default: 360 - description: UploadCycle is a field of KokuMetricsConfig to represent - the number of minutes between each upload schedule. The default - is 360 min (6 hours). - format: int64 - minimum: 0 - type: integer - upload_toggle: - default: true - description: UploadToggle is a field of KokuMetricsConfig to represent - if the operator is installed in a restricted-network. If `false`, - the operator will not upload to cloud.redhat.com or check/create - sources. The default is true. - type: boolean - upload_wait: - description: UploadWait is a field of KokuMetricsConfig to represent - the time to wait before sending an upload. - format: int64 - minimum: 0 - type: integer - validate_cert: - default: true - description: ValidateCert is a field of KokuMetricsConfig to represent - if the Ingress endpoint must be certificate validated. - type: boolean - required: - - ingress_path - - upload_cycle - - upload_toggle - - validate_cert - type: object - volume_claim_template: - description: VolumeClaimTemplate is a field of KokuMetricsConfig to - represent a PVC template. - properties: - apiVersion: - description: 'APIVersion defines the versioned schema of this - representation of an object. Servers should convert recognized - schemas to the latest internal value, and may reject unrecognized - values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' - type: string - kind: - description: 'Kind is a string value representing the REST resource - this object represents. Servers may infer this from the endpoint - the client submits requests to. Cannot be updated. In CamelCase. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' - type: string - metadata: - description: EmbeddedMetadata contains metadata relevant to an - EmbeddedResource. - properties: - annotations: - additionalProperties: - type: string - description: 'Annotations is an unstructured key value map - stored with a resource that may be set by external tools - to store and retrieve arbitrary metadata. They are not queryable - and should be preserved when modifying objects. More info: - http://kubernetes.io/docs/user-guide/annotations' - type: object - labels: - additionalProperties: - type: string - description: 'Map of string keys and values that can be used - to organize and categorize (scope and select) objects. May - match selectors of replication controllers and services. - More info: http://kubernetes.io/docs/user-guide/labels' - type: object - name: - description: 'Name must be unique within a namespace. Is required - when creating resources, although some resources may allow - a client to request the generation of an appropriate name - automatically. Name is primarily intended for creation idempotence - and configuration definition. Cannot be updated. More info: - http://kubernetes.io/docs/user-guide/identifiers#names' - type: string - type: object - spec: - description: 'Spec defines the desired characteristics of a volume - requested by a pod author. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims' - properties: - accessModes: - description: 'AccessModes contains the desired access modes - the volume should have. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes-1' - items: - type: string - type: array - dataSource: - description: 'This field can be used to specify either: * - An existing VolumeSnapshot object (snapshot.storage.k8s.io/VolumeSnapshot) - * An existing PVC (PersistentVolumeClaim) * An existing - custom resource that implements data population (Alpha) - In order to use custom resource types that implement data - population, the AnyVolumeDataSource feature gate must be - enabled. If the provisioner or an external controller can - support the specified data source, it will create a new - volume based on the contents of the specified data source.' - properties: - apiGroup: - description: APIGroup is the group for the resource being - referenced. If APIGroup is not specified, the specified - Kind must be in the core API group. For any other third-party - types, APIGroup is required. - type: string - kind: - description: Kind is the type of resource being referenced - type: string - name: - description: Name is the name of resource being referenced - type: string - required: - - kind - - name - type: object - resources: - description: 'Resources represents the minimum resources the - volume should have. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources' - properties: - limits: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - description: 'Limits describes the maximum amount of compute - resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/' - type: object - requests: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - description: 'Requests describes the minimum amount of - compute resources required. If Requests is omitted for - a container, it defaults to Limits if that is explicitly - specified, otherwise to an implementation-defined value. - More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/' - type: object - type: object - selector: - description: A label query over volumes to consider for binding. - properties: - matchExpressions: - description: matchExpressions is a list of label selector - requirements. The requirements are ANDed. - items: - description: A label selector requirement is a selector - that contains values, a key, and an operator that - relates the key and values. - properties: - key: - description: key is the label key that the selector - applies to. - type: string - operator: - description: operator represents a key's relationship - to a set of values. Valid operators are In, NotIn, - Exists and DoesNotExist. - type: string - values: - description: values is an array of string values. - If the operator is In or NotIn, the values array - must be non-empty. If the operator is Exists or - DoesNotExist, the values array must be empty. - This array is replaced during a strategic merge - patch. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - description: matchLabels is a map of {key,value} pairs. - A single {key,value} in the matchLabels map is equivalent - to an element of matchExpressions, whose key field is - "key", the operator is "In", and the values array contains - only "value". The requirements are ANDed. - type: object - type: object - storageClassName: - description: 'Name of the StorageClass required by the claim. - More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#class-1' - type: string - volumeMode: - description: volumeMode defines what type of volume is required - by the claim. Value of Filesystem is implied when not included - in claim spec. - type: string - volumeName: - description: VolumeName is the binding reference to the PersistentVolume - backing this claim. - type: string - type: object - type: object - required: - - authentication - - packaging - - prometheus_config - - source - - upload - type: object - status: - description: KokuMetricsConfigStatus defines the observed state of KokuMetricsConfig. - properties: - api_url: - description: APIURL is a field of KokuMetricsConfig to represent the - url of the API endpoint for service interaction. - type: string - authentication: - description: Authentication is a field of KokuMetricsConfig to represent - the authentication status. - properties: - credentials_found: - description: AuthenticationCredentialsFound is a field of KokuMetricsConfig - to represent if used for uploads were found. - type: boolean - error: - description: AuthErrorMessage is a field of KokuMetricsConfig - to represent an `invalid credentials` error message. - type: string - last_credential_verification_time: - description: LastVerificationTime is a field of KokuMetricsConfig - to represent the last time credentials were verified. - format: date-time - nullable: true - type: string - secret_name: - description: AuthenticationSecretName is a field of KokuMetricsConfig - to represent the secret with the user and password used for - uploads. - type: string - type: - description: AuthType is a field of KokuMetricsConfig to represent - the authentication type to be used basic or token. - enum: - - token - - basic - type: string - valid_basic_auth: - description: ValidBasicAuth is a field of KokuMetricsConfig to - represent if the given basic auth credentials are valid. - type: boolean - type: object - clusterID: - description: ClusterID is a field of KokuMetricsConfig to represent - the cluster UUID. - type: string - clusterVersion: - description: ClusterVersion is a field of KokuMetricsConfig to represent - the cluster version. - type: string - operator_commit: - description: OperatorCommit is a field of KokuMetricsConfig that shows - the commit hash of the operator. - type: string - packaging: - description: Packaging is a field of KokuMetricsConfig to represent - the packaging status - properties: - error: - description: PackagingError is a field of KokuMetricsConfig to - represent the error encountered packaging the reports. - type: string - last_successful_packaging_time: - description: LastSuccessfulPackagingTime is a field of KokuMetricsConfig - that shows the time of the last successful file packaging. - format: date-time - nullable: true - type: string - max_reports_to_store: - description: MaxReports is a field of KokuMetricsConfig to represent - the maximum number of reports to store. - format: int64 - type: integer - max_size_MB: - description: MaxSize is a field of KokuMetricsConfig to represent - the max file size in megabytes that will be compressed for upload - to Ingress. - format: int64 - type: integer - number_reports_stored: - description: ReportCount is a field of KokuMetricsConfig to represent - the number of reports in storage. - format: int64 - type: integer - packaged_files: - description: PackagedFiles is a field of KokuMetricsConfig to - represent the list of file packages in storage. - items: - type: string - type: array - type: object - persistent_volume_claim: - description: PersistentVolumeClaim is a field of KokuMetricsConfig - to represent a PVC. - properties: - apiVersion: - description: 'APIVersion defines the versioned schema of this - representation of an object. Servers should convert recognized - schemas to the latest internal value, and may reject unrecognized - values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' - type: string - kind: - description: 'Kind is a string value representing the REST resource - this object represents. Servers may infer this from the endpoint - the client submits requests to. Cannot be updated. In CamelCase. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' - type: string - metadata: - description: EmbeddedMetadata contains metadata relevant to an - EmbeddedResource. - properties: - annotations: - additionalProperties: - type: string - description: 'Annotations is an unstructured key value map - stored with a resource that may be set by external tools - to store and retrieve arbitrary metadata. They are not queryable - and should be preserved when modifying objects. More info: - http://kubernetes.io/docs/user-guide/annotations' - type: object - labels: - additionalProperties: - type: string - description: 'Map of string keys and values that can be used - to organize and categorize (scope and select) objects. May - match selectors of replication controllers and services. - More info: http://kubernetes.io/docs/user-guide/labels' - type: object - name: - description: 'Name must be unique within a namespace. Is required - when creating resources, although some resources may allow - a client to request the generation of an appropriate name - automatically. Name is primarily intended for creation idempotence - and configuration definition. Cannot be updated. More info: - http://kubernetes.io/docs/user-guide/identifiers#names' - type: string - type: object - spec: - description: 'Spec defines the desired characteristics of a volume - requested by a pod author. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims' - properties: - accessModes: - description: 'AccessModes contains the desired access modes - the volume should have. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes-1' - items: - type: string - type: array - dataSource: - description: 'This field can be used to specify either: * - An existing VolumeSnapshot object (snapshot.storage.k8s.io/VolumeSnapshot) - * An existing PVC (PersistentVolumeClaim) * An existing - custom resource that implements data population (Alpha) - In order to use custom resource types that implement data - population, the AnyVolumeDataSource feature gate must be - enabled. If the provisioner or an external controller can - support the specified data source, it will create a new - volume based on the contents of the specified data source.' - properties: - apiGroup: - description: APIGroup is the group for the resource being - referenced. If APIGroup is not specified, the specified - Kind must be in the core API group. For any other third-party - types, APIGroup is required. - type: string - kind: - description: Kind is the type of resource being referenced - type: string - name: - description: Name is the name of resource being referenced - type: string - required: - - kind - - name - type: object - resources: - description: 'Resources represents the minimum resources the - volume should have. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources' - properties: - limits: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - description: 'Limits describes the maximum amount of compute - resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/' - type: object - requests: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - description: 'Requests describes the minimum amount of - compute resources required. If Requests is omitted for - a container, it defaults to Limits if that is explicitly - specified, otherwise to an implementation-defined value. - More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/' - type: object - type: object - selector: - description: A label query over volumes to consider for binding. - properties: - matchExpressions: - description: matchExpressions is a list of label selector - requirements. The requirements are ANDed. - items: - description: A label selector requirement is a selector - that contains values, a key, and an operator that - relates the key and values. - properties: - key: - description: key is the label key that the selector - applies to. - type: string - operator: - description: operator represents a key's relationship - to a set of values. Valid operators are In, NotIn, - Exists and DoesNotExist. - type: string - values: - description: values is an array of string values. - If the operator is In or NotIn, the values array - must be non-empty. If the operator is Exists or - DoesNotExist, the values array must be empty. - This array is replaced during a strategic merge - patch. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - description: matchLabels is a map of {key,value} pairs. - A single {key,value} in the matchLabels map is equivalent - to an element of matchExpressions, whose key field is - "key", the operator is "In", and the values array contains - only "value". The requirements are ANDed. - type: object - type: object - storageClassName: - description: 'Name of the StorageClass required by the claim. - More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#class-1' - type: string - volumeMode: - description: volumeMode defines what type of volume is required - by the claim. Value of Filesystem is implied when not included - in claim spec. - type: string - volumeName: - description: VolumeName is the binding reference to the PersistentVolume - backing this claim. - type: string - type: object - type: object - prometheus: - description: Prometheus represents the status of premetheus queries. - properties: - configuration_error: - description: ConfigError is a field of KokuMetricsConfigStatus - to represent errors during prometheus configuration. - type: string - context_timeout: - description: ContextTimeout is a field of KokuMetricsConfigState - to represent how long a query to prometheus should run in seconds - before timing out. - format: int64 - type: integer - last_query_start_time: - description: LastQueryStartTime is a field of KokuMetricsConfigStatus - to represent the last time queries were started. - format: date-time - nullable: true - type: string - last_query_success_time: - description: LastQuerySuccessTime is a field of KokuMetricsConfigStatus - to represent the last time queries were successful. - format: date-time - nullable: true - type: string - prometheus_configured: - description: PrometheusConfigured is a field of KokuMetricsConfigStatus - to represent if the operator is configured to connect to prometheus. - type: boolean - prometheus_connected: - description: PrometheusConnected is a field of KokuMetricsConfigStatus - to represent if prometheus can be queried. - type: boolean - prometheus_connection_error: - description: ConnectionError is a field of KokuMetricsConfigStatus - to represent errors during prometheus test query. - type: string - service_address: - description: SvcAddress is the internal thanos-querier address. - type: string - skip_tls_verification: - description: SkipTLSVerification is a field of KokuMetricsConfigStatus - to represent if the thanos-querier endpoint must be certificate - validated. - type: boolean - required: - - prometheus_configured - - prometheus_connected - type: object - reports: - description: Reports represents the status of report generation. - properties: - data_collected: - description: DataCollected is a field of KokuMetricsConfigStatus - to represent whether or not data was collected for the last - query. - type: boolean - data_collection_message: - description: DataCollectionMessage is a field of KokuMetricsConfigStatus - to represent a message associated with the data_collected status. - type: string - last_hour_queried: - description: LastHourQueried is a field of KokuMetricsConfigStatus - to represent the time range for which metrics were last queried. - type: string - report_month: - description: ReportMonth is a field of KokuMetricsConfigStatus - to represent the month for which reports are being generated. - type: string - type: object - source: - description: Source is a field of KokuMetricsConfig to represent the - observed state of the source on cloud.redhat.com. - properties: - check_cycle: - description: CheckCycle is a field of KokuMetricsConfig to represent - the number of minutes between each source check schedule. The - default is 1440 min (24 hours). - format: int64 - type: integer - create_source: - description: CreateSource is a field of KokuMetricsConfigStatus - to represent if the source should be created if not found. A - source will not be created if upload_toggle is `false`. - type: boolean - error: - description: SourceError is a field of KokuMetricsConfigStatus - to represent the error encountered creating the source. - type: string - last_check_time: - description: LastSourceCheckTime is a field of KokuMetricsConfig - that shows the time that the last check was attempted. - format: date-time - nullable: true - type: string - name: - description: SourceName is a field of KokuMetricsConfigStatus - to represent the source name on cloud.redhat.com. - type: string - source_defined: - description: SourceDefined is a field of KokuMetricsConfigStatus - to represent if the source exists as defined on cloud.redhat.com. - type: boolean - sources_path: - description: SourcesAPIPath is a field of KokuMetricsConfig to - represent the path of the Sources API service. - type: string - type: object - storage: - description: Storage is a field - properties: - volume_mounted: - description: VolumeMounted is a bool to indicate if storage volume - was mounted. - type: boolean - volume_type: - description: VolumeType is the string representation of the volume - type. - type: string - type: object - upload: - description: Upload is a field of KokuMetricsConfig to represent the - upload object. - properties: - error: - description: UploadError is a field of KokuMetricsConfigStatus - to represent the error encountered uploading reports. - type: string - ingress_path: - description: IngressAPIPath is a field of KokuMetricsConfig to - represent the path of the Ingress API service. - type: string - last_payload_files: - description: LastPayloadFiles is a field of KokuMetricsConfig - to represent the list of files in the last payload that was - sent. - items: - type: string - type: array - last_payload_manifest_id: - description: LastPayloadManifest is a field of KokuMetricsConfig - that shows the manifestID of the last payload. - type: string - last_payload_name: - description: LastPayloadName is a field of KokuMetricsConfig that - shows the name of the last payload file. - type: string - last_payload_request_id: - description: LastPayloadRequestID is a field of KokuMetricsConfig - that shows the insights request id of the last payload. - type: string - last_successful_upload_time: - description: LastSuccessfulUploadTime is a field of KokuMetricsConfig - that shows the time of the last successful upload. - format: date-time - nullable: true - type: string - last_upload_status: - description: LastUploadStatus is a field of KokuMetricsConfig - that shows the http status of the last upload. - type: string - upload: - description: UploadToggle is a field of KokuMetricsConfig to represent - if the operator should upload to cloud.redhat.com. The default - is true - type: boolean - upload_cycle: - description: UploadCycle is a field of KokuMetricsConfig to represent - the number of minutes between each upload schedule. The default - is 360 min (6 hours). - format: int64 - type: integer - upload_wait: - description: UploadWait is a field of KokuMetricsConfig to represent - the time to wait before sending an upload. - format: int64 - type: integer - validate_cert: - description: ValidateCert is a field of KokuMetricsConfig to represent - if the Ingress endpoint must be certificate validated. - type: boolean - type: object - type: object - required: - - spec - type: object - served: true - storage: true - subresources: - status: {} -status: - acceptedNames: - kind: "" - plural: "" - conditions: [] - storedVersions: [] diff --git a/koku-metrics-operator/1.1.9/manifests/koku-metrics-operator.clusterserviceversion.yaml b/koku-metrics-operator/1.1.9/manifests/koku-metrics-operator.clusterserviceversion.yaml deleted file mode 100644 index adedbc964..000000000 --- a/koku-metrics-operator/1.1.9/manifests/koku-metrics-operator.clusterserviceversion.yaml +++ /dev/null @@ -1,474 +0,0 @@ -apiVersion: operators.coreos.com/v1alpha1 -kind: ClusterServiceVersion -metadata: - annotations: - alm-examples: |- - [ - { - "apiVersion": "koku-metrics-cfg.openshift.io/v1beta1", - "kind": "KokuMetricsConfig", - "metadata": { - "name": "kokumetricscfg-sample-v1beta1" - }, - "spec": { - "authentication": { - "type": "token" - }, - "packaging": { - "max_reports_to_store": 30, - "max_size_MB": 100 - }, - "prometheus_config": {}, - "source": { - "check_cycle": 1440, - "create_source": false, - "name": "INSERT-SOURCE-NAME" - }, - "upload": { - "upload_cycle": 360, - "upload_toggle": true - } - } - } - ] - capabilities: Seamless Upgrades - categories: Monitoring - certified: "false" - containerImage: quay.io/project-koku/koku-metrics-operator@sha256:e7f7b47891330e589e9b39974a73063978b8badf7e479790f5839e82cbf17c26 - createdAt: "2022-11-30T17:43:04Z" - description: A Golang-based OpenShift Operator that generates and uploads OpenShift - usage metrics to cost management. - operatorframework.io/suggested-namespace: koku-metrics-operator - operators.openshift.io/infrastructure-features: '["Disconnected"]' - operators.operatorframework.io/builder: operator-sdk-v1.25.0 - operators.operatorframework.io/project_layout: go.kubebuilder.io/v2 - repository: https://github.com/project-koku/koku-metrics-operator - support: Cost Management - name: koku-metrics-operator.v1.1.9 - namespace: placeholder -spec: - apiservicedefinitions: {} - customresourcedefinitions: - owned: - - description: KokuMetricsConfig is the Schema for the kokumetricsconfig API - displayName: Koku Metrics Config - kind: KokuMetricsConfig - name: kokumetricsconfigs.koku-metrics-cfg.openshift.io - version: v1beta1 - description: |- - # Koku Metrics Operator - ## Introduction - The `koku-metrics-operator` is a component of the [cost managment](https://access.redhat.com/documentation/en-us/cost_management_service) service for Openshift, used to gather the required information from the cluster. It is recommended to be installed in OpenShift 4.5+. This operator obtains OpenShift usage data by querying Prometheus and uploads it to cost management to be processed. The Operator queries Prometheus every hour to create metric reports, which are then packaged and uploaded to cost management at [console.redhat.com](https://console.redhat.com). For more information, reach out to . - - This operator is capable of functioning within a disconnected/restricted network (aka air-gapped mode). In this mode, the operator will store the packaged reports for manual retrieval instead of being uploaded to cost management. Documentation for installing an operator within a restricted network can be found [here](https://docs.openshift.com/container-platform/latest/operators/admin/olm-restricted-networks.html). - - ## Features and Capabilities - #### Metrics collection: - The Koku Metrics Operator (`koku-metrics-operator`) collects the metrics required for cost management by: - * Querying Prometheus to gather the necessary metrics for cost management. - * Writing Prometheus queries to CSV report files. - * Packaging the CSV report files into tarballs. - - #### Additional Capabilities: - * The operator can be configured to automatically upload the packaged reports to cost management through Red Hat Insights Ingress service. - * The operator can create a source in console.redhat.com. A source is required for cost management to process the uploaded packages. - * PersistentVolumeClaim (PVC) configuration: The KokuMetricsConfig CR can accept a PVC definition and the operator will create and mount the PVC. If one is not provided, a default PVC will be created. - * Restricted network installation: this operator can function on a restricted network. In this mode, the operator stores the packaged reports for manual retrieval. - - ## Limitations and Pre-Requisites - #### Limitations (Potential for metrics data loss) - * A source **must** exist in console.redhat.com for an uploaded payload to be processed by cost management. The operator sends the payload to the Red Hat Insights Ingress service which usually returns successfully, but the operator does not currently confirm with cost management that the payload was processed. After Ingress accepts the uploaded payload, the payload is removed from the operator and is gone forever. If the data within the payload is not processed, a gap will be introduced in the usage metrics. - - **Note** The following limitations are specific to operators configured to run in a restricted network: - * The `koku-metrics-operator` will not be able to generate new reports if the PVC storage is filled. If this occurs, the reports must be manually deleted from the PVC so that the operator can function as normal. - * The default report retention is 30 reports (about one week's worth of data). The reports must be manually downloaded and uploaded to console.redhat.com every week, or they will be deleted and the data will be lost. - - #### Storage configuration prerequisite - The operator will attempt to create and use the following PVC when installed: - - volume_claim_template: - apiVersion: v1 - kind: PersistentVolumeClaim - metadata: - name: koku-metrics-operator-data - spec: - accessModes: - - ReadWriteOnce - resources: - requests: - storage: 10Gi - - If a different PVC should be utilized, a valid PVC should be specified in the KokuMetricsConfig CR as described in the appropriate section below. The PVC to be used may exist already, or the operator will attempt to create it. - - To use the default specification, the follow assumptions must be met: - 1. A default StorageClass is defined. - 2. Dynamic provisioning for that default StorageClass is enabled. - - If these assumptions are not met, the operator will not deploy correctly. In these cases, storage must be manually configured. After configuring storage, a valid PVC template should be supplied in the `volume_claim_template` spec of the KokuMetricsConfig CR. - - ## Configure the koku-metrics-operator - **Note** There are separate instructions for configuring the `koku-metrics-operator` to run in a restricted network. - ##### Configure authentication - The default authentication for the operator is `token`. No further steps are required to configure token authentication. If `basic` is the preferred authentication method, a Secret must be created which holds username and password credentials: - 1. On the left navigation pane, select `Workloads` -> `Secrets` -> select Project: `koku-metrics-operator` -> `Create` -> `Key/Value Secret` - 2. Give the Secret a name and add 2 keys: `username` and `password` (all lowercase). The values for these keys correspond to console.redhat.com credentials. - 3. Select `Create`. - ##### Create the KokuMetricsConfig - Configure the koku-metrics-operator by creating a `KokuMetricsConfig`. - 1. On the left navigation pane, select `Operators` -> `Installed Operators` -> `koku-metrics-operator` -> `KokuMetricsConfig` -> `Create Instance`. - 2. For `basic` authentication, edit the following values in the spec: - * Replace `authentication: type:` with `basic`. - * Add the `secret_name` field under `authentication`, and set it equal to the name of the authentication Secret that was created above. The spec should look similar to the following: - - ``` - authentication: - secret_name: SECRET-NAME - type: basic - ``` - - 3. To configure the koku-metrics-operator to create a cost management source, edit the following values in the `source` field: - * Replace `INSERT-SOURCE-NAME` with the preferred name of the source to be created. - * Replace the `create_source` field value with `true`. - - **Note:** if the source already exists, replace `INSERT-SOURCE-NAME` with the existing name, and leave `create_source` as false. This will allow the operator to confirm the source exists. - 4. If not specified, the operator will create a default PersistentVolumeClaim called `koku-metrics-operator-data` with 10Gi of storage. To configure the koku-metrics-operator to use or create a different PVC, edit the following in the spec: - * Add the desired configuration to the `volume_claim_template` field in the spec: - - ``` - volume_claim_template: - apiVersion: v1 - kind: PersistentVolumeClaim - metadata: - name: - spec: - accessModes: - - ReadWriteOnce - resources: - requests: - storage: 10Gi - ``` - - **Note:** If using the YAML View, the `volume_claim_template` field must be added to the spec - 5. Select `Create`. - - # Restricted Network Usage (disconnected/air-gapped mode) - ## Installation - To install the `koku-metrics-operator` in a restricted network, follow the [olm documentation](https://docs.openshift.com/container-platform/latest/operators/admin/olm-restricted-networks.html). The operator is found in the `community-operators` Catalog in the `registry.redhat.io/redhat/community-operator-index:latest` Index. If pruning the index before pushing to the mirrored registry, keep the `koku-metrics-operator` package. - - Within a restricted network, the operator queries prometheus to gather the necessary usage metrics, writes the query results to CSV files, and packages the reports for storage in the PVC. These reports then need to be manually downloaded from the cluster and uploaded to [console.redhat.com](https://console.redhat.com). - - ## Configure the koku-metrics-operator for a restricted network - ##### Create the KokuMetricsConfig - Configure the koku-metrics-operator by creating a `KokuMetricsConfig`. - 1. On the left navigation pane, select `Operators` -> `Installed Operators` -> `koku-metrics-operator` -> `KokuMetricsConfig` -> `Create Instance`. - 2. Specify the desired storage. If not specified, the operator will create a default Persistent Volume Claim called `koku-metrics-operator-data` with 10Gi of storage. To configure the koku-metrics-operator to use or create a different PVC, edit the following in the spec: - * Add the desired configuration to the `volume_claim_template` field in the spec: - - ``` - volume_claim_template: - apiVersion: v1 - kind: PersistentVolumeClaim - metadata: - name: - spec: - storageClassName: - accessModes: - - ReadWriteOnce - resources: - requests: - storage: 10Gi - ``` - - **Note:** If using the YAML View, the `volume_claim_template` field must be added to the spec - 3. (Optional) Specify the desired report retention. The operator will retain 30 reports by default. This corresponds to approximately one week's worth of data if using the default packaging cycle. To modify the number of retained reports: - * Change the `packaging` spec field `max_reports_to_store` to the desired number of reports to retain. Once this max number is reached, the operator will start removing the oldest packages remaining on the PVC: - - ``` - packaging: - max_size_MB: 100 - max_reports_to_store: 30 - ``` - - **Note:** The number of retained reports directly affects the frequency that reports must be manually downloaded from the PVC. Take caution in setting this to a higher number of reports, as the operator cannot write data to the PVC if the storage is full. - 4. To configure the operator to perform in a restricted network, set the `upload_toggle` to `false`: - - ``` - upload: - upload_cycle: 360, - upload_toggle: false - ``` - - 5. Select `Create`. - - ## Download reports from the Operator & clean up the PVC - If the `koku-metrics-operator` is configured to run in a restricted network, the metric reports will not automatically upload to cost managment. Instead, they need to be manually copied from the PVC for upload to [console.redhat.com](https://console.redhat.com). The default configuration saves one week of reports which means the process of downloading and uploading reports should be repeated weekly to prevent loss of metrics data. To download the reports, complete the following steps: - 1. Create the following Pod, ensuring the `claimName` matches the PVC containing the report data: - - ``` - kind: Pod - apiVersion: v1 - metadata: - name: volume-shell - namespace: koku-metrics-operator - labels: - app: koku-metrics-operator - spec: - volumes: - - name: koku-metrics-operator-reports - persistentVolumeClaim: - claimName: koku-metrics-operator-data - containers: - - name: volume-shell - image: busybox - command: ['sleep', 'infinity'] - volumeMounts: - - name: koku-metrics-operator-reports - mountPath: /tmp/koku-metrics-operator-reports - ``` - - 2. Use rsync to copy all of the files ready for upload from the PVC to a local folder: - - ``` - $ oc rsync volume-shell:/tmp/koku-metrics-operator-reports/upload local/path/to/save/folder - ``` - - 3. Once confirming that the files have been successfully copied, use rsh to connect to the pod and delete the contents of the upload folder so that they are no longer in storage: - - ``` - $ oc rsh volume-shell - $ rm /tmp/koku-metrics-operator-reports/upload/* - ``` - - 4. (Optional) Delete the pod that was used to connect to the PVC: - - ``` - $ oc delete -f volume-shell.yaml - ``` - - ## Create a source - In a restricted network, the `koku-metrics-operator` cannot automatically create a source. This process must be done manually. In the console.redhat.com platform, open the [Sources menu](https://console.redhat.com/settings/sources/) to begin adding an OpenShift source to cost management: - - Prerequisites: - * The cluster identifier which can be found in the KokuMetricsConfig CR, the cluster Overview page, or the cluster Help > About. - - Create source: - 1. Navigate to the Sources menu - 2. Select the `Red Hat sources` tab - 3. Create a new `Red Hat Openshift Container Platform` source: - * give the source a unique name - * add the Cost Management application - * add the cluster identifier - 4. In the Sources wizard, review the details and click `Finish` to create the Source. - - ## Upload the reports to cost managment - Uploading reports to cost managment is done through curl: - - $ curl -vvvv -F "file=@FILE_NAME.tar.gz;type=application/vnd.redhat.hccm.tar+tgz" https://cloud.redhat.com/api/ingress/v1/upload -u USERNAME:PASS - - where `USERNAME` and `PASS` correspond to the user credentials for [console.redhat.com](https://console.redhat.com), and `FILE_NAME` is the name of the report to upload. - - displayName: Koku Metrics Operator - icon: - - base64data: PD94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YzNjExYy0wLjkxNjkxNTksMC0xLjcwMDIyNTgsMC4zMjI1MjUtMi4zNDk4OTkzLDAuOTcyMjEzNwoJCQljLTAuNjQ5Njg4NywwLjY0OTY3MzUtMC45NzY4MjE5LDEuNDc0NDQxNS0wLjk3NjgyMTksMi40NjUwODc5YzAsMC42ODY1NTQsMC4yMzAzOTI1LDEuMzM2MjEyMiwwLjY5MTE0NjksMS45NDkwMzU2CgkJCWMwLjQ1NjE2MTUsMC42MTI4MjM1LDEuMDMyMTE5OCwxLjAzMjExOTgsMS43MTg2NTg0LDEuMjYyNDk2OUwxNzQuMjgwNjM5NiwxODUuODczNjExNXoiLz4KCTwvZz4KPC9nPgo8L3N2Zz4K - mediatype: image/svg+xml - install: - spec: - clusterPermissions: - - rules: - - apiGroups: - - config.openshift.io - resources: - - clusterversions - verbs: - - get - - list - - watch - - apiGroups: - - "" - resources: - - namespaces - verbs: - - get - - list - - watch - - apiGroups: - - "" - resources: - - secrets - verbs: - - get - serviceAccountName: koku-metrics-controller-manager - deployments: - - label: - app: koku-metrics-operator - control-plane: controller-manager - name: koku-metrics-operator - spec: - replicas: 1 - selector: - matchLabels: - app: koku-metrics-operator - control-plane: controller-manager - strategy: {} - template: - metadata: - labels: - app: koku-metrics-operator - control-plane: controller-manager - spec: - containers: - - args: - - --enable-leader-election - command: - - /manager - env: - - name: IN_CLUSTER - value: "true" - - name: WATCH_NAMESPACE - valueFrom: - fieldRef: - fieldPath: metadata.annotations['olm.targetNamespaces'] - image: quay.io/project-koku/koku-metrics-operator@sha256:e7f7b47891330e589e9b39974a73063978b8badf7e479790f5839e82cbf17c26 - name: manager - resources: - limits: - cpu: 500m - memory: 500Mi - requests: - cpu: 100m - memory: 20Mi - terminationMessagePolicy: FallbackToLogsOnError - volumeMounts: - - mountPath: /tmp/koku-metrics-operator-reports - name: koku-metrics-operator-reports - serviceAccountName: koku-metrics-controller-manager - terminationGracePeriodSeconds: 10 - volumes: - - name: koku-metrics-operator-reports - permissions: - - rules: - - apiGroups: - - "" - resources: - - configmaps - verbs: - - get - - list - - watch - - create - - update - - patch - - delete - - apiGroups: - - "" - resources: - - configmaps/status - verbs: - - get - - update - - patch - - apiGroups: - - "" - resources: - - events - verbs: - - create - - patch - - apiGroups: - - coordination.k8s.io - resources: - - leases - verbs: - - get - - list - - watch - - create - - update - - patch - - delete - - apiGroups: - - apps - resources: - - deployments - verbs: - - get - - list - - patch - - watch - - apiGroups: - - "" - resources: - - configmaps - - endpoints - - events - - persistentvolumeclaims - - pods - - secrets - - serviceaccounts - - services - - services/finalizers - verbs: - - create - - delete - - get - - list - - patch - - update - - watch - - apiGroups: - - koku-metrics-cfg.openshift.io - resources: - - kokumetricsconfigs - verbs: - - create - - delete - - get - - list - - patch - - update - - watch - - apiGroups: - - koku-metrics-cfg.openshift.io - resources: - - kokumetricsconfigs/status - verbs: - - get - - patch - - update - - apiGroups: - - operators.coreos.com - resources: - - clusterserviceversions - verbs: - - get - - list - - patch - - update - - watch - serviceAccountName: koku-metrics-controller-manager - strategy: deployment - installModes: - - supported: true - type: OwnNamespace - - supported: true - type: SingleNamespace - - supported: false - type: MultiNamespace - - supported: false - type: AllNamespaces - relatedImages: - - name: koku-metrics-operator - image: quay.io/project-koku/koku-metrics-operator@sha256:e7f7b47891330e589e9b39974a73063978b8badf7e479790f5839e82cbf17c26 - keywords: - - cost - - management - - usage - - monitor - maintainers: - - email: costmanagement@redhat.com - name: costmanagement - maturity: alpha - provider: - name: Red Hat - replaces: koku-metrics-operator.v1.1.8 - version: 1.1.9 diff --git a/koku-metrics-operator/1.1.9/metadata/annotations.yaml b/koku-metrics-operator/1.1.9/metadata/annotations.yaml deleted file mode 100644 index c6ca7cb87..000000000 --- a/koku-metrics-operator/1.1.9/metadata/annotations.yaml +++ /dev/null @@ -1,15 +0,0 @@ -annotations: - # Core bundle annotations. - operators.operatorframework.io.bundle.mediatype.v1: registry+v1 - operators.operatorframework.io.bundle.manifests.v1: manifests/ - operators.operatorframework.io.bundle.metadata.v1: metadata/ - operators.operatorframework.io.bundle.package.v1: koku-metrics-operator - operators.operatorframework.io.bundle.channels.v1: alpha,beta - operators.operatorframework.io.bundle.channel.default.v1: beta - operators.operatorframework.io.metrics.builder: operator-sdk-v1.25.0 - operators.operatorframework.io.metrics.mediatype.v1: metrics+v1 - operators.operatorframework.io.metrics.project_layout: go.kubebuilder.io/v2 - - # Annotations for testing. - operators.operatorframework.io.test.mediatype.v1: scorecard+v1 - operators.operatorframework.io.test.config.v1: tests/scorecard/ diff --git a/koku-metrics-operator/1.1.9/tests/scorecard/config.yaml b/koku-metrics-operator/1.1.9/tests/scorecard/config.yaml deleted file mode 100644 index a19cb8f47..000000000 --- a/koku-metrics-operator/1.1.9/tests/scorecard/config.yaml +++ /dev/null @@ -1,40 +0,0 @@ -apiVersion: scorecard.operatorframework.io/v1alpha3 -kind: Configuration -metadata: - name: config -stages: -- parallel: true - tests: - - entrypoint: - - scorecard-test - - basic-check-spec - image: quay.io/operator-framework/scorecard-test:v1.10.1 - labels: - suite: basic - test: basic-check-spec-test - storage: - spec: - mountPath: {} - - entrypoint: - - scorecard-test - - olm-bundle-validation - image: quay.io/operator-framework/scorecard-test:v1.10.1 - labels: - suite: olm - test: olm-bundle-validation-test - storage: - spec: - mountPath: {} - - entrypoint: - - scorecard-test - - olm-crds-have-validation - image: quay.io/operator-framework/scorecard-test:v1.10.1 - labels: - suite: olm - test: olm-crds-have-validation-test - storage: - spec: - mountPath: {} -storage: - spec: - mountPath: {} diff --git a/koku-metrics-operator/1.2.0/Dockerfile b/koku-metrics-operator/1.2.0/Dockerfile deleted file mode 100644 index 74fad1f41..000000000 --- a/koku-metrics-operator/1.2.0/Dockerfile +++ /dev/null @@ -1,21 +0,0 @@ -FROM scratch - -# Core bundle labels. -LABEL operators.operatorframework.io.bundle.mediatype.v1=registry+v1 -LABEL operators.operatorframework.io.bundle.manifests.v1=manifests/ -LABEL operators.operatorframework.io.bundle.metadata.v1=metadata/ -LABEL operators.operatorframework.io.bundle.package.v1=koku-metrics-operator -LABEL operators.operatorframework.io.bundle.channels.v1=alpha,beta -LABEL operators.operatorframework.io.bundle.channel.default.v1=beta -LABEL operators.operatorframework.io.metrics.builder=operator-sdk-v1.25.3 -LABEL operators.operatorframework.io.metrics.mediatype.v1=metrics+v1 -LABEL operators.operatorframework.io.metrics.project_layout=go.kubebuilder.io/v2 - -# Labels for testing. -LABEL operators.operatorframework.io.test.mediatype.v1=scorecard+v1 -LABEL operators.operatorframework.io.test.config.v1=tests/scorecard/ - -# Copy files to locations specified by labels. -COPY manifests /manifests/ -COPY metadata /metadata/ -COPY tests/scorecard /tests/scorecard/ diff --git a/koku-metrics-operator/1.2.0/manifests/koku-metrics-cfg.openshift.io_kokumetricsconfigs.yaml b/koku-metrics-operator/1.2.0/manifests/koku-metrics-cfg.openshift.io_kokumetricsconfigs.yaml deleted file mode 100644 index 651ae1bba..000000000 --- a/koku-metrics-operator/1.2.0/manifests/koku-metrics-cfg.openshift.io_kokumetricsconfigs.yaml +++ /dev/null @@ -1,842 +0,0 @@ -apiVersion: apiextensions.k8s.io/v1 -kind: CustomResourceDefinition -metadata: - annotations: - controller-gen.kubebuilder.io/version: v0.3.0 - creationTimestamp: null - labels: - app: koku-metrics-operator - name: kokumetricsconfigs.koku-metrics-cfg.openshift.io -spec: - group: koku-metrics-cfg.openshift.io - names: - kind: KokuMetricsConfig - listKind: KokuMetricsConfigList - plural: kokumetricsconfigs - singular: kokumetricsconfig - scope: Namespaced - versions: - - name: v1beta1 - schema: - openAPIV3Schema: - description: KokuMetricsConfig is the Schema for the kokumetricsconfig API - properties: - apiVersion: - description: 'APIVersion defines the versioned schema of this representation - of an object. Servers should convert recognized schemas to the latest - internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' - type: string - kind: - description: 'Kind is a string value representing the REST resource this - object represents. Servers may infer this from the endpoint the client - submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' - type: string - metadata: - type: object - spec: - description: KokuMetricsConfigSpec defines the desired state of KokuMetricsConfig. - properties: - api_url: - default: https://cloud.redhat.com - description: FOR DEVELOPMENT ONLY. APIURL is a field of KokuMetricsConfig - to represent the url of the API endpoint for service interaction. - The default is `https://cloud.redhat.com`. - type: string - authentication: - description: Authentication is a field of KokuMetricsConfig to represent - the authentication object. - properties: - secret_name: - description: AuthenticationSecretName is a field of KokuMetricsConfig - to represent the secret with the user and password used for - uploads. - type: string - type: - default: token - description: 'AuthType is a field of KokuMetricsConfig to represent - the authentication type to be used basic or token. Valid values - are: - "basic" : Enables authentication using user and password - from authentication secret. - "token" (default): Uses cluster - token for authentication.' - enum: - - token - - basic - type: string - required: - - type - type: object - clusterID: - description: ClusterID is a field of KokuMetricsConfig to represent - the cluster UUID. Normally this value should not be specified. Only - set this value if the clusterID cannot be obtained from the ClusterVersion. - type: string - clusterVersion: - description: ClusterVersion is a field of KokuMetricsConfig to represent - the cluster version. Normally this value should not be specified. - Only set this value if the clusterVersion cannot be obtained from - the ClusterVersion. - type: string - packaging: - description: Packaging is a field of KokuMetricsConfig to represent - the packaging object. - properties: - max_reports_to_store: - default: 30 - description: MaxReports is a field of KokuMetricsConfig to represent - the maximum number of reports to store. The default is 30 reports - which corresponds to approximately 7 days worth of data given - the other default values. - format: int64 - minimum: 1 - type: integer - max_size_MB: - default: 100 - description: MaxSize is a field of KokuMetricsConfig to represent - the max file size in megabytes that will be compressed for upload - to Ingress. The default is 100. - format: int64 - maximum: 100 - minimum: 1 - type: integer - required: - - max_reports_to_store - - max_size_MB - type: object - prometheus_config: - description: PrometheusConfig is a field of KokuMetricsConfig to represent - the configuration of Prometheus connection. - properties: - context_timeout: - default: 120 - description: ContextTimeout is a field of KokuMetricsConfig to - represent how long a query to prometheus should run in seconds - before timing out. The default is 120 seconds. - format: int64 - maximum: 180 - minimum: 10 - type: integer - service_address: - default: https://thanos-querier.openshift-monitoring.svc:9091 - description: FOR DEVELOPMENT ONLY. SvcAddress is a field of KokuMetricsConfig - to represent the thanos-querier address. The default is `https://thanos-querier.openshift-monitoring.svc:9091`. - type: string - skip_tls_verification: - default: false - description: FOR DEVELOPMENT ONLY. SkipTLSVerification is a field - of KokuMetricsConfig to represent if the thanos-querier endpoint - must be certificate validated. The default is false. - type: boolean - required: - - service_address - - skip_tls_verification - type: object - source: - description: Source is a field of KokuMetricsConfig to represent the - desired source on cloud.redhat.com. - properties: - check_cycle: - default: 1440 - description: CheckCycle is a field of KokuMetricsConfig to represent - the number of minutes between each source check schedule The - default is 1440 min (24 hours). - format: int64 - minimum: 0 - type: integer - create_source: - default: false - description: CreateSource is a field of KokuMetricsConfigSpec - to represent if the source should be created if not found. - type: boolean - name: - description: SourceName is a field of KokuMetricsConfigSpec to - represent the source name on cloud.redhat.com. - type: string - sources_path: - default: /api/sources/v1.0/ - description: FOR DEVELOPMENT ONLY. SourcesAPIPath is a field of - KokuMetricsConfig to represent the path of the Sources API service. - The default is `/api/sources/v1.0/`. - type: string - required: - - check_cycle - - create_source - - sources_path - type: object - upload: - description: Upload is a field of KokuMetricsConfig to represent the - upload object. - properties: - ingress_path: - default: /api/ingress/v1/upload - description: FOR DEVELOPMENT ONLY. IngressAPIPath is a field of - KokuMetricsConfig to represent the path of the Ingress API service. - The default is `/api/ingress/v1/upload`. - type: string - upload_cycle: - default: 360 - description: UploadCycle is a field of KokuMetricsConfig to represent - the number of minutes between each upload schedule. The default - is 360 min (6 hours). - format: int64 - minimum: 0 - type: integer - upload_toggle: - default: true - description: UploadToggle is a field of KokuMetricsConfig to represent - if the operator is installed in a restricted-network. If `false`, - the operator will not upload to cloud.redhat.com or check/create - sources. The default is true. - type: boolean - upload_wait: - description: UploadWait is a field of KokuMetricsConfig to represent - the time to wait before sending an upload. - format: int64 - minimum: 0 - type: integer - validate_cert: - default: true - description: ValidateCert is a field of KokuMetricsConfig to represent - if the Ingress endpoint must be certificate validated. - type: boolean - required: - - ingress_path - - upload_cycle - - upload_toggle - - validate_cert - type: object - volume_claim_template: - description: VolumeClaimTemplate is a field of KokuMetricsConfig to - represent a PVC template. - properties: - apiVersion: - description: 'APIVersion defines the versioned schema of this - representation of an object. Servers should convert recognized - schemas to the latest internal value, and may reject unrecognized - values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' - type: string - kind: - description: 'Kind is a string value representing the REST resource - this object represents. Servers may infer this from the endpoint - the client submits requests to. Cannot be updated. In CamelCase. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' - type: string - metadata: - description: EmbeddedMetadata contains metadata relevant to an - EmbeddedResource. - properties: - annotations: - additionalProperties: - type: string - description: 'Annotations is an unstructured key value map - stored with a resource that may be set by external tools - to store and retrieve arbitrary metadata. They are not queryable - and should be preserved when modifying objects. More info: - http://kubernetes.io/docs/user-guide/annotations' - type: object - labels: - additionalProperties: - type: string - description: 'Map of string keys and values that can be used - to organize and categorize (scope and select) objects. May - match selectors of replication controllers and services. - More info: http://kubernetes.io/docs/user-guide/labels' - type: object - name: - description: 'Name must be unique within a namespace. Is required - when creating resources, although some resources may allow - a client to request the generation of an appropriate name - automatically. Name is primarily intended for creation idempotence - and configuration definition. Cannot be updated. More info: - http://kubernetes.io/docs/user-guide/identifiers#names' - type: string - type: object - spec: - description: 'Spec defines the desired characteristics of a volume - requested by a pod author. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims' - properties: - accessModes: - description: 'AccessModes contains the desired access modes - the volume should have. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes-1' - items: - type: string - type: array - dataSource: - description: 'This field can be used to specify either: * - An existing VolumeSnapshot object (snapshot.storage.k8s.io/VolumeSnapshot) - * An existing PVC (PersistentVolumeClaim) * An existing - custom resource that implements data population (Alpha) - In order to use custom resource types that implement data - population, the AnyVolumeDataSource feature gate must be - enabled. If the provisioner or an external controller can - support the specified data source, it will create a new - volume based on the contents of the specified data source.' - properties: - apiGroup: - description: APIGroup is the group for the resource being - referenced. If APIGroup is not specified, the specified - Kind must be in the core API group. For any other third-party - types, APIGroup is required. - type: string - kind: - description: Kind is the type of resource being referenced - type: string - name: - description: Name is the name of resource being referenced - type: string - required: - - kind - - name - type: object - resources: - description: 'Resources represents the minimum resources the - volume should have. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources' - properties: - limits: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - description: 'Limits describes the maximum amount of compute - resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/' - type: object - requests: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - description: 'Requests describes the minimum amount of - compute resources required. If Requests is omitted for - a container, it defaults to Limits if that is explicitly - specified, otherwise to an implementation-defined value. - More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/' - type: object - type: object - selector: - description: A label query over volumes to consider for binding. - properties: - matchExpressions: - description: matchExpressions is a list of label selector - requirements. The requirements are ANDed. - items: - description: A label selector requirement is a selector - that contains values, a key, and an operator that - relates the key and values. - properties: - key: - description: key is the label key that the selector - applies to. - type: string - operator: - description: operator represents a key's relationship - to a set of values. Valid operators are In, NotIn, - Exists and DoesNotExist. - type: string - values: - description: values is an array of string values. - If the operator is In or NotIn, the values array - must be non-empty. If the operator is Exists or - DoesNotExist, the values array must be empty. - This array is replaced during a strategic merge - patch. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - description: matchLabels is a map of {key,value} pairs. - A single {key,value} in the matchLabels map is equivalent - to an element of matchExpressions, whose key field is - "key", the operator is "In", and the values array contains - only "value". The requirements are ANDed. - type: object - type: object - storageClassName: - description: 'Name of the StorageClass required by the claim. - More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#class-1' - type: string - volumeMode: - description: volumeMode defines what type of volume is required - by the claim. Value of Filesystem is implied when not included - in claim spec. - type: string - volumeName: - description: VolumeName is the binding reference to the PersistentVolume - backing this claim. - type: string - type: object - type: object - required: - - authentication - - packaging - - prometheus_config - - source - - upload - type: object - status: - description: KokuMetricsConfigStatus defines the observed state of KokuMetricsConfig. - properties: - api_url: - description: APIURL is a field of KokuMetricsConfig to represent the - url of the API endpoint for service interaction. - type: string - authentication: - description: Authentication is a field of KokuMetricsConfig to represent - the authentication status. - properties: - credentials_found: - description: AuthenticationCredentialsFound is a field of KokuMetricsConfig - to represent if used for uploads were found. - type: boolean - error: - description: AuthErrorMessage is a field of KokuMetricsConfig - to represent an `invalid credentials` error message. - type: string - last_credential_verification_time: - description: LastVerificationTime is a field of KokuMetricsConfig - to represent the last time credentials were verified. - format: date-time - nullable: true - type: string - secret_name: - description: AuthenticationSecretName is a field of KokuMetricsConfig - to represent the secret with the user and password used for - uploads. - type: string - type: - description: AuthType is a field of KokuMetricsConfig to represent - the authentication type to be used basic or token. - enum: - - token - - basic - type: string - valid_basic_auth: - description: ValidBasicAuth is a field of KokuMetricsConfig to - represent if the given basic auth credentials are valid. - type: boolean - type: object - clusterID: - description: ClusterID is a field of KokuMetricsConfig to represent - the cluster UUID. - type: string - clusterVersion: - description: ClusterVersion is a field of KokuMetricsConfig to represent - the cluster version. - type: string - operator_commit: - description: OperatorCommit is a field of KokuMetricsConfig that shows - the commit hash of the operator. - type: string - packaging: - description: Packaging is a field of KokuMetricsConfig to represent - the packaging status - properties: - error: - description: PackagingError is a field of KokuMetricsConfig to - represent the error encountered packaging the reports. - type: string - last_successful_packaging_time: - description: LastSuccessfulPackagingTime is a field of KokuMetricsConfig - that shows the time of the last successful file packaging. - format: date-time - nullable: true - type: string - max_reports_to_store: - description: MaxReports is a field of KokuMetricsConfig to represent - the maximum number of reports to store. - format: int64 - type: integer - max_size_MB: - description: MaxSize is a field of KokuMetricsConfig to represent - the max file size in megabytes that will be compressed for upload - to Ingress. - format: int64 - type: integer - number_reports_stored: - description: ReportCount is a field of KokuMetricsConfig to represent - the number of reports in storage. - format: int64 - type: integer - packaged_files: - description: PackagedFiles is a field of KokuMetricsConfig to - represent the list of file packages in storage. - items: - type: string - type: array - type: object - persistent_volume_claim: - description: PersistentVolumeClaim is a field of KokuMetricsConfig - to represent a PVC. - properties: - apiVersion: - description: 'APIVersion defines the versioned schema of this - representation of an object. Servers should convert recognized - schemas to the latest internal value, and may reject unrecognized - values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' - type: string - kind: - description: 'Kind is a string value representing the REST resource - this object represents. Servers may infer this from the endpoint - the client submits requests to. Cannot be updated. In CamelCase. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' - type: string - metadata: - description: EmbeddedMetadata contains metadata relevant to an - EmbeddedResource. - properties: - annotations: - additionalProperties: - type: string - description: 'Annotations is an unstructured key value map - stored with a resource that may be set by external tools - to store and retrieve arbitrary metadata. They are not queryable - and should be preserved when modifying objects. More info: - http://kubernetes.io/docs/user-guide/annotations' - type: object - labels: - additionalProperties: - type: string - description: 'Map of string keys and values that can be used - to organize and categorize (scope and select) objects. May - match selectors of replication controllers and services. - More info: http://kubernetes.io/docs/user-guide/labels' - type: object - name: - description: 'Name must be unique within a namespace. Is required - when creating resources, although some resources may allow - a client to request the generation of an appropriate name - automatically. Name is primarily intended for creation idempotence - and configuration definition. Cannot be updated. More info: - http://kubernetes.io/docs/user-guide/identifiers#names' - type: string - type: object - spec: - description: 'Spec defines the desired characteristics of a volume - requested by a pod author. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims' - properties: - accessModes: - description: 'AccessModes contains the desired access modes - the volume should have. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes-1' - items: - type: string - type: array - dataSource: - description: 'This field can be used to specify either: * - An existing VolumeSnapshot object (snapshot.storage.k8s.io/VolumeSnapshot) - * An existing PVC (PersistentVolumeClaim) * An existing - custom resource that implements data population (Alpha) - In order to use custom resource types that implement data - population, the AnyVolumeDataSource feature gate must be - enabled. If the provisioner or an external controller can - support the specified data source, it will create a new - volume based on the contents of the specified data source.' - properties: - apiGroup: - description: APIGroup is the group for the resource being - referenced. If APIGroup is not specified, the specified - Kind must be in the core API group. For any other third-party - types, APIGroup is required. - type: string - kind: - description: Kind is the type of resource being referenced - type: string - name: - description: Name is the name of resource being referenced - type: string - required: - - kind - - name - type: object - resources: - description: 'Resources represents the minimum resources the - volume should have. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources' - properties: - limits: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - description: 'Limits describes the maximum amount of compute - resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/' - type: object - requests: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - description: 'Requests describes the minimum amount of - compute resources required. If Requests is omitted for - a container, it defaults to Limits if that is explicitly - specified, otherwise to an implementation-defined value. - More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/' - type: object - type: object - selector: - description: A label query over volumes to consider for binding. - properties: - matchExpressions: - description: matchExpressions is a list of label selector - requirements. The requirements are ANDed. - items: - description: A label selector requirement is a selector - that contains values, a key, and an operator that - relates the key and values. - properties: - key: - description: key is the label key that the selector - applies to. - type: string - operator: - description: operator represents a key's relationship - to a set of values. Valid operators are In, NotIn, - Exists and DoesNotExist. - type: string - values: - description: values is an array of string values. - If the operator is In or NotIn, the values array - must be non-empty. If the operator is Exists or - DoesNotExist, the values array must be empty. - This array is replaced during a strategic merge - patch. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - description: matchLabels is a map of {key,value} pairs. - A single {key,value} in the matchLabels map is equivalent - to an element of matchExpressions, whose key field is - "key", the operator is "In", and the values array contains - only "value". The requirements are ANDed. - type: object - type: object - storageClassName: - description: 'Name of the StorageClass required by the claim. - More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#class-1' - type: string - volumeMode: - description: volumeMode defines what type of volume is required - by the claim. Value of Filesystem is implied when not included - in claim spec. - type: string - volumeName: - description: VolumeName is the binding reference to the PersistentVolume - backing this claim. - type: string - type: object - type: object - prometheus: - description: Prometheus represents the status of premetheus queries. - properties: - configuration_error: - description: ConfigError is a field of KokuMetricsConfigStatus - to represent errors during prometheus configuration. - type: string - context_timeout: - description: ContextTimeout is a field of KokuMetricsConfigState - to represent how long a query to prometheus should run in seconds - before timing out. - format: int64 - type: integer - last_query_start_time: - description: LastQueryStartTime is a field of KokuMetricsConfigStatus - to represent the last time queries were started. - format: date-time - nullable: true - type: string - last_query_success_time: - description: LastQuerySuccessTime is a field of KokuMetricsConfigStatus - to represent the last time queries were successful. - format: date-time - nullable: true - type: string - prometheus_configured: - description: PrometheusConfigured is a field of KokuMetricsConfigStatus - to represent if the operator is configured to connect to prometheus. - type: boolean - prometheus_connected: - description: PrometheusConnected is a field of KokuMetricsConfigStatus - to represent if prometheus can be queried. - type: boolean - prometheus_connection_error: - description: ConnectionError is a field of KokuMetricsConfigStatus - to represent errors during prometheus test query. - type: string - service_address: - description: SvcAddress is the internal thanos-querier address. - type: string - skip_tls_verification: - description: SkipTLSVerification is a field of KokuMetricsConfigStatus - to represent if the thanos-querier endpoint must be certificate - validated. - type: boolean - required: - - prometheus_configured - - prometheus_connected - type: object - reports: - description: Reports represents the status of report generation. - properties: - data_collected: - description: DataCollected is a field of KokuMetricsConfigStatus - to represent whether or not data was collected for the last - query. - type: boolean - data_collection_message: - description: DataCollectionMessage is a field of KokuMetricsConfigStatus - to represent a message associated with the data_collected status. - type: string - last_hour_queried: - description: LastHourQueried is a field of KokuMetricsConfigStatus - to represent the time range for which metrics were last queried. - type: string - report_month: - description: ReportMonth is a field of KokuMetricsConfigStatus - to represent the month for which reports are being generated. - type: string - type: object - source: - description: Source is a field of KokuMetricsConfig to represent the - observed state of the source on cloud.redhat.com. - properties: - check_cycle: - description: CheckCycle is a field of KokuMetricsConfig to represent - the number of minutes between each source check schedule. The - default is 1440 min (24 hours). - format: int64 - type: integer - create_source: - description: CreateSource is a field of KokuMetricsConfigStatus - to represent if the source should be created if not found. A - source will not be created if upload_toggle is `false`. - type: boolean - error: - description: SourceError is a field of KokuMetricsConfigStatus - to represent the error encountered creating the source. - type: string - last_check_time: - description: LastSourceCheckTime is a field of KokuMetricsConfig - that shows the time that the last check was attempted. - format: date-time - nullable: true - type: string - name: - description: SourceName is a field of KokuMetricsConfigStatus - to represent the source name on cloud.redhat.com. - type: string - source_defined: - description: SourceDefined is a field of KokuMetricsConfigStatus - to represent if the source exists as defined on cloud.redhat.com. - type: boolean - sources_path: - description: SourcesAPIPath is a field of KokuMetricsConfig to - represent the path of the Sources API service. - type: string - type: object - storage: - description: Storage is a field - properties: - volume_mounted: - description: VolumeMounted is a bool to indicate if storage volume - was mounted. - type: boolean - volume_type: - description: VolumeType is the string representation of the volume - type. - type: string - type: object - upload: - description: Upload is a field of KokuMetricsConfig to represent the - upload object. - properties: - error: - description: UploadError is a field of KokuMetricsConfigStatus - to represent the error encountered uploading reports. - type: string - ingress_path: - description: IngressAPIPath is a field of KokuMetricsConfig to - represent the path of the Ingress API service. - type: string - last_payload_files: - description: LastPayloadFiles is a field of KokuMetricsConfig - to represent the list of files in the last payload that was - sent. - items: - type: string - type: array - last_payload_manifest_id: - description: LastPayloadManifest is a field of KokuMetricsConfig - that shows the manifestID of the last payload. - type: string - last_payload_name: - description: LastPayloadName is a field of KokuMetricsConfig that - shows the name of the last payload file. - type: string - last_payload_request_id: - description: LastPayloadRequestID is a field of KokuMetricsConfig - that shows the insights request id of the last payload. - type: string - last_successful_upload_time: - description: LastSuccessfulUploadTime is a field of KokuMetricsConfig - that shows the time of the last successful upload. - format: date-time - nullable: true - type: string - last_upload_status: - description: LastUploadStatus is a field of KokuMetricsConfig - that shows the http status of the last upload. - type: string - upload: - description: UploadToggle is a field of KokuMetricsConfig to represent - if the operator should upload to cloud.redhat.com. The default - is true - type: boolean - upload_cycle: - description: UploadCycle is a field of KokuMetricsConfig to represent - the number of minutes between each upload schedule. The default - is 360 min (6 hours). - format: int64 - type: integer - upload_wait: - description: UploadWait is a field of KokuMetricsConfig to represent - the time to wait before sending an upload. - format: int64 - type: integer - validate_cert: - description: ValidateCert is a field of KokuMetricsConfig to represent - if the Ingress endpoint must be certificate validated. - type: boolean - type: object - type: object - required: - - spec - type: object - served: true - storage: true - subresources: - status: {} -status: - acceptedNames: - kind: "" - plural: "" - conditions: [] - storedVersions: [] diff --git a/koku-metrics-operator/1.2.0/manifests/koku-metrics-operator.clusterserviceversion.yaml b/koku-metrics-operator/1.2.0/manifests/koku-metrics-operator.clusterserviceversion.yaml deleted file mode 100644 index d57d3a863..000000000 --- a/koku-metrics-operator/1.2.0/manifests/koku-metrics-operator.clusterserviceversion.yaml +++ /dev/null @@ -1,474 +0,0 @@ -apiVersion: operators.coreos.com/v1alpha1 -kind: ClusterServiceVersion -metadata: - annotations: - alm-examples: |- - [ - { - "apiVersion": "koku-metrics-cfg.openshift.io/v1beta1", - "kind": "KokuMetricsConfig", - "metadata": { - "name": "kokumetricscfg-sample-v1beta1" - }, - "spec": { - "authentication": { - "type": "token" - }, - "packaging": { - "max_reports_to_store": 30, - "max_size_MB": 100 - }, - "prometheus_config": {}, - "source": { - "check_cycle": 1440, - "create_source": false, - "name": "INSERT-SOURCE-NAME" - }, - "upload": { - "upload_cycle": 360, - "upload_toggle": true - } - } - } - ] - capabilities: Seamless Upgrades - categories: Monitoring - certified: "false" - containerImage: quay.io/project-koku/koku-metrics-operator@sha256:4d60286deb439e81fad78056dd483393b28940b276f1a9dfc755c94558484b8b - createdAt: "2023-01-16T19:29:55Z" - description: A Golang-based OpenShift Operator that generates and uploads OpenShift - usage metrics to cost management. - operatorframework.io/suggested-namespace: koku-metrics-operator - operators.openshift.io/infrastructure-features: '["Disconnected"]' - operators.operatorframework.io/builder: operator-sdk-v1.25.3 - operators.operatorframework.io/project_layout: go.kubebuilder.io/v2 - repository: https://github.com/project-koku/koku-metrics-operator - support: Cost Management - name: koku-metrics-operator.v1.2.0 - namespace: placeholder -spec: - apiservicedefinitions: {} - customresourcedefinitions: - owned: - - description: KokuMetricsConfig is the Schema for the kokumetricsconfig API - displayName: Koku Metrics Config - kind: KokuMetricsConfig - name: kokumetricsconfigs.koku-metrics-cfg.openshift.io - version: v1beta1 - description: |- - # Koku Metrics Operator - ## Introduction - The `koku-metrics-operator` is a component of the [cost managment](https://access.redhat.com/documentation/en-us/cost_management_service) service for Openshift, used to gather the required information from the cluster. It is recommended to be installed in OpenShift 4.5+. This operator obtains OpenShift usage data by querying Prometheus and uploads it to cost management to be processed. The Operator queries Prometheus every hour to create metric reports, which are then packaged and uploaded to cost management at [console.redhat.com](https://console.redhat.com). For more information, reach out to . - - This operator is capable of functioning within a disconnected/restricted network (aka air-gapped mode). In this mode, the operator will store the packaged reports for manual retrieval instead of being uploaded to cost management. Documentation for installing an operator within a restricted network can be found [here](https://docs.openshift.com/container-platform/latest/operators/admin/olm-restricted-networks.html). - - ## Features and Capabilities - #### Metrics collection: - The Koku Metrics Operator (`koku-metrics-operator`) collects the metrics required for cost management by: - * Querying Prometheus to gather the necessary metrics for cost management. - * Writing Prometheus queries to CSV report files. - * Packaging the CSV report files into tarballs. - - #### Additional Capabilities: - * The operator can be configured to automatically upload the packaged reports to cost management through Red Hat Insights Ingress service. - * The operator can create a source in console.redhat.com. A source is required for cost management to process the uploaded packages. - * PersistentVolumeClaim (PVC) configuration: The KokuMetricsConfig CR can accept a PVC definition and the operator will create and mount the PVC. If one is not provided, a default PVC will be created. - * Restricted network installation: this operator can function on a restricted network. In this mode, the operator stores the packaged reports for manual retrieval. - - ## Limitations and Pre-Requisites - #### Limitations (Potential for metrics data loss) - * A source **must** exist in console.redhat.com for an uploaded payload to be processed by cost management. The operator sends the payload to the Red Hat Insights Ingress service which usually returns successfully, but the operator does not currently confirm with cost management that the payload was processed. After Ingress accepts the uploaded payload, the payload is removed from the operator and is gone forever. If the data within the payload is not processed, a gap will be introduced in the usage metrics. - - **Note** The following limitations are specific to operators configured to run in a restricted network: - * The `koku-metrics-operator` will not be able to generate new reports if the PVC storage is filled. If this occurs, the reports must be manually deleted from the PVC so that the operator can function as normal. - * The default report retention is 30 reports (about one week's worth of data). The reports must be manually downloaded and uploaded to console.redhat.com every week, or they will be deleted and the data will be lost. - - #### Storage configuration prerequisite - The operator will attempt to create and use the following PVC when installed: - - volume_claim_template: - apiVersion: v1 - kind: PersistentVolumeClaim - metadata: - name: koku-metrics-operator-data - spec: - accessModes: - - ReadWriteOnce - resources: - requests: - storage: 10Gi - - If a different PVC should be utilized, a valid PVC should be specified in the KokuMetricsConfig CR as described in the appropriate section below. The PVC to be used may exist already, or the operator will attempt to create it. - - To use the default specification, the follow assumptions must be met: - 1. A default StorageClass is defined. - 2. Dynamic provisioning for that default StorageClass is enabled. - - If these assumptions are not met, the operator will not deploy correctly. In these cases, storage must be manually configured. After configuring storage, a valid PVC template should be supplied in the `volume_claim_template` spec of the KokuMetricsConfig CR. - - ## Configure the koku-metrics-operator - **Note** There are separate instructions for configuring the `koku-metrics-operator` to run in a restricted network. - ##### Configure authentication - The default authentication for the operator is `token`. No further steps are required to configure token authentication. If `basic` is the preferred authentication method, a Secret must be created which holds username and password credentials: - 1. On the left navigation pane, select `Workloads` -> `Secrets` -> select Project: `koku-metrics-operator` -> `Create` -> `Key/Value Secret` - 2. Give the Secret a name and add 2 keys: `username` and `password` (all lowercase). The values for these keys correspond to console.redhat.com credentials. - 3. Select `Create`. - ##### Create the KokuMetricsConfig - Configure the koku-metrics-operator by creating a `KokuMetricsConfig`. - 1. On the left navigation pane, select `Operators` -> `Installed Operators` -> `koku-metrics-operator` -> `KokuMetricsConfig` -> `Create Instance`. - 2. For `basic` authentication, edit the following values in the spec: - * Replace `authentication: type:` with `basic`. - * Add the `secret_name` field under `authentication`, and set it equal to the name of the authentication Secret that was created above. The spec should look similar to the following: - - ``` - authentication: - secret_name: SECRET-NAME - type: basic - ``` - - 3. To configure the koku-metrics-operator to create a cost management source, edit the following values in the `source` field: - * Replace `INSERT-SOURCE-NAME` with the preferred name of the source to be created. - * Replace the `create_source` field value with `true`. - - **Note:** if the source already exists, replace `INSERT-SOURCE-NAME` with the existing name, and leave `create_source` as false. This will allow the operator to confirm the source exists. - 4. If not specified, the operator will create a default PersistentVolumeClaim called `koku-metrics-operator-data` with 10Gi of storage. To configure the koku-metrics-operator to use or create a different PVC, edit the following in the spec: - * Add the desired configuration to the `volume_claim_template` field in the spec: - - ``` - volume_claim_template: - apiVersion: v1 - kind: PersistentVolumeClaim - metadata: - name: - spec: - accessModes: - - ReadWriteOnce - resources: - requests: - storage: 10Gi - ``` - - **Note:** If using the YAML View, the `volume_claim_template` field must be added to the spec - 5. Select `Create`. - - # Restricted Network Usage (disconnected/air-gapped mode) - ## Installation - To install the `koku-metrics-operator` in a restricted network, follow the [olm documentation](https://docs.openshift.com/container-platform/latest/operators/admin/olm-restricted-networks.html). The operator is found in the `community-operators` Catalog in the `registry.redhat.io/redhat/community-operator-index:latest` Index. If pruning the index before pushing to the mirrored registry, keep the `koku-metrics-operator` package. - - Within a restricted network, the operator queries prometheus to gather the necessary usage metrics, writes the query results to CSV files, and packages the reports for storage in the PVC. These reports then need to be manually downloaded from the cluster and uploaded to [console.redhat.com](https://console.redhat.com). - - ## Configure the koku-metrics-operator for a restricted network - ##### Create the KokuMetricsConfig - Configure the koku-metrics-operator by creating a `KokuMetricsConfig`. - 1. On the left navigation pane, select `Operators` -> `Installed Operators` -> `koku-metrics-operator` -> `KokuMetricsConfig` -> `Create Instance`. - 2. Specify the desired storage. If not specified, the operator will create a default Persistent Volume Claim called `koku-metrics-operator-data` with 10Gi of storage. To configure the koku-metrics-operator to use or create a different PVC, edit the following in the spec: - * Add the desired configuration to the `volume_claim_template` field in the spec: - - ``` - volume_claim_template: - apiVersion: v1 - kind: PersistentVolumeClaim - metadata: - name: - spec: - storageClassName: - accessModes: - - ReadWriteOnce - resources: - requests: - storage: 10Gi - ``` - - **Note:** If using the YAML View, the `volume_claim_template` field must be added to the spec - 3. (Optional) Specify the desired report retention. The operator will retain 30 reports by default. This corresponds to approximately one week's worth of data if using the default packaging cycle. To modify the number of retained reports: - * Change the `packaging` spec field `max_reports_to_store` to the desired number of reports to retain. Once this max number is reached, the operator will start removing the oldest packages remaining on the PVC: - - ``` - packaging: - max_size_MB: 100 - max_reports_to_store: 30 - ``` - - **Note:** The number of retained reports directly affects the frequency that reports must be manually downloaded from the PVC. Take caution in setting this to a higher number of reports, as the operator cannot write data to the PVC if the storage is full. - 4. To configure the operator to perform in a restricted network, set the `upload_toggle` to `false`: - - ``` - upload: - upload_cycle: 360, - upload_toggle: false - ``` - - 5. Select `Create`. - - ## Download reports from the Operator & clean up the PVC - If the `koku-metrics-operator` is configured to run in a restricted network, the metric reports will not automatically upload to cost managment. Instead, they need to be manually copied from the PVC for upload to [console.redhat.com](https://console.redhat.com). The default configuration saves one week of reports which means the process of downloading and uploading reports should be repeated weekly to prevent loss of metrics data. To download the reports, complete the following steps: - 1. Create the following Pod, ensuring the `claimName` matches the PVC containing the report data: - - ``` - kind: Pod - apiVersion: v1 - metadata: - name: volume-shell - namespace: koku-metrics-operator - labels: - app: koku-metrics-operator - spec: - volumes: - - name: koku-metrics-operator-reports - persistentVolumeClaim: - claimName: koku-metrics-operator-data - containers: - - name: volume-shell - image: busybox - command: ['sleep', 'infinity'] - volumeMounts: - - name: koku-metrics-operator-reports - mountPath: /tmp/koku-metrics-operator-reports - ``` - - 2. Use rsync to copy all of the files ready for upload from the PVC to a local folder: - - ``` - $ oc rsync volume-shell:/tmp/koku-metrics-operator-reports/upload local/path/to/save/folder - ``` - - 3. Once confirming that the files have been successfully copied, use rsh to connect to the pod and delete the contents of the upload folder so that they are no longer in storage: - - ``` - $ oc rsh volume-shell - $ rm /tmp/koku-metrics-operator-reports/upload/* - ``` - - 4. (Optional) Delete the pod that was used to connect to the PVC: - - ``` - $ oc delete -f volume-shell.yaml - ``` - - ## Create a source - In a restricted network, the `koku-metrics-operator` cannot automatically create a source. This process must be done manually. In the console.redhat.com platform, open the [Sources menu](https://console.redhat.com/settings/sources/) to begin adding an OpenShift source to cost management: - - Prerequisites: - * The cluster identifier which can be found in the KokuMetricsConfig CR, the cluster Overview page, or the cluster Help > About. - - Create source: - 1. Navigate to the Sources menu - 2. Select the `Red Hat sources` tab - 3. Create a new `Red Hat Openshift Container Platform` source: - * give the source a unique name - * add the Cost Management application - * add the cluster identifier - 4. In the Sources wizard, review the details and click `Finish` to create the Source. - - ## Upload the reports to cost managment - Uploading reports to cost managment is done through curl: - - $ curl -vvvv -F "file=@FILE_NAME.tar.gz;type=application/vnd.redhat.hccm.tar+tgz" https://cloud.redhat.com/api/ingress/v1/upload -u USERNAME:PASS - - where `USERNAME` and `PASS` correspond to the user credentials for [console.redhat.com](https://console.redhat.com), and `FILE_NAME` is the name of the report to upload. - - displayName: Koku Metrics Operator - icon: - - base64data: PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4KPCEtLSBHZW5lcmF0b3I6IEFkb2JlIElsbHVzdHJhdG9yIDIyLjEuMCwgU1ZHIEV4cG9ydCBQbHVnLUluIC4gU1ZHIFZlcnNpb246IDYuM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jUwODc5YzAsMC42ODY1NTQsMC4yMzAzOTI1LDEuMzM2MjEyMiwwLjY5MTE0NjksMS45NDkwMzU2CgkJCWMwLjQ1NjE2MTUsMC42MTI4MjM1LDEuMDMyMTE5OCwxLjAzMjExOTgsMS43MTg2NTg0LDEuMjYyNDk2OUwxNzQuMjgwNjM5NiwxODUuODczNjExNXoiLz4KCTwvZz4KPC9nPgo8L3N2Zz4K - mediatype: image/svg+xml - install: - spec: - clusterPermissions: - - rules: - - apiGroups: - - config.openshift.io - resources: - - clusterversions - verbs: - - get - - list - - watch - - apiGroups: - - "" - resources: - - namespaces - verbs: - - get - - list - - watch - - apiGroups: - - "" - resources: - - secrets - verbs: - - get - serviceAccountName: koku-metrics-controller-manager - deployments: - - label: - app: koku-metrics-operator - control-plane: controller-manager - name: koku-metrics-operator - spec: - replicas: 1 - selector: - matchLabels: - app: koku-metrics-operator - control-plane: controller-manager - strategy: {} - template: - metadata: - labels: - app: koku-metrics-operator - control-plane: controller-manager - spec: - containers: - - args: - - --enable-leader-election - command: - - /manager - env: - - name: IN_CLUSTER - value: "true" - - name: WATCH_NAMESPACE - valueFrom: - fieldRef: - fieldPath: metadata.annotations['olm.targetNamespaces'] - image: quay.io/project-koku/koku-metrics-operator@sha256:4d60286deb439e81fad78056dd483393b28940b276f1a9dfc755c94558484b8b - name: manager - resources: - limits: - cpu: 500m - memory: 500Mi - requests: - cpu: 100m - memory: 20Mi - terminationMessagePolicy: FallbackToLogsOnError - volumeMounts: - - mountPath: /tmp/koku-metrics-operator-reports - name: koku-metrics-operator-reports - serviceAccountName: koku-metrics-controller-manager - terminationGracePeriodSeconds: 10 - volumes: - - name: koku-metrics-operator-reports - permissions: - - rules: - - apiGroups: - - "" - resources: - - configmaps - verbs: - - get - - list - - watch - - create - - update - - patch - - delete - - apiGroups: - - "" - resources: - - configmaps/status - verbs: - - get - - update - - patch - - apiGroups: - - "" - resources: - - events - verbs: - - create - - patch - - apiGroups: - - coordination.k8s.io - resources: - - leases - verbs: - - get - - list - - watch - - create - - update - - patch - - delete - - apiGroups: - - apps - resources: - - deployments - verbs: - - get - - list - - patch - - watch - - apiGroups: - - "" - resources: - - configmaps - - endpoints - - events - - persistentvolumeclaims - - pods - - secrets - - serviceaccounts - - services - - services/finalizers - verbs: - - create - - delete - - get - - list - - patch - - update - - watch - - apiGroups: - - koku-metrics-cfg.openshift.io - resources: - - kokumetricsconfigs - verbs: - - create - - delete - - get - - list - - patch - - update - - watch - - apiGroups: - - koku-metrics-cfg.openshift.io - resources: - - kokumetricsconfigs/status - verbs: - - get - - patch - - update - - apiGroups: - - operators.coreos.com - resources: - - clusterserviceversions - verbs: - - get - - list - - patch - - update - - watch - serviceAccountName: koku-metrics-controller-manager - strategy: deployment - installModes: - - supported: true - type: OwnNamespace - - supported: true - type: SingleNamespace - - supported: false - type: MultiNamespace - - supported: false - type: AllNamespaces - relatedImages: - - name: koku-metrics-operator - image: quay.io/project-koku/koku-metrics-operator@sha256:4d60286deb439e81fad78056dd483393b28940b276f1a9dfc755c94558484b8b - keywords: - - cost - - management - - usage - - monitor - maintainers: - - email: costmanagement@redhat.com - name: costmanagement - maturity: alpha - provider: - name: Red Hat - replaces: koku-metrics-operator.v1.1.9 - version: 1.2.0 diff --git a/koku-metrics-operator/1.2.0/metadata/annotations.yaml b/koku-metrics-operator/1.2.0/metadata/annotations.yaml deleted file mode 100644 index 2889e0f51..000000000 --- a/koku-metrics-operator/1.2.0/metadata/annotations.yaml +++ /dev/null @@ -1,15 +0,0 @@ -annotations: - # Core bundle annotations. - operators.operatorframework.io.bundle.mediatype.v1: registry+v1 - operators.operatorframework.io.bundle.manifests.v1: manifests/ - operators.operatorframework.io.bundle.metadata.v1: metadata/ - operators.operatorframework.io.bundle.package.v1: koku-metrics-operator - operators.operatorframework.io.bundle.channels.v1: alpha,beta - operators.operatorframework.io.bundle.channel.default.v1: beta - operators.operatorframework.io.metrics.builder: operator-sdk-v1.25.3 - operators.operatorframework.io.metrics.mediatype.v1: metrics+v1 - operators.operatorframework.io.metrics.project_layout: go.kubebuilder.io/v2 - - # Annotations for testing. - operators.operatorframework.io.test.mediatype.v1: scorecard+v1 - operators.operatorframework.io.test.config.v1: tests/scorecard/ diff --git a/koku-metrics-operator/1.2.0/tests/scorecard/config.yaml b/koku-metrics-operator/1.2.0/tests/scorecard/config.yaml deleted file mode 100644 index a19cb8f47..000000000 --- a/koku-metrics-operator/1.2.0/tests/scorecard/config.yaml +++ /dev/null @@ -1,40 +0,0 @@ -apiVersion: scorecard.operatorframework.io/v1alpha3 -kind: Configuration -metadata: - name: config -stages: -- parallel: true - tests: - - entrypoint: - - scorecard-test - - basic-check-spec - image: quay.io/operator-framework/scorecard-test:v1.10.1 - labels: - suite: basic - test: basic-check-spec-test - storage: - spec: - mountPath: {} - - entrypoint: - - scorecard-test - - olm-bundle-validation - image: quay.io/operator-framework/scorecard-test:v1.10.1 - labels: - suite: olm - test: olm-bundle-validation-test - storage: - spec: - mountPath: {} - - entrypoint: - - scorecard-test - - olm-crds-have-validation - image: quay.io/operator-framework/scorecard-test:v1.10.1 - labels: - suite: olm - test: olm-crds-have-validation-test - storage: - spec: - mountPath: {} -storage: - spec: - mountPath: {} diff --git a/koku-metrics-operator/2.0.0/Dockerfile b/koku-metrics-operator/2.0.0/Dockerfile deleted file mode 100644 index 74fad1f41..000000000 --- a/koku-metrics-operator/2.0.0/Dockerfile +++ /dev/null @@ -1,21 +0,0 @@ -FROM scratch - -# Core bundle labels. -LABEL operators.operatorframework.io.bundle.mediatype.v1=registry+v1 -LABEL operators.operatorframework.io.bundle.manifests.v1=manifests/ -LABEL operators.operatorframework.io.bundle.metadata.v1=metadata/ -LABEL operators.operatorframework.io.bundle.package.v1=koku-metrics-operator -LABEL operators.operatorframework.io.bundle.channels.v1=alpha,beta -LABEL operators.operatorframework.io.bundle.channel.default.v1=beta -LABEL operators.operatorframework.io.metrics.builder=operator-sdk-v1.25.3 -LABEL operators.operatorframework.io.metrics.mediatype.v1=metrics+v1 -LABEL operators.operatorframework.io.metrics.project_layout=go.kubebuilder.io/v2 - -# Labels for testing. -LABEL operators.operatorframework.io.test.mediatype.v1=scorecard+v1 -LABEL operators.operatorframework.io.test.config.v1=tests/scorecard/ - -# Copy files to locations specified by labels. -COPY manifests /manifests/ -COPY metadata /metadata/ -COPY tests/scorecard /tests/scorecard/ diff --git a/koku-metrics-operator/2.0.0/manifests/koku-metrics-cfg.openshift.io_kokumetricsconfigs.yaml b/koku-metrics-operator/2.0.0/manifests/koku-metrics-cfg.openshift.io_kokumetricsconfigs.yaml deleted file mode 100644 index 0b3f1a09a..000000000 --- a/koku-metrics-operator/2.0.0/manifests/koku-metrics-cfg.openshift.io_kokumetricsconfigs.yaml +++ /dev/null @@ -1,968 +0,0 @@ -apiVersion: apiextensions.k8s.io/v1 -kind: CustomResourceDefinition -metadata: - annotations: - controller-gen.kubebuilder.io/version: v0.3.0 - creationTimestamp: null - labels: - app: koku-metrics-operator - name: kokumetricsconfigs.koku-metrics-cfg.openshift.io -spec: - group: koku-metrics-cfg.openshift.io - names: - kind: KokuMetricsConfig - listKind: KokuMetricsConfigList - plural: kokumetricsconfigs - singular: kokumetricsconfig - scope: Namespaced - versions: - - name: v1beta1 - schema: - openAPIV3Schema: - description: KokuMetricsConfig is the Schema for the kokumetricsconfig API - properties: - apiVersion: - description: 'APIVersion defines the versioned schema of this representation - of an object. Servers should convert recognized schemas to the latest - internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' - type: string - kind: - description: 'Kind is a string value representing the REST resource this - object represents. Servers may infer this from the endpoint the client - submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' - type: string - metadata: - type: object - spec: - description: KokuMetricsConfigSpec defines the desired state of KokuMetricsConfig. - properties: - api_url: - default: https://cloud.redhat.com - description: FOR DEVELOPMENT ONLY. APIURL is a field of KokuMetricsConfig - to represent the url of the API endpoint for service interaction. - The default is `https://cloud.redhat.com`. - type: string - authentication: - description: Authentication is a field of KokuMetricsConfig to represent - the authentication object. - properties: - secret_name: - description: AuthenticationSecretName is a field of KokuMetricsConfig - to represent the secret with the user and password used for - uploads. - type: string - type: - default: token - description: 'AuthType is a field of KokuMetricsConfig to represent - the authentication type to be used basic or token. Valid values - are: - "basic" : Enables authentication using user and password - from authentication secret. - "token" (default): Uses cluster - token for authentication.' - enum: - - token - - basic - type: string - required: - - type - type: object - clusterID: - description: ClusterID is a field of KokuMetricsConfig to represent - the cluster UUID. Normally this value should not be specified. Only - set this value if the clusterID cannot be obtained from the ClusterVersion. - type: string - clusterVersion: - description: ClusterVersion is a field of KokuMetricsConfig to represent - the cluster version. Normally this value should not be specified. - Only set this value if the clusterVersion cannot be obtained from - the ClusterVersion. - type: string - packaging: - description: Packaging is a field of KokuMetricsConfig to represent - the packaging object. - properties: - max_reports_to_store: - default: 30 - description: MaxReports is a field of KokuMetricsConfig to represent - the maximum number of reports to store. The default is 30 reports - which corresponds to approximately 7 days worth of data given - the other default values. - format: int64 - minimum: 1 - type: integer - max_size_MB: - default: 100 - description: MaxSize is a field of KokuMetricsConfig to represent - the max file size in megabytes that will be compressed for upload - to Ingress. The default is 100. - format: int64 - maximum: 100 - minimum: 1 - type: integer - required: - - max_reports_to_store - - max_size_MB - type: object - prometheus_config: - description: PrometheusConfig is a field of KokuMetricsConfig to represent - the configuration of Prometheus connection. - properties: - collect_previous_data: - default: true - description: CollectPreviousData is a field of KokuMetricsConfig - to represent whether or not the operator will gather previous - data upon KokuMetricsConfig creation. This toggle only changes - operator behavior when a new KokuMetricsConfig is created. When - `true`, the operator will gather all existing Prometheus data - for the current month. The default is true. - type: boolean - context_timeout: - default: 120 - description: ContextTimeout is a field of KokuMetricsConfig to - represent how long a query to prometheus should run in seconds - before timing out. The default is 120 seconds. - format: int64 - maximum: 180 - minimum: 10 - type: integer - disable_metrics_collection_cost_management: - default: false - description: DisableMetricsCollectionCostManagement is a field - of KokuMetricsConfig to represent whether or not the operator - will generate reports for cost-management metrics. The default - is false. - type: boolean - disable_metrics_collection_resource_optimization: - default: false - description: DisableMetricsCollectionResourceOptimization is a - field of KokuMetricsConfig to represent whether or not the operator - will generate reports for resource-optimization metrics. The - default is false. - type: boolean - service_address: - default: https://thanos-querier.openshift-monitoring.svc:9091 - description: FOR DEVELOPMENT ONLY. SvcAddress is a field of KokuMetricsConfig - to represent the thanos-querier address. The default is `https://thanos-querier.openshift-monitoring.svc:9091`. - type: string - skip_tls_verification: - default: false - description: FOR DEVELOPMENT ONLY. SkipTLSVerification is a field - of KokuMetricsConfig to represent if the thanos-querier endpoint - must be certificate validated. The default is false. - type: boolean - required: - - service_address - - skip_tls_verification - type: object - source: - description: Source is a field of KokuMetricsConfig to represent the - desired source on cloud.redhat.com. - properties: - check_cycle: - default: 1440 - description: CheckCycle is a field of KokuMetricsConfig to represent - the number of minutes between each source check schedule The - default is 1440 min (24 hours). - format: int64 - minimum: 0 - type: integer - create_source: - default: false - description: CreateSource is a field of KokuMetricsConfigSpec - to represent if the source should be created if not found. - type: boolean - name: - description: SourceName is a field of KokuMetricsConfigSpec to - represent the source name on cloud.redhat.com. - type: string - sources_path: - default: /api/sources/v1.0/ - description: FOR DEVELOPMENT ONLY. SourcesAPIPath is a field of - KokuMetricsConfig to represent the path of the Sources API service. - The default is `/api/sources/v1.0/`. - type: string - required: - - check_cycle - - create_source - - sources_path - type: object - upload: - description: Upload is a field of KokuMetricsConfig to represent the - upload object. - properties: - ingress_path: - default: /api/ingress/v1/upload - description: FOR DEVELOPMENT ONLY. IngressAPIPath is a field of - KokuMetricsConfig to represent the path of the Ingress API service. - The default is `/api/ingress/v1/upload`. - type: string - upload_cycle: - default: 360 - description: UploadCycle is a field of KokuMetricsConfig to represent - the number of minutes between each upload schedule. The default - is 360 min (6 hours). - format: int64 - minimum: 0 - type: integer - upload_toggle: - default: true - description: UploadToggle is a field of KokuMetricsConfig to represent - if the operator is installed in a restricted-network. If `false`, - the operator will not upload to cloud.redhat.com or check/create - sources. The default is true. - type: boolean - upload_wait: - description: UploadWait is a field of KokuMetricsConfig to represent - the time to wait before sending an upload. - format: int64 - minimum: 0 - type: integer - validate_cert: - default: true - description: ValidateCert is a field of KokuMetricsConfig to represent - if the Ingress endpoint must be certificate validated. - type: boolean - required: - - ingress_path - - upload_cycle - - upload_toggle - - validate_cert - type: object - volume_claim_template: - description: VolumeClaimTemplate is a field of KokuMetricsConfig to - represent a PVC template. - properties: - apiVersion: - description: 'APIVersion defines the versioned schema of this - representation of an object. Servers should convert recognized - schemas to the latest internal value, and may reject unrecognized - values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' - type: string - kind: - description: 'Kind is a string value representing the REST resource - this object represents. Servers may infer this from the endpoint - the client submits requests to. Cannot be updated. In CamelCase. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' - type: string - metadata: - description: EmbeddedMetadata contains metadata relevant to an - EmbeddedResource. - properties: - annotations: - additionalProperties: - type: string - description: 'Annotations is an unstructured key value map - stored with a resource that may be set by external tools - to store and retrieve arbitrary metadata. They are not queryable - and should be preserved when modifying objects. More info: - http://kubernetes.io/docs/user-guide/annotations' - type: object - labels: - additionalProperties: - type: string - description: 'Map of string keys and values that can be used - to organize and categorize (scope and select) objects. May - match selectors of replication controllers and services. - More info: http://kubernetes.io/docs/user-guide/labels' - type: object - name: - description: 'Name must be unique within a namespace. Is required - when creating resources, although some resources may allow - a client to request the generation of an appropriate name - automatically. Name is primarily intended for creation idempotence - and configuration definition. Cannot be updated. More info: - http://kubernetes.io/docs/user-guide/identifiers#names' - type: string - type: object - spec: - description: 'Spec defines the desired characteristics of a volume - requested by a pod author. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims' - properties: - accessModes: - description: 'accessModes contains the desired access modes - the volume should have. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes-1' - items: - type: string - type: array - dataSource: - description: 'dataSource field can be used to specify either: - * An existing VolumeSnapshot object (snapshot.storage.k8s.io/VolumeSnapshot) - * An existing PVC (PersistentVolumeClaim) If the provisioner - or an external controller can support the specified data - source, it will create a new volume based on the contents - of the specified data source. If the AnyVolumeDataSource - feature gate is enabled, this field will always have the - same contents as the DataSourceRef field.' - properties: - apiGroup: - description: APIGroup is the group for the resource being - referenced. If APIGroup is not specified, the specified - Kind must be in the core API group. For any other third-party - types, APIGroup is required. - type: string - kind: - description: Kind is the type of resource being referenced - type: string - name: - description: Name is the name of resource being referenced - type: string - required: - - kind - - name - type: object - dataSourceRef: - description: 'dataSourceRef specifies the object from which - to populate the volume with data, if a non-empty volume - is desired. This may be any local object from a non-empty - API group (non core object) or a PersistentVolumeClaim object. - When this field is specified, volume binding will only succeed - if the type of the specified object matches some installed - volume populator or dynamic provisioner. This field will - replace the functionality of the DataSource field and as - such if both fields are non-empty, they must have the same - value. For backwards compatibility, both fields (DataSource - and DataSourceRef) will be set to the same value automatically - if one of them is empty and the other is non-empty. There - are two important differences between DataSource and DataSourceRef: - * While DataSource only allows two specific types of objects, - DataSourceRef allows any non-core object, as well as PersistentVolumeClaim - objects. * While DataSource ignores disallowed values (dropping - them), DataSourceRef preserves all values, and generates - an error if a disallowed value is specified. (Beta) Using - this field requires the AnyVolumeDataSource feature gate - to be enabled.' - properties: - apiGroup: - description: APIGroup is the group for the resource being - referenced. If APIGroup is not specified, the specified - Kind must be in the core API group. For any other third-party - types, APIGroup is required. - type: string - kind: - description: Kind is the type of resource being referenced - type: string - name: - description: Name is the name of resource being referenced - type: string - required: - - kind - - name - type: object - resources: - description: 'resources represents the minimum resources the - volume should have. If RecoverVolumeExpansionFailure feature - is enabled users are allowed to specify resource requirements - that are lower than previous value but must still be higher - than capacity recorded in the status field of the claim. - More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources' - properties: - limits: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - description: 'Limits describes the maximum amount of compute - resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' - type: object - requests: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - description: 'Requests describes the minimum amount of - compute resources required. If Requests is omitted for - a container, it defaults to Limits if that is explicitly - specified, otherwise to an implementation-defined value. - More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' - type: object - type: object - selector: - description: selector is a label query over volumes to consider - for binding. - properties: - matchExpressions: - description: matchExpressions is a list of label selector - requirements. The requirements are ANDed. - items: - description: A label selector requirement is a selector - that contains values, a key, and an operator that - relates the key and values. - properties: - key: - description: key is the label key that the selector - applies to. - type: string - operator: - description: operator represents a key's relationship - to a set of values. Valid operators are In, NotIn, - Exists and DoesNotExist. - type: string - values: - description: values is an array of string values. - If the operator is In or NotIn, the values array - must be non-empty. If the operator is Exists or - DoesNotExist, the values array must be empty. - This array is replaced during a strategic merge - patch. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - description: matchLabels is a map of {key,value} pairs. - A single {key,value} in the matchLabels map is equivalent - to an element of matchExpressions, whose key field is - "key", the operator is "In", and the values array contains - only "value". The requirements are ANDed. - type: object - type: object - storageClassName: - description: 'storageClassName is the name of the StorageClass - required by the claim. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#class-1' - type: string - volumeMode: - description: volumeMode defines what type of volume is required - by the claim. Value of Filesystem is implied when not included - in claim spec. - type: string - volumeName: - description: volumeName is the binding reference to the PersistentVolume - backing this claim. - type: string - type: object - type: object - required: - - authentication - - packaging - - prometheus_config - - source - - upload - type: object - status: - description: KokuMetricsConfigStatus defines the observed state of KokuMetricsConfig. - properties: - api_url: - description: APIURL is a field of KokuMetricsConfig to represent the - url of the API endpoint for service interaction. - type: string - authentication: - description: Authentication is a field of KokuMetricsConfig to represent - the authentication status. - properties: - credentials_found: - description: AuthenticationCredentialsFound is a field of KokuMetricsConfig - to represent if used for uploads were found. - type: boolean - error: - description: AuthErrorMessage is a field of KokuMetricsConfig - to represent an `invalid credentials` error message. - type: string - last_credential_verification_time: - description: LastVerificationTime is a field of KokuMetricsConfig - to represent the last time credentials were verified. - format: date-time - nullable: true - type: string - secret_name: - description: AuthenticationSecretName is a field of KokuMetricsConfig - to represent the secret with the user and password used for - uploads. - type: string - type: - description: AuthType is a field of KokuMetricsConfig to represent - the authentication type to be used basic or token. - enum: - - token - - basic - type: string - valid_basic_auth: - description: ValidBasicAuth is a field of KokuMetricsConfig to - represent if the given basic auth credentials are valid. - type: boolean - type: object - clusterID: - description: ClusterID is a field of KokuMetricsConfig to represent - the cluster UUID. - type: string - clusterVersion: - description: ClusterVersion is a field of KokuMetricsConfig to represent - the cluster version. - type: string - operator_commit: - description: OperatorCommit is a field of KokuMetricsConfig that shows - the commit hash of the operator. - type: string - packaging: - description: Packaging is a field of KokuMetricsConfig to represent - the packaging status - properties: - error: - description: PackagingError is a field of KokuMetricsConfig to - represent the error encountered packaging the reports. - type: string - last_successful_packaging_time: - description: LastSuccessfulPackagingTime is a field of KokuMetricsConfig - that shows the time of the last successful file packaging. - format: date-time - nullable: true - type: string - max_reports_to_store: - description: MaxReports is a field of KokuMetricsConfig to represent - the maximum number of reports to store. - format: int64 - type: integer - max_size_MB: - description: MaxSize is a field of KokuMetricsConfig to represent - the max file size in megabytes that will be compressed for upload - to Ingress. - format: int64 - type: integer - number_reports_stored: - description: ReportCount is a field of KokuMetricsConfig to represent - the number of reports in storage. - format: int64 - type: integer - packaged_files: - description: PackagedFiles is a field of KokuMetricsConfig to - represent the list of file packages in storage. - items: - type: string - type: array - type: object - persistent_volume_claim: - description: PersistentVolumeClaim is a field of KokuMetricsConfig - to represent a PVC. - properties: - apiVersion: - description: 'APIVersion defines the versioned schema of this - representation of an object. Servers should convert recognized - schemas to the latest internal value, and may reject unrecognized - values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' - type: string - kind: - description: 'Kind is a string value representing the REST resource - this object represents. Servers may infer this from the endpoint - the client submits requests to. Cannot be updated. In CamelCase. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' - type: string - metadata: - description: EmbeddedMetadata contains metadata relevant to an - EmbeddedResource. - properties: - annotations: - additionalProperties: - type: string - description: 'Annotations is an unstructured key value map - stored with a resource that may be set by external tools - to store and retrieve arbitrary metadata. They are not queryable - and should be preserved when modifying objects. More info: - http://kubernetes.io/docs/user-guide/annotations' - type: object - labels: - additionalProperties: - type: string - description: 'Map of string keys and values that can be used - to organize and categorize (scope and select) objects. May - match selectors of replication controllers and services. - More info: http://kubernetes.io/docs/user-guide/labels' - type: object - name: - description: 'Name must be unique within a namespace. Is required - when creating resources, although some resources may allow - a client to request the generation of an appropriate name - automatically. Name is primarily intended for creation idempotence - and configuration definition. Cannot be updated. More info: - http://kubernetes.io/docs/user-guide/identifiers#names' - type: string - type: object - spec: - description: 'Spec defines the desired characteristics of a volume - requested by a pod author. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims' - properties: - accessModes: - description: 'accessModes contains the desired access modes - the volume should have. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes-1' - items: - type: string - type: array - dataSource: - description: 'dataSource field can be used to specify either: - * An existing VolumeSnapshot object (snapshot.storage.k8s.io/VolumeSnapshot) - * An existing PVC (PersistentVolumeClaim) If the provisioner - or an external controller can support the specified data - source, it will create a new volume based on the contents - of the specified data source. If the AnyVolumeDataSource - feature gate is enabled, this field will always have the - same contents as the DataSourceRef field.' - properties: - apiGroup: - description: APIGroup is the group for the resource being - referenced. If APIGroup is not specified, the specified - Kind must be in the core API group. For any other third-party - types, APIGroup is required. - type: string - kind: - description: Kind is the type of resource being referenced - type: string - name: - description: Name is the name of resource being referenced - type: string - required: - - kind - - name - type: object - dataSourceRef: - description: 'dataSourceRef specifies the object from which - to populate the volume with data, if a non-empty volume - is desired. This may be any local object from a non-empty - API group (non core object) or a PersistentVolumeClaim object. - When this field is specified, volume binding will only succeed - if the type of the specified object matches some installed - volume populator or dynamic provisioner. This field will - replace the functionality of the DataSource field and as - such if both fields are non-empty, they must have the same - value. For backwards compatibility, both fields (DataSource - and DataSourceRef) will be set to the same value automatically - if one of them is empty and the other is non-empty. There - are two important differences between DataSource and DataSourceRef: - * While DataSource only allows two specific types of objects, - DataSourceRef allows any non-core object, as well as PersistentVolumeClaim - objects. * While DataSource ignores disallowed values (dropping - them), DataSourceRef preserves all values, and generates - an error if a disallowed value is specified. (Beta) Using - this field requires the AnyVolumeDataSource feature gate - to be enabled.' - properties: - apiGroup: - description: APIGroup is the group for the resource being - referenced. If APIGroup is not specified, the specified - Kind must be in the core API group. For any other third-party - types, APIGroup is required. - type: string - kind: - description: Kind is the type of resource being referenced - type: string - name: - description: Name is the name of resource being referenced - type: string - required: - - kind - - name - type: object - resources: - description: 'resources represents the minimum resources the - volume should have. If RecoverVolumeExpansionFailure feature - is enabled users are allowed to specify resource requirements - that are lower than previous value but must still be higher - than capacity recorded in the status field of the claim. - More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources' - properties: - limits: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - description: 'Limits describes the maximum amount of compute - resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' - type: object - requests: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - description: 'Requests describes the minimum amount of - compute resources required. If Requests is omitted for - a container, it defaults to Limits if that is explicitly - specified, otherwise to an implementation-defined value. - More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' - type: object - type: object - selector: - description: selector is a label query over volumes to consider - for binding. - properties: - matchExpressions: - description: matchExpressions is a list of label selector - requirements. The requirements are ANDed. - items: - description: A label selector requirement is a selector - that contains values, a key, and an operator that - relates the key and values. - properties: - key: - description: key is the label key that the selector - applies to. - type: string - operator: - description: operator represents a key's relationship - to a set of values. Valid operators are In, NotIn, - Exists and DoesNotExist. - type: string - values: - description: values is an array of string values. - If the operator is In or NotIn, the values array - must be non-empty. If the operator is Exists or - DoesNotExist, the values array must be empty. - This array is replaced during a strategic merge - patch. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - description: matchLabels is a map of {key,value} pairs. - A single {key,value} in the matchLabels map is equivalent - to an element of matchExpressions, whose key field is - "key", the operator is "In", and the values array contains - only "value". The requirements are ANDed. - type: object - type: object - storageClassName: - description: 'storageClassName is the name of the StorageClass - required by the claim. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#class-1' - type: string - volumeMode: - description: volumeMode defines what type of volume is required - by the claim. Value of Filesystem is implied when not included - in claim spec. - type: string - volumeName: - description: volumeName is the binding reference to the PersistentVolume - backing this claim. - type: string - type: object - type: object - prometheus: - description: Prometheus represents the status of premetheus queries. - properties: - configuration_error: - description: ConfigError is a field of KokuMetricsConfigStatus - to represent errors during prometheus configuration. - type: string - context_timeout: - description: ContextTimeout is a field of KokuMetricsConfigState - to represent how long a query to prometheus should run in seconds - before timing out. - format: int64 - type: integer - disabled_metrics_collection_cost_management: - default: false - description: DisabledMetricsCollectionCostManagement is a field - of KokuMetricsConfigStatus to represent whether or not collecting - cost-management metrics is disabled. The default is false. - type: boolean - disabled_metrics_collection_resource_optimization: - default: true - description: DisabledMetricsCollectionResourceOptimization is - a field of KokuMetricsConfigStatus to represent whether or not - collecting resource-optimzation metrics is disabled. The default - is true. - type: boolean - last_query_start_time: - description: LastQueryStartTime is a field of KokuMetricsConfigStatus - to represent the last time queries were started. - format: date-time - nullable: true - type: string - last_query_success_time: - description: LastQuerySuccessTime is a field of KokuMetricsConfigStatus - to represent the last time queries were successful. - format: date-time - nullable: true - type: string - previous_data_collected: - default: false - description: PreviousDataCollected is a field of KokuMetricsConfigStatus - to represent whether or not the operator gathered the available - Prometheus data upon KokuMetricsConfig creation. - type: boolean - prometheus_configured: - description: PrometheusConfigured is a field of KokuMetricsConfigStatus - to represent if the operator is configured to connect to prometheus. - type: boolean - prometheus_connected: - description: PrometheusConnected is a field of KokuMetricsConfigStatus - to represent if prometheus can be queried. - type: boolean - prometheus_connection_error: - description: ConnectionError is a field of KokuMetricsConfigStatus - to represent errors during prometheus test query. - type: string - service_address: - description: SvcAddress is the internal thanos-querier address. - type: string - skip_tls_verification: - description: SkipTLSVerification is a field of KokuMetricsConfigStatus - to represent if the thanos-querier endpoint must be certificate - validated. - type: boolean - required: - - prometheus_configured - - prometheus_connected - type: object - reports: - description: Reports represents the status of report generation. - properties: - data_collected: - description: DataCollected is a field of KokuMetricsConfigStatus - to represent whether or not data was collected for the last - query. - type: boolean - data_collection_message: - description: DataCollectionMessage is a field of KokuMetricsConfigStatus - to represent a message associated with the data_collected status. - type: string - last_hour_queried: - description: LastHourQueried is a field of KokuMetricsConfigStatus - to represent the time range for which metrics were last queried. - type: string - report_month: - description: ReportMonth is a field of KokuMetricsConfigStatus - to represent the month for which reports are being generated. - type: string - type: object - source: - description: Source is a field of KokuMetricsConfig to represent the - observed state of the source on cloud.redhat.com. - properties: - check_cycle: - description: CheckCycle is a field of KokuMetricsConfig to represent - the number of minutes between each source check schedule. The - default is 1440 min (24 hours). - format: int64 - type: integer - create_source: - description: CreateSource is a field of KokuMetricsConfigStatus - to represent if the source should be created if not found. A - source will not be created if upload_toggle is `false`. - type: boolean - error: - description: SourceError is a field of KokuMetricsConfigStatus - to represent the error encountered creating the source. - type: string - last_check_time: - description: LastSourceCheckTime is a field of KokuMetricsConfig - that shows the time that the last check was attempted. - format: date-time - nullable: true - type: string - name: - description: SourceName is a field of KokuMetricsConfigStatus - to represent the source name on cloud.redhat.com. - type: string - source_defined: - description: SourceDefined is a field of KokuMetricsConfigStatus - to represent if the source exists as defined on cloud.redhat.com. - type: boolean - sources_path: - description: SourcesAPIPath is a field of KokuMetricsConfig to - represent the path of the Sources API service. - type: string - type: object - storage: - description: Storage is a field - properties: - volume_mounted: - description: VolumeMounted is a bool to indicate if storage volume - was mounted. - type: boolean - volume_type: - description: VolumeType is the string representation of the volume - type. - type: string - type: object - upload: - description: Upload is a field of KokuMetricsConfig to represent the - upload object. - properties: - error: - description: UploadError is a field of KokuMetricsConfigStatus - to represent the error encountered uploading reports. - type: string - ingress_path: - description: IngressAPIPath is a field of KokuMetricsConfig to - represent the path of the Ingress API service. - type: string - last_payload_files: - description: LastPayloadFiles is a field of KokuMetricsConfig - to represent the list of files in the last payload that was - sent. - items: - type: string - type: array - last_payload_manifest_id: - description: LastPayloadManifest is a field of KokuMetricsConfig - that shows the manifestID of the last payload. - type: string - last_payload_name: - description: LastPayloadName is a field of KokuMetricsConfig that - shows the name of the last payload file. - type: string - last_payload_request_id: - description: LastPayloadRequestID is a field of KokuMetricsConfig - that shows the insights request id of the last payload. - type: string - last_successful_upload_time: - description: LastSuccessfulUploadTime is a field of KokuMetricsConfig - that shows the time of the last successful upload. - format: date-time - nullable: true - type: string - last_upload_status: - description: LastUploadStatus is a field of KokuMetricsConfig - that shows the http status of the last upload. - type: string - upload: - description: UploadToggle is a field of KokuMetricsConfig to represent - if the operator should upload to cloud.redhat.com. The default - is true - type: boolean - upload_cycle: - description: UploadCycle is a field of KokuMetricsConfig to represent - the number of minutes between each upload schedule. The default - is 360 min (6 hours). - format: int64 - type: integer - upload_wait: - description: UploadWait is a field of KokuMetricsConfig to represent - the time to wait before sending an upload. - format: int64 - type: integer - validate_cert: - description: ValidateCert is a field of KokuMetricsConfig to represent - if the Ingress endpoint must be certificate validated. - type: boolean - type: object - type: object - required: - - spec - type: object - served: true - storage: true - subresources: - status: {} -status: - acceptedNames: - kind: "" - plural: "" - conditions: [] - storedVersions: [] diff --git a/koku-metrics-operator/2.0.0/manifests/koku-metrics-operator.clusterserviceversion.yaml b/koku-metrics-operator/2.0.0/manifests/koku-metrics-operator.clusterserviceversion.yaml deleted file mode 100644 index 5b6fb83dd..000000000 --- a/koku-metrics-operator/2.0.0/manifests/koku-metrics-operator.clusterserviceversion.yaml +++ /dev/null @@ -1,515 +0,0 @@ -apiVersion: operators.coreos.com/v1alpha1 -kind: ClusterServiceVersion -metadata: - annotations: - alm-examples: |- - [ - { - "apiVersion": "koku-metrics-cfg.openshift.io/v1beta1", - "kind": "KokuMetricsConfig", - "metadata": { - "name": "kokumetricscfg-sample-v1beta1" - }, - "spec": { - "authentication": { - "type": "token" - }, - "packaging": { - "max_reports_to_store": 30, - "max_size_MB": 100 - }, - "prometheus_config": { - "collect_previous_data": true, - "context_timeout": 120, - "disable_metrics_collection_cost_management": false, - "disable_metrics_collection_resource_optimization": false - }, - "source": { - "check_cycle": 1440, - "create_source": false, - "name": "INSERT-SOURCE-NAME" - }, - "upload": { - "upload_cycle": 360, - "upload_toggle": true - } - } - } - ] - capabilities: Seamless Upgrades - categories: Monitoring - certified: "false" - containerImage: quay.io/project-koku/koku-metrics-operator@sha256:e0ec3fb3f8ebd9ce09e4c35622e955731f3b2d93d51b34c6b6435a6d2b630c4c - createdAt: "2023-03-29T16:40:08Z" - description: A Golang-based OpenShift Operator that generates and uploads OpenShift - usage metrics to cost management. - operatorframework.io/suggested-namespace: koku-metrics-operator - operators.openshift.io/infrastructure-features: '["Disconnected"]' - operators.operatorframework.io/builder: operator-sdk-v1.25.3 - operators.operatorframework.io/project_layout: go.kubebuilder.io/v2 - repository: https://github.com/project-koku/koku-metrics-operator - support: Cost Management - name: koku-metrics-operator.v2.0.0 - namespace: placeholder -spec: - apiservicedefinitions: {} - customresourcedefinitions: - owned: - - description: KokuMetricsConfig is the Schema for the kokumetricsconfig API - displayName: Koku Metrics Config - kind: KokuMetricsConfig - name: kokumetricsconfigs.koku-metrics-cfg.openshift.io - version: v1beta1 - description: |- - # Koku Metrics Operator - ## Introduction - The `koku-metrics-operator` is a component of the [cost managment](https://access.redhat.com/documentation/en-us/cost_management_service) service for Openshift, used to gather the required information from the cluster. It is recommended to be installed in OpenShift 4.5+. This operator obtains OpenShift usage data by querying Prometheus and uploads it to cost management to be processed. The Operator queries Prometheus every hour to create metric reports, which are then packaged and uploaded to cost management at [console.redhat.com](https://console.redhat.com). For more information, reach out to . - - This operator is capable of functioning within a disconnected/restricted network (aka air-gapped mode). In this mode, the operator will store the packaged reports for manual retrieval instead of being uploaded to cost management. Documentation for installing an operator within a restricted network can be found [here](https://docs.openshift.com/container-platform/latest/operators/admin/olm-restricted-networks.html). - - ## Features and Capabilities - #### Metrics collection: - The Koku Metrics Operator (`koku-metrics-operator`) collects the metrics required for cost management by: - * Querying Prometheus to gather the necessary metrics for cost management. - * Writing Prometheus queries to CSV report files. - * Packaging the CSV report files into tarballs. - - #### Additional Capabilities: - * Resource Optimization metrics collection. - * The operator can be configured to gather all previous data within the configured retention period or a maximum of 90 days. The default data collection period is the 14 previous days. This setting is only applicable to newly created KokuMetricsConfigs. - * The operator can be configured to automatically upload the packaged reports to cost management through Red Hat Insights Ingress service. - * The operator can create a source in console.redhat.com. A source is required for cost management to process the uploaded packages. - * PersistentVolumeClaim (PVC) configuration: The KokuMetricsConfig CR can accept a PVC definition and the operator will create and mount the PVC. If one is not provided, a default PVC will be created. - * Restricted network installation: this operator can function on a restricted network. In this mode, the operator stores the packaged reports for manual retrieval. - - ## New in v2.0.0: - * Adds metrics and report generation for resource optimization. This feature will collect additional usage metrics and create a new report in the payload. These metrics are enabled by default, but can be disabled by setting `disable_metrics_collection_resource_optimization` to `true`. - * Collect all available Prometheus data upon CR creation. This feature only applies to newly created KokuMetricsConfigs. The operator will check the monitoring stack configuration in the `openshift-monitoring` namespace. The operator will use the `retention` period set in the `cluster-monitoring-config` ConfigMap if defined, up to a maximum of 90 days. Otherwise it will fall back to collecting 14 days of data, if available. This data collection may be disabled by setting `collect_previous_data` to `false`. Turning this feature off results in the operator collecting metrics from the time the KokuMetricsConfig is created, forward. - - ## Limitations and Pre-Requisites - #### Limitations (Potential for metrics data loss) - * A source **must** exist in console.redhat.com for an uploaded payload to be processed by cost management. The operator sends the payload to the Red Hat Insights Ingress service which usually returns successfully, but the operator does not currently confirm with cost management that the payload was processed. After Ingress accepts the uploaded payload, the payload is removed from the operator and is gone forever. If the data within the payload is not processed, a gap will be introduced in the usage metrics. - - **Note** The following limitations are specific to operators configured to run in a restricted network: - * The `koku-metrics-operator` will not be able to generate new reports if the PVC storage is filled. If this occurs, the reports must be manually deleted from the PVC so that the operator can function as normal. - * The default report retention is 30 reports (about one week's worth of data). The reports must be manually downloaded and uploaded to console.redhat.com every week, or they will be deleted and the data will be lost. - - #### Storage configuration prerequisite - The operator will attempt to create and use the following PVC when installed: - - volume_claim_template: - apiVersion: v1 - kind: PersistentVolumeClaim - metadata: - name: koku-metrics-operator-data - spec: - accessModes: - - ReadWriteOnce - resources: - requests: - storage: 10Gi - - If a different PVC should be utilized, a valid PVC should be specified in the KokuMetricsConfig CR as described in the appropriate section below. The PVC to be used may exist already, or the operator will attempt to create it. - - To use the default specification, the follow assumptions must be met: - 1. A default StorageClass is defined. - 2. Dynamic provisioning for that default StorageClass is enabled. - - If these assumptions are not met, the operator will not deploy correctly. In these cases, storage must be manually configured. After configuring storage, a valid PVC template should be supplied in the `volume_claim_template` spec of the KokuMetricsConfig CR. - - ## Configurable parameters: - * `authentication`: - * `type: token` -> The authentication method for connecting to `console.redhat.com`. The default and preferred method is `token`. `basic` is used when the openshift-config pull-secret does not contain a token for `cloud.redhat.com`. - * `secret_name` -> The Secret used by the operator when the authentication type is `basic`. This parameter is required **only if** the authentication type is `basic`. - * `packaging`: - * `max_reports_to_store: 30` -> The number of reports to store when configured in air-gapped mode. The default is 30, with a minimum of 1 and no maximum. When the operator is not configured in air-gapped mode, this parameter has no effect. Reports are removed as soon as they are uploaded. - * `max_size: 100` -> The maximum size for packaged files in Megabytes prior to compression. The default is 100, with a minimum of 1 and maximum of 100. - * `prometheus_config`: - * `collect_previous_data: true` -> Toggle for collecting all available data in Prometheus **upon KokuMetricsConfig creation** (This parameter will start to appear in KokuMetricsConfigs that were created prior to v2.0.0 but will not have any effect unless the KokuMetricsConfig is deleted and recreated). The default is `true`. The operator will first look for a `retention` period in the `cluster-monitoring-config` ConfigMap in the `openshift-monitoring` namespace and gather data over this time period up to a maximum of 90 days. If this configuration is not set, the default is 14 days. (New in v2.0.0) - * `disable_metrics_collection_cost_management: false` -> Toggle for disabling the collection of metrics for Cost Management. The default is false. (New in v2.0.0) - * `disable_metrics_collection_resource_optimization: false` -> Toggle for disabling the collection of metrics for Resource Optimization. The default is false. (New in v2.0.0) - * `context_timeout: 120` -> The time in seconds before Prometheus queries timeout due to exceeding context timeout. The default is 120, with a minimum of 10 and maximum of 180. - * `source`: - * `name: INSERT_SOURCE_NAME` -> The name of the Source the operator will create in `console.redhat.com`. The default is `INSERT_SOURCE_NAME` which is a placeholder. - * `create_source: false` -> Toggle for whether or not the operator will create the Source in `console.redhat.com`. The default is False. This parameter should be switched to True when a Source does not already exist in `console.redhat.com` for this cluster. - * `check_cycle: 1440` -> The time in minutes to wait between checking if a Source exists for this cluster. The default is 1440 minutes (24 hrs). - * `upload`: - * `upload_cycle: 360` -> The time in minutes between payload uploads. The default is 360 (6 hours). - * `upload_toggle: true` -> Toggle to turn upload on or off -> true means upload, false means do not upload (false == air-gapped mode). The default is `true`. - * `upload_wait` -> The amount of time (in seconds) to pause before uploading a payload. The default is a random number between 0 and 35. This is used to decrease service load, but may be set to `0` if desired. - * `volume_claim_template` -> see the "Storage configuration prerequisite" section above. - - ## Configure the koku-metrics-operator - **Note** There are separate instructions for configuring the `koku-metrics-operator` to run in a restricted network. - ##### Configure authentication - The default authentication for the operator is `token`. No further steps are required to configure token authentication. If `basic` is the preferred authentication method, a Secret must be created which holds username and password credentials: - 1. On the left navigation pane, select `Workloads` -> `Secrets` -> select Project: `koku-metrics-operator` -> `Create` -> `Key/Value Secret` - 2. Give the Secret a name and add 2 keys: `username` and `password` (all lowercase). The values for these keys correspond to console.redhat.com credentials. - 3. Select `Create`. - ##### Create the KokuMetricsConfig - Configure the koku-metrics-operator by creating a `KokuMetricsConfig`. - 1. On the left navigation pane, select `Operators` -> `Installed Operators` -> `koku-metrics-operator` -> `KokuMetricsConfig` -> `Create Instance`. - 2. For `basic` authentication, edit the following values in the spec: - * Replace `authentication: type:` with `basic`. - * Add the `secret_name` field under `authentication`, and set it equal to the name of the authentication Secret that was created above. The spec should look similar to the following: - - ``` - authentication: - secret_name: SECRET-NAME - type: basic - ``` - - 3. To configure the koku-metrics-operator to create a cost management source, edit the following values in the `source` field: - * Replace `INSERT-SOURCE-NAME` with the preferred name of the source to be created. - * Replace the `create_source` field value with `true`. - - **Note:** if the source already exists, replace `INSERT-SOURCE-NAME` with the existing name, and leave `create_source` as false. This will allow the operator to confirm the source exists. - 4. If not specified, the operator will create a default PersistentVolumeClaim called `koku-metrics-operator-data` with 10Gi of storage. To configure the koku-metrics-operator to use or create a different PVC, edit the following in the spec: - * Add the desired configuration to the `volume_claim_template` field in the spec: - - ``` - volume_claim_template: - apiVersion: v1 - kind: PersistentVolumeClaim - metadata: - name: - spec: - accessModes: - - ReadWriteOnce - resources: - requests: - storage: 10Gi - ``` - - **Note:** If using the YAML View, the `volume_claim_template` field must be added to the spec - 5. Select `Create`. - - # Restricted Network Usage (disconnected/air-gapped mode) - ## Installation - To install the `koku-metrics-operator` in a restricted network, follow the [olm documentation](https://docs.openshift.com/container-platform/latest/operators/admin/olm-restricted-networks.html). The operator is found in the `community-operators` Catalog in the `registry.redhat.io/redhat/community-operator-index:latest` Index. If pruning the index before pushing to the mirrored registry, keep the `koku-metrics-operator` package. - - Within a restricted network, the operator queries prometheus to gather the necessary usage metrics, writes the query results to CSV files, and packages the reports for storage in the PVC. These reports then need to be manually downloaded from the cluster and uploaded to [console.redhat.com](https://console.redhat.com). - - ## Configure the koku-metrics-operator for a restricted network - ##### Create the KokuMetricsConfig - Configure the koku-metrics-operator by creating a `KokuMetricsConfig`. - 1. On the left navigation pane, select `Operators` -> `Installed Operators` -> `koku-metrics-operator` -> `KokuMetricsConfig` -> `Create Instance`. - 2. Specify the desired storage. If not specified, the operator will create a default Persistent Volume Claim called `koku-metrics-operator-data` with 10Gi of storage. To configure the koku-metrics-operator to use or create a different PVC, edit the following in the spec: - * Add the desired configuration to the `volume_claim_template` field in the spec: - - ``` - volume_claim_template: - apiVersion: v1 - kind: PersistentVolumeClaim - metadata: - name: - spec: - storageClassName: - accessModes: - - ReadWriteOnce - resources: - requests: - storage: 10Gi - ``` - - **Note:** If using the YAML View, the `volume_claim_template` field must be added to the spec - 3. (Optional) Specify the desired report retention. The operator will retain 30 reports by default. This corresponds to approximately one week's worth of data if using the default packaging cycle. To modify the number of retained reports: - * Change the `packaging` spec field `max_reports_to_store` to the desired number of reports to retain. Once this max number is reached, the operator will start removing the oldest packages remaining on the PVC: - - ``` - packaging: - max_size_MB: 100 - max_reports_to_store: 30 - ``` - - **Note:** The number of retained reports directly affects the frequency that reports must be manually downloaded from the PVC. Take caution in setting this to a higher number of reports, as the operator cannot write data to the PVC if the storage is full. - 4. To configure the operator to perform in a restricted network, set the `upload_toggle` to `false`: - - ``` - upload: - upload_cycle: 360 - upload_toggle: false - ``` - - 5. Select `Create`. - - ## Download reports from the Operator & clean up the PVC - If the `koku-metrics-operator` is configured to run in a restricted network, the metric reports will not automatically upload to cost managment. Instead, they need to be manually copied from the PVC for upload to [console.redhat.com](https://console.redhat.com). The default configuration saves one week of reports which means the process of downloading and uploading reports should be repeated weekly to prevent loss of metrics data. To download the reports, complete the following steps: - 1. Create the following Pod, ensuring the `claimName` matches the PVC containing the report data: - - ``` - kind: Pod - apiVersion: v1 - metadata: - name: volume-shell - namespace: koku-metrics-operator - labels: - app: koku-metrics-operator - spec: - volumes: - - name: koku-metrics-operator-reports - persistentVolumeClaim: - claimName: koku-metrics-operator-data - containers: - - name: volume-shell - image: busybox - command: ['sleep', 'infinity'] - volumeMounts: - - name: koku-metrics-operator-reports - mountPath: /tmp/koku-metrics-operator-reports - ``` - - 2. Use rsync to copy all of the files ready for upload from the PVC to a local folder: - - ``` - $ oc rsync volume-shell:/tmp/koku-metrics-operator-reports/upload local/path/to/save/folder - ``` - - 3. Once confirming that the files have been successfully copied, use rsh to connect to the pod and delete the contents of the upload folder so that they are no longer in storage: - - ``` - $ oc rsh volume-shell - $ rm /tmp/koku-metrics-operator-reports/upload/* - ``` - - 4. (Optional) Delete the pod that was used to connect to the PVC: - - ``` - $ oc delete -f volume-shell.yaml - ``` - - ## Create a source - In a restricted network, the `koku-metrics-operator` cannot automatically create a source. This process must be done manually. In the console.redhat.com platform, open the [Sources menu](https://console.redhat.com/settings/sources/) to begin adding an OpenShift source to cost management: - - Prerequisites: - * The cluster identifier which can be found in the KokuMetricsConfig CR, the cluster Overview page, or the cluster Help > About. - - Create source: - 1. Navigate to the Sources menu - 2. Select the `Red Hat sources` tab - 3. Create a new `Red Hat Openshift Container Platform` source: - * give the source a unique name - * add the Cost Management application - * add the cluster identifier - 4. In the Sources wizard, review the details and click `Finish` to create the Source. - - ## Upload the reports to cost managment - Uploading reports to cost managment is done through curl: - - $ curl -vvvv -F "file=@FILE_NAME.tar.gz;type=application/vnd.redhat.hccm.tar+tgz" https://console.redhat.com/api/ingress/v1/upload -u USERNAME:PASS - - where `USERNAME` and `PASS` correspond to the user credentials for [console.redhat.com](https://console.redhat.com), and `FILE_NAME` is the name of the report to upload. - - displayName: Koku Metrics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YyNDk2OWgtNy42NzYzNjExYy0wLjkxNjkxNTksMC0xLjcwMDIyNTgsMC4zMjI1MjUtMi4zNDk4OTkzLDAuOTcyMjEzNwoJCQljLTAuNjQ5Njg4NywwLjY0OTY3MzUtMC45NzY4MjE5LDEuNDc0NDQxNS0wLjk3NjgyMTksMi40NjUwODc5YzAsMC42ODY1NTQsMC4yMzAzOTI1LDEuMzM2MjEyMiwwLjY5MTE0NjksMS45NDkwMzU2CgkJCWMwLjQ1NjE2MTUsMC42MTI4MjM1LDEuMDMyMTE5OCwxLjAzMjExOTgsMS43MTg2NTg0LDEuMjYyNDk2OUwxNzQuMjgwNjM5NiwxODUuODczNjExNXoiLz4KCTwvZz4KPC9nPgo8L3N2Zz4K - mediatype: image/svg+xml - install: - spec: - clusterPermissions: - - rules: - - apiGroups: - - config.openshift.io - resources: - - clusterversions - verbs: - - get - - list - - watch - - apiGroups: - - "" - resources: - - configmaps - verbs: - - get - - list - - watch - - apiGroups: - - "" - resources: - - namespaces - verbs: - - get - - list - - watch - - apiGroups: - - "" - resources: - - secrets - verbs: - - get - serviceAccountName: koku-metrics-controller-manager - deployments: - - label: - app: koku-metrics-operator - control-plane: controller-manager - name: koku-metrics-operator - spec: - replicas: 1 - selector: - matchLabels: - app: koku-metrics-operator - control-plane: controller-manager - strategy: {} - template: - metadata: - labels: - app: koku-metrics-operator - control-plane: controller-manager - spec: - containers: - - args: - - --enable-leader-election - command: - - /manager - env: - - name: IN_CLUSTER - value: "true" - - name: WATCH_NAMESPACE - valueFrom: - fieldRef: - fieldPath: metadata.annotations['olm.targetNamespaces'] - image: quay.io/project-koku/koku-metrics-operator@sha256:e0ec3fb3f8ebd9ce09e4c35622e955731f3b2d93d51b34c6b6435a6d2b630c4c - name: manager - resources: - limits: - cpu: 500m - memory: 500Mi - requests: - cpu: 100m - memory: 20Mi - terminationMessagePolicy: FallbackToLogsOnError - volumeMounts: - - mountPath: /tmp/koku-metrics-operator-reports - name: koku-metrics-operator-reports - serviceAccountName: koku-metrics-controller-manager - terminationGracePeriodSeconds: 10 - volumes: - - name: koku-metrics-operator-reports - permissions: - - rules: - - apiGroups: - - "" - resources: - - configmaps - verbs: - - get - - list - - watch - - create - - update - - patch - - delete - - apiGroups: - - "" - resources: - - configmaps/status - verbs: - - get - - update - - patch - - apiGroups: - - "" - resources: - - events - verbs: - - create - - patch - - apiGroups: - - coordination.k8s.io - resources: - - leases - verbs: - - get - - list - - watch - - create - - update - - patch - - delete - - apiGroups: - - apps - resources: - - deployments - verbs: - - get - - list - - patch - - watch - - apiGroups: - - "" - resources: - - configmaps - - endpoints - - events - - persistentvolumeclaims - - pods - - secrets - - serviceaccounts - - services - - services/finalizers - verbs: - - create - - delete - - get - - list - - patch - - update - - watch - - apiGroups: - - koku-metrics-cfg.openshift.io - resources: - - kokumetricsconfigs - verbs: - - create - - delete - - get - - list - - patch - - update - - watch - - apiGroups: - - koku-metrics-cfg.openshift.io - resources: - - kokumetricsconfigs/status - verbs: - - get - - patch - - update - - apiGroups: - - operators.coreos.com - resources: - - clusterserviceversions - verbs: - - get - - list - - patch - - update - - watch - serviceAccountName: koku-metrics-controller-manager - strategy: deployment - installModes: - - supported: true - type: OwnNamespace - - supported: true - type: SingleNamespace - - supported: false - type: MultiNamespace - - supported: false - type: AllNamespaces - relatedImages: - - name: koku-metrics-operator - image: quay.io/project-koku/koku-metrics-operator@sha256:e0ec3fb3f8ebd9ce09e4c35622e955731f3b2d93d51b34c6b6435a6d2b630c4c - keywords: - - cost - - management - - usage - - monitor - maintainers: - - email: costmanagement@redhat.com - name: costmanagement - maturity: alpha - provider: - name: Red Hat - replaces: koku-metrics-operator.v1.2.0 - version: 2.0.0 diff --git a/koku-metrics-operator/2.0.0/metadata/annotations.yaml b/koku-metrics-operator/2.0.0/metadata/annotations.yaml deleted file mode 100644 index 2889e0f51..000000000 --- a/koku-metrics-operator/2.0.0/metadata/annotations.yaml +++ /dev/null @@ -1,15 +0,0 @@ -annotations: - # Core bundle annotations. - operators.operatorframework.io.bundle.mediatype.v1: registry+v1 - operators.operatorframework.io.bundle.manifests.v1: manifests/ - operators.operatorframework.io.bundle.metadata.v1: metadata/ - operators.operatorframework.io.bundle.package.v1: koku-metrics-operator - operators.operatorframework.io.bundle.channels.v1: alpha,beta - operators.operatorframework.io.bundle.channel.default.v1: beta - operators.operatorframework.io.metrics.builder: operator-sdk-v1.25.3 - operators.operatorframework.io.metrics.mediatype.v1: metrics+v1 - operators.operatorframework.io.metrics.project_layout: go.kubebuilder.io/v2 - - # Annotations for testing. - operators.operatorframework.io.test.mediatype.v1: scorecard+v1 - operators.operatorframework.io.test.config.v1: tests/scorecard/ diff --git a/koku-metrics-operator/2.0.0/tests/scorecard/config.yaml b/koku-metrics-operator/2.0.0/tests/scorecard/config.yaml deleted file mode 100644 index a19cb8f47..000000000 --- a/koku-metrics-operator/2.0.0/tests/scorecard/config.yaml +++ /dev/null @@ -1,40 +0,0 @@ -apiVersion: scorecard.operatorframework.io/v1alpha3 -kind: Configuration -metadata: - name: config -stages: -- parallel: true - tests: - - entrypoint: - - scorecard-test - - basic-check-spec - image: quay.io/operator-framework/scorecard-test:v1.10.1 - labels: - suite: basic - test: basic-check-spec-test - storage: - spec: - mountPath: {} - - entrypoint: - - scorecard-test - - olm-bundle-validation - image: quay.io/operator-framework/scorecard-test:v1.10.1 - labels: - suite: olm - test: olm-bundle-validation-test - storage: - spec: - mountPath: {} - - entrypoint: - - scorecard-test - - olm-crds-have-validation - image: quay.io/operator-framework/scorecard-test:v1.10.1 - labels: - suite: olm - test: olm-crds-have-validation-test - storage: - spec: - mountPath: {} -storage: - spec: - mountPath: {} diff --git a/koku-metrics-operator/3.0.0/Dockerfile b/koku-metrics-operator/3.0.0/Dockerfile deleted file mode 100644 index bdc47c92b..000000000 --- a/koku-metrics-operator/3.0.0/Dockerfile +++ /dev/null @@ -1,21 +0,0 @@ -FROM scratch - -# Core bundle labels. -LABEL operators.operatorframework.io.bundle.mediatype.v1=registry+v1 -LABEL operators.operatorframework.io.bundle.manifests.v1=manifests/ -LABEL operators.operatorframework.io.bundle.metadata.v1=metadata/ -LABEL operators.operatorframework.io.bundle.package.v1=koku-metrics-operator -LABEL operators.operatorframework.io.bundle.channels.v1=alpha,beta -LABEL operators.operatorframework.io.bundle.channel.default.v1=beta -LABEL operators.operatorframework.io.metrics.builder=operator-sdk-v1.28.0 -LABEL operators.operatorframework.io.metrics.mediatype.v1=metrics+v1 -LABEL operators.operatorframework.io.metrics.project_layout=go.kubebuilder.io/v2 - -# Labels for testing. -LABEL operators.operatorframework.io.test.mediatype.v1=scorecard+v1 -LABEL operators.operatorframework.io.test.config.v1=tests/scorecard/ - -# Copy files to locations specified by labels. -COPY manifests /manifests/ -COPY metadata /metadata/ -COPY tests/scorecard /tests/scorecard/ diff --git a/koku-metrics-operator/3.0.0/manifests/koku-metrics-cfg.openshift.io_kokumetricsconfigs.yaml b/koku-metrics-operator/3.0.0/manifests/koku-metrics-cfg.openshift.io_kokumetricsconfigs.yaml deleted file mode 100644 index 8689d2d0a..000000000 --- a/koku-metrics-operator/3.0.0/manifests/koku-metrics-cfg.openshift.io_kokumetricsconfigs.yaml +++ /dev/null @@ -1,972 +0,0 @@ -apiVersion: apiextensions.k8s.io/v1 -kind: CustomResourceDefinition -metadata: - annotations: - controller-gen.kubebuilder.io/version: v0.11.2 - creationTimestamp: null - labels: - app: koku-metrics-operator - name: kokumetricsconfigs.koku-metrics-cfg.openshift.io -spec: - group: koku-metrics-cfg.openshift.io - names: - kind: KokuMetricsConfig - listKind: KokuMetricsConfigList - plural: kokumetricsconfigs - singular: kokumetricsconfig - scope: Namespaced - versions: - - name: v1beta1 - schema: - openAPIV3Schema: - description: KokuMetricsConfig is the Schema for the kokumetricsconfig API - properties: - apiVersion: - description: 'APIVersion defines the versioned schema of this representation - of an object. Servers should convert recognized schemas to the latest - internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' - type: string - kind: - description: 'Kind is a string value representing the REST resource this - object represents. Servers may infer this from the endpoint the client - submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' - type: string - metadata: - type: object - spec: - description: KokuMetricsConfigSpec defines the desired state of KokuMetricsConfig. - properties: - api_url: - default: https://console.redhat.com - description: FOR DEVELOPMENT ONLY. APIURL is a field of KokuMetricsConfig - to represent the url of the API endpoint for service interaction. - The default is `https://console.redhat.com`. - type: string - authentication: - description: Authentication is a field of KokuMetricsConfig to represent - the authentication object. - properties: - secret_name: - description: AuthenticationSecretName is a field of KokuMetricsConfig - to represent the secret with the user and password used for - uploads. - type: string - type: - default: token - description: 'AuthType is a field of KokuMetricsConfig to represent - the authentication type to be used basic or token. Valid values - are: - "basic" : Enables authentication using user and password - from authentication secret. - "token" (default): Uses cluster - token for authentication.' - enum: - - token - - basic - type: string - required: - - type - type: object - clusterID: - description: ClusterID is a field of KokuMetricsConfig to represent - the cluster UUID. Normally this value should not be specified. Only - set this value if the clusterID cannot be obtained from the ClusterVersion. - type: string - clusterVersion: - description: ClusterVersion is a field of KokuMetricsConfig to represent - the cluster version. Normally this value should not be specified. - Only set this value if the clusterVersion cannot be obtained from - the ClusterVersion. - type: string - packaging: - description: Packaging is a field of KokuMetricsConfig to represent - the packaging object. - properties: - max_reports_to_store: - default: 30 - description: MaxReports is a field of KokuMetricsConfig to represent - the maximum number of reports to store. The default is 30 reports - which corresponds to approximately 7 days worth of data given - the other default values. - format: int64 - minimum: 1 - type: integer - max_size_MB: - default: 100 - description: MaxSize is a field of KokuMetricsConfig to represent - the max file size in megabytes that will be compressed for upload - to Ingress. The default is 100. - format: int64 - maximum: 100 - minimum: 1 - type: integer - required: - - max_reports_to_store - - max_size_MB - type: object - prometheus_config: - description: PrometheusConfig is a field of KokuMetricsConfig to represent - the configuration of Prometheus connection. - properties: - collect_previous_data: - default: true - description: CollectPreviousData is a field of KokuMetricsConfig - to represent whether or not the operator will gather previous - data upon KokuMetricsConfig creation. This toggle only changes - operator behavior when a new KokuMetricsConfig is created. When - `true`, the operator will gather all existing Prometheus data - for the current month. The default is true. - type: boolean - context_timeout: - default: 120 - description: ContextTimeout is a field of KokuMetricsConfig to - represent how long a query to prometheus should run in seconds - before timing out. The default is 120 seconds. - format: int64 - maximum: 180 - minimum: 10 - type: integer - disable_metrics_collection_cost_management: - default: false - description: DisableMetricsCollectionCostManagement is a field - of KokuMetricsConfig to represent whether or not the operator - will generate reports for cost-management metrics. The default - is false. - type: boolean - disable_metrics_collection_resource_optimization: - default: false - description: DisableMetricsCollectionResourceOptimization is a - field of KokuMetricsConfig to represent whether or not the operator - will generate reports for resource-optimization metrics. The - default is false. - type: boolean - service_address: - default: https://thanos-querier.openshift-monitoring.svc:9091 - description: FOR DEVELOPMENT ONLY. SvcAddress is a field of KokuMetricsConfig - to represent the thanos-querier address. The default is `https://thanos-querier.openshift-monitoring.svc:9091`. - type: string - skip_tls_verification: - default: false - description: FOR DEVELOPMENT ONLY. SkipTLSVerification is a field - of KokuMetricsConfig to represent if the thanos-querier endpoint - must be certificate validated. The default is false. - type: boolean - required: - - service_address - - skip_tls_verification - type: object - source: - description: source represents the desired source on console.redhat.com. - properties: - check_cycle: - default: 1440 - description: check_cycle is the number of minutes between each - source status check on console.redhat.com. The default is 1440 - min (24 hours). - format: int64 - minimum: 0 - type: integer - create_source: - default: false - description: create_source toggles the creation of the source - on console.redhat.com. - type: boolean - name: - description: name is the desired name of the source to create - on console.redhat.com. - type: string - sources_path: - default: /api/sources/v1.0/ - description: FOR DEVELOPMENT ONLY. sources_path is the prefix - of the Sources API on console.redhat.com. The default is `/api/sources/v1.0/`. - type: string - required: - - check_cycle - - create_source - - sources_path - type: object - upload: - description: Upload is a field of KokuMetricsConfig to represent the - upload object. - properties: - ingress_path: - default: /api/ingress/v1/upload - description: FOR DEVELOPMENT ONLY. IngressAPIPath is a field of - KokuMetricsConfig to represent the path of the Ingress API service. - The default is `/api/ingress/v1/upload`. - type: string - upload_cycle: - default: 360 - description: UploadCycle is a field of KokuMetricsConfig to represent - the number of minutes between each upload schedule. The default - is 360 min (6 hours). - format: int64 - minimum: 0 - type: integer - upload_toggle: - default: true - description: UploadToggle is a field of KokuMetricsConfig to represent - if the operator is installed in a restricted-network. If `false`, - the operator will not upload to console.redhat.com or check/create - sources. The default is true. - type: boolean - upload_wait: - description: UploadWait is a field of KokuMetricsConfig to represent - the time to wait before sending an upload. - format: int64 - minimum: 0 - type: integer - validate_cert: - default: true - description: ValidateCert is a field of KokuMetricsConfig to represent - if the Ingress endpoint must be certificate validated. - type: boolean - required: - - ingress_path - - upload_cycle - - upload_toggle - - validate_cert - type: object - volume_claim_template: - description: VolumeClaimTemplate is a field of KokuMetricsConfig to - represent a PVC template. - properties: - apiVersion: - description: 'APIVersion defines the versioned schema of this - representation of an object. Servers should convert recognized - schemas to the latest internal value, and may reject unrecognized - values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' - type: string - kind: - description: 'Kind is a string value representing the REST resource - this object represents. Servers may infer this from the endpoint - the client submits requests to. Cannot be updated. In CamelCase. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' - type: string - metadata: - description: EmbeddedMetadata contains metadata relevant to an - EmbeddedResource. - properties: - annotations: - additionalProperties: - type: string - description: 'Annotations is an unstructured key value map - stored with a resource that may be set by external tools - to store and retrieve arbitrary metadata. They are not queryable - and should be preserved when modifying objects. More info: - http://kubernetes.io/docs/user-guide/annotations' - type: object - labels: - additionalProperties: - type: string - description: 'Map of string keys and values that can be used - to organize and categorize (scope and select) objects. May - match selectors of replication controllers and services. - More info: http://kubernetes.io/docs/user-guide/labels' - type: object - name: - description: 'Name must be unique within a namespace. Is required - when creating resources, although some resources may allow - a client to request the generation of an appropriate name - automatically. Name is primarily intended for creation idempotence - and configuration definition. Cannot be updated. More info: - http://kubernetes.io/docs/user-guide/identifiers#names' - type: string - type: object - spec: - description: 'Spec defines the desired characteristics of a volume - requested by a pod author. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims' - properties: - accessModes: - description: 'accessModes contains the desired access modes - the volume should have. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes-1' - items: - type: string - type: array - dataSource: - description: 'dataSource field can be used to specify either: - * An existing VolumeSnapshot object (snapshot.storage.k8s.io/VolumeSnapshot) - * An existing PVC (PersistentVolumeClaim) If the provisioner - or an external controller can support the specified data - source, it will create a new volume based on the contents - of the specified data source. If the AnyVolumeDataSource - feature gate is enabled, this field will always have the - same contents as the DataSourceRef field.' - properties: - apiGroup: - description: APIGroup is the group for the resource being - referenced. If APIGroup is not specified, the specified - Kind must be in the core API group. For any other third-party - types, APIGroup is required. - type: string - kind: - description: Kind is the type of resource being referenced - type: string - name: - description: Name is the name of resource being referenced - type: string - required: - - kind - - name - type: object - x-kubernetes-map-type: atomic - dataSourceRef: - description: 'dataSourceRef specifies the object from which - to populate the volume with data, if a non-empty volume - is desired. This may be any local object from a non-empty - API group (non core object) or a PersistentVolumeClaim object. - When this field is specified, volume binding will only succeed - if the type of the specified object matches some installed - volume populator or dynamic provisioner. This field will - replace the functionality of the DataSource field and as - such if both fields are non-empty, they must have the same - value. For backwards compatibility, both fields (DataSource - and DataSourceRef) will be set to the same value automatically - if one of them is empty and the other is non-empty. There - are two important differences between DataSource and DataSourceRef: - * While DataSource only allows two specific types of objects, - DataSourceRef allows any non-core object, as well as PersistentVolumeClaim - objects. * While DataSource ignores disallowed values (dropping - them), DataSourceRef preserves all values, and generates - an error if a disallowed value is specified. (Beta) Using - this field requires the AnyVolumeDataSource feature gate - to be enabled.' - properties: - apiGroup: - description: APIGroup is the group for the resource being - referenced. If APIGroup is not specified, the specified - Kind must be in the core API group. For any other third-party - types, APIGroup is required. - type: string - kind: - description: Kind is the type of resource being referenced - type: string - name: - description: Name is the name of resource being referenced - type: string - required: - - kind - - name - type: object - x-kubernetes-map-type: atomic - resources: - description: 'resources represents the minimum resources the - volume should have. If RecoverVolumeExpansionFailure feature - is enabled users are allowed to specify resource requirements - that are lower than previous value but must still be higher - than capacity recorded in the status field of the claim. - More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources' - properties: - limits: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - description: 'Limits describes the maximum amount of compute - resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' - type: object - requests: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - description: 'Requests describes the minimum amount of - compute resources required. If Requests is omitted for - a container, it defaults to Limits if that is explicitly - specified, otherwise to an implementation-defined value. - More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' - type: object - type: object - selector: - description: selector is a label query over volumes to consider - for binding. - properties: - matchExpressions: - description: matchExpressions is a list of label selector - requirements. The requirements are ANDed. - items: - description: A label selector requirement is a selector - that contains values, a key, and an operator that - relates the key and values. - properties: - key: - description: key is the label key that the selector - applies to. - type: string - operator: - description: operator represents a key's relationship - to a set of values. Valid operators are In, NotIn, - Exists and DoesNotExist. - type: string - values: - description: values is an array of string values. - If the operator is In or NotIn, the values array - must be non-empty. If the operator is Exists or - DoesNotExist, the values array must be empty. - This array is replaced during a strategic merge - patch. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - description: matchLabels is a map of {key,value} pairs. - A single {key,value} in the matchLabels map is equivalent - to an element of matchExpressions, whose key field is - "key", the operator is "In", and the values array contains - only "value". The requirements are ANDed. - type: object - type: object - x-kubernetes-map-type: atomic - storageClassName: - description: 'storageClassName is the name of the StorageClass - required by the claim. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#class-1' - type: string - volumeMode: - description: volumeMode defines what type of volume is required - by the claim. Value of Filesystem is implied when not included - in claim spec. - type: string - volumeName: - description: volumeName is the binding reference to the PersistentVolume - backing this claim. - type: string - type: object - type: object - required: - - authentication - - packaging - - prometheus_config - - source - - upload - type: object - status: - description: KokuMetricsConfigStatus defines the observed state of KokuMetricsConfig. - properties: - api_url: - description: APIURL is a field of KokuMetricsConfig to represent the - url of the API endpoint for service interaction. - type: string - authentication: - description: Authentication is a field of KokuMetricsConfig to represent - the authentication status. - properties: - credentials_found: - description: AuthenticationCredentialsFound is a field of KokuMetricsConfig - to represent if used for uploads were found. - type: boolean - error: - description: AuthErrorMessage is a field of KokuMetricsConfig - to represent an `invalid credentials` error message. - type: string - last_credential_verification_time: - description: LastVerificationTime is a field of KokuMetricsConfig - to represent the last time credentials were verified. - format: date-time - nullable: true - type: string - secret_name: - description: AuthenticationSecretName is a field of KokuMetricsConfig - to represent the secret with the user and password used for - uploads. - type: string - type: - description: AuthType is a field of KokuMetricsConfig to represent - the authentication type to be used basic or token. - enum: - - token - - basic - type: string - valid_basic_auth: - description: ValidBasicAuth is a field of KokuMetricsConfig to - represent if the given basic auth credentials are valid. - type: boolean - type: object - clusterID: - description: ClusterID is a field of KokuMetricsConfig to represent - the cluster UUID. - type: string - clusterVersion: - description: ClusterVersion is a field of KokuMetricsConfig to represent - the cluster version. - type: string - operator_commit: - description: OperatorCommit is a field of KokuMetricsConfig that shows - the commit hash of the operator. - type: string - packaging: - description: Packaging is a field of KokuMetricsConfig to represent - the packaging status - properties: - error: - description: PackagingError is a field of KokuMetricsConfig to - represent the error encountered packaging the reports. - type: string - last_successful_packaging_time: - description: LastSuccessfulPackagingTime is a field of KokuMetricsConfig - that shows the time of the last successful file packaging. - format: date-time - nullable: true - type: string - max_reports_to_store: - description: MaxReports is a field of KokuMetricsConfig to represent - the maximum number of reports to store. - format: int64 - type: integer - max_size_MB: - description: MaxSize is a field of KokuMetricsConfig to represent - the max file size in megabytes that will be compressed for upload - to Ingress. - format: int64 - type: integer - number_reports_stored: - description: ReportCount is a field of KokuMetricsConfig to represent - the number of reports in storage. - format: int64 - type: integer - packaged_files: - description: PackagedFiles is a field of KokuMetricsConfig to - represent the list of file packages in storage. - items: - type: string - type: array - type: object - persistent_volume_claim: - description: PersistentVolumeClaim is a field of KokuMetricsConfig - to represent a PVC. - properties: - apiVersion: - description: 'APIVersion defines the versioned schema of this - representation of an object. Servers should convert recognized - schemas to the latest internal value, and may reject unrecognized - values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' - type: string - kind: - description: 'Kind is a string value representing the REST resource - this object represents. Servers may infer this from the endpoint - the client submits requests to. Cannot be updated. In CamelCase. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' - type: string - metadata: - description: EmbeddedMetadata contains metadata relevant to an - EmbeddedResource. - properties: - annotations: - additionalProperties: - type: string - description: 'Annotations is an unstructured key value map - stored with a resource that may be set by external tools - to store and retrieve arbitrary metadata. They are not queryable - and should be preserved when modifying objects. More info: - http://kubernetes.io/docs/user-guide/annotations' - type: object - labels: - additionalProperties: - type: string - description: 'Map of string keys and values that can be used - to organize and categorize (scope and select) objects. May - match selectors of replication controllers and services. - More info: http://kubernetes.io/docs/user-guide/labels' - type: object - name: - description: 'Name must be unique within a namespace. Is required - when creating resources, although some resources may allow - a client to request the generation of an appropriate name - automatically. Name is primarily intended for creation idempotence - and configuration definition. Cannot be updated. More info: - http://kubernetes.io/docs/user-guide/identifiers#names' - type: string - type: object - spec: - description: 'Spec defines the desired characteristics of a volume - requested by a pod author. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims' - properties: - accessModes: - description: 'accessModes contains the desired access modes - the volume should have. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes-1' - items: - type: string - type: array - dataSource: - description: 'dataSource field can be used to specify either: - * An existing VolumeSnapshot object (snapshot.storage.k8s.io/VolumeSnapshot) - * An existing PVC (PersistentVolumeClaim) If the provisioner - or an external controller can support the specified data - source, it will create a new volume based on the contents - of the specified data source. If the AnyVolumeDataSource - feature gate is enabled, this field will always have the - same contents as the DataSourceRef field.' - properties: - apiGroup: - description: APIGroup is the group for the resource being - referenced. If APIGroup is not specified, the specified - Kind must be in the core API group. For any other third-party - types, APIGroup is required. - type: string - kind: - description: Kind is the type of resource being referenced - type: string - name: - description: Name is the name of resource being referenced - type: string - required: - - kind - - name - type: object - x-kubernetes-map-type: atomic - dataSourceRef: - description: 'dataSourceRef specifies the object from which - to populate the volume with data, if a non-empty volume - is desired. This may be any local object from a non-empty - API group (non core object) or a PersistentVolumeClaim object. - When this field is specified, volume binding will only succeed - if the type of the specified object matches some installed - volume populator or dynamic provisioner. This field will - replace the functionality of the DataSource field and as - such if both fields are non-empty, they must have the same - value. For backwards compatibility, both fields (DataSource - and DataSourceRef) will be set to the same value automatically - if one of them is empty and the other is non-empty. There - are two important differences between DataSource and DataSourceRef: - * While DataSource only allows two specific types of objects, - DataSourceRef allows any non-core object, as well as PersistentVolumeClaim - objects. * While DataSource ignores disallowed values (dropping - them), DataSourceRef preserves all values, and generates - an error if a disallowed value is specified. (Beta) Using - this field requires the AnyVolumeDataSource feature gate - to be enabled.' - properties: - apiGroup: - description: APIGroup is the group for the resource being - referenced. If APIGroup is not specified, the specified - Kind must be in the core API group. For any other third-party - types, APIGroup is required. - type: string - kind: - description: Kind is the type of resource being referenced - type: string - name: - description: Name is the name of resource being referenced - type: string - required: - - kind - - name - type: object - x-kubernetes-map-type: atomic - resources: - description: 'resources represents the minimum resources the - volume should have. If RecoverVolumeExpansionFailure feature - is enabled users are allowed to specify resource requirements - that are lower than previous value but must still be higher - than capacity recorded in the status field of the claim. - More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources' - properties: - limits: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - description: 'Limits describes the maximum amount of compute - resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' - type: object - requests: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - description: 'Requests describes the minimum amount of - compute resources required. If Requests is omitted for - a container, it defaults to Limits if that is explicitly - specified, otherwise to an implementation-defined value. - More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' - type: object - type: object - selector: - description: selector is a label query over volumes to consider - for binding. - properties: - matchExpressions: - description: matchExpressions is a list of label selector - requirements. The requirements are ANDed. - items: - description: A label selector requirement is a selector - that contains values, a key, and an operator that - relates the key and values. - properties: - key: - description: key is the label key that the selector - applies to. - type: string - operator: - description: operator represents a key's relationship - to a set of values. Valid operators are In, NotIn, - Exists and DoesNotExist. - type: string - values: - description: values is an array of string values. - If the operator is In or NotIn, the values array - must be non-empty. If the operator is Exists or - DoesNotExist, the values array must be empty. - This array is replaced during a strategic merge - patch. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - description: matchLabels is a map of {key,value} pairs. - A single {key,value} in the matchLabels map is equivalent - to an element of matchExpressions, whose key field is - "key", the operator is "In", and the values array contains - only "value". The requirements are ANDed. - type: object - type: object - x-kubernetes-map-type: atomic - storageClassName: - description: 'storageClassName is the name of the StorageClass - required by the claim. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#class-1' - type: string - volumeMode: - description: volumeMode defines what type of volume is required - by the claim. Value of Filesystem is implied when not included - in claim spec. - type: string - volumeName: - description: volumeName is the binding reference to the PersistentVolume - backing this claim. - type: string - type: object - type: object - prometheus: - description: Prometheus represents the status of premetheus queries. - properties: - configuration_error: - description: ConfigError is a field of KokuMetricsConfigStatus - to represent errors during prometheus configuration. - type: string - context_timeout: - description: ContextTimeout is a field of KokuMetricsConfigState - to represent how long a query to prometheus should run in seconds - before timing out. - format: int64 - type: integer - disabled_metrics_collection_cost_management: - default: false - description: DisabledMetricsCollectionCostManagement is a field - of KokuMetricsConfigStatus to represent whether or not collecting - cost-management metrics is disabled. The default is false. - type: boolean - disabled_metrics_collection_resource_optimization: - default: true - description: DisabledMetricsCollectionResourceOptimization is - a field of KokuMetricsConfigStatus to represent whether or not - collecting resource-optimzation metrics is disabled. The default - is true. - type: boolean - last_query_start_time: - description: LastQueryStartTime is a field of KokuMetricsConfigStatus - to represent the last time queries were started. - format: date-time - nullable: true - type: string - last_query_success_time: - description: LastQuerySuccessTime is a field of KokuMetricsConfigStatus - to represent the last time queries were successful. - format: date-time - nullable: true - type: string - previous_data_collected: - default: false - description: PreviousDataCollected is a field of KokuMetricsConfigStatus - to represent whether or not the operator gathered the available - Prometheus data upon KokuMetricsConfig creation. - type: boolean - prometheus_configured: - description: PrometheusConfigured is a field of KokuMetricsConfigStatus - to represent if the operator is configured to connect to prometheus. - type: boolean - prometheus_connected: - description: PrometheusConnected is a field of KokuMetricsConfigStatus - to represent if prometheus can be queried. - type: boolean - prometheus_connection_error: - description: ConnectionError is a field of KokuMetricsConfigStatus - to represent errors during prometheus test query. - type: string - service_address: - description: SvcAddress is the internal thanos-querier address. - type: string - skip_tls_verification: - description: SkipTLSVerification is a field of KokuMetricsConfigStatus - to represent if the thanos-querier endpoint must be certificate - validated. - type: boolean - required: - - prometheus_configured - - prometheus_connected - type: object - reports: - description: Reports represents the status of report generation. - properties: - data_collected: - description: DataCollected is a field of KokuMetricsConfigStatus - to represent whether or not data was collected for the last - query. - type: boolean - data_collection_message: - description: DataCollectionMessage is a field of KokuMetricsConfigStatus - to represent a message associated with the data_collected status. - type: string - last_hour_queried: - description: LastHourQueried is a field of KokuMetricsConfigStatus - to represent the time range for which metrics were last queried. - type: string - report_month: - description: ReportMonth is a field of KokuMetricsConfigStatus - to represent the month for which reports are being generated. - type: string - type: object - source: - description: source represents the observed state of the source on - console.redhat.com. - properties: - check_cycle: - description: check_cycle is the number of minutes between each - source status check on console.redhat.com. The default is 1440 - min (24 hours). - format: int64 - type: integer - create_source: - description: create_source represents the toggle used during the - creation of the source on console.redhat.com. A source will - not be created if upload_toggle is `false`. - type: boolean - error: - description: error represents any errors encountered when creating - the source. - type: string - last_check_time: - description: last_check_time is the time that the last source - status check was attempted. - format: date-time - nullable: true - type: string - name: - description: name represents the name of the source that the operator - attempted to create on console.redhat.com. - type: string - source_defined: - description: source_defined represents whether the defined source - name exists on console.redhat.com. - type: boolean - sources_path: - description: sources_path is the prefix of the Sources API on - console.redhat.com. - type: string - type: object - storage: - description: Storage is a field - properties: - volume_mounted: - description: VolumeMounted is a bool to indicate if storage volume - was mounted. - type: boolean - volume_type: - description: VolumeType is the string representation of the volume - type. - type: string - type: object - upload: - description: Upload is a field of KokuMetricsConfig to represent the - upload object. - properties: - error: - description: UploadError is a field of KokuMetricsConfigStatus - to represent the error encountered uploading reports. - type: string - ingress_path: - description: IngressAPIPath is a field of KokuMetricsConfig to - represent the path of the Ingress API service. - type: string - last_payload_files: - description: LastPayloadFiles is a field of KokuMetricsConfig - to represent the list of files in the last payload that was - sent. - items: - type: string - type: array - last_payload_manifest_id: - description: LastPayloadManifest is a field of KokuMetricsConfig - that shows the manifestID of the last payload. - type: string - last_payload_name: - description: LastPayloadName is a field of KokuMetricsConfig that - shows the name of the last payload file. - type: string - last_payload_request_id: - description: LastPayloadRequestID is a field of KokuMetricsConfig - that shows the insights request id of the last payload. - type: string - last_successful_upload_time: - description: LastSuccessfulUploadTime is a field of KokuMetricsConfig - that shows the time of the last successful upload. - format: date-time - nullable: true - type: string - last_upload_status: - description: LastUploadStatus is a field of KokuMetricsConfig - that shows the http status of the last upload. - type: string - upload: - description: UploadToggle is a field of KokuMetricsConfig to represent - if the operator should upload to console.redhat.com. The default - is true - type: boolean - upload_cycle: - description: UploadCycle is a field of KokuMetricsConfig to represent - the number of minutes between each upload schedule. The default - is 360 min (6 hours). - format: int64 - type: integer - upload_wait: - description: UploadWait is a field of KokuMetricsConfig to represent - the time to wait before sending an upload. - format: int64 - type: integer - validate_cert: - description: ValidateCert is a field of KokuMetricsConfig to represent - if the Ingress endpoint must be certificate validated. - type: boolean - type: object - type: object - required: - - spec - type: object - served: true - storage: true - subresources: - status: {} -status: - acceptedNames: - kind: "" - plural: "" - conditions: null - storedVersions: null diff --git a/koku-metrics-operator/3.0.0/manifests/koku-metrics-operator.clusterserviceversion.yaml b/koku-metrics-operator/3.0.0/manifests/koku-metrics-operator.clusterserviceversion.yaml deleted file mode 100644 index d51657730..000000000 --- a/koku-metrics-operator/3.0.0/manifests/koku-metrics-operator.clusterserviceversion.yaml +++ /dev/null @@ -1,520 +0,0 @@ -apiVersion: operators.coreos.com/v1alpha1 -kind: ClusterServiceVersion -metadata: - annotations: - alm-examples: |- - [ - { - "apiVersion": "koku-metrics-cfg.openshift.io/v1beta1", - "kind": "KokuMetricsConfig", - "metadata": { - "name": "kokumetricscfg-sample-v1beta1" - }, - "spec": { - "authentication": { - "type": "token" - }, - "packaging": { - "max_reports_to_store": 30, - "max_size_MB": 100 - }, - "prometheus_config": { - "collect_previous_data": true, - "context_timeout": 120, - "disable_metrics_collection_cost_management": false, - "disable_metrics_collection_resource_optimization": false - }, - "source": { - "check_cycle": 1440, - "create_source": false, - "name": "" - }, - "upload": { - "upload_cycle": 360, - "upload_toggle": true - } - } - } - ] - capabilities: Seamless Upgrades - categories: Monitoring - certified: "false" - containerImage: quay.io/project-koku/koku-metrics-operator@sha256:3f8fcc51d18214f1391592d518864b6099b16632d1e1fa3bf1c1803e0da81078 - createdAt: "2023-09-07T21:30:30Z" - description: A Golang-based OpenShift Operator that generates and uploads OpenShift - usage metrics to cost management. - operatorframework.io/suggested-namespace: koku-metrics-operator - operators.openshift.io/infrastructure-features: '["Disconnected"]' - operators.operatorframework.io/builder: operator-sdk-v1.28.0 - operators.operatorframework.io/project_layout: go.kubebuilder.io/v2 - repository: https://github.com/project-koku/koku-metrics-operator - support: Cost Management - name: koku-metrics-operator.v3.0.0 - namespace: placeholder -spec: - apiservicedefinitions: {} - customresourcedefinitions: - owned: - - description: KokuMetricsConfig is the Schema for the kokumetricsconfig API - displayName: Koku Metrics Config - kind: KokuMetricsConfig - name: kokumetricsconfigs.koku-metrics-cfg.openshift.io - version: v1beta1 - description: |- - # Koku Metrics Operator - ## Introduction - The `koku-metrics-operator` is a component of the [cost managment](https://access.redhat.com/documentation/en-us/cost_management_service) service for Openshift. The operator runs on the latest supported versions of Openshift. This operator obtains OpenShift usage data by querying Prometheus every hour to create metric reports that it uploads to Cost Management at [console.redhat.com](https://console.redhat.com) to be processed. For more information, reach out to . - - This operator is capable of functioning within a disconnected/restricted network (aka air-gapped mode). In this mode, the operator will store the packaged reports for manual retrieval instead of being uploaded to Cost Management. Documentation for installing an operator within a restricted network can be found [here](https://docs.openshift.com/container-platform/latest/operators/admin/olm-restricted-networks.html). - - ## Features and Capabilities - #### Metrics collection: - The Koku Metrics Operator (`koku-metrics-operator`) collects the metrics required for Cost Management by: - * Querying Prometheus to gather the necessary metrics for Cost Management. - * Writing the results of Prometheus queries to CSV report files. - * Packaging the CSV report files into tarballs. - - #### Additional Capabilities: - * Resource Optimization metrics collection. - * The operator can be configured to gather all previous data within the configured retention period or a maximum of 90 days. The default data collection period is the 14 previous days. This setting is only applicable to newly created KokuMetricsConfigs. - * The operator can be configured to automatically upload the packaged reports to Cost Management through Red Hat Insights Ingress service. - * The operator can create a source in console.redhat.com. A source is required for Cost Management to process the uploaded packages. - * PersistentVolumeClaim (PVC) configuration: The KokuMetricsConfig CR can accept a PVC definition and the operator will create and mount the PVC. If one is not provided, a default PVC will be created. - * Restricted network installation: this operator can function on a restricted network. In this mode, the operator stores the packaged reports for manual retrieval. - - ## New in v3.0.0: - * Daily report generation: Operator versions prior to v3.0.0 generated sequential reports. Now, reports are generated starting at 0:00 UTC. Any payloads generated throughout a given day will contain all data starting from 0:00 UTC. Once the next day starts, the previous day's reports are packaged, and the new report again starts at 0:00 UTC for the current day. - * Failed query retry: In an attempt to prevent missing data, the operator will retry queries from the last successful query time, up to 5 times. - - ## New in v2.0.0: - * Adds metrics and report generation for resource optimization. This feature will collect additional usage metrics and create a new report in the payload. These metrics are enabled by default, but can be disabled by setting `disable_metrics_collection_resource_optimization` to `true`. - * Collect all available Prometheus data upon CR creation. This feature only applies to newly created KokuMetricsConfigs. The operator will check the monitoring stack configuration in the `openshift-monitoring` namespace. The operator will use the `retention` period set in the `cluster-monitoring-config` ConfigMap if defined, up to a maximum of 90 days. Otherwise it will fall back to collecting 14 days of data, if available. This data collection may be disabled by setting `collect_previous_data` to `false`. Turning this feature off results in the operator collecting metrics from the time the KokuMetricsConfig is created, forward. - - ## Limitations and Pre-Requisites - #### Limitations (Potential for metrics data loss) - * A source **must** exist in console.redhat.com for an uploaded payload to be processed by Cost Management. The operator sends the payload to the Red Hat Insights Ingress service which usually returns successfully, but the operator does not currently confirm with Cost Management that the payload was processed. After Ingress accepts the uploaded payload, it is deleted from the operator. If the data within the payload is not processed, a gap will be introduced in the usage metrics. Data may be recollected by deleting the `KokuMetricsConfig`, creating a new `KokuMetricsConfig`, and setting `collect_previous_data: true`. This re-collection of data will gather all data stored in Prometheus, up to 90 days. - - **Note** The following limitations are specific to operators configured to run in a restricted network: - * The `koku-metrics-operator` will not be able to generate new reports if the PVC storage is full. If this occurs, the reports must be manually deleted from the PVC so that the operator can function as normal. - * The default report retention is 30 reports (about one week's worth of data). The reports must be manually downloaded and uploaded to console.redhat.com every week, or they will be deleted and the data will be lost. - - #### Storage configuration prerequisite - The operator will attempt to create and use the following PVC when installed: - - volume_claim_template: - apiVersion: v1 - kind: PersistentVolumeClaim - metadata: - name: koku-metrics-operator-data - spec: - accessModes: - - ReadWriteOnce - resources: - requests: - storage: 10Gi - - If a different PVC should be utilized, a valid PVC should be specified in the KokuMetricsConfig CR as described in the appropriate section below. The PVC to be used may exist already, or the operator will attempt to create it. - - To use the default specification, the follow assumptions must be met: - 1. A default StorageClass is defined. - 2. Dynamic provisioning for that default StorageClass is enabled. - - If these assumptions are not met, the operator will not deploy correctly. In these cases, storage must be manually configured. After configuring storage, a valid PVC template should be supplied in the `volume_claim_template` spec of the KokuMetricsConfig CR. - - ## Configurable parameters: - * `authentication`: - * `type: token` -> The authentication method for connecting to `console.redhat.com`. The default and preferred method is `token`. `basic` is used when the openshift-config pull-secret does not contain a token for `console.redhat.com`. - * `secret_name` -> The Secret used by the operator when the authentication type is `basic`. This parameter is required **only if** the authentication type is `basic`. - * `packaging`: - * `max_reports_to_store: 30` -> The number of reports to store when configured in air-gapped mode. The default is 30, with a minimum of 1 and no maximum. When the operator is not configured in air-gapped mode, this parameter has no effect. Reports are removed as soon as they are uploaded. - * `max_size: 100` -> The maximum size for packaged files in Megabytes prior to compression. The default is 100, with a minimum of 1 and maximum of 100. - * `prometheus_config`: - * `collect_previous_data: true` -> Toggle for collecting all available data in Prometheus **upon KokuMetricsConfig creation** (This parameter will start to appear in KokuMetricsConfigs that were created prior to v2.0.0 but will not have any effect unless the KokuMetricsConfig is deleted and recreated). The default is `true`. The operator will first look for a `retention` period in the `cluster-monitoring-config` ConfigMap in the `openshift-monitoring` namespace and gather data over this time period up to a maximum of 90 days. If this configuration is not set, the default is 14 days. (New in v2.0.0) - * `disable_metrics_collection_cost_management: false` -> Toggle for disabling the collection of metrics for Cost Management. The default is false. (New in v2.0.0) - * `disable_metrics_collection_resource_optimization: false` -> Toggle for disabling the collection of metrics for Resource Optimization. The default is false. (New in v2.0.0) - * `context_timeout: 120` -> The time in seconds before Prometheus queries timeout due to exceeding context timeout. The default is 120, with a minimum of 10 and maximum of 180. - * `source`: - * `name: ''` -> The name of the source the operator will create in `console.redhat.com`. If the name value is empty, the default intergration name is the **cluster id**. - * `create_source: false` -> Toggle for whether or not the operator will create the source in `console.redhat.com`. The default is False. This parameter should be switched to True when a source does not already exist in `console.redhat.com` for this cluster. - * `check_cycle: 1440` -> The time in minutes to wait between checking if a source exists for this cluster. The default is 1440 minutes (24 hrs). - * `upload`: - * `upload_cycle: 360` -> The time in minutes between payload uploads. The default is 360 (6 hours). - * `upload_toggle: true` -> Toggle to turn upload on or off -> true means upload, false means do not upload (false == air-gapped mode). The default is `true`. - * `upload_wait` -> The amount of time (in seconds) to pause before uploading a payload. The default is a random number between 0 and 35. This is used to decrease service load, but may be set to `0` if desired. - * `volume_claim_template` -> see the "Storage configuration prerequisite" section above. - - ## Configure the koku-metrics-operator - **Note** There are separate instructions for configuring the `koku-metrics-operator` to run in a restricted network. - ##### Configure authentication - The default authentication for the operator is `token`. No further steps are required to configure token authentication. If `basic` is the preferred authentication method, a Secret must be created which holds username and password credentials: - 1. On the left navigation pane, select `Workloads` -> `Secrets` -> select Project: `koku-metrics-operator` -> `Create` -> `Key/Value Secret` - 2. Give the Secret a name and add 2 keys: `username` and `password` (all lowercase). The values for these keys correspond to console.redhat.com credentials. - 3. Select `Create`. - ##### Create the KokuMetricsConfig - Configure the koku-metrics-operator by creating a `KokuMetricsConfig`. - 1. On the left navigation pane, select `Operators` -> `Installed Operators` -> `koku-metrics-operator` -> `KokuMetricsConfig` -> `Create Instance`. - 2. For `basic` authentication, edit the following values in the spec: - * Replace `authentication: type:` with `basic`. - * Add the `secret_name` field under `authentication`, and set it equal to the name of the authentication Secret that was created above. The spec should look similar to the following: - - ``` - authentication: - secret_name: SECRET-NAME - type: basic - ``` - - 3. To configure the koku-metrics-operator to create a cost management source, edit the following values in the `source` field: - * Replace the `name` field value with the preferred name of the source to be created. - * Replace the `create_source` field value with `true`. - - **Note:** if the source already exists, replace the empty string value of the `name` field with the existing name, and leave `create_source` as false. This will allow the operator to confirm that the source exists. - - 4. If not specified, the operator will create a default PersistentVolumeClaim called `koku-metrics-operator-data` with 10Gi of storage. To configure the koku-metrics-operator to use or create a different PVC, edit the following in the spec: - * Add the desired configuration to the `volume_claim_template` field in the spec: - - ``` - volume_claim_template: - apiVersion: v1 - kind: PersistentVolumeClaim - metadata: - name: - spec: - accessModes: - - ReadWriteOnce - resources: - requests: - storage: 10Gi - ``` - - **Note:** If using the YAML View, the `volume_claim_template` field must be added to the spec - 5. Select `Create`. - - # Restricted Network Usage (disconnected/air-gapped mode) - ## Installation - To install the `koku-metrics-operator` in a restricted network, follow the [olm documentation](https://docs.openshift.com/container-platform/latest/operators/admin/olm-restricted-networks.html). The operator is found in the `community-operators` Catalog in the `registry.redhat.io/redhat/community-operator-index:latest` Index. If pruning the index before pushing to the mirrored registry, keep the `koku-metrics-operator` package. - - Within a restricted network, the operator queries prometheus to gather the necessary usage metrics, writes the query results to CSV files, and packages the reports for storage in the PVC. These reports then need to be manually downloaded from the cluster and uploaded to [console.redhat.com](https://console.redhat.com). - - ## Configure the koku-metrics-operator for a restricted network - ##### Create the KokuMetricsConfig - Configure the koku-metrics-operator by creating a `KokuMetricsConfig`. - 1. On the left navigation pane, select `Operators` -> `Installed Operators` -> `koku-metrics-operator` -> `KokuMetricsConfig` -> `Create Instance`. - 2. Specify the desired storage. If not specified, the operator will create a default Persistent Volume Claim called `koku-metrics-operator-data` with 10Gi of storage. To configure the koku-metrics-operator to use or create a different PVC, edit the following in the spec: - * Add the desired configuration to the `volume_claim_template` field in the spec (below is only a template. Any _valid_ `PersistentVolumeClaim` may be defined here): - - ``` - volume_claim_template: - apiVersion: v1 - kind: PersistentVolumeClaim - metadata: - name: - spec: - storageClassName: - accessModes: - - ReadWriteOnce - resources: - requests: - storage: 10Gi - ``` - - **Note:** If using the YAML View, the `volume_claim_template` field must be added to the spec - 3. (Optional) Specify the desired report retention. The operator will retain 30 reports by default. This corresponds to approximately one week's worth of data if using the default packaging cycle. To modify the number of retained reports: - * Change the `packaging` spec field `max_reports_to_store` to the desired number of reports to retain. Once this max number is reached, the operator will start removing the oldest packages remaining on the PVC: - - ``` - packaging: - max_size_MB: 100 - max_reports_to_store: 30 - ``` - - **Note:** The number of retained reports directly affects the frequency that reports must be manually downloaded from the PVC. Take caution in setting this to a higher number of reports, as the operator cannot write data to the PVC if the storage is full. - 4. To configure the operator to perform in a restricted network, set the `upload_toggle` to `false`: - - ``` - upload: - upload_cycle: 360 - upload_toggle: false - ``` - - 5. Select `Create`. - - ## Download reports from the Operator & clean up the PVC - If the `koku-metrics-operator` is configured to run in a restricted network, the metric reports will not automatically upload to cost managment. Instead, they need to be manually copied from the PVC for upload to [console.redhat.com](https://console.redhat.com). The default configuration saves one week of reports which means the process of downloading and uploading reports should be repeated weekly to prevent loss of metrics data. To download the reports, complete the following steps: - 1. Create the following Pod, ensuring the `claimName` matches the PVC containing the report data: - - ``` - kind: Pod - apiVersion: v1 - metadata: - name: volume-shell - namespace: koku-metrics-operator - labels: - app: koku-metrics-operator - spec: - volumes: - - name: koku-metrics-operator-reports - persistentVolumeClaim: - claimName: koku-metrics-operator-data - containers: - - name: volume-shell - image: busybox - command: ['sleep', 'infinity'] - volumeMounts: - - name: koku-metrics-operator-reports - mountPath: /tmp/koku-metrics-operator-reports - ``` - - 2. Use rsync to copy all of the files ready for upload from the PVC to a local folder: - - ``` - $ oc rsync volume-shell:/tmp/koku-metrics-operator-reports/upload local/path/to/save/folder - ``` - - 3. Once confirming that the files have been successfully copied, use rsh to connect to the pod and delete the contents of the upload folder so that they are no longer in storage: - - ``` - $ oc rsh volume-shell - $ rm /tmp/koku-metrics-operator-reports/upload/* - ``` - - 4. (Optional) Delete the pod that was used to connect to the PVC: - - ``` - $ oc delete -f volume-shell.yaml - ``` - - ## Create a Source - In a restricted network, the `koku-metrics-operator` cannot automatically create a source. This process must be done manually. In the console.redhat.com platform, open the [Sources menu](https://console.redhat.com/settings/sources/) to begin adding an OpenShift source to Cost Management: - - Prerequisites: - * The cluster identifier which can be found in the KokuMetricsConfig CR, the cluster Overview page, or the cluster Help > About. - - Creating a source: - 1. Navigate to the Sources menu - 2. Select the `Red Hat` tab - 3. Create a new `Red Hat Openshift Container Platform` source: - * give the source a unique name - * add the Cost Management application - * add the cluster identifier - 4. In the Source wizard, review the details and click `Finish` to create the source. - - ## Upload the reports to cost managment - Uploading reports to cost managment is done through curl: - - $ curl -vvvv -F "file=@FILE_NAME.tar.gz;type=application/vnd.redhat.hccm.tar+tgz" https://console.redhat.com/api/ingress/v1/upload -u USERNAME:PASS - - where `USERNAME` and `PASS` correspond to the user credentials for [console.redhat.com](https://console.redhat.com), and `FILE_NAME` is the name of the report to upload. - - displayName: Koku Metrics Operator - icon: - - base64data: PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4KPCEtLSBHZW5lcmF0b3I6IEFkb2JlIElsbHVzdHJhdG9yIDIyLjEuMCwgU1ZHIEV4cG9ydCBQbHVnLUluIC4gU1ZHIFZlcnNpb246IDYuMDAgQnVpbGQgMCkgIC0tPgo8c3ZnIHZlcnNpb249IjEuMSIgaWQ9IkxheWVyXzEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4IgoJIHZpZXdCb3g9IjAgMCAzMDAgMzAwIiBzdHlsZT0iZW5hYmxlLWJhY2tncm91bmQ6bmV3IDAgMCAzMDAgMzAwOyIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSI+CjxzdHlsZSB0eXBlPSJ0ZXh0L2NzcyI+Cgkuc3Qwe2ZpbGw6I0VFMDAwMDt9Cjwvc3R5bGU+Cjx0aXRsZT5Db3N0LWljb248L3RpdGxlPgo8ZGVzYz5DcmVhdGVkIHdpdGggU2tldGNoLjwvZGVzYz4KPGc+Cgk8Zz4KCQk8cGF0aCBjbGFzcz0ic3QwIiBkPSJNMjM5LjAzNzAzMzEsMTE3LjI3NTE3N2MtMy4y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wLjUzNDUwMDEtMC4xMTUyMDM5LDAuOTkwNjQ2NC0wLjU3MTM1MDEsMS4zNzMwNzc0bC0zLjg5ODA4NjUsNC4wMTMyNzUxCgkJCWMtMC4zMDg3MTU4LDAuMjMwMzkyNS0wLjY2ODEwNjEsMC4zODI0MzEtMS4wOTIwMTA1LDAuNDU2MTYxNWMtMC40MTkyOTYzLDAuMDc4MzIzNC0wLjgyMDE1OTksMC0xLjIwMjU5MDktMC4yMjU3NjkKCQkJYy0xLjE0MjcxNTUtMC44NDMyMDA3LTIuNDQyMDc3Ni0xLjI2MjQ5NjktMy44OTgwODY1LTEuMjYyNDk2OWgtNy42NzYzNjExYy0wLjkxNjkxNTksMC0xLjcwMDIyNTgsMC4zMjI1MjUtMi4zNDk4OTkzLDAuOTcyMjEzNwoJCQljLTAuNjQ5Njg4NywwLjY0OTY3MzUtMC45NzY4MjE5LDEuNDc0NDQxNS0wLjk3NjgyMTksMi40NjUwODc5YzAsMC42ODY1NTQsMC4yMzAzOTI1LDEuMzM2MjEyMiwwLjY5MTE0NjksMS45NDkwMzU2CgkJCWMwLjQ1NjE2MTUsMC42MTI4MjM1LDEuMDMyMTE5OCwxLjAzMjExOTgsMS43MTg2NTg0LDEuMjYyNDk2OUwxNzQuMjgwNjM5NiwxODUuODczNjExNXoiLz4KCTwvZz4KPC9nPgo8L3N2Zz4K - mediatype: image/svg+xml - install: - spec: - clusterPermissions: - - rules: - - apiGroups: - - config.openshift.io - resources: - - clusterversions - verbs: - - get - - list - - watch - - apiGroups: - - "" - resources: - - configmaps - verbs: - - get - - list - - watch - - apiGroups: - - "" - resources: - - namespaces - verbs: - - get - - list - - watch - - apiGroups: - - "" - resources: - - secrets - verbs: - - get - serviceAccountName: koku-metrics-controller-manager - deployments: - - label: - app: koku-metrics-operator - control-plane: controller-manager - name: koku-metrics-operator - spec: - replicas: 1 - selector: - matchLabels: - app: koku-metrics-operator - control-plane: controller-manager - strategy: {} - template: - metadata: - labels: - app: koku-metrics-operator - control-plane: controller-manager - spec: - containers: - - args: - - --enable-leader-election - command: - - /manager - env: - - name: IN_CLUSTER - value: "true" - - name: WATCH_NAMESPACE - valueFrom: - fieldRef: - fieldPath: metadata.annotations['olm.targetNamespaces'] - image: quay.io/project-koku/koku-metrics-operator@sha256:3f8fcc51d18214f1391592d518864b6099b16632d1e1fa3bf1c1803e0da81078 - name: manager - resources: - limits: - cpu: 500m - memory: 500Mi - requests: - cpu: 100m - memory: 20Mi - terminationMessagePolicy: FallbackToLogsOnError - volumeMounts: - - mountPath: /tmp/koku-metrics-operator-reports - name: koku-metrics-operator-reports - serviceAccountName: koku-metrics-controller-manager - terminationGracePeriodSeconds: 10 - volumes: - - name: koku-metrics-operator-reports - permissions: - - rules: - - apiGroups: - - "" - resources: - - configmaps - verbs: - - get - - list - - watch - - create - - update - - patch - - delete - - apiGroups: - - "" - resources: - - configmaps/status - verbs: - - get - - update - - patch - - apiGroups: - - "" - resources: - - events - verbs: - - create - - patch - - apiGroups: - - coordination.k8s.io - resources: - - leases - verbs: - - get - - list - - watch - - create - - update - - patch - - delete - - apiGroups: - - apps - resources: - - deployments - verbs: - - get - - list - - patch - - watch - - apiGroups: - - "" - resources: - - configmaps - - endpoints - - events - - persistentvolumeclaims - - pods - - secrets - - serviceaccounts - - services - - services/finalizers - verbs: - - create - - delete - - get - - list - - patch - - update - - watch - - apiGroups: - - koku-metrics-cfg.openshift.io - resources: - - kokumetricsconfigs - verbs: - - create - - delete - - get - - list - - patch - - update - - watch - - apiGroups: - - koku-metrics-cfg.openshift.io - resources: - - kokumetricsconfigs/status - verbs: - - get - - patch - - update - - apiGroups: - - operators.coreos.com - resources: - - clusterserviceversions - verbs: - - get - - list - - patch - - update - - watch - serviceAccountName: koku-metrics-controller-manager - strategy: deployment - installModes: - - supported: true - type: OwnNamespace - - supported: true - type: SingleNamespace - - supported: false - type: MultiNamespace - - supported: false - type: AllNamespaces - relatedImages: - - name: koku-metrics-operator - image: quay.io/project-koku/koku-metrics-operator@sha256:3f8fcc51d18214f1391592d518864b6099b16632d1e1fa3bf1c1803e0da81078 - keywords: - - cost - - management - - usage - - monitor - maintainers: - - email: costmanagement@redhat.com - name: costmanagement - maturity: alpha - provider: - name: Red Hat - replaces: koku-metrics-operator.v2.0.0 - version: 3.0.0 diff --git a/koku-metrics-operator/3.0.0/metadata/annotations.yaml b/koku-metrics-operator/3.0.0/metadata/annotations.yaml deleted file mode 100644 index 9a6dda021..000000000 --- a/koku-metrics-operator/3.0.0/metadata/annotations.yaml +++ /dev/null @@ -1,15 +0,0 @@ -annotations: - # Core bundle annotations. - operators.operatorframework.io.bundle.mediatype.v1: registry+v1 - operators.operatorframework.io.bundle.manifests.v1: manifests/ - operators.operatorframework.io.bundle.metadata.v1: metadata/ - operators.operatorframework.io.bundle.package.v1: koku-metrics-operator - operators.operatorframework.io.bundle.channels.v1: alpha,beta - operators.operatorframework.io.bundle.channel.default.v1: beta - operators.operatorframework.io.metrics.builder: operator-sdk-v1.28.0 - operators.operatorframework.io.metrics.mediatype.v1: metrics+v1 - operators.operatorframework.io.metrics.project_layout: go.kubebuilder.io/v2 - - # Annotations for testing. - operators.operatorframework.io.test.mediatype.v1: scorecard+v1 - operators.operatorframework.io.test.config.v1: tests/scorecard/ diff --git a/koku-metrics-operator/3.0.0/tests/scorecard/config.yaml b/koku-metrics-operator/3.0.0/tests/scorecard/config.yaml deleted file mode 100644 index a19cb8f47..000000000 --- a/koku-metrics-operator/3.0.0/tests/scorecard/config.yaml +++ /dev/null @@ -1,40 +0,0 @@ -apiVersion: scorecard.operatorframework.io/v1alpha3 -kind: Configuration -metadata: - name: config -stages: -- parallel: true - tests: - - entrypoint: - - scorecard-test - - basic-check-spec - image: quay.io/operator-framework/scorecard-test:v1.10.1 - labels: - suite: basic - test: basic-check-spec-test - storage: - spec: - mountPath: {} - - entrypoint: - - scorecard-test - - olm-bundle-validation - image: quay.io/operator-framework/scorecard-test:v1.10.1 - labels: - suite: olm - test: olm-bundle-validation-test - storage: - spec: - mountPath: {} - - entrypoint: - - scorecard-test - - olm-crds-have-validation - image: quay.io/operator-framework/scorecard-test:v1.10.1 - labels: - suite: olm - test: olm-crds-have-validation-test - storage: - spec: - mountPath: {} -storage: - spec: - mountPath: {} diff --git a/koku-metrics-operator/3.0.1/Dockerfile b/koku-metrics-operator/3.0.1/Dockerfile deleted file mode 100644 index 9aeaea6a2..000000000 --- a/koku-metrics-operator/3.0.1/Dockerfile +++ /dev/null @@ -1,21 +0,0 @@ -FROM scratch - -# Core bundle labels. -LABEL operators.operatorframework.io.bundle.mediatype.v1=registry+v1 -LABEL operators.operatorframework.io.bundle.manifests.v1=manifests/ -LABEL operators.operatorframework.io.bundle.metadata.v1=metadata/ -LABEL operators.operatorframework.io.bundle.package.v1=koku-metrics-operator -LABEL operators.operatorframework.io.bundle.channels.v1=alpha,beta -LABEL operators.operatorframework.io.bundle.channel.default.v1=beta -LABEL operators.operatorframework.io.metrics.builder=operator-sdk-v1.32.0 -LABEL operators.operatorframework.io.metrics.mediatype.v1=metrics+v1 -LABEL operators.operatorframework.io.metrics.project_layout=go.kubebuilder.io/v2 - -# Labels for testing. -LABEL operators.operatorframework.io.test.mediatype.v1=scorecard+v1 -LABEL operators.operatorframework.io.test.config.v1=tests/scorecard/ - -# Copy files to locations specified by labels. -COPY manifests /manifests/ -COPY metadata /metadata/ -COPY tests/scorecard /tests/scorecard/ diff --git a/koku-metrics-operator/3.0.1/manifests/koku-metrics-cfg.openshift.io_kokumetricsconfigs.yaml b/koku-metrics-operator/3.0.1/manifests/koku-metrics-cfg.openshift.io_kokumetricsconfigs.yaml deleted file mode 100644 index 9ac7f7528..000000000 --- a/koku-metrics-operator/3.0.1/manifests/koku-metrics-cfg.openshift.io_kokumetricsconfigs.yaml +++ /dev/null @@ -1,1052 +0,0 @@ -apiVersion: apiextensions.k8s.io/v1 -kind: CustomResourceDefinition -metadata: - annotations: - controller-gen.kubebuilder.io/version: v0.13.0 - creationTimestamp: null - labels: - app: koku-metrics-operator - name: kokumetricsconfigs.koku-metrics-cfg.openshift.io -spec: - group: koku-metrics-cfg.openshift.io - names: - kind: KokuMetricsConfig - listKind: KokuMetricsConfigList - plural: kokumetricsconfigs - singular: kokumetricsconfig - scope: Namespaced - versions: - - name: v1beta1 - schema: - openAPIV3Schema: - description: KokuMetricsConfig is the Schema for the kokumetricsconfig API - properties: - apiVersion: - description: 'APIVersion defines the versioned schema of this representation - of an object. Servers should convert recognized schemas to the latest - internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' - type: string - kind: - description: 'Kind is a string value representing the REST resource this - object represents. Servers may infer this from the endpoint the client - submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' - type: string - metadata: - type: object - spec: - description: KokuMetricsConfigSpec defines the desired state of KokuMetricsConfig. - properties: - api_url: - default: https://console.redhat.com - description: FOR DEVELOPMENT ONLY. APIURL is a field of KokuMetricsConfig - to represent the url of the API endpoint for service interaction. - The default is `https://console.redhat.com`. - type: string - authentication: - description: Authentication is a field of KokuMetricsConfig to represent - the authentication object. - properties: - secret_name: - description: AuthenticationSecretName is a field of KokuMetricsConfig - to represent the secret with the user and password used for - uploads. - type: string - type: - default: token - description: 'AuthType is a field of KokuMetricsConfig to represent - the authentication type to be used basic or token. Valid values - are: - "basic" : Enables authentication using user and password - from authentication secret. - "token" (default): Uses cluster - token for authentication.' - enum: - - token - - basic - type: string - required: - - type - type: object - clusterID: - description: ClusterID is a field of KokuMetricsConfig to represent - the cluster UUID. Normally this value should not be specified. Only - set this value if the clusterID cannot be obtained from the ClusterVersion. - type: string - clusterVersion: - description: ClusterVersion is a field of KokuMetricsConfig to represent - the cluster version. Normally this value should not be specified. - Only set this value if the clusterVersion cannot be obtained from - the ClusterVersion. - type: string - packaging: - description: Packaging is a field of KokuMetricsConfig to represent - the packaging object. - properties: - max_reports_to_store: - default: 30 - description: MaxReports is a field of KokuMetricsConfig to represent - the maximum number of reports to store. The default is 30 reports - which corresponds to approximately 7 days worth of data given - the other default values. - format: int64 - minimum: 1 - type: integer - max_size_MB: - default: 100 - description: MaxSize is a field of KokuMetricsConfig to represent - the max file size in megabytes that will be compressed for upload - to Ingress. The default is 100. - format: int64 - maximum: 100 - minimum: 1 - type: integer - required: - - max_reports_to_store - - max_size_MB - type: object - prometheus_config: - description: PrometheusConfig is a field of KokuMetricsConfig to represent - the configuration of Prometheus connection. - properties: - collect_previous_data: - default: true - description: CollectPreviousData is a field of KokuMetricsConfig - to represent whether or not the operator will gather previous - data upon KokuMetricsConfig creation. This toggle only changes - operator behavior when a new KokuMetricsConfig is created. When - `true`, the operator will gather all existing Prometheus data - for the current month. The default is true. - type: boolean - context_timeout: - default: 120 - description: ContextTimeout is a field of KokuMetricsConfig to - represent how long a query to prometheus should run in seconds - before timing out. The default is 120 seconds. - format: int64 - maximum: 180 - minimum: 10 - type: integer - disable_metrics_collection_cost_management: - default: false - description: DisableMetricsCollectionCostManagement is a field - of KokuMetricsConfig to represent whether or not the operator - will generate reports for cost-management metrics. The default - is false. - type: boolean - disable_metrics_collection_resource_optimization: - default: false - description: DisableMetricsCollectionResourceOptimization is a - field of KokuMetricsConfig to represent whether or not the operator - will generate reports for resource-optimization metrics. The - default is false. - type: boolean - service_address: - default: https://thanos-querier.openshift-monitoring.svc:9091 - description: FOR DEVELOPMENT ONLY. SvcAddress is a field of KokuMetricsConfig - to represent the thanos-querier address. The default is `https://thanos-querier.openshift-monitoring.svc:9091`. - type: string - skip_tls_verification: - default: false - description: FOR DEVELOPMENT ONLY. SkipTLSVerification is a field - of KokuMetricsConfig to represent if the thanos-querier endpoint - must be certificate validated. The default is false. - type: boolean - required: - - service_address - - skip_tls_verification - type: object - source: - description: source represents the desired source on console.redhat.com. - properties: - check_cycle: - default: 1440 - description: check_cycle is the number of minutes between each - source status check on console.redhat.com. The default is 1440 - min (24 hours). - format: int64 - minimum: 0 - type: integer - create_source: - default: false - description: create_source toggles the creation of the source - on console.redhat.com. - type: boolean - name: - description: name is the desired name of the source to create - on console.redhat.com. - type: string - sources_path: - default: /api/sources/v1.0/ - description: FOR DEVELOPMENT ONLY. sources_path is the prefix - of the Sources API on console.redhat.com. The default is `/api/sources/v1.0/`. - type: string - required: - - check_cycle - - create_source - - sources_path - type: object - upload: - description: Upload is a field of KokuMetricsConfig to represent the - upload object. - properties: - ingress_path: - default: /api/ingress/v1/upload - description: FOR DEVELOPMENT ONLY. IngressAPIPath is a field of - KokuMetricsConfig to represent the path of the Ingress API service. - The default is `/api/ingress/v1/upload`. - type: string - upload_cycle: - default: 360 - description: UploadCycle is a field of KokuMetricsConfig to represent - the number of minutes between each upload schedule. The default - is 360 min (6 hours). - format: int64 - minimum: 0 - type: integer - upload_toggle: - default: true - description: UploadToggle is a field of KokuMetricsConfig to represent - if the operator is installed in a restricted-network. If `false`, - the operator will not upload to console.redhat.com or check/create - sources. The default is true. - type: boolean - upload_wait: - description: UploadWait is a field of KokuMetricsConfig to represent - the time to wait before sending an upload. - format: int64 - minimum: 0 - type: integer - validate_cert: - default: true - description: ValidateCert is a field of KokuMetricsConfig to represent - if the Ingress endpoint must be certificate validated. - type: boolean - required: - - ingress_path - - upload_cycle - - upload_toggle - - validate_cert - type: object - volume_claim_template: - description: VolumeClaimTemplate is a field of KokuMetricsConfig to - represent a PVC template. - properties: - apiVersion: - description: 'APIVersion defines the versioned schema of this - representation of an object. Servers should convert recognized - schemas to the latest internal value, and may reject unrecognized - values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' - type: string - kind: - description: 'Kind is a string value representing the REST resource - this object represents. Servers may infer this from the endpoint - the client submits requests to. Cannot be updated. In CamelCase. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' - type: string - metadata: - description: EmbeddedMetadata contains metadata relevant to an - EmbeddedResource. - properties: - annotations: - additionalProperties: - type: string - description: 'Annotations is an unstructured key value map - stored with a resource that may be set by external tools - to store and retrieve arbitrary metadata. They are not queryable - and should be preserved when modifying objects. More info: - http://kubernetes.io/docs/user-guide/annotations' - type: object - labels: - additionalProperties: - type: string - description: 'Map of string keys and values that can be used - to organize and categorize (scope and select) objects. May - match selectors of replication controllers and services. - More info: http://kubernetes.io/docs/user-guide/labels' - type: object - name: - description: 'Name must be unique within a namespace. Is required - when creating resources, although some resources may allow - a client to request the generation of an appropriate name - automatically. Name is primarily intended for creation idempotence - and configuration definition. Cannot be updated. More info: - http://kubernetes.io/docs/user-guide/identifiers#names' - type: string - type: object - spec: - description: 'Spec defines the desired characteristics of a volume - requested by a pod author. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims' - properties: - accessModes: - description: 'accessModes contains the desired access modes - the volume should have. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes-1' - items: - type: string - type: array - dataSource: - description: 'dataSource field can be used to specify either: - * An existing VolumeSnapshot object (snapshot.storage.k8s.io/VolumeSnapshot) - * An existing PVC (PersistentVolumeClaim) If the provisioner - or an external controller can support the specified data - source, it will create a new volume based on the contents - of the specified data source. When the AnyVolumeDataSource - feature gate is enabled, dataSource contents will be copied - to dataSourceRef, and dataSourceRef contents will be copied - to dataSource when dataSourceRef.namespace is not specified. - If the namespace is specified, then dataSourceRef will not - be copied to dataSource.' - properties: - apiGroup: - description: APIGroup is the group for the resource being - referenced. If APIGroup is not specified, the specified - Kind must be in the core API group. For any other third-party - types, APIGroup is required. - type: string - kind: - description: Kind is the type of resource being referenced - type: string - name: - description: Name is the name of resource being referenced - type: string - required: - - kind - - name - type: object - x-kubernetes-map-type: atomic - dataSourceRef: - description: 'dataSourceRef specifies the object from which - to populate the volume with data, if a non-empty volume - is desired. This may be any object from a non-empty API - group (non core object) or a PersistentVolumeClaim object. - When this field is specified, volume binding will only succeed - if the type of the specified object matches some installed - volume populator or dynamic provisioner. This field will - replace the functionality of the dataSource field and as - such if both fields are non-empty, they must have the same - value. For backwards compatibility, when namespace isn''t - specified in dataSourceRef, both fields (dataSource and - dataSourceRef) will be set to the same value automatically - if one of them is empty and the other is non-empty. When - namespace is specified in dataSourceRef, dataSource isn''t - set to the same value and must be empty. There are three - important differences between dataSource and dataSourceRef: - * While dataSource only allows two specific types of objects, - dataSourceRef allows any non-core object, as well as PersistentVolumeClaim - objects. * While dataSource ignores disallowed values (dropping - them), dataSourceRef preserves all values, and generates - an error if a disallowed value is specified. * While dataSource - only allows local objects, dataSourceRef allows objects - in any namespaces. (Beta) Using this field requires the - AnyVolumeDataSource feature gate to be enabled. (Alpha) - Using the namespace field of dataSourceRef requires the - CrossNamespaceVolumeDataSource feature gate to be enabled.' - properties: - apiGroup: - description: APIGroup is the group for the resource being - referenced. If APIGroup is not specified, the specified - Kind must be in the core API group. For any other third-party - types, APIGroup is required. - type: string - kind: - description: Kind is the type of resource being referenced - type: string - name: - description: Name is the name of resource being referenced - type: string - namespace: - description: Namespace is the namespace of resource being - referenced Note that when a namespace is specified, - a gateway.networking.k8s.io/ReferenceGrant object is - required in the referent namespace to allow that namespace's - owner to accept the reference. See the ReferenceGrant - documentation for details. (Alpha) This field requires - the CrossNamespaceVolumeDataSource feature gate to be - enabled. - type: string - required: - - kind - - name - type: object - resources: - description: 'resources represents the minimum resources the - volume should have. If RecoverVolumeExpansionFailure feature - is enabled users are allowed to specify resource requirements - that are lower than previous value but must still be higher - than capacity recorded in the status field of the claim. - More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources' - properties: - claims: - description: "Claims lists the names of resources, defined - in spec.resourceClaims, that are used by this container. - \n This is an alpha field and requires enabling the - DynamicResourceAllocation feature gate. \n This field - is immutable. It can only be set for containers." - items: - description: ResourceClaim references one entry in PodSpec.ResourceClaims. - properties: - name: - description: Name must match the name of one entry - in pod.spec.resourceClaims of the Pod where this - field is used. It makes that resource available - inside a container. - type: string - required: - - name - type: object - type: array - x-kubernetes-list-map-keys: - - name - x-kubernetes-list-type: map - limits: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - description: 'Limits describes the maximum amount of compute - resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' - type: object - requests: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - description: 'Requests describes the minimum amount of - compute resources required. If Requests is omitted for - a container, it defaults to Limits if that is explicitly - specified, otherwise to an implementation-defined value. - Requests cannot exceed Limits. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' - type: object - type: object - selector: - description: selector is a label query over volumes to consider - for binding. - properties: - matchExpressions: - description: matchExpressions is a list of label selector - requirements. The requirements are ANDed. - items: - description: A label selector requirement is a selector - that contains values, a key, and an operator that - relates the key and values. - properties: - key: - description: key is the label key that the selector - applies to. - type: string - operator: - description: operator represents a key's relationship - to a set of values. Valid operators are In, NotIn, - Exists and DoesNotExist. - type: string - values: - description: values is an array of string values. - If the operator is In or NotIn, the values array - must be non-empty. If the operator is Exists or - DoesNotExist, the values array must be empty. - This array is replaced during a strategic merge - patch. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - description: matchLabels is a map of {key,value} pairs. - A single {key,value} in the matchLabels map is equivalent - to an element of matchExpressions, whose key field is - "key", the operator is "In", and the values array contains - only "value". The requirements are ANDed. - type: object - type: object - x-kubernetes-map-type: atomic - storageClassName: - description: 'storageClassName is the name of the StorageClass - required by the claim. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#class-1' - type: string - volumeMode: - description: volumeMode defines what type of volume is required - by the claim. Value of Filesystem is implied when not included - in claim spec. - type: string - volumeName: - description: volumeName is the binding reference to the PersistentVolume - backing this claim. - type: string - type: object - type: object - required: - - authentication - - packaging - - prometheus_config - - source - - upload - type: object - status: - description: KokuMetricsConfigStatus defines the observed state of KokuMetricsConfig. - properties: - api_url: - description: APIURL is a field of KokuMetricsConfig to represent the - url of the API endpoint for service interaction. - type: string - authentication: - description: Authentication is a field of KokuMetricsConfig to represent - the authentication status. - properties: - credentials_found: - description: AuthenticationCredentialsFound is a field of KokuMetricsConfig - to represent if used for uploads were found. - type: boolean - error: - description: AuthErrorMessage is a field of KokuMetricsConfig - to represent an `invalid credentials` error message. - type: string - last_credential_verification_time: - description: LastVerificationTime is a field of KokuMetricsConfig - to represent the last time credentials were verified. - format: date-time - nullable: true - type: string - secret_name: - description: AuthenticationSecretName is a field of KokuMetricsConfig - to represent the secret with the user and password used for - uploads. - type: string - type: - description: AuthType is a field of KokuMetricsConfig to represent - the authentication type to be used basic or token. - enum: - - token - - basic - type: string - valid_basic_auth: - description: ValidBasicAuth is a field of KokuMetricsConfig to - represent if the given basic auth credentials are valid. - type: boolean - type: object - clusterID: - description: ClusterID is a field of KokuMetricsConfig to represent - the cluster UUID. - type: string - clusterVersion: - description: ClusterVersion is a field of KokuMetricsConfig to represent - the cluster version. - type: string - operator_commit: - description: OperatorCommit is a field of KokuMetricsConfig that shows - the commit hash of the operator. - type: string - packaging: - description: Packaging is a field of KokuMetricsConfig to represent - the packaging status - properties: - error: - description: PackagingError is a field of KokuMetricsConfig to - represent the error encountered packaging the reports. - type: string - last_successful_packaging_time: - description: LastSuccessfulPackagingTime is a field of KokuMetricsConfig - that shows the time of the last successful file packaging. - format: date-time - nullable: true - type: string - max_reports_to_store: - description: MaxReports is a field of KokuMetricsConfig to represent - the maximum number of reports to store. - format: int64 - type: integer - max_size_MB: - description: MaxSize is a field of KokuMetricsConfig to represent - the max file size in megabytes that will be compressed for upload - to Ingress. - format: int64 - type: integer - number_reports_stored: - description: ReportCount is a field of KokuMetricsConfig to represent - the number of reports in storage. - format: int64 - type: integer - packaged_files: - description: PackagedFiles is a field of KokuMetricsConfig to - represent the list of file packages in storage. - items: - type: string - type: array - type: object - persistent_volume_claim: - description: PersistentVolumeClaim is a field of KokuMetricsConfig - to represent a PVC. - properties: - apiVersion: - description: 'APIVersion defines the versioned schema of this - representation of an object. Servers should convert recognized - schemas to the latest internal value, and may reject unrecognized - values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' - type: string - kind: - description: 'Kind is a string value representing the REST resource - this object represents. Servers may infer this from the endpoint - the client submits requests to. Cannot be updated. In CamelCase. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' - type: string - metadata: - description: EmbeddedMetadata contains metadata relevant to an - EmbeddedResource. - properties: - annotations: - additionalProperties: - type: string - description: 'Annotations is an unstructured key value map - stored with a resource that may be set by external tools - to store and retrieve arbitrary metadata. They are not queryable - and should be preserved when modifying objects. More info: - http://kubernetes.io/docs/user-guide/annotations' - type: object - labels: - additionalProperties: - type: string - description: 'Map of string keys and values that can be used - to organize and categorize (scope and select) objects. May - match selectors of replication controllers and services. - More info: http://kubernetes.io/docs/user-guide/labels' - type: object - name: - description: 'Name must be unique within a namespace. Is required - when creating resources, although some resources may allow - a client to request the generation of an appropriate name - automatically. Name is primarily intended for creation idempotence - and configuration definition. Cannot be updated. More info: - http://kubernetes.io/docs/user-guide/identifiers#names' - type: string - type: object - spec: - description: 'Spec defines the desired characteristics of a volume - requested by a pod author. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims' - properties: - accessModes: - description: 'accessModes contains the desired access modes - the volume should have. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes-1' - items: - type: string - type: array - dataSource: - description: 'dataSource field can be used to specify either: - * An existing VolumeSnapshot object (snapshot.storage.k8s.io/VolumeSnapshot) - * An existing PVC (PersistentVolumeClaim) If the provisioner - or an external controller can support the specified data - source, it will create a new volume based on the contents - of the specified data source. When the AnyVolumeDataSource - feature gate is enabled, dataSource contents will be copied - to dataSourceRef, and dataSourceRef contents will be copied - to dataSource when dataSourceRef.namespace is not specified. - If the namespace is specified, then dataSourceRef will not - be copied to dataSource.' - properties: - apiGroup: - description: APIGroup is the group for the resource being - referenced. If APIGroup is not specified, the specified - Kind must be in the core API group. For any other third-party - types, APIGroup is required. - type: string - kind: - description: Kind is the type of resource being referenced - type: string - name: - description: Name is the name of resource being referenced - type: string - required: - - kind - - name - type: object - x-kubernetes-map-type: atomic - dataSourceRef: - description: 'dataSourceRef specifies the object from which - to populate the volume with data, if a non-empty volume - is desired. This may be any object from a non-empty API - group (non core object) or a PersistentVolumeClaim object. - When this field is specified, volume binding will only succeed - if the type of the specified object matches some installed - volume populator or dynamic provisioner. This field will - replace the functionality of the dataSource field and as - such if both fields are non-empty, they must have the same - value. For backwards compatibility, when namespace isn''t - specified in dataSourceRef, both fields (dataSource and - dataSourceRef) will be set to the same value automatically - if one of them is empty and the other is non-empty. When - namespace is specified in dataSourceRef, dataSource isn''t - set to the same value and must be empty. There are three - important differences between dataSource and dataSourceRef: - * While dataSource only allows two specific types of objects, - dataSourceRef allows any non-core object, as well as PersistentVolumeClaim - objects. * While dataSource ignores disallowed values (dropping - them), dataSourceRef preserves all values, and generates - an error if a disallowed value is specified. * While dataSource - only allows local objects, dataSourceRef allows objects - in any namespaces. (Beta) Using this field requires the - AnyVolumeDataSource feature gate to be enabled. (Alpha) - Using the namespace field of dataSourceRef requires the - CrossNamespaceVolumeDataSource feature gate to be enabled.' - properties: - apiGroup: - description: APIGroup is the group for the resource being - referenced. If APIGroup is not specified, the specified - Kind must be in the core API group. For any other third-party - types, APIGroup is required. - type: string - kind: - description: Kind is the type of resource being referenced - type: string - name: - description: Name is the name of resource being referenced - type: string - namespace: - description: Namespace is the namespace of resource being - referenced Note that when a namespace is specified, - a gateway.networking.k8s.io/ReferenceGrant object is - required in the referent namespace to allow that namespace's - owner to accept the reference. See the ReferenceGrant - documentation for details. (Alpha) This field requires - the CrossNamespaceVolumeDataSource feature gate to be - enabled. - type: string - required: - - kind - - name - type: object - resources: - description: 'resources represents the minimum resources the - volume should have. If RecoverVolumeExpansionFailure feature - is enabled users are allowed to specify resource requirements - that are lower than previous value but must still be higher - than capacity recorded in the status field of the claim. - More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources' - properties: - claims: - description: "Claims lists the names of resources, defined - in spec.resourceClaims, that are used by this container. - \n This is an alpha field and requires enabling the - DynamicResourceAllocation feature gate. \n This field - is immutable. It can only be set for containers." - items: - description: ResourceClaim references one entry in PodSpec.ResourceClaims. - properties: - name: - description: Name must match the name of one entry - in pod.spec.resourceClaims of the Pod where this - field is used. It makes that resource available - inside a container. - type: string - required: - - name - type: object - type: array - x-kubernetes-list-map-keys: - - name - x-kubernetes-list-type: map - limits: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - description: 'Limits describes the maximum amount of compute - resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' - type: object - requests: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - description: 'Requests describes the minimum amount of - compute resources required. If Requests is omitted for - a container, it defaults to Limits if that is explicitly - specified, otherwise to an implementation-defined value. - Requests cannot exceed Limits. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' - type: object - type: object - selector: - description: selector is a label query over volumes to consider - for binding. - properties: - matchExpressions: - description: matchExpressions is a list of label selector - requirements. The requirements are ANDed. - items: - description: A label selector requirement is a selector - that contains values, a key, and an operator that - relates the key and values. - properties: - key: - description: key is the label key that the selector - applies to. - type: string - operator: - description: operator represents a key's relationship - to a set of values. Valid operators are In, NotIn, - Exists and DoesNotExist. - type: string - values: - description: values is an array of string values. - If the operator is In or NotIn, the values array - must be non-empty. If the operator is Exists or - DoesNotExist, the values array must be empty. - This array is replaced during a strategic merge - patch. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - description: matchLabels is a map of {key,value} pairs. - A single {key,value} in the matchLabels map is equivalent - to an element of matchExpressions, whose key field is - "key", the operator is "In", and the values array contains - only "value". The requirements are ANDed. - type: object - type: object - x-kubernetes-map-type: atomic - storageClassName: - description: 'storageClassName is the name of the StorageClass - required by the claim. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#class-1' - type: string - volumeMode: - description: volumeMode defines what type of volume is required - by the claim. Value of Filesystem is implied when not included - in claim spec. - type: string - volumeName: - description: volumeName is the binding reference to the PersistentVolume - backing this claim. - type: string - type: object - type: object - prometheus: - description: Prometheus represents the status of premetheus queries. - properties: - configuration_error: - description: ConfigError is a field of KokuMetricsConfigStatus - to represent errors during prometheus configuration. - type: string - context_timeout: - description: ContextTimeout is a field of KokuMetricsConfigState - to represent how long a query to prometheus should run in seconds - before timing out. - format: int64 - type: integer - disabled_metrics_collection_cost_management: - default: false - description: DisabledMetricsCollectionCostManagement is a field - of KokuMetricsConfigStatus to represent whether or not collecting - cost-management metrics is disabled. The default is false. - type: boolean - disabled_metrics_collection_resource_optimization: - default: true - description: DisabledMetricsCollectionResourceOptimization is - a field of KokuMetricsConfigStatus to represent whether or not - collecting resource-optimzation metrics is disabled. The default - is true. - type: boolean - last_query_start_time: - description: LastQueryStartTime is a field of KokuMetricsConfigStatus - to represent the last time queries were started. - format: date-time - nullable: true - type: string - last_query_success_time: - description: LastQuerySuccessTime is a field of KokuMetricsConfigStatus - to represent the last time queries were successful. - format: date-time - nullable: true - type: string - previous_data_collected: - default: false - description: PreviousDataCollected is a field of KokuMetricsConfigStatus - to represent whether or not the operator gathered the available - Prometheus data upon KokuMetricsConfig creation. - type: boolean - prometheus_configured: - description: PrometheusConfigured is a field of KokuMetricsConfigStatus - to represent if the operator is configured to connect to prometheus. - type: boolean - prometheus_connected: - description: PrometheusConnected is a field of KokuMetricsConfigStatus - to represent if prometheus can be queried. - type: boolean - prometheus_connection_error: - description: ConnectionError is a field of KokuMetricsConfigStatus - to represent errors during prometheus test query. - type: string - service_address: - description: SvcAddress is the internal thanos-querier address. - type: string - skip_tls_verification: - description: SkipTLSVerification is a field of KokuMetricsConfigStatus - to represent if the thanos-querier endpoint must be certificate - validated. - type: boolean - required: - - prometheus_configured - - prometheus_connected - type: object - reports: - description: Reports represents the status of report generation. - properties: - data_collected: - description: DataCollected is a field of KokuMetricsConfigStatus - to represent whether or not data was collected for the last - query. - type: boolean - data_collection_message: - description: DataCollectionMessage is a field of KokuMetricsConfigStatus - to represent a message associated with the data_collected status. - type: string - last_hour_queried: - description: LastHourQueried is a field of KokuMetricsConfigStatus - to represent the time range for which metrics were last queried. - type: string - report_month: - description: ReportMonth is a field of KokuMetricsConfigStatus - to represent the month for which reports are being generated. - type: string - type: object - source: - description: source represents the observed state of the source on - console.redhat.com. - properties: - check_cycle: - description: check_cycle is the number of minutes between each - source status check on console.redhat.com. The default is 1440 - min (24 hours). - format: int64 - type: integer - create_source: - description: create_source represents the toggle used during the - creation of the source on console.redhat.com. A source will - not be created if upload_toggle is `false`. - type: boolean - error: - description: error represents any errors encountered when creating - the source. - type: string - last_check_time: - description: last_check_time is the time that the last source - status check was attempted. - format: date-time - nullable: true - type: string - name: - description: name represents the name of the source that the operator - attempted to create on console.redhat.com. - type: string - source_defined: - description: source_defined represents whether the defined source - name exists on console.redhat.com. - type: boolean - sources_path: - description: sources_path is the prefix of the Sources API on - console.redhat.com. - type: string - type: object - storage: - description: Storage is a field - properties: - volume_mounted: - description: VolumeMounted is a bool to indicate if storage volume - was mounted. - type: boolean - volume_type: - description: VolumeType is the string representation of the volume - type. - type: string - type: object - upload: - description: Upload is a field of KokuMetricsConfig to represent the - upload object. - properties: - error: - description: UploadError is a field of KokuMetricsConfigStatus - to represent the error encountered uploading reports. - type: string - ingress_path: - description: IngressAPIPath is a field of KokuMetricsConfig to - represent the path of the Ingress API service. - type: string - last_payload_files: - description: LastPayloadFiles is a field of KokuMetricsConfig - to represent the list of files in the last payload that was - sent. - items: - type: string - type: array - last_payload_manifest_id: - description: LastPayloadManifest is a field of KokuMetricsConfig - that shows the manifestID of the last payload. - type: string - last_payload_name: - description: LastPayloadName is a field of KokuMetricsConfig that - shows the name of the last payload file. - type: string - last_payload_request_id: - description: LastPayloadRequestID is a field of KokuMetricsConfig - that shows the insights request id of the last payload. - type: string - last_successful_upload_time: - description: LastSuccessfulUploadTime is a field of KokuMetricsConfig - that shows the time of the last successful upload. - format: date-time - nullable: true - type: string - last_upload_status: - description: LastUploadStatus is a field of KokuMetricsConfig - that shows the http status of the last upload. - type: string - upload: - description: UploadToggle is a field of KokuMetricsConfig to represent - if the operator should upload to console.redhat.com. The default - is true - type: boolean - upload_cycle: - description: UploadCycle is a field of KokuMetricsConfig to represent - the number of minutes between each upload schedule. The default - is 360 min (6 hours). - format: int64 - type: integer - upload_wait: - description: UploadWait is a field of KokuMetricsConfig to represent - the time to wait before sending an upload. - format: int64 - type: integer - validate_cert: - description: ValidateCert is a field of KokuMetricsConfig to represent - if the Ingress endpoint must be certificate validated. - type: boolean - type: object - type: object - required: - - spec - type: object - served: true - storage: true - subresources: - status: {} -status: - acceptedNames: - kind: "" - plural: "" - conditions: null - storedVersions: null diff --git a/koku-metrics-operator/3.0.1/manifests/koku-metrics-operator.clusterserviceversion.yaml b/koku-metrics-operator/3.0.1/manifests/koku-metrics-operator.clusterserviceversion.yaml deleted file mode 100644 index 5acc2fff4..000000000 --- a/koku-metrics-operator/3.0.1/manifests/koku-metrics-operator.clusterserviceversion.yaml +++ /dev/null @@ -1,520 +0,0 @@ -apiVersion: operators.coreos.com/v1alpha1 -kind: ClusterServiceVersion -metadata: - annotations: - alm-examples: |- - [ - { - "apiVersion": "koku-metrics-cfg.openshift.io/v1beta1", - "kind": "KokuMetricsConfig", - "metadata": { - "name": "kokumetricscfg-sample-v1beta1" - }, - "spec": { - "authentication": { - "type": "token" - }, - "packaging": { - "max_reports_to_store": 30, - "max_size_MB": 100 - }, - "prometheus_config": { - "collect_previous_data": true, - "context_timeout": 120, - "disable_metrics_collection_cost_management": false, - "disable_metrics_collection_resource_optimization": false - }, - "source": { - "check_cycle": 1440, - "create_source": false, - "name": "" - }, - "upload": { - "upload_cycle": 360, - "upload_toggle": true - } - } - } - ] - capabilities: Seamless Upgrades - categories: Monitoring - certified: "false" - containerImage: quay.io/project-koku/koku-metrics-operator@sha256:8a303e480260600315a4a13b0e6c47ef69f78354d4ba6938cd76b4da506423be - createdAt: "2023-10-17T15:47:35Z" - description: A Golang-based OpenShift Operator that generates and uploads OpenShift - usage metrics to cost management. - operatorframework.io/suggested-namespace: koku-metrics-operator - operators.openshift.io/infrastructure-features: '["Disconnected"]' - operators.operatorframework.io/builder: operator-sdk-v1.32.0 - operators.operatorframework.io/project_layout: go.kubebuilder.io/v2 - repository: https://github.com/project-koku/koku-metrics-operator - support: Cost Management - name: koku-metrics-operator.v3.0.1 - namespace: placeholder -spec: - apiservicedefinitions: {} - customresourcedefinitions: - owned: - - description: KokuMetricsConfig is the Schema for the kokumetricsconfig API - displayName: Koku Metrics Config - kind: KokuMetricsConfig - name: kokumetricsconfigs.koku-metrics-cfg.openshift.io - version: v1beta1 - description: |- - # Koku Metrics Operator - ## Introduction - The `koku-metrics-operator` is a component of the [cost managment](https://access.redhat.com/documentation/en-us/cost_management_service) service for Openshift. The operator runs on the latest supported versions of Openshift. This operator obtains OpenShift usage data by querying Prometheus every hour to create metric reports that it uploads to Cost Management at [console.redhat.com](https://console.redhat.com) to be processed. For more information, reach out to . - - This operator is capable of functioning within a disconnected/restricted network (aka air-gapped mode). In this mode, the operator will store the packaged reports for manual retrieval instead of being uploaded to Cost Management. Documentation for installing an operator within a restricted network can be found [here](https://docs.openshift.com/container-platform/latest/operators/admin/olm-restricted-networks.html). - - ## Features and Capabilities - #### Metrics collection: - The Koku Metrics Operator (`koku-metrics-operator`) collects the metrics required for Cost Management by: - * Querying Prometheus to gather the necessary metrics for Cost Management. - * Writing the results of Prometheus queries to CSV report files. - * Packaging the CSV report files into tarballs. - - #### Additional Capabilities: - * Resource Optimization metrics collection. - * The operator can be configured to gather all previous data within the configured retention period or a maximum of 90 days. The default data collection period is the 14 previous days. This setting is only applicable to newly created KokuMetricsConfigs. - * The operator can be configured to automatically upload the packaged reports to Cost Management through Red Hat Insights Ingress service. - * The operator can create a source in console.redhat.com. A source is required for Cost Management to process the uploaded packages. - * PersistentVolumeClaim (PVC) configuration: The KokuMetricsConfig CR can accept a PVC definition and the operator will create and mount the PVC. If one is not provided, a default PVC will be created. - * Restricted network installation: this operator can function on a restricted network. In this mode, the operator stores the packaged reports for manual retrieval. - - ## New in v3.0.0: - * Daily report generation: Operator versions prior to v3.0.0 generated sequential reports. Now, reports are generated starting at 0:00 UTC. Any payloads generated throughout a given day will contain all data starting from 0:00 UTC. Once the next day starts, the previous day's reports are packaged, and the new report again starts at 0:00 UTC for the current day. - * Failed query retry: In an attempt to prevent missing data, the operator will retry queries from the last successful query time, up to 5 times. - - ## New in v2.0.0: - * Adds metrics and report generation for resource optimization. This feature will collect additional usage metrics and create a new report in the payload. These metrics are enabled by default, but can be disabled by setting `disable_metrics_collection_resource_optimization` to `true`. - * Collect all available Prometheus data upon CR creation. This feature only applies to newly created KokuMetricsConfigs. The operator will check the monitoring stack configuration in the `openshift-monitoring` namespace. The operator will use the `retention` period set in the `cluster-monitoring-config` ConfigMap if defined, up to a maximum of 90 days. Otherwise it will fall back to collecting 14 days of data, if available. This data collection may be disabled by setting `collect_previous_data` to `false`. Turning this feature off results in the operator collecting metrics from the time the KokuMetricsConfig is created, forward. - - ## Limitations and Pre-Requisites - #### Limitations (Potential for metrics data loss) - * A source **must** exist in console.redhat.com for an uploaded payload to be processed by Cost Management. The operator sends the payload to the Red Hat Insights Ingress service which usually returns successfully, but the operator does not currently confirm with Cost Management that the payload was processed. After Ingress accepts the uploaded payload, it is deleted from the operator. If the data within the payload is not processed, a gap will be introduced in the usage metrics. Data may be recollected by deleting the `KokuMetricsConfig`, creating a new `KokuMetricsConfig`, and setting `collect_previous_data: true`. This re-collection of data will gather all data stored in Prometheus, up to 90 days. - - **Note** The following limitations are specific to operators configured to run in a restricted network: - * The `koku-metrics-operator` will not be able to generate new reports if the PVC storage is full. If this occurs, the reports must be manually deleted from the PVC so that the operator can function as normal. - * The default report retention is 30 reports (about one week's worth of data). The reports must be manually downloaded and uploaded to console.redhat.com every week, or they will be deleted and the data will be lost. - - #### Storage configuration prerequisite - The operator will attempt to create and use the following PVC when installed: - - volume_claim_template: - apiVersion: v1 - kind: PersistentVolumeClaim - metadata: - name: koku-metrics-operator-data - spec: - accessModes: - - ReadWriteOnce - resources: - requests: - storage: 10Gi - - If a different PVC should be utilized, a valid PVC should be specified in the KokuMetricsConfig CR as described in the appropriate section below. The PVC to be used may exist already, or the operator will attempt to create it. - - To use the default specification, the follow assumptions must be met: - 1. A default StorageClass is defined. - 2. Dynamic provisioning for that default StorageClass is enabled. - - If these assumptions are not met, the operator will not deploy correctly. In these cases, storage must be manually configured. After configuring storage, a valid PVC template should be supplied in the `volume_claim_template` spec of the KokuMetricsConfig CR. - - ## Configurable parameters: - * `authentication`: - * `type: token` -> The authentication method for connecting to `console.redhat.com`. The default and preferred method is `token`. `basic` is used when the openshift-config pull-secret does not contain a token for `console.redhat.com`. - * `secret_name` -> The Secret used by the operator when the authentication type is `basic`. This parameter is required **only if** the authentication type is `basic`. - * `packaging`: - * `max_reports_to_store: 30` -> The number of reports to store when configured in air-gapped mode. The default is 30, with a minimum of 1 and no maximum. When the operator is not configured in air-gapped mode, this parameter has no effect. Reports are removed as soon as they are uploaded. - * `max_size: 100` -> The maximum size for packaged files in Megabytes prior to compression. The default is 100, with a minimum of 1 and maximum of 100. - * `prometheus_config`: - * `collect_previous_data: true` -> Toggle for collecting all available data in Prometheus **upon KokuMetricsConfig creation** (This parameter will start to appear in KokuMetricsConfigs that were created prior to v2.0.0 but will not have any effect unless the KokuMetricsConfig is deleted and recreated). The default is `true`. The operator will first look for a `retention` period in the `cluster-monitoring-config` ConfigMap in the `openshift-monitoring` namespace and gather data over this time period up to a maximum of 90 days. If this configuration is not set, the default is 14 days. (New in v2.0.0) - * `disable_metrics_collection_cost_management: false` -> Toggle for disabling the collection of metrics for Cost Management. The default is false. (New in v2.0.0) - * `disable_metrics_collection_resource_optimization: false` -> Toggle for disabling the collection of metrics for Resource Optimization. The default is false. (New in v2.0.0) - * `context_timeout: 120` -> The time in seconds before Prometheus queries timeout due to exceeding context timeout. The default is 120, with a minimum of 10 and maximum of 180. - * `source`: - * `name: ''` -> The name of the source the operator will create in `console.redhat.com`. If the name value is empty, the default intergration name is the **cluster id**. - * `create_source: false` -> Toggle for whether or not the operator will create the source in `console.redhat.com`. The default is False. This parameter should be switched to True when a source does not already exist in `console.redhat.com` for this cluster. - * `check_cycle: 1440` -> The time in minutes to wait between checking if a source exists for this cluster. The default is 1440 minutes (24 hrs). - * `upload`: - * `upload_cycle: 360` -> The time in minutes between payload uploads. The default is 360 (6 hours). - * `upload_toggle: true` -> Toggle to turn upload on or off -> true means upload, false means do not upload (false == air-gapped mode). The default is `true`. - * `upload_wait` -> The amount of time (in seconds) to pause before uploading a payload. The default is a random number between 0 and 35. This is used to decrease service load, but may be set to `0` if desired. - * `volume_claim_template` -> see the "Storage configuration prerequisite" section above. - - ## Configure the koku-metrics-operator - **Note** There are separate instructions for configuring the `koku-metrics-operator` to run in a restricted network. - ##### Configure authentication - The default authentication for the operator is `token`. No further steps are required to configure token authentication. If `basic` is the preferred authentication method, a Secret must be created which holds username and password credentials: - 1. On the left navigation pane, select `Workloads` -> `Secrets` -> select Project: `koku-metrics-operator` -> `Create` -> `Key/Value Secret` - 2. Give the Secret a name and add 2 keys: `username` and `password` (all lowercase). The values for these keys correspond to console.redhat.com credentials. - 3. Select `Create`. - ##### Create the KokuMetricsConfig - Configure the koku-metrics-operator by creating a `KokuMetricsConfig`. - 1. On the left navigation pane, select `Operators` -> `Installed Operators` -> `koku-metrics-operator` -> `KokuMetricsConfig` -> `Create Instance`. - 2. For `basic` authentication, edit the following values in the spec: - * Replace `authentication: type:` with `basic`. - * Add the `secret_name` field under `authentication`, and set it equal to the name of the authentication Secret that was created above. The spec should look similar to the following: - - ``` - authentication: - secret_name: SECRET-NAME - type: basic - ``` - - 3. To configure the koku-metrics-operator to create a cost management source, edit the following values in the `source` field: - * Replace the `name` field value with the preferred name of the source to be created. - * Replace the `create_source` field value with `true`. - - **Note:** if the source already exists, replace the empty string value of the `name` field with the existing name, and leave `create_source` as false. This will allow the operator to confirm that the source exists. - - 4. If not specified, the operator will create a default PersistentVolumeClaim called `koku-metrics-operator-data` with 10Gi of storage. To configure the koku-metrics-operator to use or create a different PVC, edit the following in the spec: - * Add the desired configuration to the `volume_claim_template` field in the spec: - - ``` - volume_claim_template: - apiVersion: v1 - kind: PersistentVolumeClaim - metadata: - name: - spec: - accessModes: - - ReadWriteOnce - resources: - requests: - storage: 10Gi - ``` - - **Note:** If using the YAML View, the `volume_claim_template` field must be added to the spec - 5. Select `Create`. - - # Restricted Network Usage (disconnected/air-gapped mode) - ## Installation - To install the `koku-metrics-operator` in a restricted network, follow the [olm documentation](https://docs.openshift.com/container-platform/latest/operators/admin/olm-restricted-networks.html). The operator is found in the `community-operators` Catalog in the `registry.redhat.io/redhat/community-operator-index:latest` Index. If pruning the index before pushing to the mirrored registry, keep the `koku-metrics-operator` package. - - Within a restricted network, the operator queries prometheus to gather the necessary usage metrics, writes the query results to CSV files, and packages the reports for storage in the PVC. These reports then need to be manually downloaded from the cluster and uploaded to [console.redhat.com](https://console.redhat.com). - - ## Configure the koku-metrics-operator for a restricted network - ##### Create the KokuMetricsConfig - Configure the koku-metrics-operator by creating a `KokuMetricsConfig`. - 1. On the left navigation pane, select `Operators` -> `Installed Operators` -> `koku-metrics-operator` -> `KokuMetricsConfig` -> `Create Instance`. - 2. Specify the desired storage. If not specified, the operator will create a default Persistent Volume Claim called `koku-metrics-operator-data` with 10Gi of storage. To configure the koku-metrics-operator to use or create a different PVC, edit the following in the spec: - * Add the desired configuration to the `volume_claim_template` field in the spec (below is only a template. Any _valid_ `PersistentVolumeClaim` may be defined here): - - ``` - volume_claim_template: - apiVersion: v1 - kind: PersistentVolumeClaim - metadata: - name: - spec: - storageClassName: - accessModes: - - ReadWriteOnce - resources: - requests: - storage: 10Gi - ``` - - **Note:** If using the YAML View, the `volume_claim_template` field must be added to the spec - 3. (Optional) Specify the desired report retention. The operator will retain 30 reports by default. This corresponds to approximately one week's worth of data if using the default packaging cycle. To modify the number of retained reports: - * Change the `packaging` spec field `max_reports_to_store` to the desired number of reports to retain. Once this max number is reached, the operator will start removing the oldest packages remaining on the PVC: - - ``` - packaging: - max_size_MB: 100 - max_reports_to_store: 30 - ``` - - **Note:** The number of retained reports directly affects the frequency that reports must be manually downloaded from the PVC. Take caution in setting this to a higher number of reports, as the operator cannot write data to the PVC if the storage is full. - 4. To configure the operator to perform in a restricted network, set the `upload_toggle` to `false`: - - ``` - upload: - upload_cycle: 360 - upload_toggle: false - ``` - - 5. Select `Create`. - - ## Download reports from the Operator & clean up the PVC - If the `koku-metrics-operator` is configured to run in a restricted network, the metric reports will not automatically upload to cost managment. Instead, they need to be manually copied from the PVC for upload to [console.redhat.com](https://console.redhat.com). The default configuration saves one week of reports which means the process of downloading and uploading reports should be repeated weekly to prevent loss of metrics data. To download the reports, complete the following steps: - 1. Create the following Pod, ensuring the `claimName` matches the PVC containing the report data: - - ``` - kind: Pod - apiVersion: v1 - metadata: - name: volume-shell - namespace: koku-metrics-operator - labels: - app: koku-metrics-operator - spec: - volumes: - - name: koku-metrics-operator-reports - persistentVolumeClaim: - claimName: koku-metrics-operator-data - containers: - - name: volume-shell - image: busybox - command: ['sleep', 'infinity'] - volumeMounts: - - name: koku-metrics-operator-reports - mountPath: /tmp/koku-metrics-operator-reports - ``` - - 2. Use rsync to copy all of the files ready for upload from the PVC to a local folder: - - ``` - $ oc rsync volume-shell:/tmp/koku-metrics-operator-reports/upload local/path/to/save/folder - ``` - - 3. Once confirming that the files have been successfully copied, use rsh to connect to the pod and delete the contents of the upload folder so that they are no longer in storage: - - ``` - $ oc rsh volume-shell - $ rm /tmp/koku-metrics-operator-reports/upload/* - ``` - - 4. (Optional) Delete the pod that was used to connect to the PVC: - - ``` - $ oc delete -f volume-shell.yaml - ``` - - ## Create a Source - In a restricted network, the `koku-metrics-operator` cannot automatically create a source. This process must be done manually. In the console.redhat.com platform, open the [Sources menu](https://console.redhat.com/settings/sources/) to begin adding an OpenShift source to Cost Management: - - Prerequisites: - * The cluster identifier which can be found in the KokuMetricsConfig CR, the cluster Overview page, or the cluster Help > About. - - Creating a source: - 1. Navigate to the Sources menu - 2. Select the `Red Hat` tab - 3. Create a new `Red Hat Openshift Container Platform` source: - * give the source a unique name - * add the Cost Management application - * add the cluster identifier - 4. In the Source wizard, review the details and click `Finish` to create the source. - - ## Upload the reports to cost managment - Uploading reports to cost managment is done through curl: - - $ curl -vvvv -F "file=@FILE_NAME.tar.gz;type=application/vnd.redhat.hccm.tar+tgz" https://console.redhat.com/api/ingress/v1/upload -u USERNAME:PASS - - where `USERNAME` and `PASS` correspond to the user credentials for [console.redhat.com](https://console.redhat.com), and `FILE_NAME` is the name of the report to upload. - - displayName: Koku Metrics Operator - icon: - - base64data: PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4KPCEtLSBHZW5lcmF0b3I6IEFkb2JlIElsbHVzdHJhdG9yIDIyLjEuMCwgU1ZHIEV4cG9ydCBQbHVnLUluIC4gU1ZHIFZlcnNpb246IDYuMDAgQnVpbGQgMCkgIC0tPgo8c3ZnIHZlcnNpb249IjEuMSIgaWQ9IkxheWVyXzEiIHhtbG5zPSJodHR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WMwLjQ1NjE2MTUsMC42MTI4MjM1LDEuMDMyMTE5OCwxLjAzMjExOTgsMS43MTg2NTg0LDEuMjYyNDk2OUwxNzQuMjgwNjM5NiwxODUuODczNjExNXoiLz4KCTwvZz4KPC9nPgo8L3N2Zz4K - mediatype: image/svg+xml - install: - spec: - clusterPermissions: - - rules: - - apiGroups: - - config.openshift.io - resources: - - clusterversions - verbs: - - get - - list - - watch - - apiGroups: - - "" - resources: - - configmaps - verbs: - - get - - list - - watch - - apiGroups: - - "" - resources: - - namespaces - verbs: - - get - - list - - watch - - apiGroups: - - "" - resources: - - secrets - verbs: - - get - serviceAccountName: koku-metrics-controller-manager - deployments: - - label: - app: koku-metrics-operator - control-plane: controller-manager - name: koku-metrics-operator - spec: - replicas: 1 - selector: - matchLabels: - app: koku-metrics-operator - control-plane: controller-manager - strategy: {} - template: - metadata: - labels: - app: koku-metrics-operator - control-plane: controller-manager - spec: - containers: - - args: - - --leader-elect - command: - - /manager - env: - - name: IN_CLUSTER - value: "true" - - name: WATCH_NAMESPACE - valueFrom: - fieldRef: - fieldPath: metadata.annotations['olm.targetNamespaces'] - image: quay.io/project-koku/koku-metrics-operator@sha256:8a303e480260600315a4a13b0e6c47ef69f78354d4ba6938cd76b4da506423be - name: manager - resources: - limits: - cpu: 500m - memory: 500Mi - requests: - cpu: 100m - memory: 20Mi - terminationMessagePolicy: FallbackToLogsOnError - volumeMounts: - - mountPath: /tmp/koku-metrics-operator-reports - name: koku-metrics-operator-reports - serviceAccountName: koku-metrics-controller-manager - terminationGracePeriodSeconds: 10 - volumes: - - name: koku-metrics-operator-reports - permissions: - - rules: - - apiGroups: - - "" - resources: - - configmaps - verbs: - - get - - list - - watch - - create - - update - - patch - - delete - - apiGroups: - - "" - resources: - - configmaps/status - verbs: - - get - - update - - patch - - apiGroups: - - "" - resources: - - events - verbs: - - create - - patch - - apiGroups: - - coordination.k8s.io - resources: - - leases - verbs: - - get - - list - - watch - - create - - update - - patch - - delete - - apiGroups: - - apps - resources: - - deployments - verbs: - - get - - list - - patch - - watch - - apiGroups: - - "" - resources: - - configmaps - - endpoints - - events - - persistentvolumeclaims - - pods - - secrets - - serviceaccounts - - services - - services/finalizers - verbs: - - create - - delete - - get - - list - - patch - - update - - watch - - apiGroups: - - koku-metrics-cfg.openshift.io - resources: - - kokumetricsconfigs - verbs: - - create - - delete - - get - - list - - patch - - update - - watch - - apiGroups: - - koku-metrics-cfg.openshift.io - resources: - - kokumetricsconfigs/status - verbs: - - get - - patch - - update - - apiGroups: - - operators.coreos.com - resources: - - clusterserviceversions - verbs: - - get - - list - - patch - - update - - watch - serviceAccountName: koku-metrics-controller-manager - strategy: deployment - installModes: - - supported: true - type: OwnNamespace - - supported: true - type: SingleNamespace - - supported: false - type: MultiNamespace - - supported: false - type: AllNamespaces - relatedImages: - - name: koku-metrics-operator - image: quay.io/project-koku/koku-metrics-operator@sha256:8a303e480260600315a4a13b0e6c47ef69f78354d4ba6938cd76b4da506423be - keywords: - - cost - - management - - usage - - monitor - maintainers: - - email: costmanagement@redhat.com - name: costmanagement - maturity: alpha - provider: - name: Red Hat - replaces: koku-metrics-operator.v3.0.0 - version: 3.0.1 diff --git a/koku-metrics-operator/3.0.1/metadata/annotations.yaml b/koku-metrics-operator/3.0.1/metadata/annotations.yaml deleted file mode 100644 index 5eb43ebfb..000000000 --- a/koku-metrics-operator/3.0.1/metadata/annotations.yaml +++ /dev/null @@ -1,15 +0,0 @@ -annotations: - # Core bundle annotations. - operators.operatorframework.io.bundle.mediatype.v1: registry+v1 - operators.operatorframework.io.bundle.manifests.v1: manifests/ - operators.operatorframework.io.bundle.metadata.v1: metadata/ - operators.operatorframework.io.bundle.package.v1: koku-metrics-operator - operators.operatorframework.io.bundle.channels.v1: alpha,beta - operators.operatorframework.io.bundle.channel.default.v1: beta - operators.operatorframework.io.metrics.builder: operator-sdk-v1.32.0 - operators.operatorframework.io.metrics.mediatype.v1: metrics+v1 - operators.operatorframework.io.metrics.project_layout: go.kubebuilder.io/v2 - - # Annotations for testing. - operators.operatorframework.io.test.mediatype.v1: scorecard+v1 - operators.operatorframework.io.test.config.v1: tests/scorecard/ diff --git a/koku-metrics-operator/3.0.1/tests/scorecard/config.yaml b/koku-metrics-operator/3.0.1/tests/scorecard/config.yaml deleted file mode 100644 index a19cb8f47..000000000 --- a/koku-metrics-operator/3.0.1/tests/scorecard/config.yaml +++ /dev/null @@ -1,40 +0,0 @@ -apiVersion: scorecard.operatorframework.io/v1alpha3 -kind: Configuration -metadata: - name: config -stages: -- parallel: true - tests: - - entrypoint: - - scorecard-test - - basic-check-spec - image: quay.io/operator-framework/scorecard-test:v1.10.1 - labels: - suite: basic - test: basic-check-spec-test - storage: - spec: - mountPath: {} - - entrypoint: - - scorecard-test - - olm-bundle-validation - image: quay.io/operator-framework/scorecard-test:v1.10.1 - labels: - suite: olm - test: olm-bundle-validation-test - storage: - spec: - mountPath: {} - - entrypoint: - - scorecard-test - - olm-crds-have-validation - image: quay.io/operator-framework/scorecard-test:v1.10.1 - labels: - suite: olm - test: olm-crds-have-validation-test - storage: - spec: - mountPath: {} -storage: - spec: - mountPath: {} diff --git a/koku-metrics-operator/3.1.0/Dockerfile b/koku-metrics-operator/3.1.0/Dockerfile deleted file mode 100644 index 1f455f1de..000000000 --- a/koku-metrics-operator/3.1.0/Dockerfile +++ /dev/null @@ -1,21 +0,0 @@ -FROM scratch - -# Core bundle labels. -LABEL operators.operatorframework.io.bundle.mediatype.v1=registry+v1 -LABEL operators.operatorframework.io.bundle.manifests.v1=manifests/ -LABEL operators.operatorframework.io.bundle.metadata.v1=metadata/ -LABEL operators.operatorframework.io.bundle.package.v1=koku-metrics-operator -LABEL operators.operatorframework.io.bundle.channels.v1=alpha,beta -LABEL operators.operatorframework.io.bundle.channel.default.v1=beta -LABEL operators.operatorframework.io.metrics.builder=operator-sdk-v1.31.0 -LABEL operators.operatorframework.io.metrics.mediatype.v1=metrics+v1 -LABEL operators.operatorframework.io.metrics.project_layout=go.kubebuilder.io/v2 - -# Labels for testing. -LABEL operators.operatorframework.io.test.mediatype.v1=scorecard+v1 -LABEL operators.operatorframework.io.test.config.v1=tests/scorecard/ - -# Copy files to locations specified by labels. -COPY manifests /manifests/ -COPY metadata /metadata/ -COPY tests/scorecard /tests/scorecard/ diff --git a/koku-metrics-operator/3.1.0/manifests/koku-metrics-cfg.openshift.io_kokumetricsconfigs.yaml b/koku-metrics-operator/3.1.0/manifests/koku-metrics-cfg.openshift.io_kokumetricsconfigs.yaml deleted file mode 100644 index af947f70d..000000000 --- a/koku-metrics-operator/3.1.0/manifests/koku-metrics-cfg.openshift.io_kokumetricsconfigs.yaml +++ /dev/null @@ -1,1067 +0,0 @@ -apiVersion: apiextensions.k8s.io/v1 -kind: CustomResourceDefinition -metadata: - annotations: - controller-gen.kubebuilder.io/version: v0.13.0 - creationTimestamp: null - labels: - app: koku-metrics-operator - name: kokumetricsconfigs.koku-metrics-cfg.openshift.io -spec: - group: koku-metrics-cfg.openshift.io - names: - kind: KokuMetricsConfig - listKind: KokuMetricsConfigList - plural: kokumetricsconfigs - singular: kokumetricsconfig - scope: Namespaced - versions: - - name: v1beta1 - schema: - openAPIV3Schema: - description: KokuMetricsConfig is the Schema for the kokumetricsconfig API - properties: - apiVersion: - description: 'APIVersion defines the versioned schema of this representation - of an object. Servers should convert recognized schemas to the latest - internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' - type: string - kind: - description: 'Kind is a string value representing the REST resource this - object represents. Servers may infer this from the endpoint the client - submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' - type: string - metadata: - type: object - spec: - description: KokuMetricsConfigSpec defines the desired state of KokuMetricsConfig. - properties: - api_url: - default: https://console.redhat.com - description: FOR DEVELOPMENT ONLY. APIURL is a field of KokuMetricsConfig - to represent the url of the API endpoint for service interaction. - The default is `https://console.redhat.com`. - type: string - authentication: - description: Authentication is a field of KokuMetricsConfig to represent - the authentication object. - properties: - secret_name: - description: AuthenticationSecretName is a field of KokuMetricsConfig - to represent the secret with the user and password used for - uploads. - type: string - token_url: - default: https://sso.redhat.com/auth/realms/redhat-external/protocol/openid-connect/token - description: FOR DEVELOPMENT ONLY. TokenURL is a field of KokuMetricsConfig - to represent the endpoint used to obtain the service account - token. The default is `https://sso.redhat.com/auth/realms/redhat-external/protocol/openid-connect/token`. - type: string - type: - default: token - description: 'AuthType is a field of KokuMetricsConfig to represent - the authentication type to be used basic, service-account or - token. Valid values are: - "basic" (deprecated) : Enables authentication - using user and password from authentication secret. - "service-account" - : Enables authentication using client_id and client_secret from - the secret containing service account information. - "token" - (default): Uses cluster token for authentication.' - enum: - - token - - basic - - service-account - type: string - required: - - type - type: object - clusterID: - description: ClusterID is a field of KokuMetricsConfig to represent - the cluster UUID. Normally this value should not be specified. Only - set this value if the clusterID cannot be obtained from the ClusterVersion. - type: string - clusterVersion: - description: ClusterVersion is a field of KokuMetricsConfig to represent - the cluster version. Normally this value should not be specified. - Only set this value if the clusterVersion cannot be obtained from - the ClusterVersion. - type: string - packaging: - description: Packaging is a field of KokuMetricsConfig to represent - the packaging object. - properties: - max_reports_to_store: - default: 30 - description: MaxReports is a field of KokuMetricsConfig to represent - the maximum number of reports to store. The default is 30 reports - which corresponds to approximately 7 days worth of data given - the other default values. - format: int64 - minimum: 1 - type: integer - max_size_MB: - default: 100 - description: MaxSize is a field of KokuMetricsConfig to represent - the max file size in megabytes that will be compressed for upload - to Ingress. The default is 100. - format: int64 - maximum: 100 - minimum: 1 - type: integer - required: - - max_reports_to_store - - max_size_MB - type: object - prometheus_config: - description: PrometheusConfig is a field of KokuMetricsConfig to represent - the configuration of Prometheus connection. - properties: - collect_previous_data: - default: true - description: CollectPreviousData is a field of KokuMetricsConfig - to represent whether or not the operator will gather previous - data upon KokuMetricsConfig creation. This toggle only changes - operator behavior when a new KokuMetricsConfig is created. When - `true`, the operator will gather all existing Prometheus data - for the current month. The default is true. - type: boolean - context_timeout: - default: 120 - description: ContextTimeout is a field of KokuMetricsConfig to - represent how long a query to prometheus should run in seconds - before timing out. The default is 120 seconds. - format: int64 - maximum: 180 - minimum: 10 - type: integer - disable_metrics_collection_cost_management: - default: false - description: DisableMetricsCollectionCostManagement is a field - of KokuMetricsConfig to represent whether or not the operator - will generate reports for cost-management metrics. The default - is false. - type: boolean - disable_metrics_collection_resource_optimization: - default: false - description: DisableMetricsCollectionResourceOptimization is a - field of KokuMetricsConfig to represent whether or not the operator - will generate reports for resource-optimization metrics. The - default is false. - type: boolean - service_address: - default: https://thanos-querier.openshift-monitoring.svc:9091 - description: FOR DEVELOPMENT ONLY. SvcAddress is a field of KokuMetricsConfig - to represent the thanos-querier address. The default is `https://thanos-querier.openshift-monitoring.svc:9091`. - type: string - skip_tls_verification: - default: false - description: FOR DEVELOPMENT ONLY. SkipTLSVerification is a field - of KokuMetricsConfig to represent if the thanos-querier endpoint - must be certificate validated. The default is false. - type: boolean - required: - - service_address - - skip_tls_verification - type: object - source: - description: source represents the desired integration on console.redhat.com. - properties: - check_cycle: - default: 1440 - description: check_cycle is the number of minutes between each - integration status check on console.redhat.com. The default - is 1440 min (24 hours). - format: int64 - minimum: 0 - type: integer - create_source: - default: false - description: create_source toggles the creation of the integration - on console.redhat.com. - type: boolean - name: - description: name is the desired name of the integration to create - on console.redhat.com. - type: string - sources_path: - default: /api/sources/v1.0/ - description: FOR DEVELOPMENT ONLY. sources_path is the prefix - of the Sources API on console.redhat.com. The default is `/api/sources/v1.0/`. - type: string - required: - - check_cycle - - create_source - - sources_path - type: object - upload: - description: Upload is a field of KokuMetricsConfig to represent the - upload object. - properties: - ingress_path: - default: /api/ingress/v1/upload - description: FOR DEVELOPMENT ONLY. IngressAPIPath is a field of - KokuMetricsConfig to represent the path of the Ingress API service. - The default is `/api/ingress/v1/upload`. - type: string - upload_cycle: - default: 360 - description: UploadCycle is a field of KokuMetricsConfig to represent - the number of minutes between each upload schedule. The default - is 360 min (6 hours). - format: int64 - minimum: 0 - type: integer - upload_toggle: - default: true - description: UploadToggle is a field of KokuMetricsConfig to represent - if the operator is installed in a restricted-network. If `false`, - the operator will not upload to console.redhat.com or check/create - sources. The default is true. - type: boolean - upload_wait: - description: UploadWait is a field of KokuMetricsConfig to represent - the time to wait before sending an upload. - format: int64 - minimum: 0 - type: integer - validate_cert: - default: true - description: ValidateCert is a field of KokuMetricsConfig to represent - if the Ingress endpoint must be certificate validated. - type: boolean - required: - - ingress_path - - upload_cycle - - upload_toggle - - validate_cert - type: object - volume_claim_template: - description: VolumeClaimTemplate is a field of KokuMetricsConfig to - represent a PVC template. - properties: - apiVersion: - description: 'APIVersion defines the versioned schema of this - representation of an object. Servers should convert recognized - schemas to the latest internal value, and may reject unrecognized - values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' - type: string - kind: - description: 'Kind is a string value representing the REST resource - this object represents. Servers may infer this from the endpoint - the client submits requests to. Cannot be updated. In CamelCase. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' - type: string - metadata: - description: EmbeddedMetadata contains metadata relevant to an - EmbeddedResource. - properties: - annotations: - additionalProperties: - type: string - description: 'Annotations is an unstructured key value map - stored with a resource that may be set by external tools - to store and retrieve arbitrary metadata. They are not queryable - and should be preserved when modifying objects. More info: - http://kubernetes.io/docs/user-guide/annotations' - type: object - labels: - additionalProperties: - type: string - description: 'Map of string keys and values that can be used - to organize and categorize (scope and select) objects. May - match selectors of replication controllers and services. - More info: http://kubernetes.io/docs/user-guide/labels' - type: object - name: - description: 'Name must be unique within a namespace. Is required - when creating resources, although some resources may allow - a client to request the generation of an appropriate name - automatically. Name is primarily intended for creation idempotence - and configuration definition. Cannot be updated. More info: - http://kubernetes.io/docs/user-guide/identifiers#names' - type: string - type: object - spec: - description: 'Spec defines the desired characteristics of a volume - requested by a pod author. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims' - properties: - accessModes: - description: 'accessModes contains the desired access modes - the volume should have. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes-1' - items: - type: string - type: array - dataSource: - description: 'dataSource field can be used to specify either: - * An existing VolumeSnapshot object (snapshot.storage.k8s.io/VolumeSnapshot) - * An existing PVC (PersistentVolumeClaim) If the provisioner - or an external controller can support the specified data - source, it will create a new volume based on the contents - of the specified data source. When the AnyVolumeDataSource - feature gate is enabled, dataSource contents will be copied - to dataSourceRef, and dataSourceRef contents will be copied - to dataSource when dataSourceRef.namespace is not specified. - If the namespace is specified, then dataSourceRef will not - be copied to dataSource.' - properties: - apiGroup: - description: APIGroup is the group for the resource being - referenced. If APIGroup is not specified, the specified - Kind must be in the core API group. For any other third-party - types, APIGroup is required. - type: string - kind: - description: Kind is the type of resource being referenced - type: string - name: - description: Name is the name of resource being referenced - type: string - required: - - kind - - name - type: object - x-kubernetes-map-type: atomic - dataSourceRef: - description: 'dataSourceRef specifies the object from which - to populate the volume with data, if a non-empty volume - is desired. This may be any object from a non-empty API - group (non core object) or a PersistentVolumeClaim object. - When this field is specified, volume binding will only succeed - if the type of the specified object matches some installed - volume populator or dynamic provisioner. This field will - replace the functionality of the dataSource field and as - such if both fields are non-empty, they must have the same - value. For backwards compatibility, when namespace isn''t - specified in dataSourceRef, both fields (dataSource and - dataSourceRef) will be set to the same value automatically - if one of them is empty and the other is non-empty. When - namespace is specified in dataSourceRef, dataSource isn''t - set to the same value and must be empty. There are three - important differences between dataSource and dataSourceRef: - * While dataSource only allows two specific types of objects, - dataSourceRef allows any non-core object, as well as PersistentVolumeClaim - objects. * While dataSource ignores disallowed values (dropping - them), dataSourceRef preserves all values, and generates - an error if a disallowed value is specified. * While dataSource - only allows local objects, dataSourceRef allows objects - in any namespaces. (Beta) Using this field requires the - AnyVolumeDataSource feature gate to be enabled. (Alpha) - Using the namespace field of dataSourceRef requires the - CrossNamespaceVolumeDataSource feature gate to be enabled.' - properties: - apiGroup: - description: APIGroup is the group for the resource being - referenced. If APIGroup is not specified, the specified - Kind must be in the core API group. For any other third-party - types, APIGroup is required. - type: string - kind: - description: Kind is the type of resource being referenced - type: string - name: - description: Name is the name of resource being referenced - type: string - namespace: - description: Namespace is the namespace of resource being - referenced Note that when a namespace is specified, - a gateway.networking.k8s.io/ReferenceGrant object is - required in the referent namespace to allow that namespace's - owner to accept the reference. See the ReferenceGrant - documentation for details. (Alpha) This field requires - the CrossNamespaceVolumeDataSource feature gate to be - enabled. - type: string - required: - - kind - - name - type: object - resources: - description: 'resources represents the minimum resources the - volume should have. If RecoverVolumeExpansionFailure feature - is enabled users are allowed to specify resource requirements - that are lower than previous value but must still be higher - than capacity recorded in the status field of the claim. - More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources' - properties: - claims: - description: "Claims lists the names of resources, defined - in spec.resourceClaims, that are used by this container. - \n This is an alpha field and requires enabling the - DynamicResourceAllocation feature gate. \n This field - is immutable. It can only be set for containers." - items: - description: ResourceClaim references one entry in PodSpec.ResourceClaims. - properties: - name: - description: Name must match the name of one entry - in pod.spec.resourceClaims of the Pod where this - field is used. It makes that resource available - inside a container. - type: string - required: - - name - type: object - type: array - x-kubernetes-list-map-keys: - - name - x-kubernetes-list-type: map - limits: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - description: 'Limits describes the maximum amount of compute - resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' - type: object - requests: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - description: 'Requests describes the minimum amount of - compute resources required. If Requests is omitted for - a container, it defaults to Limits if that is explicitly - specified, otherwise to an implementation-defined value. - Requests cannot exceed Limits. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' - type: object - type: object - selector: - description: selector is a label query over volumes to consider - for binding. - properties: - matchExpressions: - description: matchExpressions is a list of label selector - requirements. The requirements are ANDed. - items: - description: A label selector requirement is a selector - that contains values, a key, and an operator that - relates the key and values. - properties: - key: - description: key is the label key that the selector - applies to. - type: string - operator: - description: operator represents a key's relationship - to a set of values. Valid operators are In, NotIn, - Exists and DoesNotExist. - type: string - values: - description: values is an array of string values. - If the operator is In or NotIn, the values array - must be non-empty. If the operator is Exists or - DoesNotExist, the values array must be empty. - This array is replaced during a strategic merge - patch. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - description: matchLabels is a map of {key,value} pairs. - A single {key,value} in the matchLabels map is equivalent - to an element of matchExpressions, whose key field is - "key", the operator is "In", and the values array contains - only "value". The requirements are ANDed. - type: object - type: object - x-kubernetes-map-type: atomic - storageClassName: - description: 'storageClassName is the name of the StorageClass - required by the claim. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#class-1' - type: string - volumeMode: - description: volumeMode defines what type of volume is required - by the claim. Value of Filesystem is implied when not included - in claim spec. - type: string - volumeName: - description: volumeName is the binding reference to the PersistentVolume - backing this claim. - type: string - type: object - type: object - required: - - authentication - - packaging - - prometheus_config - - source - - upload - type: object - status: - description: KokuMetricsConfigStatus defines the observed state of KokuMetricsConfig. - properties: - api_url: - description: APIURL is a field of KokuMetricsConfig to represent the - url of the API endpoint for service interaction. - type: string - authentication: - description: Authentication is a field of KokuMetricsConfig to represent - the authentication status. - properties: - credentials_found: - description: AuthenticationCredentialsFound is a field of KokuMetricsConfig - to represent if used for uploads were found. - type: boolean - error: - description: AuthErrorMessage is a field of KokuMetricsConfig - to represent an `invalid credentials` error message. - type: string - last_credential_verification_time: - description: LastVerificationTime is a field of KokuMetricsConfig - to represent the last time credentials were verified. - format: date-time - nullable: true - type: string - secret_name: - description: AuthenticationSecretName is a field of KokuMetricsConfig - to represent the secret with the user and password used for - uploads. - type: string - token_url: - description: TokenURL is a field of KokuMetricsConfig to represent - the url used to generate a service account token. - type: string - type: - description: AuthType is a field of KokuMetricsConfig to represent - the authentication type to be used basic, service-account or - token. - enum: - - token - - basic - - service-account - type: string - valid_basic_auth: - description: ValidBasicAuth is a field of KokuMetricsConfig to - represent if the given basic auth credentials are valid. - type: boolean - type: object - clusterID: - description: ClusterID is a field of KokuMetricsConfig to represent - the cluster UUID. - type: string - clusterVersion: - description: ClusterVersion is a field of KokuMetricsConfig to represent - the cluster version. - type: string - operator_commit: - description: OperatorCommit is a field of KokuMetricsConfig that shows - the commit hash of the operator. - type: string - packaging: - description: Packaging is a field of KokuMetricsConfig to represent - the packaging status - properties: - error: - description: PackagingError is a field of KokuMetricsConfig to - represent the error encountered packaging the reports. - type: string - last_successful_packaging_time: - description: LastSuccessfulPackagingTime is a field of KokuMetricsConfig - that shows the time of the last successful file packaging. - format: date-time - nullable: true - type: string - max_reports_to_store: - description: MaxReports is a field of KokuMetricsConfig to represent - the maximum number of reports to store. - format: int64 - type: integer - max_size_MB: - description: MaxSize is a field of KokuMetricsConfig to represent - the max file size in megabytes that will be compressed for upload - to Ingress. - format: int64 - type: integer - number_reports_stored: - description: ReportCount is a field of KokuMetricsConfig to represent - the number of reports in storage. - format: int64 - type: integer - packaged_files: - description: PackagedFiles is a field of KokuMetricsConfig to - represent the list of file packages in storage. - items: - type: string - type: array - type: object - persistent_volume_claim: - description: PersistentVolumeClaim is a field of KokuMetricsConfig - to represent a PVC. - properties: - apiVersion: - description: 'APIVersion defines the versioned schema of this - representation of an object. Servers should convert recognized - schemas to the latest internal value, and may reject unrecognized - values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' - type: string - kind: - description: 'Kind is a string value representing the REST resource - this object represents. Servers may infer this from the endpoint - the client submits requests to. Cannot be updated. In CamelCase. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' - type: string - metadata: - description: EmbeddedMetadata contains metadata relevant to an - EmbeddedResource. - properties: - annotations: - additionalProperties: - type: string - description: 'Annotations is an unstructured key value map - stored with a resource that may be set by external tools - to store and retrieve arbitrary metadata. They are not queryable - and should be preserved when modifying objects. More info: - http://kubernetes.io/docs/user-guide/annotations' - type: object - labels: - additionalProperties: - type: string - description: 'Map of string keys and values that can be used - to organize and categorize (scope and select) objects. May - match selectors of replication controllers and services. - More info: http://kubernetes.io/docs/user-guide/labels' - type: object - name: - description: 'Name must be unique within a namespace. Is required - when creating resources, although some resources may allow - a client to request the generation of an appropriate name - automatically. Name is primarily intended for creation idempotence - and configuration definition. Cannot be updated. More info: - http://kubernetes.io/docs/user-guide/identifiers#names' - type: string - type: object - spec: - description: 'Spec defines the desired characteristics of a volume - requested by a pod author. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims' - properties: - accessModes: - description: 'accessModes contains the desired access modes - the volume should have. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes-1' - items: - type: string - type: array - dataSource: - description: 'dataSource field can be used to specify either: - * An existing VolumeSnapshot object (snapshot.storage.k8s.io/VolumeSnapshot) - * An existing PVC (PersistentVolumeClaim) If the provisioner - or an external controller can support the specified data - source, it will create a new volume based on the contents - of the specified data source. When the AnyVolumeDataSource - feature gate is enabled, dataSource contents will be copied - to dataSourceRef, and dataSourceRef contents will be copied - to dataSource when dataSourceRef.namespace is not specified. - If the namespace is specified, then dataSourceRef will not - be copied to dataSource.' - properties: - apiGroup: - description: APIGroup is the group for the resource being - referenced. If APIGroup is not specified, the specified - Kind must be in the core API group. For any other third-party - types, APIGroup is required. - type: string - kind: - description: Kind is the type of resource being referenced - type: string - name: - description: Name is the name of resource being referenced - type: string - required: - - kind - - name - type: object - x-kubernetes-map-type: atomic - dataSourceRef: - description: 'dataSourceRef specifies the object from which - to populate the volume with data, if a non-empty volume - is desired. This may be any object from a non-empty API - group (non core object) or a PersistentVolumeClaim object. - When this field is specified, volume binding will only succeed - if the type of the specified object matches some installed - volume populator or dynamic provisioner. This field will - replace the functionality of the dataSource field and as - such if both fields are non-empty, they must have the same - value. For backwards compatibility, when namespace isn''t - specified in dataSourceRef, both fields (dataSource and - dataSourceRef) will be set to the same value automatically - if one of them is empty and the other is non-empty. When - namespace is specified in dataSourceRef, dataSource isn''t - set to the same value and must be empty. There are three - important differences between dataSource and dataSourceRef: - * While dataSource only allows two specific types of objects, - dataSourceRef allows any non-core object, as well as PersistentVolumeClaim - objects. * While dataSource ignores disallowed values (dropping - them), dataSourceRef preserves all values, and generates - an error if a disallowed value is specified. * While dataSource - only allows local objects, dataSourceRef allows objects - in any namespaces. (Beta) Using this field requires the - AnyVolumeDataSource feature gate to be enabled. (Alpha) - Using the namespace field of dataSourceRef requires the - CrossNamespaceVolumeDataSource feature gate to be enabled.' - properties: - apiGroup: - description: APIGroup is the group for the resource being - referenced. If APIGroup is not specified, the specified - Kind must be in the core API group. For any other third-party - types, APIGroup is required. - type: string - kind: - description: Kind is the type of resource being referenced - type: string - name: - description: Name is the name of resource being referenced - type: string - namespace: - description: Namespace is the namespace of resource being - referenced Note that when a namespace is specified, - a gateway.networking.k8s.io/ReferenceGrant object is - required in the referent namespace to allow that namespace's - owner to accept the reference. See the ReferenceGrant - documentation for details. (Alpha) This field requires - the CrossNamespaceVolumeDataSource feature gate to be - enabled. - type: string - required: - - kind - - name - type: object - resources: - description: 'resources represents the minimum resources the - volume should have. If RecoverVolumeExpansionFailure feature - is enabled users are allowed to specify resource requirements - that are lower than previous value but must still be higher - than capacity recorded in the status field of the claim. - More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources' - properties: - claims: - description: "Claims lists the names of resources, defined - in spec.resourceClaims, that are used by this container. - \n This is an alpha field and requires enabling the - DynamicResourceAllocation feature gate. \n This field - is immutable. It can only be set for containers." - items: - description: ResourceClaim references one entry in PodSpec.ResourceClaims. - properties: - name: - description: Name must match the name of one entry - in pod.spec.resourceClaims of the Pod where this - field is used. It makes that resource available - inside a container. - type: string - required: - - name - type: object - type: array - x-kubernetes-list-map-keys: - - name - x-kubernetes-list-type: map - limits: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - description: 'Limits describes the maximum amount of compute - resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' - type: object - requests: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - description: 'Requests describes the minimum amount of - compute resources required. If Requests is omitted for - a container, it defaults to Limits if that is explicitly - specified, otherwise to an implementation-defined value. - Requests cannot exceed Limits. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/' - type: object - type: object - selector: - description: selector is a label query over volumes to consider - for binding. - properties: - matchExpressions: - description: matchExpressions is a list of label selector - requirements. The requirements are ANDed. - items: - description: A label selector requirement is a selector - that contains values, a key, and an operator that - relates the key and values. - properties: - key: - description: key is the label key that the selector - applies to. - type: string - operator: - description: operator represents a key's relationship - to a set of values. Valid operators are In, NotIn, - Exists and DoesNotExist. - type: string - values: - description: values is an array of string values. - If the operator is In or NotIn, the values array - must be non-empty. If the operator is Exists or - DoesNotExist, the values array must be empty. - This array is replaced during a strategic merge - patch. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - description: matchLabels is a map of {key,value} pairs. - A single {key,value} in the matchLabels map is equivalent - to an element of matchExpressions, whose key field is - "key", the operator is "In", and the values array contains - only "value". The requirements are ANDed. - type: object - type: object - x-kubernetes-map-type: atomic - storageClassName: - description: 'storageClassName is the name of the StorageClass - required by the claim. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#class-1' - type: string - volumeMode: - description: volumeMode defines what type of volume is required - by the claim. Value of Filesystem is implied when not included - in claim spec. - type: string - volumeName: - description: volumeName is the binding reference to the PersistentVolume - backing this claim. - type: string - type: object - type: object - prometheus: - description: Prometheus represents the status of premetheus queries. - properties: - configuration_error: - description: ConfigError is a field of KokuMetricsConfigStatus - to represent errors during prometheus configuration. - type: string - context_timeout: - description: ContextTimeout is a field of KokuMetricsConfigState - to represent how long a query to prometheus should run in seconds - before timing out. - format: int64 - type: integer - disabled_metrics_collection_cost_management: - default: false - description: DisabledMetricsCollectionCostManagement is a field - of KokuMetricsConfigStatus to represent whether or not collecting - cost-management metrics is disabled. The default is false. - type: boolean - disabled_metrics_collection_resource_optimization: - default: true - description: DisabledMetricsCollectionResourceOptimization is - a field of KokuMetricsConfigStatus to represent whether or not - collecting resource-optimzation metrics is disabled. The default - is true. - type: boolean - last_query_start_time: - description: LastQueryStartTime is a field of KokuMetricsConfigStatus - to represent the last time queries were started. - format: date-time - nullable: true - type: string - last_query_success_time: - description: LastQuerySuccessTime is a field of KokuMetricsConfigStatus - to represent the last time queries were successful. - format: date-time - nullable: true - type: string - previous_data_collected: - default: false - description: PreviousDataCollected is a field of KokuMetricsConfigStatus - to represent whether or not the operator gathered the available - Prometheus data upon KokuMetricsConfig creation. - type: boolean - prometheus_configured: - description: PrometheusConfigured is a field of KokuMetricsConfigStatus - to represent if the operator is configured to connect to prometheus. - type: boolean - prometheus_connected: - description: PrometheusConnected is a field of KokuMetricsConfigStatus - to represent if prometheus can be queried. - type: boolean - prometheus_connection_error: - description: ConnectionError is a field of KokuMetricsConfigStatus - to represent errors during prometheus test query. - type: string - service_address: - description: SvcAddress is the internal thanos-querier address. - type: string - skip_tls_verification: - description: SkipTLSVerification is a field of KokuMetricsConfigStatus - to represent if the thanos-querier endpoint must be certificate - validated. - type: boolean - required: - - prometheus_configured - - prometheus_connected - type: object - reports: - description: Reports represents the status of report generation. - properties: - data_collected: - description: DataCollected is a field of KokuMetricsConfigStatus - to represent whether or not data was collected for the last - query. - type: boolean - data_collection_message: - description: DataCollectionMessage is a field of KokuMetricsConfigStatus - to represent a message associated with the data_collected status. - type: string - last_hour_queried: - description: LastHourQueried is a field of KokuMetricsConfigStatus - to represent the time range for which metrics were last queried. - type: string - report_month: - description: ReportMonth is a field of KokuMetricsConfigStatus - to represent the month for which reports are being generated. - type: string - type: object - source: - description: source represents the observed state of the integration - on console.redhat.com. - properties: - check_cycle: - description: check_cycle is the number of minutes between each - integration status check on console.redhat.com. The default - is 1440 min (24 hours). - format: int64 - type: integer - create_source: - description: create_source represents the toggle used during the - creation of the integration on console.redhat.com. An Integration - will not be created if upload_toggle is `false`. - type: boolean - error: - description: error represents any errors encountered when creating - the integration. - type: string - last_check_time: - description: last_check_time is the time that the last integration - status check was attempted. - format: date-time - nullable: true - type: string - name: - description: name represents the name of the integration that - the operator attempted to create on console.redhat.com. - type: string - source_defined: - description: source_defined represents whether the defined integration - name exists on console.redhat.com. - type: boolean - sources_path: - description: sources_path is the prefix of the Sources API on - console.redhat.com. - type: string - type: object - storage: - description: Storage is a field - properties: - volume_mounted: - description: VolumeMounted is a bool to indicate if storage volume - was mounted. - type: boolean - volume_type: - description: VolumeType is the string representation of the volume - type. - type: string - type: object - upload: - description: Upload is a field of KokuMetricsConfig to represent the - upload object. - properties: - error: - description: UploadError is a field of KokuMetricsConfigStatus - to represent the error encountered uploading reports. - type: string - ingress_path: - description: IngressAPIPath is a field of KokuMetricsConfig to - represent the path of the Ingress API service. - type: string - last_payload_files: - description: LastPayloadFiles is a field of KokuMetricsConfig - to represent the list of files in the last payload that was - sent. - items: - type: string - type: array - last_payload_manifest_id: - description: LastPayloadManifest is a field of KokuMetricsConfig - that shows the manifestID of the last payload. - type: string - last_payload_name: - description: LastPayloadName is a field of KokuMetricsConfig that - shows the name of the last payload file. - type: string - last_payload_request_id: - description: LastPayloadRequestID is a field of KokuMetricsConfig - that shows the insights request id of the last payload. - type: string - last_successful_upload_time: - description: LastSuccessfulUploadTime is a field of KokuMetricsConfig - that shows the time of the last successful upload. - format: date-time - nullable: true - type: string - last_upload_status: - description: LastUploadStatus is a field of KokuMetricsConfig - that shows the http status of the last upload. - type: string - upload: - description: UploadToggle is a field of KokuMetricsConfig to represent - if the operator should upload to console.redhat.com. The default - is true - type: boolean - upload_cycle: - description: UploadCycle is a field of KokuMetricsConfig to represent - the number of minutes between each upload schedule. The default - is 360 min (6 hours). - format: int64 - type: integer - upload_wait: - description: UploadWait is a field of KokuMetricsConfig to represent - the time to wait before sending an upload. - format: int64 - type: integer - validate_cert: - description: ValidateCert is a field of KokuMetricsConfig to represent - if the Ingress endpoint must be certificate validated. - type: boolean - type: object - type: object - required: - - spec - type: object - served: true - storage: true - subresources: - status: {} -status: - acceptedNames: - kind: "" - plural: "" - conditions: null - storedVersions: null diff --git a/koku-metrics-operator/3.1.0/manifests/koku-metrics-operator.clusterserviceversion.yaml b/koku-metrics-operator/3.1.0/manifests/koku-metrics-operator.clusterserviceversion.yaml deleted file mode 100644 index 9dc9e6569..000000000 --- a/koku-metrics-operator/3.1.0/manifests/koku-metrics-operator.clusterserviceversion.yaml +++ /dev/null @@ -1,543 +0,0 @@ -apiVersion: operators.coreos.com/v1alpha1 -kind: ClusterServiceVersion -metadata: - annotations: - alm-examples: |- - [ - { - "apiVersion": "koku-metrics-cfg.openshift.io/v1beta1", - "kind": "KokuMetricsConfig", - "metadata": { - "name": "kokumetricscfg-sample-v1beta1" - }, - "spec": { - "authentication": { - "type": "token" - }, - "packaging": { - "max_reports_to_store": 30, - "max_size_MB": 100 - }, - "prometheus_config": { - "collect_previous_data": true, - "context_timeout": 120, - "disable_metrics_collection_cost_management": false, - "disable_metrics_collection_resource_optimization": false - }, - "source": { - "check_cycle": 1440, - "create_source": false, - "name": "" - }, - "upload": { - "upload_cycle": 360, - "upload_toggle": true - } - } - } - ] - capabilities: Seamless Upgrades - categories: Monitoring - certified: "false" - containerImage: quay.io/project-koku/koku-metrics-operator@sha256:abb24dd00a1265009c0e48756a2778432f1b99c2caacc62270821f93d77c3244 - createdAt: "2023-12-06T12:25:53Z" - description: A Golang-based OpenShift Operator that generates and uploads OpenShift - usage metrics to cost management. - operatorframework.io/suggested-namespace: koku-metrics-operator - operators.openshift.io/infrastructure-features: '["Disconnected"]' - operators.operatorframework.io/builder: operator-sdk-v1.31.0 - operators.operatorframework.io/project_layout: go.kubebuilder.io/v2 - repository: https://github.com/project-koku/koku-metrics-operator - support: Cost Management - name: koku-metrics-operator.v3.1.0 - namespace: placeholder -spec: - apiservicedefinitions: {} - customresourcedefinitions: - owned: - - description: KokuMetricsConfig is the Schema for the kokumetricsconfig API - displayName: Koku Metrics Config - kind: KokuMetricsConfig - name: kokumetricsconfigs.koku-metrics-cfg.openshift.io - version: v1beta1 - description: |- - # Koku Metrics Operator - ## Introduction - The `koku-metrics-operator` is a component of the [cost managment](https://access.redhat.com/documentation/en-us/cost_management_service) service for Openshift. The operator runs on the latest supported versions of Openshift. This operator obtains OpenShift usage data by querying Prometheus every hour to create metric reports that it uploads to Cost Management at [console.redhat.com](https://console.redhat.com) to be processed. For more information, reach out to . - - This operator is capable of functioning within a disconnected/restricted network (aka air-gapped mode). In this mode, the operator will store the packaged reports for manual retrieval instead of being uploaded to Cost Management. Documentation for installing an operator within a restricted network can be found [here](https://docs.openshift.com/container-platform/latest/operators/admin/olm-restricted-networks.html). - - ## Features and Capabilities - #### Metrics collection: - The Koku Metrics Operator (`koku-metrics-operator`) collects the metrics required for Cost Management by: - * Querying Prometheus to gather the necessary metrics for Cost Management. - * Writing the results of Prometheus queries to CSV report files. - * Packaging the CSV report files into tarballs. - - #### Additional Capabilities: - * Resource Optimization metrics collection. - * The operator can be configured to gather all previous data within the configured retention period or a maximum of 90 days. The default data collection period is the 14 previous days. This setting is only applicable to newly created KokuMetricsConfigs. - * The operator can be configured to automatically upload the packaged reports to Cost Management through Red Hat Insights Ingress service. - * The operator can create an integration in console.redhat.com. An integration is required for Cost Management to process the uploaded packages. - * PersistentVolumeClaim (PVC) configuration: The KokuMetricsConfig CR can accept a PVC definition and the operator will create and mount the PVC. If one is not provided, a default PVC will be created. - * Restricted network installation: this operator can function on a restricted network. In this mode, the operator stores the packaged reports for manual retrieval. - - ## New in v3.1.0: - * Add service-account authentication type. - * __Deprecation Notice:__ Basic authentication is deprecated and will be removed in a future version of the operator. - - ## New in v3.0.0: - * Daily report generation: Operator versions prior to v3.0.0 generated sequential reports. Now, reports are generated starting at 0:00 UTC. Any payloads generated throughout a given day will contain all data starting from 0:00 UTC. Once the next day starts, the previous day's reports are packaged, and the new report again starts at 0:00 UTC for the current day. - * Failed query retry: In an attempt to prevent missing data, the operator will retry queries from the last successful query time, up to 5 times. - - ## New in v2.0.0: - * Adds metrics and report generation for resource optimization. This feature will collect additional usage metrics and create a new report in the payload. These metrics are enabled by default, but can be disabled by setting `disable_metrics_collection_resource_optimization` to `true`. - * Collect all available Prometheus data upon CR creation. This feature only applies to newly created KokuMetricsConfigs. The operator will check the monitoring stack configuration in the `openshift-monitoring` namespace. The operator will use the `retention` period set in the `cluster-monitoring-config` ConfigMap if defined, up to a maximum of 90 days. Otherwise it will fall back to collecting 14 days of data, if available. This data collection may be disabled by setting `collect_previous_data` to `false`. Turning this feature off results in the operator collecting metrics from the time the KokuMetricsConfig is created, forward. - - ## Limitations and Pre-Requisites - #### Limitations (Potential for metrics data loss) - * An integration **must** exist in console.redhat.com for an uploaded payload to be processed by Cost Management. The operator sends the payload to the Red Hat Insights Ingress service which usually returns successfully, but the operator does not currently confirm with Cost Management that the payload was processed. After Ingress accepts the uploaded payload, it is deleted from the operator. If the data within the payload is not processed, a gap will be introduced in the usage metrics. Data may be recollected by deleting the `KokuMetricsConfig`, creating a new `KokuMetricsConfig`, and setting `collect_previous_data: true`. This re-collection of data will gather all data stored in Prometheus, up to 90 days. - - **Note** The following limitations are specific to operators configured to run in a restricted network: - * The `koku-metrics-operator` will not be able to generate new reports if the PVC storage is full. If this occurs, the reports must be manually deleted from the PVC so that the operator can function as normal. - * The default report retention is 30 reports (about one week's worth of data). The reports must be manually downloaded and uploaded to console.redhat.com every week, or they will be deleted and the data will be lost. - - #### Storage configuration prerequisite - The operator will attempt to create and use the following PVC when installed: - - volume_claim_template: - apiVersion: v1 - kind: PersistentVolumeClaim - metadata: - name: koku-metrics-operator-data - spec: - accessModes: - - ReadWriteOnce - resources: - requests: - storage: 10Gi - - If a different PVC should be utilized, a valid PVC should be specified in the KokuMetricsConfig CR as described in the appropriate section below. The PVC to be used may exist already, or the operator will attempt to create it. - - To use the default specification, the follow assumptions must be met: - 1. A default StorageClass is defined. - 2. Dynamic provisioning for that default StorageClass is enabled. - - If these assumptions are not met, the operator will not deploy correctly. In these cases, storage must be manually configured. After configuring storage, a valid PVC template should be supplied in the `volume_claim_template` spec of the KokuMetricsConfig CR. - - ## Configurable parameters: - * `authentication`: - * `type: token` -> The authentication method for connecting to `console.redhat.com`. The default and preferred method is `token`. `basic` (deprecated) and `service-account` authentication methods are used when the openshift-config pull-secret does not contain a token for `console.redhat.com`. - * `secret_name` -> The Secret used by the operator when the authentication type is `basic` (deprecated) or `service-account`. This parameter is required **only if** the authentication type is `basic` (deprecated) or `service-account`. - * `packaging`: - * `max_reports_to_store: 30` -> The number of reports to store when configured in air-gapped mode. The default is 30, with a minimum of 1 and no maximum. When the operator is not configured in air-gapped mode, this parameter has no effect. Reports are removed as soon as they are uploaded. - * `max_size: 100` -> The maximum size for packaged files in Megabytes prior to compression. The default is 100, with a minimum of 1 and maximum of 100. - * `prometheus_config`: - * `collect_previous_data: true` -> Toggle for collecting all available data in Prometheus **upon KokuMetricsConfig creation** (This parameter will start to appear in KokuMetricsConfigs that were created prior to v2.0.0 but will not have any effect unless the KokuMetricsConfig is deleted and recreated). The default is `true`. The operator will first look for a `retention` period in the `cluster-monitoring-config` ConfigMap in the `openshift-monitoring` namespace and gather data over this time period up to a maximum of 90 days. If this configuration is not set, the default is 14 days. (New in v2.0.0) - * `disable_metrics_collection_cost_management: false` -> Toggle for disabling the collection of metrics for Cost Management. The default is false. (New in v2.0.0) - * `disable_metrics_collection_resource_optimization: false` -> Toggle for disabling the collection of metrics for Resource Optimization. The default is false. (New in v2.0.0) - * `context_timeout: 120` -> The time in seconds before Prometheus queries timeout due to exceeding context timeout. The default is 120, with a minimum of 10 and maximum of 180. - * `source`: - * `name: ''` -> The name of the integration the operator will create in `console.redhat.com`. If the name value is empty, the default intergration name is the **cluster id**. - * `create_source: false` -> Toggle for whether or not the operator will create the integration in `console.redhat.com`. The default is False. This parameter should be switched to True when an integration does not already exist in `console.redhat.com` for this cluster. - * `check_cycle: 1440` -> The time in minutes to wait between checking if an integration exists for this cluster. The default is 1440 minutes (24 hrs). - * `upload`: - * `upload_cycle: 360` -> The time in minutes between payload uploads. The default is 360 (6 hours). - * `upload_toggle: true` -> Toggle to turn upload on or off -> true means upload, false means do not upload (false == air-gapped mode). The default is `true`. - * `upload_wait` -> The amount of time (in seconds) to pause before uploading a payload. The default is a random number between 0 and 35. This is used to decrease service load, but may be set to `0` if desired. - * `volume_claim_template` -> see the "Storage configuration prerequisite" section above. - - ## Configure the koku-metrics-operator - **Note** There are separate instructions for configuring the `koku-metrics-operator` to run in a restricted network. - ##### Configure authentication - The default authentication for the operator is `token`. No further steps are required to configure token authentication. If `basic` (deprecated) or `service-account` is the preferred authentication method, a Secret which holds the credentials must be created: - 1. On the left navigation pane, select `Workloads` -> `Secrets` -> select Project: `koku-metrics-operator` -> `Create` -> `Key/Value Secret` - 2. Give the Secret a name and add 2 keys (all lowercase) for the respective authentication type. The values for these keys correspond to console.redhat.com credentials: - * basic auth (deprecated): `username` and `password` - * service-account auth: `client_id` and `client_secret` - - 3. Select `Create`. - ##### Create the KokuMetricsConfig - Configure the koku-metrics-operator by creating a `KokuMetricsConfig`. - 1. On the left navigation pane, select `Operators` -> `Installed Operators` -> `koku-metrics-operator` -> `KokuMetricsConfig` -> `Create Instance`. - 2. For `basic` (deprecated) or `service-account` authentication, edit the following values in the spec: - * Replace `authentication: type:` with `basic` or `service-account`. - * Add the `secret_name` field under `authentication`, and set it equal to the name of the authentication Secret that was created above. The spec should look similar to the following: - - * for basic auth type (deprecated) - ``` - authentication: - secret_name: SECRET-NAME - type: basic - ``` - - * for service-account auth type - ``` - authentication: - secret_name: SECRET-NAME - type: service-account - ``` - - 3. To configure the koku-metrics-operator to create a cost management integration, edit the following values in the `source` field: - * Replace the `name` field value with the preferred name of the integration to be created. - * Replace the `create_source` field value with `true`. - - **Note:** if the integration already exists, replace the empty string value of the `name` field with the existing name, and leave `create_source` as false. This will allow the operator to confirm that the integration exists. - - 4. If not specified, the operator will create a default PersistentVolumeClaim called `koku-metrics-operator-data` with 10Gi of storage. To configure the koku-metrics-operator to use or create a different PVC, edit the following in the spec: - * Add the desired configuration to the `volume_claim_template` field in the spec: - - ``` - volume_claim_template: - apiVersion: v1 - kind: PersistentVolumeClaim - metadata: - name: - spec: - accessModes: - - ReadWriteOnce - resources: - requests: - storage: 10Gi - ``` - - **Note:** If using the YAML View, the `volume_claim_template` field must be added to the spec - 5. Select `Create`. - - # Restricted Network Usage (disconnected/air-gapped mode) - ## Installation - To install the `koku-metrics-operator` in a restricted network, follow the [olm documentation](https://docs.openshift.com/container-platform/latest/operators/admin/olm-restricted-networks.html). The operator is found in the `community-operators` Catalog in the `registry.redhat.io/redhat/community-operator-index:latest` Index. If pruning the index before pushing to the mirrored registry, keep the `koku-metrics-operator` package. - - Within a restricted network, the operator queries prometheus to gather the necessary usage metrics, writes the query results to CSV files, and packages the reports for storage in the PVC. These reports then need to be manually downloaded from the cluster and uploaded to [console.redhat.com](https://console.redhat.com). - - ## Configure the koku-metrics-operator for a restricted network - ##### Create the KokuMetricsConfig - Configure the koku-metrics-operator by creating a `KokuMetricsConfig`. - 1. On the left navigation pane, select `Operators` -> `Installed Operators` -> `koku-metrics-operator` -> `KokuMetricsConfig` -> `Create Instance`. - 2. Specify the desired storage. If not specified, the operator will create a default Persistent Volume Claim called `koku-metrics-operator-data` with 10Gi of storage. To configure the koku-metrics-operator to use or create a different PVC, edit the following in the spec: - * Add the desired configuration to the `volume_claim_template` field in the spec (below is only a template. Any _valid_ `PersistentVolumeClaim` may be defined here): - - ``` - volume_claim_template: - apiVersion: v1 - kind: PersistentVolumeClaim - metadata: - name: - spec: - storageClassName: - accessModes: - - ReadWriteOnce - resources: - requests: - storage: 10Gi - ``` - - **Note:** If using the YAML View, the `volume_claim_template` field must be added to the spec - 3. (Optional) Specify the desired report retention. The operator will retain 30 reports by default. This corresponds to approximately one week's worth of data if using the default packaging cycle. To modify the number of retained reports: - * Change the `packaging` spec field `max_reports_to_store` to the desired number of reports to retain. Once this max number is reached, the operator will start removing the oldest packages remaining on the PVC: - - ``` - packaging: - max_size_MB: 100 - max_reports_to_store: 30 - ``` - - **Note:** The number of retained reports directly affects the frequency that reports must be manually downloaded from the PVC. Take caution in setting this to a higher number of reports, as the operator cannot write data to the PVC if the storage is full. - 4. To configure the operator to perform in a restricted network, set the `upload_toggle` to `false`: - - ``` - upload: - upload_cycle: 360 - upload_toggle: false - ``` - - 5. Select `Create`. - - ## Download reports from the Operator & clean up the PVC - If the `koku-metrics-operator` is configured to run in a restricted network, the metric reports will not automatically upload to cost managment. Instead, they need to be manually copied from the PVC for upload to [console.redhat.com](https://console.redhat.com). The default configuration saves one week of reports which means the process of downloading and uploading reports should be repeated weekly to prevent loss of metrics data. To download the reports, complete the following steps: - 1. Create the following Pod, ensuring the `claimName` matches the PVC containing the report data: - - ``` - kind: Pod - apiVersion: v1 - metadata: - name: volume-shell - namespace: koku-metrics-operator - labels: - app: koku-metrics-operator - spec: - volumes: - - name: koku-metrics-operator-reports - persistentVolumeClaim: - claimName: koku-metrics-operator-data - containers: - - name: volume-shell - image: busybox - command: ['sleep', 'infinity'] - volumeMounts: - - name: koku-metrics-operator-reports - mountPath: /tmp/koku-metrics-operator-reports - ``` - - 2. Use rsync to copy all of the files ready for upload from the PVC to a local folder: - - ``` - $ oc rsync volume-shell:/tmp/koku-metrics-operator-reports/upload local/path/to/save/folder - ``` - - 3. Once confirming that the files have been successfully copied, use rsh to connect to the pod and delete the contents of the upload folder so that they are no longer in storage: - - ``` - $ oc rsh volume-shell - $ rm /tmp/koku-metrics-operator-reports/upload/* - ``` - - 4. (Optional) Delete the pod that was used to connect to the PVC: - - ``` - $ oc delete -f volume-shell.yaml - ``` - - ## Create an Integration - In a restricted network, the `koku-metrics-operator` cannot automatically create an integration. This process must be done manually. In the console.redhat.com platform, open the [Integrations menu](https://console.redhat.com/settings/integrations/) to begin adding an OpenShift integration to Cost Management: - - Prerequisites: - * The cluster identifier which can be found in the KokuMetricsConfig CR, the cluster Overview page, or the cluster Help > About. - - Creating an integration: - 1. Navigate to the Integrations menu - 2. Select the `Red Hat` tab - 3. Create a new `Red Hat Openshift Container Platform` integration: - * give the integration a unique name - * add the Cost Management application - * add the cluster identifier - 4. In the Source wizard, review the details and click `Finish` to create the source. - - ## Upload the reports to cost managment - Uploading reports to cost managment is done through curl: - - $ curl -vvvv -F "file=@FILE_NAME.tar.gz;type=application/vnd.redhat.hccm.tar+tgz" https://console.redhat.com/api/ingress/v1/upload -u USERNAME:PASS - - where `USERNAME` and `PASS` correspond to the user credentials for [console.redhat.com](https://console.redhat.com), and `FILE_NAME` is the name of the report to upload. - - displayName: Koku Metrics Operator - icon: - - base64data: PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4KPCEtLSBHZW5lcmF0b3I6IEFkb2JlIElsbHVzdHJhdG9yIDIyLjEuMCwgU1ZHIEV4cG9ydCBQbHVnLUluIC4gU1ZHIFZlcnNpb246IDYuMDAgQnVpbGQgMCkgIC0tPgo8c3ZnIHZlcnNpb249IjEuMSIgaWQ9IkxheWVyXzEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly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g2NTg0LDEuMjYyNDk2OUwxNzQuMjgwNjM5NiwxODUuODczNjExNXoiLz4KCTwvZz4KPC9nPgo8L3N2Zz4K - mediatype: image/svg+xml - install: - spec: - clusterPermissions: - - rules: - - apiGroups: - - config.openshift.io - resources: - - clusterversions - verbs: - - get - - list - - watch - - apiGroups: - - "" - resources: - - configmaps - verbs: - - get - - list - - watch - - apiGroups: - - "" - resources: - - namespaces - verbs: - - get - - list - - watch - - apiGroups: - - "" - resources: - - secrets - verbs: - - get - - apiGroups: - - monitoring.coreos.com - resources: - - prometheuses/api - verbs: - - create - - get - - update - serviceAccountName: koku-metrics-controller-manager - deployments: - - label: - app: koku-metrics-operator - control-plane: controller-manager - name: koku-metrics-operator - spec: - replicas: 1 - selector: - matchLabels: - app: koku-metrics-operator - control-plane: controller-manager - strategy: {} - template: - metadata: - labels: - app: koku-metrics-operator - control-plane: controller-manager - spec: - containers: - - args: - - --leader-elect - command: - - /manager - env: - - name: IN_CLUSTER - value: "true" - - name: WATCH_NAMESPACE - valueFrom: - fieldRef: - fieldPath: metadata.annotations['olm.targetNamespaces'] - image: quay.io/project-koku/koku-metrics-operator@sha256:abb24dd00a1265009c0e48756a2778432f1b99c2caacc62270821f93d77c3244 - name: manager - resources: - limits: - cpu: 500m - memory: 500Mi - requests: - cpu: 100m - memory: 20Mi - terminationMessagePolicy: FallbackToLogsOnError - volumeMounts: - - mountPath: /tmp/koku-metrics-operator-reports - name: koku-metrics-operator-reports - serviceAccountName: koku-metrics-controller-manager - terminationGracePeriodSeconds: 10 - volumes: - - name: koku-metrics-operator-reports - permissions: - - rules: - - apiGroups: - - "" - resources: - - configmaps - verbs: - - get - - list - - watch - - create - - update - - patch - - delete - - apiGroups: - - "" - resources: - - configmaps/status - verbs: - - get - - update - - patch - - apiGroups: - - "" - resources: - - events - verbs: - - create - - patch - - apiGroups: - - coordination.k8s.io - resources: - - leases - verbs: - - get - - list - - watch - - create - - update - - patch - - delete - - apiGroups: - - apps - resources: - - deployments - verbs: - - get - - list - - patch - - watch - - apiGroups: - - "" - resources: - - configmaps - - endpoints - - events - - persistentvolumeclaims - - pods - - secrets - - serviceaccounts - - services - - services/finalizers - verbs: - - create - - delete - - get - - list - - patch - - update - - watch - - apiGroups: - - koku-metrics-cfg.openshift.io - resources: - - kokumetricsconfigs - verbs: - - create - - delete - - get - - list - - patch - - update - - watch - - apiGroups: - - koku-metrics-cfg.openshift.io - resources: - - kokumetricsconfigs/status - verbs: - - get - - patch - - update - - apiGroups: - - operators.coreos.com - resources: - - clusterserviceversions - verbs: - - get - - list - - patch - - update - - watch - serviceAccountName: koku-metrics-controller-manager - strategy: deployment - installModes: - - supported: true - type: OwnNamespace - - supported: true - type: SingleNamespace - - supported: false - type: MultiNamespace - - supported: false - type: AllNamespaces - relatedImages: - - name: koku-metrics-operator - image: quay.io/project-koku/koku-metrics-operator@sha256:abb24dd00a1265009c0e48756a2778432f1b99c2caacc62270821f93d77c3244 - keywords: - - cost - - management - - usage - - monitor - maintainers: - - email: costmanagement@redhat.com - name: costmanagement - maturity: alpha - provider: - name: Red Hat - replaces: koku-metrics-operator.v3.0.1 - version: 3.1.0 diff --git a/koku-metrics-operator/3.1.0/metadata/annotations.yaml b/koku-metrics-operator/3.1.0/metadata/annotations.yaml deleted file mode 100644 index f0495fab0..000000000 --- a/koku-metrics-operator/3.1.0/metadata/annotations.yaml +++ /dev/null @@ -1,15 +0,0 @@ -annotations: - # Core bundle annotations. - operators.operatorframework.io.bundle.mediatype.v1: registry+v1 - operators.operatorframework.io.bundle.manifests.v1: manifests/ - operators.operatorframework.io.bundle.metadata.v1: metadata/ - operators.operatorframework.io.bundle.package.v1: koku-metrics-operator - operators.operatorframework.io.bundle.channels.v1: alpha,beta - operators.operatorframework.io.bundle.channel.default.v1: beta - operators.operatorframework.io.metrics.builder: operator-sdk-v1.31.0 - operators.operatorframework.io.metrics.mediatype.v1: metrics+v1 - operators.operatorframework.io.metrics.project_layout: go.kubebuilder.io/v2 - - # Annotations for testing. - operators.operatorframework.io.test.mediatype.v1: scorecard+v1 - operators.operatorframework.io.test.config.v1: tests/scorecard/ diff --git a/koku-metrics-operator/3.1.0/tests/scorecard/config.yaml b/koku-metrics-operator/3.1.0/tests/scorecard/config.yaml deleted file mode 100644 index a19cb8f47..000000000 --- a/koku-metrics-operator/3.1.0/tests/scorecard/config.yaml +++ /dev/null @@ -1,40 +0,0 @@ -apiVersion: scorecard.operatorframework.io/v1alpha3 -kind: Configuration -metadata: - name: config -stages: -- parallel: true - tests: - - entrypoint: - - scorecard-test - - basic-check-spec - image: quay.io/operator-framework/scorecard-test:v1.10.1 - labels: - suite: basic - test: basic-check-spec-test - storage: - spec: - mountPath: {} - - entrypoint: - - scorecard-test - - olm-bundle-validation - image: quay.io/operator-framework/scorecard-test:v1.10.1 - labels: - suite: olm - test: olm-bundle-validation-test - storage: - spec: - mountPath: {} - - entrypoint: - - scorecard-test - - olm-crds-have-validation - image: quay.io/operator-framework/scorecard-test:v1.10.1 - labels: - suite: olm - test: olm-crds-have-validation-test - storage: - spec: - mountPath: {} -storage: - spec: - mountPath: {} diff --git a/koku-metrics-operator/3.2.0/Dockerfile b/koku-metrics-operator/3.2.0/Dockerfile deleted file mode 100644 index 40c845c69..000000000 --- a/koku-metrics-operator/3.2.0/Dockerfile +++ /dev/null @@ -1,21 +0,0 @@ -FROM scratch - -# Core bundle labels. -LABEL operators.operatorframework.io.bundle.mediatype.v1=registry+v1 -LABEL operators.operatorframework.io.bundle.manifests.v1=manifests/ -LABEL operators.operatorframework.io.bundle.metadata.v1=metadata/ -LABEL operators.operatorframework.io.bundle.package.v1=koku-metrics-operator -LABEL operators.operatorframework.io.bundle.channels.v1=alpha,beta -LABEL operators.operatorframework.io.bundle.channel.default.v1=beta -LABEL operators.operatorframework.io.metrics.builder=operator-sdk-v1.33.0 -LABEL operators.operatorframework.io.metrics.mediatype.v1=metrics+v1 -LABEL operators.operatorframework.io.metrics.project_layout=go.kubebuilder.io/v4 - -# Labels for testing. -LABEL operators.operatorframework.io.test.mediatype.v1=scorecard+v1 -LABEL operators.operatorframework.io.test.config.v1=tests/scorecard/ - -# Copy files to locations specified by labels. -COPY manifests /manifests/ -COPY metadata /metadata/ -COPY tests/scorecard /tests/scorecard/ diff --git a/koku-metrics-operator/3.2.0/manifests/koku-metrics-cfg.openshift.io_kokumetricsconfigs.yaml b/koku-metrics-operator/3.2.0/manifests/koku-metrics-cfg.openshift.io_kokumetricsconfigs.yaml deleted file mode 100644 index fb75466c1..000000000 --- a/koku-metrics-operator/3.2.0/manifests/koku-metrics-cfg.openshift.io_kokumetricsconfigs.yaml +++ /dev/null @@ -1,1056 +0,0 @@ -apiVersion: apiextensions.k8s.io/v1 -kind: CustomResourceDefinition -metadata: - annotations: - controller-gen.kubebuilder.io/version: v0.14.0 - creationTimestamp: null - labels: - app: koku-metrics-operator - name: kokumetricsconfigs.koku-metrics-cfg.openshift.io -spec: - group: koku-metrics-cfg.openshift.io - names: - kind: KokuMetricsConfig - listKind: KokuMetricsConfigList - plural: kokumetricsconfigs - singular: kokumetricsconfig - scope: Namespaced - versions: - - name: v1beta1 - schema: - openAPIV3Schema: - description: KokuMetricsConfig is the Schema for the kokumetricsconfig API - properties: - apiVersion: - description: |- - APIVersion defines the versioned schema of this representation of an object. - Servers should convert recognized schemas to the latest internal value, and - may reject unrecognized values. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources - type: string - kind: - description: |- - Kind is a string value representing the REST resource this object represents. - Servers may infer this from the endpoint the client submits requests to. - Cannot be updated. - In CamelCase. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds - type: string - metadata: - type: object - spec: - description: KokuMetricsConfigSpec defines the desired state of KokuMetricsConfig. - properties: - api_url: - default: https://console.redhat.com - description: |- - FOR DEVELOPMENT ONLY. - APIURL is a field of KokuMetricsConfig to represent the url of the API endpoint for service interaction. - The default is `https://console.redhat.com`. - type: string - authentication: - description: Authentication is a field of KokuMetricsConfig to represent - the authentication object. - properties: - secret_name: - description: AuthenticationSecretName is a field of KokuMetricsConfig - to represent the secret with the user and password used for - uploads. - type: string - token_url: - default: https://sso.redhat.com/auth/realms/redhat-external/protocol/openid-connect/token - description: |- - FOR DEVELOPMENT ONLY. - TokenURL is a field of KokuMetricsConfig to represent the endpoint used to obtain the service account token. - The default is `https://sso.redhat.com/auth/realms/redhat-external/protocol/openid-connect/token`. - type: string - type: - default: token - description: |- - AuthType is a field of KokuMetricsConfig to represent the authentication type to be used basic, service-account or token. - Valid values are: - - "basic" (deprecated) : Enables authentication using user and password from authentication secret. - - "service-account" : Enables authentication using client_id and client_secret from the secret containing service account information. - - "token" (default): Uses cluster token for authentication. - enum: - - token - - basic - - service-account - type: string - required: - - type - type: object - clusterID: - description: |- - ClusterID is a field of KokuMetricsConfig to represent the cluster UUID. Normally this value should not be - specified. Only set this value if the clusterID cannot be obtained from the ClusterVersion. - type: string - clusterVersion: - description: |- - ClusterVersion is a field of KokuMetricsConfig to represent the cluster version. Normally this value should not be - specified. Only set this value if the clusterVersion cannot be obtained from the ClusterVersion. - type: string - packaging: - description: Packaging is a field of KokuMetricsConfig to represent - the packaging object. - properties: - max_reports_to_store: - default: 30 - description: |- - MaxReports is a field of KokuMetricsConfig to represent the maximum number of reports to store. - The default is 30 reports which corresponds to approximately 7 days worth of data given the other default values. - format: int64 - minimum: 1 - type: integer - max_size_MB: - default: 100 - description: |- - MaxSize is a field of KokuMetricsConfig to represent the max file size in megabytes that will be compressed for upload to Ingress. - The default is 100. - format: int64 - maximum: 100 - minimum: 1 - type: integer - required: - - max_reports_to_store - - max_size_MB - type: object - prometheus_config: - description: PrometheusConfig is a field of KokuMetricsConfig to represent - the configuration of Prometheus connection. - properties: - collect_previous_data: - default: true - description: |- - CollectPreviousData is a field of KokuMetricsConfig to represent whether or not the operator will gather previous data upon KokuMetricsConfig - creation. This toggle only changes operator behavior when a new KokuMetricsConfig is created. When `true`, the operator will gather all - existing Prometheus data for the current month. The default is true. - type: boolean - context_timeout: - default: 120 - description: |- - ContextTimeout is a field of KokuMetricsConfig to represent how long a query to prometheus should run in seconds before timing out. - The default is 120 seconds. - format: int64 - maximum: 180 - minimum: 10 - type: integer - disable_metrics_collection_cost_management: - default: false - description: |- - DisableMetricsCollectionCostManagement is a field of KokuMetricsConfig to represent whether or not the operator will generate - reports for cost-management metrics. The default is false. - type: boolean - disable_metrics_collection_resource_optimization: - default: false - description: |- - DisableMetricsCollectionResourceOptimization is a field of KokuMetricsConfig to represent whether or not the operator will generate - reports for resource-optimization metrics. The default is false. - type: boolean - service_address: - default: https://thanos-querier.openshift-monitoring.svc:9091 - description: |- - FOR DEVELOPMENT ONLY. - SvcAddress is a field of KokuMetricsConfig to represent the thanos-querier address. - The default is `https://thanos-querier.openshift-monitoring.svc:9091`. - type: string - skip_tls_verification: - default: false - description: |- - FOR DEVELOPMENT ONLY. - SkipTLSVerification is a field of KokuMetricsConfig to represent if the thanos-querier endpoint must be certificate validated. - The default is false. - type: boolean - required: - - service_address - - skip_tls_verification - type: object - source: - description: source represents the desired integration on console.redhat.com. - properties: - check_cycle: - default: 1440 - description: |- - check_cycle is the number of minutes between each integration status check on console.redhat.com. - The default is 1440 min (24 hours). - format: int64 - minimum: 0 - type: integer - create_source: - default: false - description: create_source toggles the creation of the integration - on console.redhat.com. - type: boolean - name: - description: name is the desired name of the integration to create - on console.redhat.com. - type: string - sources_path: - default: /api/sources/v1.0/ - description: |- - FOR DEVELOPMENT ONLY. - sources_path is the prefix of the Sources API on console.redhat.com. - The default is `/api/sources/v1.0/`. - type: string - required: - - check_cycle - - create_source - - sources_path - type: object - upload: - description: Upload is a field of KokuMetricsConfig to represent the - upload object. - properties: - ingress_path: - default: /api/ingress/v1/upload - description: |- - FOR DEVELOPMENT ONLY. - IngressAPIPath is a field of KokuMetricsConfig to represent the path of the Ingress API service. - The default is `/api/ingress/v1/upload`. - type: string - upload_cycle: - default: 360 - description: |- - UploadCycle is a field of KokuMetricsConfig to represent the number of minutes between each upload schedule. - The default is 360 min (6 hours). - format: int64 - minimum: 0 - type: integer - upload_toggle: - default: true - description: |- - UploadToggle is a field of KokuMetricsConfig to represent if the operator is installed in a restricted-network. - If `false`, the operator will not upload to console.redhat.com or check/create sources. - The default is true. - type: boolean - upload_wait: - description: UploadWait is a field of KokuMetricsConfig to represent - the time to wait before sending an upload. - format: int64 - minimum: 0 - type: integer - validate_cert: - default: true - description: ValidateCert is a field of KokuMetricsConfig to represent - if the Ingress endpoint must be certificate validated. - type: boolean - required: - - ingress_path - - upload_cycle - - upload_toggle - - validate_cert - type: object - volume_claim_template: - description: VolumeClaimTemplate is a field of KokuMetricsConfig to - represent a PVC template. - properties: - apiVersion: - description: |- - APIVersion defines the versioned schema of this representation of an object. - Servers should convert recognized schemas to the latest internal value, and - may reject unrecognized values. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources - type: string - kind: - description: |- - Kind is a string value representing the REST resource this object represents. - Servers may infer this from the endpoint the client submits requests to. - Cannot be updated. - In CamelCase. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds - type: string - metadata: - description: EmbeddedMetadata contains metadata relevant to an - EmbeddedResource. - properties: - annotations: - additionalProperties: - type: string - description: |- - Annotations is an unstructured key value map stored with a resource that may be - set by external tools to store and retrieve arbitrary metadata. They are not - queryable and should be preserved when modifying objects. - More info: http://kubernetes.io/docs/user-guide/annotations - type: object - labels: - additionalProperties: - type: string - description: |- - Map of string keys and values that can be used to organize and categorize - (scope and select) objects. May match selectors of replication controllers - and services. - More info: http://kubernetes.io/docs/user-guide/labels - type: object - name: - description: |- - Name must be unique within a namespace. Is required when creating resources, although - some resources may allow a client to request the generation of an appropriate name - automatically. Name is primarily intended for creation idempotence and configuration - definition. - Cannot be updated. - More info: http://kubernetes.io/docs/user-guide/identifiers#names - type: string - type: object - spec: - description: |- - Spec defines the desired characteristics of a volume requested by a pod author. - More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims - properties: - accessModes: - description: |- - accessModes contains the desired access modes the volume should have. - More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes-1 - items: - type: string - type: array - dataSource: - description: |- - dataSource field can be used to specify either: - * An existing VolumeSnapshot object (snapshot.storage.k8s.io/VolumeSnapshot) - * An existing PVC (PersistentVolumeClaim) - If the provisioner or an external controller can support the specified data source, - it will create a new volume based on the contents of the specified data source. - When the AnyVolumeDataSource feature gate is enabled, dataSource contents will be copied to dataSourceRef, - and dataSourceRef contents will be copied to dataSource when dataSourceRef.namespace is not specified. - If the namespace is specified, then dataSourceRef will not be copied to dataSource. - properties: - apiGroup: - description: |- - APIGroup is the group for the resource being referenced. - If APIGroup is not specified, the specified Kind must be in the core API group. - For any other third-party types, APIGroup is required. - type: string - kind: - description: Kind is the type of resource being referenced - type: string - name: - description: Name is the name of resource being referenced - type: string - required: - - kind - - name - type: object - x-kubernetes-map-type: atomic - dataSourceRef: - description: |- - dataSourceRef specifies the object from which to populate the volume with data, if a non-empty - volume is desired. This may be any object from a non-empty API group (non - core object) or a PersistentVolumeClaim object. - When this field is specified, volume binding will only succeed if the type of - the specified object matches some installed volume populator or dynamic - provisioner. - This field will replace the functionality of the dataSource field and as such - if both fields are non-empty, they must have the same value. For backwards - compatibility, when namespace isn't specified in dataSourceRef, - both fields (dataSource and dataSourceRef) will be set to the same - value automatically if one of them is empty and the other is non-empty. - When namespace is specified in dataSourceRef, - dataSource isn't set to the same value and must be empty. - There are three important differences between dataSource and dataSourceRef: - * While dataSource only allows two specific types of objects, dataSourceRef - allows any non-core object, as well as PersistentVolumeClaim objects. - * While dataSource ignores disallowed values (dropping them), dataSourceRef - preserves all values, and generates an error if a disallowed value is - specified. - * While dataSource only allows local objects, dataSourceRef allows objects - in any namespaces. - (Beta) Using this field requires the AnyVolumeDataSource feature gate to be enabled. - (Alpha) Using the namespace field of dataSourceRef requires the CrossNamespaceVolumeDataSource feature gate to be enabled. - properties: - apiGroup: - description: |- - APIGroup is the group for the resource being referenced. - If APIGroup is not specified, the specified Kind must be in the core API group. - For any other third-party types, APIGroup is required. - type: string - kind: - description: Kind is the type of resource being referenced - type: string - name: - description: Name is the name of resource being referenced - type: string - namespace: - description: |- - Namespace is the namespace of resource being referenced - Note that when a namespace is specified, a gateway.networking.k8s.io/ReferenceGrant object is required in the referent namespace to allow that namespace's owner to accept the reference. See the ReferenceGrant documentation for details. - (Alpha) This field requires the CrossNamespaceVolumeDataSource feature gate to be enabled. - type: string - required: - - kind - - name - type: object - resources: - description: |- - resources represents the minimum resources the volume should have. - If RecoverVolumeExpansionFailure feature is enabled users are allowed to specify resource requirements - that are lower than previous value but must still be higher than capacity recorded in the - status field of the claim. - More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources - properties: - limits: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - description: |- - Limits describes the maximum amount of compute resources allowed. - More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ - type: object - requests: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - description: |- - Requests describes the minimum amount of compute resources required. - If Requests is omitted for a container, it defaults to Limits if that is explicitly specified, - otherwise to an implementation-defined value. Requests cannot exceed Limits. - More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ - type: object - type: object - selector: - description: selector is a label query over volumes to consider - for binding. - properties: - matchExpressions: - description: matchExpressions is a list of label selector - requirements. The requirements are ANDed. - items: - description: |- - A label selector requirement is a selector that contains values, a key, and an operator that - relates the key and values. - properties: - key: - description: key is the label key that the selector - applies to. - type: string - operator: - description: |- - operator represents a key's relationship to a set of values. - Valid operators are In, NotIn, Exists and DoesNotExist. - type: string - values: - description: |- - values is an array of string values. If the operator is In or NotIn, - the values array must be non-empty. If the operator is Exists or DoesNotExist, - the values array must be empty. This array is replaced during a strategic - merge patch. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - description: |- - matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels - map is equivalent to an element of matchExpressions, whose key field is "key", the - operator is "In", and the values array contains only "value". The requirements are ANDed. - type: object - type: object - x-kubernetes-map-type: atomic - storageClassName: - description: |- - storageClassName is the name of the StorageClass required by the claim. - More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#class-1 - type: string - volumeAttributesClassName: - description: |- - volumeAttributesClassName may be used to set the VolumeAttributesClass used by this claim. - If specified, the CSI driver will create or update the volume with the attributes defined - in the corresponding VolumeAttributesClass. This has a different purpose than storageClassName, - it can be changed after the claim is created. An empty string value means that no VolumeAttributesClass - will be applied to the claim but it's not allowed to reset this field to empty string once it is set. - If unspecified and the PersistentVolumeClaim is unbound, the default VolumeAttributesClass - will be set by the persistentvolume controller if it exists. - If the resource referred to by volumeAttributesClass does not exist, this PersistentVolumeClaim will be - set to a Pending state, as reflected by the modifyVolumeStatus field, until such as a resource - exists. - More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#volumeattributesclass - (Alpha) Using this field requires the VolumeAttributesClass feature gate to be enabled. - type: string - volumeMode: - description: |- - volumeMode defines what type of volume is required by the claim. - Value of Filesystem is implied when not included in claim spec. - type: string - volumeName: - description: volumeName is the binding reference to the PersistentVolume - backing this claim. - type: string - type: object - type: object - required: - - authentication - - packaging - - prometheus_config - - source - - upload - type: object - status: - description: KokuMetricsConfigStatus defines the observed state of KokuMetricsConfig. - properties: - api_url: - description: APIURL is a field of KokuMetricsConfig to represent the - url of the API endpoint for service interaction. - type: string - authentication: - description: Authentication is a field of KokuMetricsConfig to represent - the authentication status. - properties: - credentials_found: - description: AuthenticationCredentialsFound is a field of KokuMetricsConfig - to represent if used for uploads were found. - type: boolean - error: - description: AuthErrorMessage is a field of KokuMetricsConfig - to represent an `invalid credentials` error message. - type: string - last_credential_verification_time: - description: LastVerificationTime is a field of KokuMetricsConfig - to represent the last time credentials were verified. - format: date-time - nullable: true - type: string - secret_name: - description: AuthenticationSecretName is a field of KokuMetricsConfig - to represent the secret with the user and password used for - uploads. - type: string - token_url: - description: TokenURL is a field of KokuMetricsConfig to represent - the url used to generate a service account token. - type: string - type: - description: AuthType is a field of KokuMetricsConfig to represent - the authentication type to be used basic, service-account or - token. - enum: - - token - - basic - - service-account - type: string - valid_basic_auth: - description: ValidBasicAuth is a field of KokuMetricsConfig to - represent if the given basic auth credentials are valid. - type: boolean - type: object - clusterID: - description: ClusterID is a field of KokuMetricsConfig to represent - the cluster UUID. - type: string - clusterVersion: - description: ClusterVersion is a field of KokuMetricsConfig to represent - the cluster version. - type: string - operator_commit: - description: OperatorCommit is a field of KokuMetricsConfig that shows - the commit hash of the operator. - type: string - packaging: - description: Packaging is a field of KokuMetricsConfig to represent - the packaging status - properties: - error: - description: PackagingError is a field of KokuMetricsConfig to - represent the error encountered packaging the reports. - type: string - last_successful_packaging_time: - description: LastSuccessfulPackagingTime is a field of KokuMetricsConfig - that shows the time of the last successful file packaging. - format: date-time - nullable: true - type: string - max_reports_to_store: - description: MaxReports is a field of KokuMetricsConfig to represent - the maximum number of reports to store. - format: int64 - type: integer - max_size_MB: - description: MaxSize is a field of KokuMetricsConfig to represent - the max file size in megabytes that will be compressed for upload - to Ingress. - format: int64 - type: integer - number_reports_stored: - description: ReportCount is a field of KokuMetricsConfig to represent - the number of reports in storage. - format: int64 - type: integer - packaged_files: - description: PackagedFiles is a field of KokuMetricsConfig to - represent the list of file packages in storage. - items: - type: string - type: array - type: object - persistent_volume_claim: - description: PersistentVolumeClaim is a field of KokuMetricsConfig - to represent a PVC. - properties: - apiVersion: - description: |- - APIVersion defines the versioned schema of this representation of an object. - Servers should convert recognized schemas to the latest internal value, and - may reject unrecognized values. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources - type: string - kind: - description: |- - Kind is a string value representing the REST resource this object represents. - Servers may infer this from the endpoint the client submits requests to. - Cannot be updated. - In CamelCase. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds - type: string - metadata: - description: EmbeddedMetadata contains metadata relevant to an - EmbeddedResource. - properties: - annotations: - additionalProperties: - type: string - description: |- - Annotations is an unstructured key value map stored with a resource that may be - set by external tools to store and retrieve arbitrary metadata. They are not - queryable and should be preserved when modifying objects. - More info: http://kubernetes.io/docs/user-guide/annotations - type: object - labels: - additionalProperties: - type: string - description: |- - Map of string keys and values that can be used to organize and categorize - (scope and select) objects. May match selectors of replication controllers - and services. - More info: http://kubernetes.io/docs/user-guide/labels - type: object - name: - description: |- - Name must be unique within a namespace. Is required when creating resources, although - some resources may allow a client to request the generation of an appropriate name - automatically. Name is primarily intended for creation idempotence and configuration - definition. - Cannot be updated. - More info: http://kubernetes.io/docs/user-guide/identifiers#names - type: string - type: object - spec: - description: |- - Spec defines the desired characteristics of a volume requested by a pod author. - More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims - properties: - accessModes: - description: |- - accessModes contains the desired access modes the volume should have. - More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes-1 - items: - type: string - type: array - dataSource: - description: |- - dataSource field can be used to specify either: - * An existing VolumeSnapshot object (snapshot.storage.k8s.io/VolumeSnapshot) - * An existing PVC (PersistentVolumeClaim) - If the provisioner or an external controller can support the specified data source, - it will create a new volume based on the contents of the specified data source. - When the AnyVolumeDataSource feature gate is enabled, dataSource contents will be copied to dataSourceRef, - and dataSourceRef contents will be copied to dataSource when dataSourceRef.namespace is not specified. - If the namespace is specified, then dataSourceRef will not be copied to dataSource. - properties: - apiGroup: - description: |- - APIGroup is the group for the resource being referenced. - If APIGroup is not specified, the specified Kind must be in the core API group. - For any other third-party types, APIGroup is required. - type: string - kind: - description: Kind is the type of resource being referenced - type: string - name: - description: Name is the name of resource being referenced - type: string - required: - - kind - - name - type: object - x-kubernetes-map-type: atomic - dataSourceRef: - description: |- - dataSourceRef specifies the object from which to populate the volume with data, if a non-empty - volume is desired. This may be any object from a non-empty API group (non - core object) or a PersistentVolumeClaim object. - When this field is specified, volume binding will only succeed if the type of - the specified object matches some installed volume populator or dynamic - provisioner. - This field will replace the functionality of the dataSource field and as such - if both fields are non-empty, they must have the same value. For backwards - compatibility, when namespace isn't specified in dataSourceRef, - both fields (dataSource and dataSourceRef) will be set to the same - value automatically if one of them is empty and the other is non-empty. - When namespace is specified in dataSourceRef, - dataSource isn't set to the same value and must be empty. - There are three important differences between dataSource and dataSourceRef: - * While dataSource only allows two specific types of objects, dataSourceRef - allows any non-core object, as well as PersistentVolumeClaim objects. - * While dataSource ignores disallowed values (dropping them), dataSourceRef - preserves all values, and generates an error if a disallowed value is - specified. - * While dataSource only allows local objects, dataSourceRef allows objects - in any namespaces. - (Beta) Using this field requires the AnyVolumeDataSource feature gate to be enabled. - (Alpha) Using the namespace field of dataSourceRef requires the CrossNamespaceVolumeDataSource feature gate to be enabled. - properties: - apiGroup: - description: |- - APIGroup is the group for the resource being referenced. - If APIGroup is not specified, the specified Kind must be in the core API group. - For any other third-party types, APIGroup is required. - type: string - kind: - description: Kind is the type of resource being referenced - type: string - name: - description: Name is the name of resource being referenced - type: string - namespace: - description: |- - Namespace is the namespace of resource being referenced - Note that when a namespace is specified, a gateway.networking.k8s.io/ReferenceGrant object is required in the referent namespace to allow that namespace's owner to accept the reference. See the ReferenceGrant documentation for details. - (Alpha) This field requires the CrossNamespaceVolumeDataSource feature gate to be enabled. - type: string - required: - - kind - - name - type: object - resources: - description: |- - resources represents the minimum resources the volume should have. - If RecoverVolumeExpansionFailure feature is enabled users are allowed to specify resource requirements - that are lower than previous value but must still be higher than capacity recorded in the - status field of the claim. - More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources - properties: - limits: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - description: |- - Limits describes the maximum amount of compute resources allowed. - More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ - type: object - requests: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - description: |- - Requests describes the minimum amount of compute resources required. - If Requests is omitted for a container, it defaults to Limits if that is explicitly specified, - otherwise to an implementation-defined value. Requests cannot exceed Limits. - More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ - type: object - type: object - selector: - description: selector is a label query over volumes to consider - for binding. - properties: - matchExpressions: - description: matchExpressions is a list of label selector - requirements. The requirements are ANDed. - items: - description: |- - A label selector requirement is a selector that contains values, a key, and an operator that - relates the key and values. - properties: - key: - description: key is the label key that the selector - applies to. - type: string - operator: - description: |- - operator represents a key's relationship to a set of values. - Valid operators are In, NotIn, Exists and DoesNotExist. - type: string - values: - description: |- - values is an array of string values. If the operator is In or NotIn, - the values array must be non-empty. If the operator is Exists or DoesNotExist, - the values array must be empty. This array is replaced during a strategic - merge patch. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - description: |- - matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels - map is equivalent to an element of matchExpressions, whose key field is "key", the - operator is "In", and the values array contains only "value". The requirements are ANDed. - type: object - type: object - x-kubernetes-map-type: atomic - storageClassName: - description: |- - storageClassName is the name of the StorageClass required by the claim. - More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#class-1 - type: string - volumeAttributesClassName: - description: |- - volumeAttributesClassName may be used to set the VolumeAttributesClass used by this claim. - If specified, the CSI driver will create or update the volume with the attributes defined - in the corresponding VolumeAttributesClass. This has a different purpose than storageClassName, - it can be changed after the claim is created. An empty string value means that no VolumeAttributesClass - will be applied to the claim but it's not allowed to reset this field to empty string once it is set. - If unspecified and the PersistentVolumeClaim is unbound, the default VolumeAttributesClass - will be set by the persistentvolume controller if it exists. - If the resource referred to by volumeAttributesClass does not exist, this PersistentVolumeClaim will be - set to a Pending state, as reflected by the modifyVolumeStatus field, until such as a resource - exists. - More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#volumeattributesclass - (Alpha) Using this field requires the VolumeAttributesClass feature gate to be enabled. - type: string - volumeMode: - description: |- - volumeMode defines what type of volume is required by the claim. - Value of Filesystem is implied when not included in claim spec. - type: string - volumeName: - description: volumeName is the binding reference to the PersistentVolume - backing this claim. - type: string - type: object - type: object - prometheus: - description: Prometheus represents the status of premetheus queries. - properties: - configuration_error: - description: ConfigError is a field of KokuMetricsConfigStatus - to represent errors during prometheus configuration. - type: string - context_timeout: - description: ContextTimeout is a field of KokuMetricsConfigState - to represent how long a query to prometheus should run in seconds - before timing out. - format: int64 - type: integer - disabled_metrics_collection_cost_management: - default: false - description: |- - DisabledMetricsCollectionCostManagement is a field of KokuMetricsConfigStatus to represent whether or not collecting - cost-management metrics is disabled. The default is false. - type: boolean - disabled_metrics_collection_resource_optimization: - default: true - description: |- - DisabledMetricsCollectionResourceOptimization is a field of KokuMetricsConfigStatus to represent whether or not collecting - resource-optimzation metrics is disabled. The default is true. - type: boolean - last_query_start_time: - description: LastQueryStartTime is a field of KokuMetricsConfigStatus - to represent the last time queries were started. - format: date-time - nullable: true - type: string - last_query_success_time: - description: LastQuerySuccessTime is a field of KokuMetricsConfigStatus - to represent the last time queries were successful. - format: date-time - nullable: true - type: string - previous_data_collected: - default: false - description: |- - PreviousDataCollected is a field of KokuMetricsConfigStatus to represent whether or not the operator gathered the available Prometheus - data upon KokuMetricsConfig creation. - type: boolean - prometheus_configured: - description: PrometheusConfigured is a field of KokuMetricsConfigStatus - to represent if the operator is configured to connect to prometheus. - type: boolean - prometheus_connected: - description: PrometheusConnected is a field of KokuMetricsConfigStatus - to represent if prometheus can be queried. - type: boolean - prometheus_connection_error: - description: ConnectionError is a field of KokuMetricsConfigStatus - to represent errors during prometheus test query. - type: string - service_address: - description: SvcAddress is the internal thanos-querier address. - type: string - skip_tls_verification: - description: SkipTLSVerification is a field of KokuMetricsConfigStatus - to represent if the thanos-querier endpoint must be certificate - validated. - type: boolean - required: - - prometheus_configured - - prometheus_connected - type: object - reports: - description: Reports represents the status of report generation. - properties: - data_collected: - description: DataCollected is a field of KokuMetricsConfigStatus - to represent whether or not data was collected for the last - query. - type: boolean - data_collection_message: - description: DataCollectionMessage is a field of KokuMetricsConfigStatus - to represent a message associated with the data_collected status. - type: string - last_hour_queried: - description: LastHourQueried is a field of KokuMetricsConfigStatus - to represent the time range for which metrics were last queried. - type: string - report_month: - description: ReportMonth is a field of KokuMetricsConfigStatus - to represent the month for which reports are being generated. - type: string - type: object - source: - description: source represents the observed state of the integration - on console.redhat.com. - properties: - check_cycle: - description: |- - check_cycle is the number of minutes between each integration status check on console.redhat.com. - The default is 1440 min (24 hours). - format: int64 - type: integer - create_source: - description: |- - create_source represents the toggle used during the creation of the integration on console.redhat.com. - An Integration will not be created if upload_toggle is `false`. - type: boolean - error: - description: error represents any errors encountered when creating - the integration. - type: string - last_check_time: - description: last_check_time is the time that the last integration - status check was attempted. - format: date-time - nullable: true - type: string - name: - description: name represents the name of the integration that - the operator attempted to create on console.redhat.com. - type: string - source_defined: - description: source_defined represents whether the defined integration - name exists on console.redhat.com. - type: boolean - sources_path: - description: sources_path is the prefix of the Sources API on - console.redhat.com. - type: string - type: object - storage: - description: Storage is a field - properties: - volume_mounted: - description: VolumeMounted is a bool to indicate if storage volume - was mounted. - type: boolean - volume_type: - description: VolumeType is the string representation of the volume - type. - type: string - type: object - upload: - description: Upload is a field of KokuMetricsConfig to represent the - upload object. - properties: - error: - description: UploadError is a field of KokuMetricsConfigStatus - to represent the error encountered uploading reports. - type: string - ingress_path: - description: IngressAPIPath is a field of KokuMetricsConfig to - represent the path of the Ingress API service. - type: string - last_payload_files: - description: LastPayloadFiles is a field of KokuMetricsConfig - to represent the list of files in the last payload that was - sent. - items: - type: string - type: array - last_payload_manifest_id: - description: LastPayloadManifest is a field of KokuMetricsConfig - that shows the manifestID of the last payload. - type: string - last_payload_name: - description: LastPayloadName is a field of KokuMetricsConfig that - shows the name of the last payload file. - type: string - last_payload_request_id: - description: LastPayloadRequestID is a field of KokuMetricsConfig - that shows the insights request id of the last payload. - type: string - last_successful_upload_time: - description: LastSuccessfulUploadTime is a field of KokuMetricsConfig - that shows the time of the last successful upload. - format: date-time - nullable: true - type: string - last_upload_status: - description: LastUploadStatus is a field of KokuMetricsConfig - that shows the http status of the last upload. - type: string - upload: - description: |- - UploadToggle is a field of KokuMetricsConfig to represent if the operator should upload to console.redhat.com. - The default is true - type: boolean - upload_cycle: - description: |- - UploadCycle is a field of KokuMetricsConfig to represent the number of minutes between each upload schedule. - The default is 360 min (6 hours). - format: int64 - type: integer - upload_wait: - description: UploadWait is a field of KokuMetricsConfig to represent - the time to wait before sending an upload. - format: int64 - type: integer - validate_cert: - description: ValidateCert is a field of KokuMetricsConfig to represent - if the Ingress endpoint must be certificate validated. - type: boolean - type: object - type: object - required: - - spec - type: object - served: true - storage: true - subresources: - status: {} -status: - acceptedNames: - kind: "" - plural: "" - conditions: null - storedVersions: null diff --git a/koku-metrics-operator/3.2.0/manifests/koku-metrics-operator.clusterserviceversion.yaml b/koku-metrics-operator/3.2.0/manifests/koku-metrics-operator.clusterserviceversion.yaml deleted file mode 100644 index e36359138..000000000 --- a/koku-metrics-operator/3.2.0/manifests/koku-metrics-operator.clusterserviceversion.yaml +++ /dev/null @@ -1,604 +0,0 @@ -apiVersion: operators.coreos.com/v1alpha1 -kind: ClusterServiceVersion -metadata: - annotations: - alm-examples: |- - [ - { - "apiVersion": "koku-metrics-cfg.openshift.io/v1beta1", - "kind": "KokuMetricsConfig", - "metadata": { - "name": "kokumetricscfg-sample-v1beta1" - }, - "spec": { - "authentication": { - "type": "token" - }, - "packaging": { - "max_reports_to_store": 30, - "max_size_MB": 100 - }, - "prometheus_config": { - "collect_previous_data": true, - "context_timeout": 120, - "disable_metrics_collection_cost_management": false, - "disable_metrics_collection_resource_optimization": false - }, - "source": { - "check_cycle": 1440, - "create_source": false, - "name": "" - }, - "upload": { - "upload_cycle": 360, - "upload_toggle": true - } - } - } - ] - capabilities: Seamless Upgrades - categories: Monitoring - certified: "false" - com.redhat.openshift.versions: "4.12" - containerImage: quay.io/project-koku/koku-metrics-operator@sha256:fa59df2b2ea01274e45dd9c207fc2b86dd1dd1ee6ce54d904ead0a63120fafb8 - createdAt: "2024-02-29T15:52:18Z" - description: A Golang-based OpenShift Operator that generates and uploads OpenShift - usage metrics to cost management. - features.operators.openshift.io/disconnected: "true" - features.operators.openshift.io/fips-compliant: "false" - features.operators.openshift.io/proxy-aware: "true" - features.operators.openshift.io/tls-profiles: "false" - features.operators.openshift.io/token-auth-aws: "false" - features.operators.openshift.io/token-auth-azure: "false" - features.operators.openshift.io/token-auth-gcp: "false" - operatorframework.io/suggested-namespace: koku-metrics-operator - operators.openshift.io/infrastructure-features: '["disconnected", "proxy-aware"]' - operators.operatorframework.io/builder: operator-sdk-v1.33.0 - operators.operatorframework.io/project_layout: go.kubebuilder.io/v4 - repository: https://github.com/project-koku/koku-metrics-operator - support: Cost Management - labels: - operatorframework.io/arch.amd64: supported - operatorframework.io/arch.arm64: supported - operatorframework.io/arch.ppc64le: supported - operatorframework.io/arch.s390x: supported - operatorframework.io/os.linux: supported - name: koku-metrics-operator.v3.2.0 - namespace: placeholder -spec: - apiservicedefinitions: {} - customresourcedefinitions: - owned: - - description: KokuMetricsConfig is the Schema for the kokumetricsconfig API - displayName: Koku Metrics Config - kind: KokuMetricsConfig - name: kokumetricsconfigs.koku-metrics-cfg.openshift.io - version: v1beta1 - description: |- - # Koku Metrics Operator - ## Introduction - The `koku-metrics-operator` is a component of the [cost managment](https://access.redhat.com/documentation/en-us/cost_management_service) service for Openshift. The operator runs on the latest supported versions of Openshift. This operator obtains OpenShift usage data by querying Prometheus every hour to create metric reports that it uploads to Cost Management at [console.redhat.com](https://console.redhat.com) to be processed. For more information, reach out to . - - This operator is capable of functioning within a disconnected/restricted network (aka air-gapped mode). In this mode, the operator will store the packaged reports for manual retrieval instead of being uploaded to Cost Management. Documentation for installing an operator within a restricted network can be found [here](https://docs.openshift.com/container-platform/latest/operators/admin/olm-restricted-networks.html). - - ## Features and Capabilities - #### Metrics collection: - The Koku Metrics Operator (`koku-metrics-operator`) collects the metrics required for Cost Management by: - * Querying Prometheus to gather the necessary metrics for Cost Management. - * Writing the results of Prometheus queries to CSV report files. - * Packaging the CSV report files into tarballs. - - #### Additional Capabilities: - * Resource Optimization metrics collection. - * The operator can be configured to gather all previous data within the configured retention period or a maximum of 90 days. The default data collection period is the 14 previous days. This setting is only applicable to newly created KokuMetricsConfigs. - * The operator can be configured to automatically upload the packaged reports to Cost Management through Red Hat Insights Ingress service. - * The operator can create an integration in console.redhat.com. An integration is required for Cost Management to process the uploaded packages. - * PersistentVolumeClaim (PVC) configuration: The KokuMetricsConfig CR can accept a PVC definition and the operator will create and mount the PVC. If one is not provided, a default PVC will be created. - * Restricted network installation: this operator can function on a restricted network. In this mode, the operator stores the packaged reports for manual retrieval. - - ## New in v3.2.0: - * Support for amd64, arm64, ppc64le, s390x architectures - * add liveness and readiness probes to controller Pod - * update pod security settings so that the controller Pod can run in Restricted mode [more info](https://sdk.operatorframework.io/docs/best-practices/pod-security-standards/) - - ## New in v3.1.0: - * Add service-account authentication type. - * __Deprecation Notice:__ Basic authentication is deprecated and will be removed in a future version of the operator. - - ## New in v3.0.0: - * Daily report generation: Operator versions prior to v3.0.0 generated sequential reports. Now, reports are generated starting at 0:00 UTC. Any payloads generated throughout a given day will contain all data starting from 0:00 UTC. Once the next day starts, the previous day's reports are packaged, and the new report again starts at 0:00 UTC for the current day. - * Failed query retry: In an attempt to prevent missing data, the operator will retry queries from the last successful query time, up to 5 times. - - ## New in v2.0.0: - * Adds metrics and report generation for resource optimization. This feature will collect additional usage metrics and create a new report in the payload. These metrics are enabled by default, but can be disabled by setting `disable_metrics_collection_resource_optimization` to `true`. - * Collect all available Prometheus data upon CR creation. This feature only applies to newly created KokuMetricsConfigs. The operator will check the monitoring stack configuration in the `openshift-monitoring` namespace. The operator will use the `retention` period set in the `cluster-monitoring-config` ConfigMap if defined, up to a maximum of 90 days. Otherwise it will fall back to collecting 14 days of data, if available. This data collection may be disabled by setting `collect_previous_data` to `false`. Turning this feature off results in the operator collecting metrics from the time the KokuMetricsConfig is created, forward. - - ## Limitations and Pre-Requisites - #### Limitations (Potential for metrics data loss) - * An integration **must** exist in console.redhat.com for an uploaded payload to be processed by Cost Management. The operator sends the payload to the Red Hat Insights Ingress service which usually returns successfully, but the operator does not currently confirm with Cost Management that the payload was processed. After Ingress accepts the uploaded payload, it is deleted from the operator. If the data within the payload is not processed, a gap will be introduced in the usage metrics. Data may be recollected by deleting the `KokuMetricsConfig`, creating a new `KokuMetricsConfig`, and setting `collect_previous_data: true`. This re-collection of data will gather all data stored in Prometheus, up to 90 days. - - **Note** The following limitations are specific to operators configured to run in a restricted network: - * The `koku-metrics-operator` will not be able to generate new reports if the PVC storage is full. If this occurs, the reports must be manually deleted from the PVC so that the operator can function as normal. - * The default report retention is 30 reports (about one week's worth of data). The reports must be manually downloaded and uploaded to console.redhat.com every week, or they will be deleted and the data will be lost. - - #### Storage configuration prerequisite - The operator will attempt to create and use the following PVC when installed: - - volume_claim_template: - apiVersion: v1 - kind: PersistentVolumeClaim - metadata: - name: koku-metrics-operator-data - spec: - accessModes: - - ReadWriteOnce - resources: - requests: - storage: 10Gi - - If a different PVC should be utilized, a valid PVC should be specified in the KokuMetricsConfig CR as described in the appropriate section below. The PVC to be used may exist already, or the operator will attempt to create it. - - To use the default specification, the follow assumptions must be met: - 1. A default StorageClass is defined. - 2. Dynamic provisioning for that default StorageClass is enabled. - - If these assumptions are not met, the operator will not deploy correctly. In these cases, storage must be manually configured. After configuring storage, a valid PVC template should be supplied in the `volume_claim_template` spec of the KokuMetricsConfig CR. - - ## Configurable parameters: - * `authentication`: - * `type: token` -> The authentication method for connecting to `console.redhat.com`. The default and preferred method is `token`. `basic` (deprecated) and `service-account` authentication methods are used when the openshift-config pull-secret does not contain a token for `console.redhat.com`. - * `secret_name` -> The Secret used by the operator when the authentication type is `basic` (deprecated) or `service-account`. This parameter is required **only if** the authentication type is `basic` (deprecated) or `service-account`. - * `packaging`: - * `max_reports_to_store: 30` -> The number of reports to store when configured in air-gapped mode. The default is 30, with a minimum of 1 and no maximum. When the operator is not configured in air-gapped mode, this parameter has no effect. Reports are removed as soon as they are uploaded. - * `max_size: 100` -> The maximum size for packaged files in Megabytes prior to compression. The default is 100, with a minimum of 1 and maximum of 100. - * `prometheus_config`: - * `collect_previous_data: true` -> Toggle for collecting all available data in Prometheus **upon KokuMetricsConfig creation** (This parameter will start to appear in KokuMetricsConfigs that were created prior to v2.0.0 but will not have any effect unless the KokuMetricsConfig is deleted and recreated). The default is `true`. The operator will first look for a `retention` period in the `cluster-monitoring-config` ConfigMap in the `openshift-monitoring` namespace and gather data over this time period up to a maximum of 90 days. If this configuration is not set, the default is 14 days. (New in v2.0.0) - * `disable_metrics_collection_cost_management: false` -> Toggle for disabling the collection of metrics for Cost Management. The default is false. (New in v2.0.0) - * `disable_metrics_collection_resource_optimization: false` -> Toggle for disabling the collection of metrics for Resource Optimization. The default is false. (New in v2.0.0) - * `context_timeout: 120` -> The time in seconds before Prometheus queries timeout due to exceeding context timeout. The default is 120, with a minimum of 10 and maximum of 180. - * `source`: - * `name: ''` -> The name of the integration the operator will create in `console.redhat.com`. If the name value is empty, the default intergration name is the **cluster id**. - * `create_source: false` -> Toggle for whether or not the operator will create the integration in `console.redhat.com`. The default is False. This parameter should be switched to True when an integration does not already exist in `console.redhat.com` for this cluster. - * `check_cycle: 1440` -> The time in minutes to wait between checking if an integration exists for this cluster. The default is 1440 minutes (24 hrs). - * `upload`: - * `upload_cycle: 360` -> The time in minutes between payload uploads. The default is 360 (6 hours). - * `upload_toggle: true` -> Toggle to turn upload on or off -> true means upload, false means do not upload (false == air-gapped mode). The default is `true`. - * `upload_wait` -> The amount of time (in seconds) to pause before uploading a payload. The default is a random number between 0 and 35. This is used to decrease service load, but may be set to `0` if desired. - * `volume_claim_template` -> see the "Storage configuration prerequisite" section above. - - ## Configure the koku-metrics-operator - **Note** There are separate instructions for configuring the `koku-metrics-operator` to run in a restricted network. - ##### Configure authentication - The default authentication for the operator is `token`. No further steps are required to configure token authentication. If `basic` (deprecated) or `service-account` is the preferred authentication method, a Secret which holds the credentials must be created: - 1. On the left navigation pane, select `Workloads` -> `Secrets` -> select Project: `koku-metrics-operator` -> `Create` -> `Key/Value Secret` - 2. Give the Secret a name and add 2 keys (all lowercase) for the respective authentication type. The values for these keys correspond to console.redhat.com credentials: - * basic auth (deprecated): `username` and `password` - * service-account auth: `client_id` and `client_secret` - - 3. Select `Create`. - ##### Create the KokuMetricsConfig - Configure the koku-metrics-operator by creating a `KokuMetricsConfig`. - 1. On the left navigation pane, select `Operators` -> `Installed Operators` -> `koku-metrics-operator` -> `KokuMetricsConfig` -> `Create Instance`. - 2. For `basic` (deprecated) or `service-account` authentication, edit the following values in the spec: - * Replace `authentication: type:` with `basic` or `service-account`. - * Add the `secret_name` field under `authentication`, and set it equal to the name of the authentication Secret that was created above. The spec should look similar to the following: - - * for basic auth type (deprecated) - ``` - authentication: - secret_name: SECRET-NAME - type: basic - ``` - - * for service-account auth type - ``` - authentication: - secret_name: SECRET-NAME - type: service-account - ``` - - 3. To configure the koku-metrics-operator to create a cost management integration, edit the following values in the `source` field: - * Replace the `name` field value with the preferred name of the integration to be created. - * Replace the `create_source` field value with `true`. - - **Note:** if the integration already exists, replace the empty string value of the `name` field with the existing name, and leave `create_source` as false. This will allow the operator to confirm that the integration exists. - - 4. If not specified, the operator will create a default PersistentVolumeClaim called `koku-metrics-operator-data` with 10Gi of storage. To configure the koku-metrics-operator to use or create a different PVC, edit the following in the spec: - * Add the desired configuration to the `volume_claim_template` field in the spec: - - ``` - volume_claim_template: - apiVersion: v1 - kind: PersistentVolumeClaim - metadata: - name: - spec: - accessModes: - - ReadWriteOnce - resources: - requests: - storage: 10Gi - ``` - - **Note:** If using the YAML View, the `volume_claim_template` field must be added to the spec - 5. Select `Create`. - - # Restricted Network Usage (disconnected/air-gapped mode) - ## Installation - To install the `koku-metrics-operator` in a restricted network, follow the [olm documentation](https://docs.openshift.com/container-platform/latest/operators/admin/olm-restricted-networks.html). The operator is found in the `community-operators` Catalog in the `registry.redhat.io/redhat/community-operator-index:latest` Index. If pruning the index before pushing to the mirrored registry, keep the `koku-metrics-operator` package. - - Within a restricted network, the operator queries prometheus to gather the necessary usage metrics, writes the query results to CSV files, and packages the reports for storage in the PVC. These reports then need to be manually downloaded from the cluster and uploaded to [console.redhat.com](https://console.redhat.com). - - ## Configure the koku-metrics-operator for a restricted network - ##### Create the KokuMetricsConfig - Configure the koku-metrics-operator by creating a `KokuMetricsConfig`. - 1. On the left navigation pane, select `Operators` -> `Installed Operators` -> `koku-metrics-operator` -> `KokuMetricsConfig` -> `Create Instance`. - 2. Specify the desired storage. If not specified, the operator will create a default Persistent Volume Claim called `koku-metrics-operator-data` with 10Gi of storage. To configure the koku-metrics-operator to use or create a different PVC, edit the following in the spec: - * Add the desired configuration to the `volume_claim_template` field in the spec (below is only a template. Any _valid_ `PersistentVolumeClaim` may be defined here): - - ``` - volume_claim_template: - apiVersion: v1 - kind: PersistentVolumeClaim - metadata: - name: - spec: - storageClassName: - accessModes: - - ReadWriteOnce - resources: - requests: - storage: 10Gi - ``` - - **Note:** If using the YAML View, the `volume_claim_template` field must be added to the spec - 3. (Optional) Specify the desired report retention. The operator will retain 30 reports by default. This corresponds to approximately one week's worth of data if using the default packaging cycle. To modify the number of retained reports: - * Change the `packaging` spec field `max_reports_to_store` to the desired number of reports to retain. Once this max number is reached, the operator will start removing the oldest packages remaining on the PVC: - - ``` - packaging: - max_size_MB: 100 - max_reports_to_store: 30 - ``` - - **Note:** The number of retained reports directly affects the frequency that reports must be manually downloaded from the PVC. Take caution in setting this to a higher number of reports, as the operator cannot write data to the PVC if the storage is full. - 4. To configure the operator to perform in a restricted network, set the `upload_toggle` to `false`: - - ``` - upload: - upload_cycle: 360 - upload_toggle: false - ``` - - 5. Select `Create`. - - ## Download reports from the Operator & clean up the PVC - If the `koku-metrics-operator` is configured to run in a restricted network, the metric reports will not automatically upload to cost managment. Instead, they need to be manually copied from the PVC for upload to [console.redhat.com](https://console.redhat.com). The default configuration saves one week of reports which means the process of downloading and uploading reports should be repeated weekly to prevent loss of metrics data. To download the reports, complete the following steps: - 1. Create the following Pod, ensuring the `claimName` matches the PVC containing the report data: - - ``` - kind: Pod - apiVersion: v1 - metadata: - name: volume-shell - namespace: koku-metrics-operator - labels: - app: koku-metrics-operator - spec: - volumes: - - name: koku-metrics-operator-reports - persistentVolumeClaim: - claimName: koku-metrics-operator-data - containers: - - name: volume-shell - image: busybox - command: ['sleep', 'infinity'] - volumeMounts: - - name: koku-metrics-operator-reports - mountPath: /tmp/koku-metrics-operator-reports - ``` - - 2. Use rsync to copy all of the files ready for upload from the PVC to a local folder: - - ``` - $ oc rsync volume-shell:/tmp/koku-metrics-operator-reports/upload local/path/to/save/folder - ``` - - 3. Once confirming that the files have been successfully copied, use rsh to connect to the pod and delete the contents of the upload folder so that they are no longer in storage: - - ``` - $ oc rsh volume-shell - $ rm /tmp/koku-metrics-operator-reports/upload/* - ``` - - 4. (Optional) Delete the pod that was used to connect to the PVC: - - ``` - $ oc delete -f volume-shell.yaml - ``` - - ## Create an Integration - In a restricted network, the `koku-metrics-operator` cannot automatically create an integration. This process must be done manually. In the console.redhat.com platform, open the [Integrations menu](https://console.redhat.com/settings/integrations/) to begin adding an OpenShift integration to Cost Management: - - Prerequisites: - * The cluster identifier which can be found in the KokuMetricsConfig CR, the cluster Overview page, or the cluster Help > About. - - Creating an integration: - 1. Navigate to the Integrations menu - 2. Select the `Red Hat` tab - 3. Create a new `Red Hat Openshift Container Platform` integration: - * give the integration a unique name - * add the Cost Management application - * add the cluster identifier - 4. In the Source wizard, review the details and click `Finish` to create the source. - - ## Upload the reports to cost managment - Uploading reports to cost managment is done through curl: - - $ curl -vvvv -F "file=@FILE_NAME.tar.gz;type=application/vnd.redhat.hccm.tar+tgz" https://console.redhat.com/api/ingress/v1/upload -u USERNAME:PASS - - where `USERNAME` and `PASS` correspond to the user credentials for [console.redhat.com](https://console.redhat.com), and `FILE_NAME` is the name of the report to upload. - - displayName: Koku Metrics Operator - icon: - - base64data: PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4KPCEtLSBHZW5lcmF0b3I6IEFkb2JlIElsbHVzdHJhdG9yIDIyLjEuMCwgU1ZHIEV4cG9ydCBQbHVnLUluIC4gU1ZHIFZlcnNpb246IDYuMDAgQnVpbGQgMCkgIC0tPgo8c3ZnIHZlcnNpb249IjEuMSIgaWQ9IkxheWVyXzEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4IgoJIHZpZXdCb3g9IjAgMCAzMDAgMzAwIiBzdHlsZT0iZW5hYmxlLWJhY2tncm91bmQ6bmV3IDAgMCAzMDAgMzAwOyIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSI+CjxzdHlsZSB0eXBlPSJ0ZXh0L2NzcyI+Cgkuc3Qwe2ZpbGw6I0VFMDAwMDt9Cjwvc3R5bGU+Cjx0aXRsZT5Db3N0LWljb248L3RpdGxlPgo8ZGVzYz5DcmVhdGVkIHdpdGggU2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MTZjMC40NTYxNzY4LDAuMzgyNDQ2MywwLjcyMzQxOTIsMC44NDMyMDA3LDAuODAxNzQyNiwxLjM3NzY4NTUKCQkJYzAuMDczNzE1MiwwLjUzNDUwMDEtMC4xMTUyMDM5LDAuOTkwNjQ2NC0wLjU3MTM1MDEsMS4zNzMwNzc0bC0zLjg5ODA4NjUsNC4wMTMyNzUxCgkJCWMtMC4zMDg3MTU4LDAuMjMwMzkyNS0wLjY2ODEwNjEsMC4zODI0MzEtMS4wOTIwMTA1LDAuNDU2MTYxNWMtMC40MTkyOTYzLDAuMDc4MzIzNC0wLjgyMDE1OTksMC0xLjIwMjU5MDktMC4yMjU3NjkKCQkJYy0xLjE0MjcxNTUtMC44NDMyMDA3LTIuNDQyMDc3Ni0xLjI2MjQ5NjktMy44OTgwODY1LTEuMjYyNDk2OWgtNy42NzYzNjExYy0wLjkxNjkxNTksMC0xLjcwMDIyNTgsMC4zMjI1MjUtMi4zNDk4OTkzLDAuOTcyMjEzNwoJCQljLTAuNjQ5Njg4NywwLjY0OTY3MzUtMC45NzY4MjE5LDEuNDc0NDQxNS0wLjk3NjgyMTksMi40NjUwODc5YzAsMC42ODY1NTQsMC4yMzAzOTI1LDEuMzM2MjEyMiwwLjY5MTE0NjksMS45NDkwMzU2CgkJCWMwLjQ1NjE2MTUsMC42MTI4MjM1LDEuMDMyMTE5OCwxLjAzMjExOTgsMS43MTg2NTg0LDEuMjYyNDk2OUwxNzQuMjgwNjM5NiwxODUuODczNjExNXoiLz4KCTwvZz4KPC9nPgo8L3N2Zz4K - mediatype: image/svg+xml - install: - spec: - clusterPermissions: - - rules: - - apiGroups: - - config.openshift.io - resources: - - clusterversions - verbs: - - get - - list - - watch - - apiGroups: - - "" - resources: - - configmaps - verbs: - - get - - list - - watch - - apiGroups: - - "" - resources: - - namespaces - verbs: - - get - - list - - watch - - apiGroups: - - "" - resources: - - secrets - verbs: - - get - - apiGroups: - - monitoring.coreos.com - resources: - - prometheuses/api - verbs: - - create - - get - - update - serviceAccountName: koku-metrics-controller-manager - deployments: - - label: - app: koku-metrics-operator - control-plane: controller-manager - name: koku-metrics-operator - spec: - replicas: 1 - selector: - matchLabels: - app: koku-metrics-operator - control-plane: controller-manager - strategy: - type: Recreate - template: - metadata: - labels: - app: koku-metrics-operator - control-plane: controller-manager - spec: - affinity: - nodeAffinity: - requiredDuringSchedulingIgnoredDuringExecution: - nodeSelectorTerms: - - matchExpressions: - - key: kubernetes.io/arch - operator: In - values: - - amd64 - - arm64 - - ppc64le - - s390x - - key: kubernetes.io/os - operator: In - values: - - linux - containers: - - args: - - --leader-elect - command: - - /manager - env: - - name: IN_CLUSTER - value: "true" - - name: WATCH_NAMESPACE - valueFrom: - fieldRef: - fieldPath: metadata.annotations['olm.targetNamespaces'] - image: quay.io/project-koku/koku-metrics-operator@sha256:fa59df2b2ea01274e45dd9c207fc2b86dd1dd1ee6ce54d904ead0a63120fafb8 - livenessProbe: - httpGet: - path: /healthz - port: 8081 - initialDelaySeconds: 15 - periodSeconds: 20 - name: manager - readinessProbe: - httpGet: - path: /readyz - port: 8081 - initialDelaySeconds: 5 - periodSeconds: 10 - resources: - limits: - cpu: 500m - memory: 500Mi - requests: - cpu: 100m - memory: 20Mi - securityContext: - allowPrivilegeEscalation: false - capabilities: - drop: - - ALL - terminationMessagePolicy: FallbackToLogsOnError - volumeMounts: - - mountPath: /tmp/koku-metrics-operator-reports - name: koku-metrics-operator-reports - securityContext: - runAsNonRoot: true - seccompProfile: - type: RuntimeDefault - serviceAccountName: koku-metrics-controller-manager - terminationGracePeriodSeconds: 10 - volumes: - - name: koku-metrics-operator-reports - permissions: - - rules: - - apiGroups: - - "" - resources: - - configmaps - verbs: - - get - - list - - watch - - create - - update - - patch - - delete - - apiGroups: - - "" - resources: - - configmaps/status - verbs: - - get - - update - - patch - - apiGroups: - - "" - resources: - - events - verbs: - - create - - patch - - apiGroups: - - coordination.k8s.io - resources: - - leases - verbs: - - get - - list - - watch - - create - - update - - patch - - delete - - apiGroups: - - apps - resources: - - deployments - verbs: - - get - - list - - patch - - watch - - apiGroups: - - "" - resources: - - configmaps - - endpoints - - events - - persistentvolumeclaims - - pods - - secrets - - serviceaccounts - - services - - services/finalizers - verbs: - - create - - delete - - get - - list - - patch - - update - - watch - - apiGroups: - - koku-metrics-cfg.openshift.io - resources: - - kokumetricsconfigs - verbs: - - create - - delete - - get - - list - - patch - - update - - watch - - apiGroups: - - koku-metrics-cfg.openshift.io - resources: - - kokumetricsconfigs/status - verbs: - - get - - patch - - update - - apiGroups: - - operators.coreos.com - resources: - - clusterserviceversions - verbs: - - get - - list - - patch - - update - - watch - serviceAccountName: koku-metrics-controller-manager - strategy: deployment - installModes: - - supported: true - type: OwnNamespace - - supported: true - type: SingleNamespace - - supported: false - type: MultiNamespace - - supported: false - type: AllNamespaces - relatedImages: - - name: koku-metrics-operator - image: quay.io/project-koku/koku-metrics-operator@sha256:fa59df2b2ea01274e45dd9c207fc2b86dd1dd1ee6ce54d904ead0a63120fafb8 - keywords: - - cost - - management - - usage - - monitor - links: - - name: Koku Metrics Operator source code repository - url: https://github.com/project-koku/koku-metrics-operator - maintainers: - - email: costmanagement@redhat.com - name: costmanagement - maturity: alpha - minKubeVersion: 1.24.0 - provider: - name: Red Hat - replaces: koku-metrics-operator.v3.1.0 - version: 3.2.0 diff --git a/koku-metrics-operator/3.2.0/metadata/annotations.yaml b/koku-metrics-operator/3.2.0/metadata/annotations.yaml deleted file mode 100644 index abe94997e..000000000 --- a/koku-metrics-operator/3.2.0/metadata/annotations.yaml +++ /dev/null @@ -1,17 +0,0 @@ -annotations: - # Core bundle annotations. - operators.operatorframework.io.bundle.mediatype.v1: registry+v1 - operators.operatorframework.io.bundle.manifests.v1: manifests/ - operators.operatorframework.io.bundle.metadata.v1: metadata/ - operators.operatorframework.io.bundle.package.v1: koku-metrics-operator - operators.operatorframework.io.bundle.channels.v1: alpha,beta - operators.operatorframework.io.bundle.channel.default.v1: beta - operators.operatorframework.io.metrics.builder: operator-sdk-v1.33.0 - operators.operatorframework.io.metrics.mediatype.v1: metrics+v1 - operators.operatorframework.io.metrics.project_layout: go.kubebuilder.io/v4 - - # Annotations for testing. - operators.operatorframework.io.test.mediatype.v1: scorecard+v1 - operators.operatorframework.io.test.config.v1: tests/scorecard/ - - com.redhat.openshift.versions: "4.12" diff --git a/koku-metrics-operator/3.2.0/tests/scorecard/config.yaml b/koku-metrics-operator/3.2.0/tests/scorecard/config.yaml deleted file mode 100644 index a19cb8f47..000000000 --- a/koku-metrics-operator/3.2.0/tests/scorecard/config.yaml +++ /dev/null @@ -1,40 +0,0 @@ -apiVersion: scorecard.operatorframework.io/v1alpha3 -kind: Configuration -metadata: - name: config -stages: -- parallel: true - tests: - - entrypoint: - - scorecard-test - - basic-check-spec - image: quay.io/operator-framework/scorecard-test:v1.10.1 - labels: - suite: basic - test: basic-check-spec-test - storage: - spec: - mountPath: {} - - entrypoint: - - scorecard-test - - olm-bundle-validation - image: quay.io/operator-framework/scorecard-test:v1.10.1 - labels: - suite: olm - test: olm-bundle-validation-test - storage: - spec: - mountPath: {} - - entrypoint: - - scorecard-test - - olm-crds-have-validation - image: quay.io/operator-framework/scorecard-test:v1.10.1 - labels: - suite: olm - test: olm-crds-have-validation-test - storage: - spec: - mountPath: {} -storage: - spec: - mountPath: {} diff --git a/koku-metrics-operator/3.2.1/Dockerfile b/koku-metrics-operator/3.2.1/Dockerfile deleted file mode 100644 index 40c845c69..000000000 --- a/koku-metrics-operator/3.2.1/Dockerfile +++ /dev/null @@ -1,21 +0,0 @@ -FROM scratch - -# Core bundle labels. -LABEL operators.operatorframework.io.bundle.mediatype.v1=registry+v1 -LABEL operators.operatorframework.io.bundle.manifests.v1=manifests/ -LABEL operators.operatorframework.io.bundle.metadata.v1=metadata/ -LABEL operators.operatorframework.io.bundle.package.v1=koku-metrics-operator -LABEL operators.operatorframework.io.bundle.channels.v1=alpha,beta -LABEL operators.operatorframework.io.bundle.channel.default.v1=beta -LABEL operators.operatorframework.io.metrics.builder=operator-sdk-v1.33.0 -LABEL operators.operatorframework.io.metrics.mediatype.v1=metrics+v1 -LABEL operators.operatorframework.io.metrics.project_layout=go.kubebuilder.io/v4 - -# Labels for testing. -LABEL operators.operatorframework.io.test.mediatype.v1=scorecard+v1 -LABEL operators.operatorframework.io.test.config.v1=tests/scorecard/ - -# Copy files to locations specified by labels. -COPY manifests /manifests/ -COPY metadata /metadata/ -COPY tests/scorecard /tests/scorecard/ diff --git a/koku-metrics-operator/3.2.1/manifests/koku-metrics-cfg.openshift.io_kokumetricsconfigs.yaml b/koku-metrics-operator/3.2.1/manifests/koku-metrics-cfg.openshift.io_kokumetricsconfigs.yaml deleted file mode 100644 index fb75466c1..000000000 --- a/koku-metrics-operator/3.2.1/manifests/koku-metrics-cfg.openshift.io_kokumetricsconfigs.yaml +++ /dev/null @@ -1,1056 +0,0 @@ -apiVersion: apiextensions.k8s.io/v1 -kind: CustomResourceDefinition -metadata: - annotations: - controller-gen.kubebuilder.io/version: v0.14.0 - creationTimestamp: null - labels: - app: koku-metrics-operator - name: kokumetricsconfigs.koku-metrics-cfg.openshift.io -spec: - group: koku-metrics-cfg.openshift.io - names: - kind: KokuMetricsConfig - listKind: KokuMetricsConfigList - plural: kokumetricsconfigs - singular: kokumetricsconfig - scope: Namespaced - versions: - - name: v1beta1 - schema: - openAPIV3Schema: - description: KokuMetricsConfig is the Schema for the kokumetricsconfig API - properties: - apiVersion: - description: |- - APIVersion defines the versioned schema of this representation of an object. - Servers should convert recognized schemas to the latest internal value, and - may reject unrecognized values. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources - type: string - kind: - description: |- - Kind is a string value representing the REST resource this object represents. - Servers may infer this from the endpoint the client submits requests to. - Cannot be updated. - In CamelCase. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds - type: string - metadata: - type: object - spec: - description: KokuMetricsConfigSpec defines the desired state of KokuMetricsConfig. - properties: - api_url: - default: https://console.redhat.com - description: |- - FOR DEVELOPMENT ONLY. - APIURL is a field of KokuMetricsConfig to represent the url of the API endpoint for service interaction. - The default is `https://console.redhat.com`. - type: string - authentication: - description: Authentication is a field of KokuMetricsConfig to represent - the authentication object. - properties: - secret_name: - description: AuthenticationSecretName is a field of KokuMetricsConfig - to represent the secret with the user and password used for - uploads. - type: string - token_url: - default: https://sso.redhat.com/auth/realms/redhat-external/protocol/openid-connect/token - description: |- - FOR DEVELOPMENT ONLY. - TokenURL is a field of KokuMetricsConfig to represent the endpoint used to obtain the service account token. - The default is `https://sso.redhat.com/auth/realms/redhat-external/protocol/openid-connect/token`. - type: string - type: - default: token - description: |- - AuthType is a field of KokuMetricsConfig to represent the authentication type to be used basic, service-account or token. - Valid values are: - - "basic" (deprecated) : Enables authentication using user and password from authentication secret. - - "service-account" : Enables authentication using client_id and client_secret from the secret containing service account information. - - "token" (default): Uses cluster token for authentication. - enum: - - token - - basic - - service-account - type: string - required: - - type - type: object - clusterID: - description: |- - ClusterID is a field of KokuMetricsConfig to represent the cluster UUID. Normally this value should not be - specified. Only set this value if the clusterID cannot be obtained from the ClusterVersion. - type: string - clusterVersion: - description: |- - ClusterVersion is a field of KokuMetricsConfig to represent the cluster version. Normally this value should not be - specified. Only set this value if the clusterVersion cannot be obtained from the ClusterVersion. - type: string - packaging: - description: Packaging is a field of KokuMetricsConfig to represent - the packaging object. - properties: - max_reports_to_store: - default: 30 - description: |- - MaxReports is a field of KokuMetricsConfig to represent the maximum number of reports to store. - The default is 30 reports which corresponds to approximately 7 days worth of data given the other default values. - format: int64 - minimum: 1 - type: integer - max_size_MB: - default: 100 - description: |- - MaxSize is a field of KokuMetricsConfig to represent the max file size in megabytes that will be compressed for upload to Ingress. - The default is 100. - format: int64 - maximum: 100 - minimum: 1 - type: integer - required: - - max_reports_to_store - - max_size_MB - type: object - prometheus_config: - description: PrometheusConfig is a field of KokuMetricsConfig to represent - the configuration of Prometheus connection. - properties: - collect_previous_data: - default: true - description: |- - CollectPreviousData is a field of KokuMetricsConfig to represent whether or not the operator will gather previous data upon KokuMetricsConfig - creation. This toggle only changes operator behavior when a new KokuMetricsConfig is created. When `true`, the operator will gather all - existing Prometheus data for the current month. The default is true. - type: boolean - context_timeout: - default: 120 - description: |- - ContextTimeout is a field of KokuMetricsConfig to represent how long a query to prometheus should run in seconds before timing out. - The default is 120 seconds. - format: int64 - maximum: 180 - minimum: 10 - type: integer - disable_metrics_collection_cost_management: - default: false - description: |- - DisableMetricsCollectionCostManagement is a field of KokuMetricsConfig to represent whether or not the operator will generate - reports for cost-management metrics. The default is false. - type: boolean - disable_metrics_collection_resource_optimization: - default: false - description: |- - DisableMetricsCollectionResourceOptimization is a field of KokuMetricsConfig to represent whether or not the operator will generate - reports for resource-optimization metrics. The default is false. - type: boolean - service_address: - default: https://thanos-querier.openshift-monitoring.svc:9091 - description: |- - FOR DEVELOPMENT ONLY. - SvcAddress is a field of KokuMetricsConfig to represent the thanos-querier address. - The default is `https://thanos-querier.openshift-monitoring.svc:9091`. - type: string - skip_tls_verification: - default: false - description: |- - FOR DEVELOPMENT ONLY. - SkipTLSVerification is a field of KokuMetricsConfig to represent if the thanos-querier endpoint must be certificate validated. - The default is false. - type: boolean - required: - - service_address - - skip_tls_verification - type: object - source: - description: source represents the desired integration on console.redhat.com. - properties: - check_cycle: - default: 1440 - description: |- - check_cycle is the number of minutes between each integration status check on console.redhat.com. - The default is 1440 min (24 hours). - format: int64 - minimum: 0 - type: integer - create_source: - default: false - description: create_source toggles the creation of the integration - on console.redhat.com. - type: boolean - name: - description: name is the desired name of the integration to create - on console.redhat.com. - type: string - sources_path: - default: /api/sources/v1.0/ - description: |- - FOR DEVELOPMENT ONLY. - sources_path is the prefix of the Sources API on console.redhat.com. - The default is `/api/sources/v1.0/`. - type: string - required: - - check_cycle - - create_source - - sources_path - type: object - upload: - description: Upload is a field of KokuMetricsConfig to represent the - upload object. - properties: - ingress_path: - default: /api/ingress/v1/upload - description: |- - FOR DEVELOPMENT ONLY. - IngressAPIPath is a field of KokuMetricsConfig to represent the path of the Ingress API service. - The default is `/api/ingress/v1/upload`. - type: string - upload_cycle: - default: 360 - description: |- - UploadCycle is a field of KokuMetricsConfig to represent the number of minutes between each upload schedule. - The default is 360 min (6 hours). - format: int64 - minimum: 0 - type: integer - upload_toggle: - default: true - description: |- - UploadToggle is a field of KokuMetricsConfig to represent if the operator is installed in a restricted-network. - If `false`, the operator will not upload to console.redhat.com or check/create sources. - The default is true. - type: boolean - upload_wait: - description: UploadWait is a field of KokuMetricsConfig to represent - the time to wait before sending an upload. - format: int64 - minimum: 0 - type: integer - validate_cert: - default: true - description: ValidateCert is a field of KokuMetricsConfig to represent - if the Ingress endpoint must be certificate validated. - type: boolean - required: - - ingress_path - - upload_cycle - - upload_toggle - - validate_cert - type: object - volume_claim_template: - description: VolumeClaimTemplate is a field of KokuMetricsConfig to - represent a PVC template. - properties: - apiVersion: - description: |- - APIVersion defines the versioned schema of this representation of an object. - Servers should convert recognized schemas to the latest internal value, and - may reject unrecognized values. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources - type: string - kind: - description: |- - Kind is a string value representing the REST resource this object represents. - Servers may infer this from the endpoint the client submits requests to. - Cannot be updated. - In CamelCase. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds - type: string - metadata: - description: EmbeddedMetadata contains metadata relevant to an - EmbeddedResource. - properties: - annotations: - additionalProperties: - type: string - description: |- - Annotations is an unstructured key value map stored with a resource that may be - set by external tools to store and retrieve arbitrary metadata. They are not - queryable and should be preserved when modifying objects. - More info: http://kubernetes.io/docs/user-guide/annotations - type: object - labels: - additionalProperties: - type: string - description: |- - Map of string keys and values that can be used to organize and categorize - (scope and select) objects. May match selectors of replication controllers - and services. - More info: http://kubernetes.io/docs/user-guide/labels - type: object - name: - description: |- - Name must be unique within a namespace. Is required when creating resources, although - some resources may allow a client to request the generation of an appropriate name - automatically. Name is primarily intended for creation idempotence and configuration - definition. - Cannot be updated. - More info: http://kubernetes.io/docs/user-guide/identifiers#names - type: string - type: object - spec: - description: |- - Spec defines the desired characteristics of a volume requested by a pod author. - More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims - properties: - accessModes: - description: |- - accessModes contains the desired access modes the volume should have. - More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes-1 - items: - type: string - type: array - dataSource: - description: |- - dataSource field can be used to specify either: - * An existing VolumeSnapshot object (snapshot.storage.k8s.io/VolumeSnapshot) - * An existing PVC (PersistentVolumeClaim) - If the provisioner or an external controller can support the specified data source, - it will create a new volume based on the contents of the specified data source. - When the AnyVolumeDataSource feature gate is enabled, dataSource contents will be copied to dataSourceRef, - and dataSourceRef contents will be copied to dataSource when dataSourceRef.namespace is not specified. - If the namespace is specified, then dataSourceRef will not be copied to dataSource. - properties: - apiGroup: - description: |- - APIGroup is the group for the resource being referenced. - If APIGroup is not specified, the specified Kind must be in the core API group. - For any other third-party types, APIGroup is required. - type: string - kind: - description: Kind is the type of resource being referenced - type: string - name: - description: Name is the name of resource being referenced - type: string - required: - - kind - - name - type: object - x-kubernetes-map-type: atomic - dataSourceRef: - description: |- - dataSourceRef specifies the object from which to populate the volume with data, if a non-empty - volume is desired. This may be any object from a non-empty API group (non - core object) or a PersistentVolumeClaim object. - When this field is specified, volume binding will only succeed if the type of - the specified object matches some installed volume populator or dynamic - provisioner. - This field will replace the functionality of the dataSource field and as such - if both fields are non-empty, they must have the same value. For backwards - compatibility, when namespace isn't specified in dataSourceRef, - both fields (dataSource and dataSourceRef) will be set to the same - value automatically if one of them is empty and the other is non-empty. - When namespace is specified in dataSourceRef, - dataSource isn't set to the same value and must be empty. - There are three important differences between dataSource and dataSourceRef: - * While dataSource only allows two specific types of objects, dataSourceRef - allows any non-core object, as well as PersistentVolumeClaim objects. - * While dataSource ignores disallowed values (dropping them), dataSourceRef - preserves all values, and generates an error if a disallowed value is - specified. - * While dataSource only allows local objects, dataSourceRef allows objects - in any namespaces. - (Beta) Using this field requires the AnyVolumeDataSource feature gate to be enabled. - (Alpha) Using the namespace field of dataSourceRef requires the CrossNamespaceVolumeDataSource feature gate to be enabled. - properties: - apiGroup: - description: |- - APIGroup is the group for the resource being referenced. - If APIGroup is not specified, the specified Kind must be in the core API group. - For any other third-party types, APIGroup is required. - type: string - kind: - description: Kind is the type of resource being referenced - type: string - name: - description: Name is the name of resource being referenced - type: string - namespace: - description: |- - Namespace is the namespace of resource being referenced - Note that when a namespace is specified, a gateway.networking.k8s.io/ReferenceGrant object is required in the referent namespace to allow that namespace's owner to accept the reference. See the ReferenceGrant documentation for details. - (Alpha) This field requires the CrossNamespaceVolumeDataSource feature gate to be enabled. - type: string - required: - - kind - - name - type: object - resources: - description: |- - resources represents the minimum resources the volume should have. - If RecoverVolumeExpansionFailure feature is enabled users are allowed to specify resource requirements - that are lower than previous value but must still be higher than capacity recorded in the - status field of the claim. - More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources - properties: - limits: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - description: |- - Limits describes the maximum amount of compute resources allowed. - More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ - type: object - requests: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - description: |- - Requests describes the minimum amount of compute resources required. - If Requests is omitted for a container, it defaults to Limits if that is explicitly specified, - otherwise to an implementation-defined value. Requests cannot exceed Limits. - More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ - type: object - type: object - selector: - description: selector is a label query over volumes to consider - for binding. - properties: - matchExpressions: - description: matchExpressions is a list of label selector - requirements. The requirements are ANDed. - items: - description: |- - A label selector requirement is a selector that contains values, a key, and an operator that - relates the key and values. - properties: - key: - description: key is the label key that the selector - applies to. - type: string - operator: - description: |- - operator represents a key's relationship to a set of values. - Valid operators are In, NotIn, Exists and DoesNotExist. - type: string - values: - description: |- - values is an array of string values. If the operator is In or NotIn, - the values array must be non-empty. If the operator is Exists or DoesNotExist, - the values array must be empty. This array is replaced during a strategic - merge patch. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - description: |- - matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels - map is equivalent to an element of matchExpressions, whose key field is "key", the - operator is "In", and the values array contains only "value". The requirements are ANDed. - type: object - type: object - x-kubernetes-map-type: atomic - storageClassName: - description: |- - storageClassName is the name of the StorageClass required by the claim. - More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#class-1 - type: string - volumeAttributesClassName: - description: |- - volumeAttributesClassName may be used to set the VolumeAttributesClass used by this claim. - If specified, the CSI driver will create or update the volume with the attributes defined - in the corresponding VolumeAttributesClass. This has a different purpose than storageClassName, - it can be changed after the claim is created. An empty string value means that no VolumeAttributesClass - will be applied to the claim but it's not allowed to reset this field to empty string once it is set. - If unspecified and the PersistentVolumeClaim is unbound, the default VolumeAttributesClass - will be set by the persistentvolume controller if it exists. - If the resource referred to by volumeAttributesClass does not exist, this PersistentVolumeClaim will be - set to a Pending state, as reflected by the modifyVolumeStatus field, until such as a resource - exists. - More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#volumeattributesclass - (Alpha) Using this field requires the VolumeAttributesClass feature gate to be enabled. - type: string - volumeMode: - description: |- - volumeMode defines what type of volume is required by the claim. - Value of Filesystem is implied when not included in claim spec. - type: string - volumeName: - description: volumeName is the binding reference to the PersistentVolume - backing this claim. - type: string - type: object - type: object - required: - - authentication - - packaging - - prometheus_config - - source - - upload - type: object - status: - description: KokuMetricsConfigStatus defines the observed state of KokuMetricsConfig. - properties: - api_url: - description: APIURL is a field of KokuMetricsConfig to represent the - url of the API endpoint for service interaction. - type: string - authentication: - description: Authentication is a field of KokuMetricsConfig to represent - the authentication status. - properties: - credentials_found: - description: AuthenticationCredentialsFound is a field of KokuMetricsConfig - to represent if used for uploads were found. - type: boolean - error: - description: AuthErrorMessage is a field of KokuMetricsConfig - to represent an `invalid credentials` error message. - type: string - last_credential_verification_time: - description: LastVerificationTime is a field of KokuMetricsConfig - to represent the last time credentials were verified. - format: date-time - nullable: true - type: string - secret_name: - description: AuthenticationSecretName is a field of KokuMetricsConfig - to represent the secret with the user and password used for - uploads. - type: string - token_url: - description: TokenURL is a field of KokuMetricsConfig to represent - the url used to generate a service account token. - type: string - type: - description: AuthType is a field of KokuMetricsConfig to represent - the authentication type to be used basic, service-account or - token. - enum: - - token - - basic - - service-account - type: string - valid_basic_auth: - description: ValidBasicAuth is a field of KokuMetricsConfig to - represent if the given basic auth credentials are valid. - type: boolean - type: object - clusterID: - description: ClusterID is a field of KokuMetricsConfig to represent - the cluster UUID. - type: string - clusterVersion: - description: ClusterVersion is a field of KokuMetricsConfig to represent - the cluster version. - type: string - operator_commit: - description: OperatorCommit is a field of KokuMetricsConfig that shows - the commit hash of the operator. - type: string - packaging: - description: Packaging is a field of KokuMetricsConfig to represent - the packaging status - properties: - error: - description: PackagingError is a field of KokuMetricsConfig to - represent the error encountered packaging the reports. - type: string - last_successful_packaging_time: - description: LastSuccessfulPackagingTime is a field of KokuMetricsConfig - that shows the time of the last successful file packaging. - format: date-time - nullable: true - type: string - max_reports_to_store: - description: MaxReports is a field of KokuMetricsConfig to represent - the maximum number of reports to store. - format: int64 - type: integer - max_size_MB: - description: MaxSize is a field of KokuMetricsConfig to represent - the max file size in megabytes that will be compressed for upload - to Ingress. - format: int64 - type: integer - number_reports_stored: - description: ReportCount is a field of KokuMetricsConfig to represent - the number of reports in storage. - format: int64 - type: integer - packaged_files: - description: PackagedFiles is a field of KokuMetricsConfig to - represent the list of file packages in storage. - items: - type: string - type: array - type: object - persistent_volume_claim: - description: PersistentVolumeClaim is a field of KokuMetricsConfig - to represent a PVC. - properties: - apiVersion: - description: |- - APIVersion defines the versioned schema of this representation of an object. - Servers should convert recognized schemas to the latest internal value, and - may reject unrecognized values. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources - type: string - kind: - description: |- - Kind is a string value representing the REST resource this object represents. - Servers may infer this from the endpoint the client submits requests to. - Cannot be updated. - In CamelCase. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds - type: string - metadata: - description: EmbeddedMetadata contains metadata relevant to an - EmbeddedResource. - properties: - annotations: - additionalProperties: - type: string - description: |- - Annotations is an unstructured key value map stored with a resource that may be - set by external tools to store and retrieve arbitrary metadata. They are not - queryable and should be preserved when modifying objects. - More info: http://kubernetes.io/docs/user-guide/annotations - type: object - labels: - additionalProperties: - type: string - description: |- - Map of string keys and values that can be used to organize and categorize - (scope and select) objects. May match selectors of replication controllers - and services. - More info: http://kubernetes.io/docs/user-guide/labels - type: object - name: - description: |- - Name must be unique within a namespace. Is required when creating resources, although - some resources may allow a client to request the generation of an appropriate name - automatically. Name is primarily intended for creation idempotence and configuration - definition. - Cannot be updated. - More info: http://kubernetes.io/docs/user-guide/identifiers#names - type: string - type: object - spec: - description: |- - Spec defines the desired characteristics of a volume requested by a pod author. - More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims - properties: - accessModes: - description: |- - accessModes contains the desired access modes the volume should have. - More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes-1 - items: - type: string - type: array - dataSource: - description: |- - dataSource field can be used to specify either: - * An existing VolumeSnapshot object (snapshot.storage.k8s.io/VolumeSnapshot) - * An existing PVC (PersistentVolumeClaim) - If the provisioner or an external controller can support the specified data source, - it will create a new volume based on the contents of the specified data source. - When the AnyVolumeDataSource feature gate is enabled, dataSource contents will be copied to dataSourceRef, - and dataSourceRef contents will be copied to dataSource when dataSourceRef.namespace is not specified. - If the namespace is specified, then dataSourceRef will not be copied to dataSource. - properties: - apiGroup: - description: |- - APIGroup is the group for the resource being referenced. - If APIGroup is not specified, the specified Kind must be in the core API group. - For any other third-party types, APIGroup is required. - type: string - kind: - description: Kind is the type of resource being referenced - type: string - name: - description: Name is the name of resource being referenced - type: string - required: - - kind - - name - type: object - x-kubernetes-map-type: atomic - dataSourceRef: - description: |- - dataSourceRef specifies the object from which to populate the volume with data, if a non-empty - volume is desired. This may be any object from a non-empty API group (non - core object) or a PersistentVolumeClaim object. - When this field is specified, volume binding will only succeed if the type of - the specified object matches some installed volume populator or dynamic - provisioner. - This field will replace the functionality of the dataSource field and as such - if both fields are non-empty, they must have the same value. For backwards - compatibility, when namespace isn't specified in dataSourceRef, - both fields (dataSource and dataSourceRef) will be set to the same - value automatically if one of them is empty and the other is non-empty. - When namespace is specified in dataSourceRef, - dataSource isn't set to the same value and must be empty. - There are three important differences between dataSource and dataSourceRef: - * While dataSource only allows two specific types of objects, dataSourceRef - allows any non-core object, as well as PersistentVolumeClaim objects. - * While dataSource ignores disallowed values (dropping them), dataSourceRef - preserves all values, and generates an error if a disallowed value is - specified. - * While dataSource only allows local objects, dataSourceRef allows objects - in any namespaces. - (Beta) Using this field requires the AnyVolumeDataSource feature gate to be enabled. - (Alpha) Using the namespace field of dataSourceRef requires the CrossNamespaceVolumeDataSource feature gate to be enabled. - properties: - apiGroup: - description: |- - APIGroup is the group for the resource being referenced. - If APIGroup is not specified, the specified Kind must be in the core API group. - For any other third-party types, APIGroup is required. - type: string - kind: - description: Kind is the type of resource being referenced - type: string - name: - description: Name is the name of resource being referenced - type: string - namespace: - description: |- - Namespace is the namespace of resource being referenced - Note that when a namespace is specified, a gateway.networking.k8s.io/ReferenceGrant object is required in the referent namespace to allow that namespace's owner to accept the reference. See the ReferenceGrant documentation for details. - (Alpha) This field requires the CrossNamespaceVolumeDataSource feature gate to be enabled. - type: string - required: - - kind - - name - type: object - resources: - description: |- - resources represents the minimum resources the volume should have. - If RecoverVolumeExpansionFailure feature is enabled users are allowed to specify resource requirements - that are lower than previous value but must still be higher than capacity recorded in the - status field of the claim. - More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources - properties: - limits: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - description: |- - Limits describes the maximum amount of compute resources allowed. - More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ - type: object - requests: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - description: |- - Requests describes the minimum amount of compute resources required. - If Requests is omitted for a container, it defaults to Limits if that is explicitly specified, - otherwise to an implementation-defined value. Requests cannot exceed Limits. - More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ - type: object - type: object - selector: - description: selector is a label query over volumes to consider - for binding. - properties: - matchExpressions: - description: matchExpressions is a list of label selector - requirements. The requirements are ANDed. - items: - description: |- - A label selector requirement is a selector that contains values, a key, and an operator that - relates the key and values. - properties: - key: - description: key is the label key that the selector - applies to. - type: string - operator: - description: |- - operator represents a key's relationship to a set of values. - Valid operators are In, NotIn, Exists and DoesNotExist. - type: string - values: - description: |- - values is an array of string values. If the operator is In or NotIn, - the values array must be non-empty. If the operator is Exists or DoesNotExist, - the values array must be empty. This array is replaced during a strategic - merge patch. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - description: |- - matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels - map is equivalent to an element of matchExpressions, whose key field is "key", the - operator is "In", and the values array contains only "value". The requirements are ANDed. - type: object - type: object - x-kubernetes-map-type: atomic - storageClassName: - description: |- - storageClassName is the name of the StorageClass required by the claim. - More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#class-1 - type: string - volumeAttributesClassName: - description: |- - volumeAttributesClassName may be used to set the VolumeAttributesClass used by this claim. - If specified, the CSI driver will create or update the volume with the attributes defined - in the corresponding VolumeAttributesClass. This has a different purpose than storageClassName, - it can be changed after the claim is created. An empty string value means that no VolumeAttributesClass - will be applied to the claim but it's not allowed to reset this field to empty string once it is set. - If unspecified and the PersistentVolumeClaim is unbound, the default VolumeAttributesClass - will be set by the persistentvolume controller if it exists. - If the resource referred to by volumeAttributesClass does not exist, this PersistentVolumeClaim will be - set to a Pending state, as reflected by the modifyVolumeStatus field, until such as a resource - exists. - More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#volumeattributesclass - (Alpha) Using this field requires the VolumeAttributesClass feature gate to be enabled. - type: string - volumeMode: - description: |- - volumeMode defines what type of volume is required by the claim. - Value of Filesystem is implied when not included in claim spec. - type: string - volumeName: - description: volumeName is the binding reference to the PersistentVolume - backing this claim. - type: string - type: object - type: object - prometheus: - description: Prometheus represents the status of premetheus queries. - properties: - configuration_error: - description: ConfigError is a field of KokuMetricsConfigStatus - to represent errors during prometheus configuration. - type: string - context_timeout: - description: ContextTimeout is a field of KokuMetricsConfigState - to represent how long a query to prometheus should run in seconds - before timing out. - format: int64 - type: integer - disabled_metrics_collection_cost_management: - default: false - description: |- - DisabledMetricsCollectionCostManagement is a field of KokuMetricsConfigStatus to represent whether or not collecting - cost-management metrics is disabled. The default is false. - type: boolean - disabled_metrics_collection_resource_optimization: - default: true - description: |- - DisabledMetricsCollectionResourceOptimization is a field of KokuMetricsConfigStatus to represent whether or not collecting - resource-optimzation metrics is disabled. The default is true. - type: boolean - last_query_start_time: - description: LastQueryStartTime is a field of KokuMetricsConfigStatus - to represent the last time queries were started. - format: date-time - nullable: true - type: string - last_query_success_time: - description: LastQuerySuccessTime is a field of KokuMetricsConfigStatus - to represent the last time queries were successful. - format: date-time - nullable: true - type: string - previous_data_collected: - default: false - description: |- - PreviousDataCollected is a field of KokuMetricsConfigStatus to represent whether or not the operator gathered the available Prometheus - data upon KokuMetricsConfig creation. - type: boolean - prometheus_configured: - description: PrometheusConfigured is a field of KokuMetricsConfigStatus - to represent if the operator is configured to connect to prometheus. - type: boolean - prometheus_connected: - description: PrometheusConnected is a field of KokuMetricsConfigStatus - to represent if prometheus can be queried. - type: boolean - prometheus_connection_error: - description: ConnectionError is a field of KokuMetricsConfigStatus - to represent errors during prometheus test query. - type: string - service_address: - description: SvcAddress is the internal thanos-querier address. - type: string - skip_tls_verification: - description: SkipTLSVerification is a field of KokuMetricsConfigStatus - to represent if the thanos-querier endpoint must be certificate - validated. - type: boolean - required: - - prometheus_configured - - prometheus_connected - type: object - reports: - description: Reports represents the status of report generation. - properties: - data_collected: - description: DataCollected is a field of KokuMetricsConfigStatus - to represent whether or not data was collected for the last - query. - type: boolean - data_collection_message: - description: DataCollectionMessage is a field of KokuMetricsConfigStatus - to represent a message associated with the data_collected status. - type: string - last_hour_queried: - description: LastHourQueried is a field of KokuMetricsConfigStatus - to represent the time range for which metrics were last queried. - type: string - report_month: - description: ReportMonth is a field of KokuMetricsConfigStatus - to represent the month for which reports are being generated. - type: string - type: object - source: - description: source represents the observed state of the integration - on console.redhat.com. - properties: - check_cycle: - description: |- - check_cycle is the number of minutes between each integration status check on console.redhat.com. - The default is 1440 min (24 hours). - format: int64 - type: integer - create_source: - description: |- - create_source represents the toggle used during the creation of the integration on console.redhat.com. - An Integration will not be created if upload_toggle is `false`. - type: boolean - error: - description: error represents any errors encountered when creating - the integration. - type: string - last_check_time: - description: last_check_time is the time that the last integration - status check was attempted. - format: date-time - nullable: true - type: string - name: - description: name represents the name of the integration that - the operator attempted to create on console.redhat.com. - type: string - source_defined: - description: source_defined represents whether the defined integration - name exists on console.redhat.com. - type: boolean - sources_path: - description: sources_path is the prefix of the Sources API on - console.redhat.com. - type: string - type: object - storage: - description: Storage is a field - properties: - volume_mounted: - description: VolumeMounted is a bool to indicate if storage volume - was mounted. - type: boolean - volume_type: - description: VolumeType is the string representation of the volume - type. - type: string - type: object - upload: - description: Upload is a field of KokuMetricsConfig to represent the - upload object. - properties: - error: - description: UploadError is a field of KokuMetricsConfigStatus - to represent the error encountered uploading reports. - type: string - ingress_path: - description: IngressAPIPath is a field of KokuMetricsConfig to - represent the path of the Ingress API service. - type: string - last_payload_files: - description: LastPayloadFiles is a field of KokuMetricsConfig - to represent the list of files in the last payload that was - sent. - items: - type: string - type: array - last_payload_manifest_id: - description: LastPayloadManifest is a field of KokuMetricsConfig - that shows the manifestID of the last payload. - type: string - last_payload_name: - description: LastPayloadName is a field of KokuMetricsConfig that - shows the name of the last payload file. - type: string - last_payload_request_id: - description: LastPayloadRequestID is a field of KokuMetricsConfig - that shows the insights request id of the last payload. - type: string - last_successful_upload_time: - description: LastSuccessfulUploadTime is a field of KokuMetricsConfig - that shows the time of the last successful upload. - format: date-time - nullable: true - type: string - last_upload_status: - description: LastUploadStatus is a field of KokuMetricsConfig - that shows the http status of the last upload. - type: string - upload: - description: |- - UploadToggle is a field of KokuMetricsConfig to represent if the operator should upload to console.redhat.com. - The default is true - type: boolean - upload_cycle: - description: |- - UploadCycle is a field of KokuMetricsConfig to represent the number of minutes between each upload schedule. - The default is 360 min (6 hours). - format: int64 - type: integer - upload_wait: - description: UploadWait is a field of KokuMetricsConfig to represent - the time to wait before sending an upload. - format: int64 - type: integer - validate_cert: - description: ValidateCert is a field of KokuMetricsConfig to represent - if the Ingress endpoint must be certificate validated. - type: boolean - type: object - type: object - required: - - spec - type: object - served: true - storage: true - subresources: - status: {} -status: - acceptedNames: - kind: "" - plural: "" - conditions: null - storedVersions: null diff --git a/koku-metrics-operator/3.2.1/manifests/koku-metrics-operator.clusterserviceversion.yaml b/koku-metrics-operator/3.2.1/manifests/koku-metrics-operator.clusterserviceversion.yaml deleted file mode 100644 index 6f7aa61eb..000000000 --- a/koku-metrics-operator/3.2.1/manifests/koku-metrics-operator.clusterserviceversion.yaml +++ /dev/null @@ -1,606 +0,0 @@ -apiVersion: operators.coreos.com/v1alpha1 -kind: ClusterServiceVersion -metadata: - annotations: - alm-examples: |- - [ - { - "apiVersion": "koku-metrics-cfg.openshift.io/v1beta1", - "kind": "KokuMetricsConfig", - "metadata": { - "name": "kokumetricscfg-sample-v1beta1" - }, - "spec": { - "authentication": { - "type": "token" - }, - "packaging": { - "max_reports_to_store": 30, - "max_size_MB": 100 - }, - "prometheus_config": { - "collect_previous_data": true, - "context_timeout": 120, - "disable_metrics_collection_cost_management": false, - "disable_metrics_collection_resource_optimization": false - }, - "source": { - "check_cycle": 1440, - "create_source": false, - "name": "" - }, - "upload": { - "upload_cycle": 360, - "upload_toggle": true - } - } - } - ] - capabilities: Seamless Upgrades - categories: Monitoring - certified: "false" - containerImage: quay.io/project-koku/koku-metrics-operator@sha256:197346c3e394b38034d47d3aa2736144b8199997e1fee6843d29c903ed6ba247 - createdAt: "2024-04-03T14:22:53Z" - description: A Golang-based OpenShift Operator that generates and uploads OpenShift usage metrics to cost management. - features.operators.openshift.io/disconnected: "true" - features.operators.openshift.io/fips-compliant: "false" - features.operators.openshift.io/proxy-aware: "true" - features.operators.openshift.io/tls-profiles: "false" - features.operators.openshift.io/token-auth-aws: "false" - features.operators.openshift.io/token-auth-azure: "false" - features.operators.openshift.io/token-auth-gcp: "false" - operatorframework.io/suggested-namespace: koku-metrics-operator - operators.openshift.io/infrastructure-features: '["disconnected", "proxy-aware"]' - operators.operatorframework.io/builder: operator-sdk-v1.33.0 - operators.operatorframework.io/project_layout: go.kubebuilder.io/v4 - repository: https://github.com/project-koku/koku-metrics-operator - support: Cost Management - labels: - operatorframework.io/arch.amd64: supported - operatorframework.io/arch.arm64: supported - operatorframework.io/arch.ppc64le: supported - operatorframework.io/arch.s390x: supported - operatorframework.io/os.linux: supported - name: koku-metrics-operator.v3.2.1 - namespace: placeholder -spec: - apiservicedefinitions: {} - customresourcedefinitions: - owned: - - description: KokuMetricsConfig is the Schema for the kokumetricsconfig API - displayName: Koku Metrics Config - kind: KokuMetricsConfig - name: kokumetricsconfigs.koku-metrics-cfg.openshift.io - version: v1beta1 - description: | - # Koku Metrics Operator - ## Introduction - The `koku-metrics-operator` is a component of the [cost managment](https://access.redhat.com/documentation/en-us/cost_management_service) service for Openshift. The operator runs on the latest supported versions of Openshift. This operator obtains OpenShift usage data by querying Prometheus every hour to create metric reports that it uploads to Cost Management at [console.redhat.com](https://console.redhat.com) to be processed. For more information, reach out to . - - This operator is capable of functioning within a disconnected/restricted network (aka air-gapped mode). In this mode, the operator will store the packaged reports for manual retrieval instead of being uploaded to Cost Management. Documentation for installing an operator within a restricted network can be found [here](https://docs.openshift.com/container-platform/latest/operators/admin/olm-restricted-networks.html). - - ## Features and Capabilities - #### Metrics collection: - The Koku Metrics Operator (`koku-metrics-operator`) collects the metrics required for Cost Management by: - * Querying Prometheus to gather the necessary metrics for Cost Management. - * Writing the results of Prometheus queries to CSV report files. - * Packaging the CSV report files into tarballs. - - #### Additional Capabilities: - * Resource Optimization metrics collection. - * The operator can be configured to gather all previous data within the configured retention period or a maximum of 90 days. The default data collection period is the 14 previous days. This setting is only applicable to newly created KokuMetricsConfigs. - * The operator can be configured to automatically upload the packaged reports to Cost Management through Red Hat Insights Ingress service. - * The operator can create an integration in console.redhat.com. An integration is required for Cost Management to process the uploaded packages. - * PersistentVolumeClaim (PVC) configuration: The KokuMetricsConfig CR can accept a PVC definition and the operator will create and mount the PVC. If one is not provided, a default PVC will be created. - * Restricted network installation: this operator can function on a restricted network. In this mode, the operator stores the packaged reports for manual retrieval. - - ## New in v3.2.1: - * The minimum supported configuration for `upload_cycle` is now 60 (minutes). - * (Bugfix) many-to-many matching not allowed query fix. - * (Bugfix) Sequentially collect data during initial install. - - ## New in v3.2.0: - * Support for amd64, arm64, ppc64le, s390x architectures. - * add liveness and readiness probes to controller Pod. - * update pod security settings so that the controller Pod can run in Restricted mode [more info](https://sdk.operatorframework.io/docs/best-practices/pod-security-standards/). - - ## New in v3.1.0: - * Add service-account authentication type. - * __Deprecation Notice:__ Basic authentication is deprecated and will be removed in a future version of the operator. - - ## New in v3.0.0: - * Daily report generation: Operator versions prior to v3.0.0 generated sequential reports. Now, reports are generated starting at 0:00 UTC. Any payloads generated throughout a given day will contain all data starting from 0:00 UTC. Once the next day starts, the previous day's reports are packaged, and the new report again starts at 0:00 UTC for the current day. - * Failed query retry: In an attempt to prevent missing data, the operator will retry queries from the last successful query time, up to 5 times. - - ## New in v2.0.0: - * Adds metrics and report generation for resource optimization. This feature will collect additional usage metrics and create a new report in the payload. These metrics are enabled by default, but can be disabled by setting `disable_metrics_collection_resource_optimization` to `true`. - * Collect all available Prometheus data upon CR creation. This feature only applies to newly created KokuMetricsConfigs. The operator will check the monitoring stack configuration in the `openshift-monitoring` namespace. The operator will use the `retention` period set in the `cluster-monitoring-config` ConfigMap if defined, up to a maximum of 90 days. Otherwise it will fall back to collecting 14 days of data, if available. This data collection may be disabled by setting `collect_previous_data` to `false`. Turning this feature off results in the operator collecting metrics from the time the KokuMetricsConfig is created, forward. - - ## Limitations and Pre-Requisites - #### Limitations (Potential for metrics data loss) - * An integration **must** exist in console.redhat.com for an uploaded payload to be processed by Cost Management. The operator sends the payload to the Red Hat Insights Ingress service which usually returns successfully, but the operator does not currently confirm with Cost Management that the payload was processed. After Ingress accepts the uploaded payload, it is deleted from the operator. If the data within the payload is not processed, a gap will be introduced in the usage metrics. Data may be recollected by deleting the `KokuMetricsConfig`, creating a new `KokuMetricsConfig`, and setting `collect_previous_data: true`. This re-collection of data will gather all data stored in Prometheus, up to 90 days. - - **Note** The following limitations are specific to operators configured to run in a restricted network: - * The `koku-metrics-operator` will not be able to generate new reports if the PVC storage is full. If this occurs, the reports must be manually deleted from the PVC so that the operator can function as normal. - * The default report retention is 30 reports (about one week's worth of data). The reports must be manually downloaded and uploaded to console.redhat.com every week, or they will be deleted and the data will be lost. - - #### Storage configuration prerequisite - The operator will attempt to create and use the following PVC when installed: - - volume_claim_template: - apiVersion: v1 - kind: PersistentVolumeClaim - metadata: - name: koku-metrics-operator-data - spec: - accessModes: - - ReadWriteOnce - resources: - requests: - storage: 10Gi - - If a different PVC should be utilized, a valid PVC should be specified in the KokuMetricsConfig CR as described in the appropriate section below. The PVC to be used may exist already, or the operator will attempt to create it. - - To use the default specification, the follow assumptions must be met: - 1. A default StorageClass is defined. - 2. Dynamic provisioning for that default StorageClass is enabled. - - If these assumptions are not met, the operator will not deploy correctly. In these cases, storage must be manually configured. After configuring storage, a valid PVC template should be supplied in the `volume_claim_template` spec of the KokuMetricsConfig CR. - - ## Configurable parameters: - * `authentication`: - * `type: token` -> The authentication method for connecting to `console.redhat.com`. The default and preferred method is `token`. `basic` (deprecated) and `service-account` authentication methods are used when the openshift-config pull-secret does not contain a token for `console.redhat.com`. - * `secret_name` -> The Secret used by the operator when the authentication type is `basic` (deprecated) or `service-account`. This parameter is required **only if** the authentication type is `basic` (deprecated) or `service-account`. - * `packaging`: - * `max_reports_to_store: 30` -> The number of reports to store when configured in air-gapped mode. The default is 30, with a minimum of 1 and no maximum. When the operator is not configured in air-gapped mode, this parameter has no effect. Reports are removed as soon as they are uploaded. - * `max_size: 100` -> The maximum size for packaged files in Megabytes prior to compression. The default is 100, with a minimum of 1 and maximum of 100. - * `prometheus_config`: - * `collect_previous_data: true` -> Toggle for collecting all available data in Prometheus **upon KokuMetricsConfig creation** (This parameter will start to appear in KokuMetricsConfigs that were created prior to v2.0.0 but will not have any effect unless the KokuMetricsConfig is deleted and recreated). The default is `true`. The operator will first look for a `retention` period in the `cluster-monitoring-config` ConfigMap in the `openshift-monitoring` namespace and gather data over this time period up to a maximum of 90 days. If this configuration is not set, the default is 14 days. (New in v2.0.0) - * `disable_metrics_collection_cost_management: false` -> Toggle for disabling the collection of metrics for Cost Management. The default is false. (New in v2.0.0) - * `disable_metrics_collection_resource_optimization: false` -> Toggle for disabling the collection of metrics for Resource Optimization. The default is false. (New in v2.0.0) - * `context_timeout: 120` -> The time in seconds before Prometheus queries timeout due to exceeding context timeout. The default is 120, with a minimum of 10 and maximum of 180. - * `source`: - * `name: ''` -> The name of the integration the operator will create in `console.redhat.com`. If the name value is empty, the default intergration name is the **cluster id**. - * `create_source: false` -> Toggle for whether or not the operator will create the integration in `console.redhat.com`. The default is False. This parameter should be switched to True when an integration does not already exist in `console.redhat.com` for this cluster. - * `check_cycle: 1440` -> The time in minutes to wait between checking if an integration exists for this cluster. The default is 1440 minutes (24 hrs). - * `upload`: - * `upload_cycle: 360` -> The time in minutes between payload uploads. The default is 360 (6 hours), minimum is 60 (1 hour). - * `upload_toggle: true` -> Toggle to turn upload on or off -> true means upload, false means do not upload (false == air-gapped mode). The default is `true`. - * `upload_wait` -> The amount of time (in seconds) to pause before uploading a payload. The default is a random number between 0 and 35. This is used to decrease service load, but may be set to `0` if desired. - * `volume_claim_template` -> see the "Storage configuration prerequisite" section above. - - ## Configure the koku-metrics-operator - **Note** There are separate instructions for configuring the `koku-metrics-operator` to run in a restricted network. - ##### Configure authentication - The default authentication for the operator is `token`. No further steps are required to configure token authentication. If `basic` (deprecated) or `service-account` is the preferred authentication method, a Secret which holds the credentials must be created: - 1. On the left navigation pane, select `Workloads` -> `Secrets` -> select Project: `koku-metrics-operator` -> `Create` -> `Key/Value Secret` - 2. Give the Secret a name and add 2 keys (all lowercase) for the respective authentication type. The values for these keys correspond to console.redhat.com credentials: - * basic auth (deprecated): `username` and `password` - * service-account auth: `client_id` and `client_secret` - - 3. Select `Create`. - ##### Create the KokuMetricsConfig - Configure the koku-metrics-operator by creating a `KokuMetricsConfig`. - 1. On the left navigation pane, select `Operators` -> `Installed Operators` -> `koku-metrics-operator` -> `KokuMetricsConfig` -> `Create Instance`. - 2. For `basic` (deprecated) or `service-account` authentication, edit the following values in the spec: - * Replace `authentication: type:` with `basic` or `service-account`. - * Add the `secret_name` field under `authentication`, and set it equal to the name of the authentication Secret that was created above. The spec should look similar to the following: - - * for basic auth type (deprecated) - ``` - authentication: - secret_name: SECRET-NAME - type: basic - ``` - - * for service-account auth type - ``` - authentication: - secret_name: SECRET-NAME - type: service-account - ``` - - 3. To configure the koku-metrics-operator to create a cost management integration, edit the following values in the `source` field: - * Replace the `name` field value with the preferred name of the integration to be created. - * Replace the `create_source` field value with `true`. - - **Note:** if the integration already exists, replace the empty string value of the `name` field with the existing name, and leave `create_source` as false. This will allow the operator to confirm that the integration exists. - - 4. If not specified, the operator will create a default PersistentVolumeClaim called `koku-metrics-operator-data` with 10Gi of storage. To configure the koku-metrics-operator to use or create a different PVC, edit the following in the spec: - * Add the desired configuration to the `volume_claim_template` field in the spec: - - ``` - volume_claim_template: - apiVersion: v1 - kind: PersistentVolumeClaim - metadata: - name: - spec: - accessModes: - - ReadWriteOnce - resources: - requests: - storage: 10Gi - ``` - - **Note:** If using the YAML View, the `volume_claim_template` field must be added to the spec - 5. Select `Create`. - - # Restricted Network Usage (disconnected/air-gapped mode) - ## Installation - To install the `koku-metrics-operator` in a restricted network, follow the [olm documentation](https://docs.openshift.com/container-platform/latest/operators/admin/olm-restricted-networks.html). The operator is found in the `community-operators` Catalog in the `registry.redhat.io/redhat/community-operator-index:latest` Index. If pruning the index before pushing to the mirrored registry, keep the `koku-metrics-operator` package. - - Within a restricted network, the operator queries prometheus to gather the necessary usage metrics, writes the query results to CSV files, and packages the reports for storage in the PVC. These reports then need to be manually downloaded from the cluster and uploaded to [console.redhat.com](https://console.redhat.com). - - ## Configure the koku-metrics-operator for a restricted network - ##### Create the KokuMetricsConfig - Configure the koku-metrics-operator by creating a `KokuMetricsConfig`. - 1. On the left navigation pane, select `Operators` -> `Installed Operators` -> `koku-metrics-operator` -> `KokuMetricsConfig` -> `Create Instance`. - 2. Specify the desired storage. If not specified, the operator will create a default Persistent Volume Claim called `koku-metrics-operator-data` with 10Gi of storage. To configure the koku-metrics-operator to use or create a different PVC, edit the following in the spec: - * Add the desired configuration to the `volume_claim_template` field in the spec (below is only a template. Any _valid_ `PersistentVolumeClaim` may be defined here): - - ``` - volume_claim_template: - apiVersion: v1 - kind: PersistentVolumeClaim - metadata: - name: - spec: - storageClassName: - accessModes: - - ReadWriteOnce - resources: - requests: - storage: 10Gi - ``` - - **Note:** If using the YAML View, the `volume_claim_template` field must be added to the spec - 3. (Optional) Specify the desired report retention. The operator will retain 30 reports by default. This corresponds to approximately one week's worth of data if using the default packaging cycle. To modify the number of retained reports: - * Change the `packaging` spec field `max_reports_to_store` to the desired number of reports to retain. Once this max number is reached, the operator will start removing the oldest packages remaining on the PVC: - - ``` - packaging: - max_size_MB: 100 - max_reports_to_store: 30 - ``` - - **Note:** The number of retained reports directly affects the frequency that reports must be manually downloaded from the PVC. Take caution in setting this to a higher number of reports, as the operator cannot write data to the PVC if the storage is full. - 4. To configure the operator to perform in a restricted network, set the `upload_toggle` to `false`: - - ``` - upload: - upload_cycle: 360 - upload_toggle: false - ``` - - 5. Select `Create`. - - ## Download reports from the Operator & clean up the PVC - If the `koku-metrics-operator` is configured to run in a restricted network, the metric reports will not automatically upload to cost managment. Instead, they need to be manually copied from the PVC for upload to [console.redhat.com](https://console.redhat.com). The default configuration saves one week of reports which means the process of downloading and uploading reports should be repeated weekly to prevent loss of metrics data. To download the reports, complete the following steps: - 1. Create the following Pod, ensuring the `claimName` matches the PVC containing the report data: - - ``` - kind: Pod - apiVersion: v1 - metadata: - name: volume-shell - namespace: koku-metrics-operator - labels: - app: koku-metrics-operator - spec: - volumes: - - name: koku-metrics-operator-reports - persistentVolumeClaim: - claimName: koku-metrics-operator-data - containers: - - name: volume-shell - image: busybox - command: ['sleep', 'infinity'] - volumeMounts: - - name: koku-metrics-operator-reports - mountPath: /tmp/koku-metrics-operator-reports - ``` - - 2. Use rsync to copy all of the files ready for upload from the PVC to a local folder: - - ``` - $ oc rsync volume-shell:/tmp/koku-metrics-operator-reports/upload local/path/to/save/folder - ``` - - 3. Once confirming that the files have been successfully copied, use rsh to connect to the pod and delete the contents of the upload folder so that they are no longer in storage: - - ``` - $ oc rsh volume-shell - $ rm /tmp/koku-metrics-operator-reports/upload/* - ``` - - 4. (Optional) Delete the pod that was used to connect to the PVC: - - ``` - $ oc delete -f volume-shell.yaml - ``` - - ## Create an Integration - In a restricted network, the `koku-metrics-operator` cannot automatically create an integration. This process must be done manually. In the console.redhat.com platform, open the [Integrations menu](https://console.redhat.com/settings/integrations/) to begin adding an OpenShift integration to Cost Management: - - Prerequisites: - * The cluster identifier which can be found in the KokuMetricsConfig CR, the cluster Overview page, or the cluster Help > About. - - Creating an integration: - 1. Navigate to the Integrations menu - 2. Select the `Red Hat` tab - 3. Create a new `Red Hat Openshift Container Platform` integration: - * give the integration a unique name - * add the Cost Management application - * add the cluster identifier - 4. In the Source wizard, review the details and click `Finish` to create the source. - - ## Upload the reports to cost managment - Uploading reports to cost managment is done through curl: - - $ curl -vvvv -F "file=@FILE_NAME.tar.gz;type=application/vnd.redhat.hccm.tar+tgz" https://console.redhat.com/api/ingress/v1/upload -u USERNAME:PASS - - where `USERNAME` and `PASS` correspond to the user credentials for [console.redhat.com](https://console.redhat.com), and `FILE_NAME` is the name of the report to upload. - displayName: Koku Metrics Operator - icon: - - base64data: PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4KPCEtLSBHZW5lcmF0b3I6IEFkb2JlIElsbHVzdHJhdG9yIDIyLjEuMCwgU1ZHIEV4cG9ydCBQbHVnLUluIC4gU1ZHIFZlcnNpb246IDYuMDAgQnVpbGQgMCkgIC0tPgo8c3ZnIHZlcnNpb249IjEuMSIgaWQ9IkxheWVyXzEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4IgoJIHZpZXdCb3g9IjAgMCAzMDAgMzAwIiBzdHlsZT0iZW5hYmxlLWJhY2tncm91bmQ6bmV3IDAg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: - - config.openshift.io - resources: - - clusterversions - verbs: - - get - - list - - watch - - apiGroups: - - "" - resources: - - configmaps - verbs: - - get - - list - - watch - - apiGroups: - - "" - resources: - - namespaces - verbs: - - get - - list - - watch - - apiGroups: - - "" - resources: - - secrets - verbs: - - get - - apiGroups: - - monitoring.coreos.com - resources: - - prometheuses/api - verbs: - - create - - get - - update - serviceAccountName: koku-metrics-controller-manager - deployments: - - label: - app: koku-metrics-operator - control-plane: controller-manager - name: koku-metrics-operator - spec: - replicas: 1 - selector: - matchLabels: - app: koku-metrics-operator - control-plane: controller-manager - strategy: - type: Recreate - template: - metadata: - labels: - app: koku-metrics-operator - control-plane: controller-manager - spec: - affinity: - nodeAffinity: - requiredDuringSchedulingIgnoredDuringExecution: - nodeSelectorTerms: - - matchExpressions: - - key: kubernetes.io/arch - operator: In - values: - - amd64 - - arm64 - - ppc64le - - s390x - - key: kubernetes.io/os - operator: In - values: - - linux - containers: - - args: - - --leader-elect - command: - - /manager - env: - - name: IN_CLUSTER - value: "true" - - name: WATCH_NAMESPACE - valueFrom: - fieldRef: - fieldPath: metadata.annotations['olm.targetNamespaces'] - image: quay.io/project-koku/koku-metrics-operator@sha256:197346c3e394b38034d47d3aa2736144b8199997e1fee6843d29c903ed6ba247 - livenessProbe: - httpGet: - path: /healthz - port: 8081 - initialDelaySeconds: 15 - periodSeconds: 20 - name: manager - readinessProbe: - httpGet: - path: /readyz - port: 8081 - initialDelaySeconds: 5 - periodSeconds: 10 - resources: - limits: - cpu: 500m - memory: 500Mi - requests: - cpu: 100m - memory: 20Mi - securityContext: - allowPrivilegeEscalation: false - capabilities: - drop: - - ALL - terminationMessagePolicy: FallbackToLogsOnError - volumeMounts: - - mountPath: /tmp/koku-metrics-operator-reports - name: koku-metrics-operator-reports - securityContext: - runAsNonRoot: true - seccompProfile: - type: RuntimeDefault - serviceAccountName: koku-metrics-controller-manager - terminationGracePeriodSeconds: 10 - volumes: - - name: koku-metrics-operator-reports - permissions: - - rules: - - apiGroups: - - "" - resources: - - configmaps - verbs: - - get - - list - - watch - - create - - update - - patch - - delete - - apiGroups: - - "" - resources: - - configmaps/status - verbs: - - get - - update - - patch - - apiGroups: - - "" - resources: - - events - verbs: - - create - - patch - - apiGroups: - - coordination.k8s.io - resources: - - leases - verbs: - - get - - list - - watch - - create - - update - - patch - - delete - - apiGroups: - - apps - resources: - - deployments - verbs: - - get - - list - - patch - - watch - - apiGroups: - - "" - resources: - - configmaps - - endpoints - - events - - persistentvolumeclaims - - pods - - secrets - - serviceaccounts - - services - - services/finalizers - verbs: - - create - - delete - - get - - list - - patch - - update - - watch - - apiGroups: - - koku-metrics-cfg.openshift.io - resources: - - kokumetricsconfigs - verbs: - - create - - delete - - get - - list - - patch - - update - - watch - - apiGroups: - - koku-metrics-cfg.openshift.io - resources: - - kokumetricsconfigs/status - verbs: - - get - - patch - - update - - apiGroups: - - operators.coreos.com - resources: - - clusterserviceversions - verbs: - - get - - list - - patch - - update - - watch - serviceAccountName: koku-metrics-controller-manager - strategy: deployment - installModes: - - supported: true - type: OwnNamespace - - supported: true - type: SingleNamespace - - supported: false - type: MultiNamespace - - supported: false - type: AllNamespaces - keywords: - - cost - - management - - usage - - monitor - links: - - name: Koku Metrics Operator source code repository - url: https://github.com/project-koku/koku-metrics-operator - maintainers: - - email: costmanagement@redhat.com - name: costmanagement - maturity: alpha - minKubeVersion: 1.24.0 - provider: - name: Red Hat - version: 3.2.1 - relatedImages: - - name: koku-metrics-operator - image: quay.io/project-koku/koku-metrics-operator@sha256:197346c3e394b38034d47d3aa2736144b8199997e1fee6843d29c903ed6ba247 - replaces: koku-metrics-operator.v3.2.0 diff --git a/koku-metrics-operator/3.2.1/metadata/annotations.yaml b/koku-metrics-operator/3.2.1/metadata/annotations.yaml deleted file mode 100644 index cc0425a9d..000000000 --- a/koku-metrics-operator/3.2.1/metadata/annotations.yaml +++ /dev/null @@ -1,16 +0,0 @@ -annotations: - # Core bundle annotations. - operators.operatorframework.io.bundle.mediatype.v1: registry+v1 - operators.operatorframework.io.bundle.manifests.v1: manifests/ - operators.operatorframework.io.bundle.metadata.v1: metadata/ - operators.operatorframework.io.bundle.package.v1: koku-metrics-operator - operators.operatorframework.io.bundle.channels.v1: alpha,beta - operators.operatorframework.io.bundle.channel.default.v1: beta - operators.operatorframework.io.metrics.builder: operator-sdk-v1.33.0 - operators.operatorframework.io.metrics.mediatype.v1: metrics+v1 - operators.operatorframework.io.metrics.project_layout: go.kubebuilder.io/v4 - # Annotations for testing. - operators.operatorframework.io.test.mediatype.v1: scorecard+v1 - operators.operatorframework.io.test.config.v1: tests/scorecard/ - # OpenShift specific annotations. - com.redhat.openshift.versions: "4.12" diff --git a/koku-metrics-operator/3.2.1/tests/scorecard/config.yaml b/koku-metrics-operator/3.2.1/tests/scorecard/config.yaml deleted file mode 100644 index a19cb8f47..000000000 --- a/koku-metrics-operator/3.2.1/tests/scorecard/config.yaml +++ /dev/null @@ -1,40 +0,0 @@ -apiVersion: scorecard.operatorframework.io/v1alpha3 -kind: Configuration -metadata: - name: config -stages: -- parallel: true - tests: - - entrypoint: - - scorecard-test - - basic-check-spec - image: quay.io/operator-framework/scorecard-test:v1.10.1 - labels: - suite: basic - test: basic-check-spec-test - storage: - spec: - mountPath: {} - - entrypoint: - - scorecard-test - - olm-bundle-validation - image: quay.io/operator-framework/scorecard-test:v1.10.1 - labels: - suite: olm - test: olm-bundle-validation-test - storage: - spec: - mountPath: {} - - entrypoint: - - scorecard-test - - olm-crds-have-validation - image: quay.io/operator-framework/scorecard-test:v1.10.1 - labels: - suite: olm - test: olm-crds-have-validation-test - storage: - spec: - mountPath: {} -storage: - spec: - mountPath: {} diff --git a/koku-metrics-operator/ci.yaml b/koku-metrics-operator/ci.yaml deleted file mode 100644 index de462722b..000000000 --- a/koku-metrics-operator/ci.yaml +++ /dev/null @@ -1,7 +0,0 @@ ---- -# Use `replaces-mode` or `semver-mode`. Once you switch to `semver-mode`, there is no easy way back. -updateGraph: replaces-mode -addReviewers: true -reviewers: - - dnakabaa - - maskarb