diff --git a/.gitignore b/.gitignore index 2f0f21543..75a67742a 100644 --- a/.gitignore +++ b/.gitignore @@ -44,9 +44,7 @@ internal/collector/test_files/test_reports/* # VSCode .vscode -bundle/ community-operators-prod/ -bundle.Dockerfile # Ignore python virtual env diff --git a/koku-metrics-operator/3.3.1/Dockerfile b/bundle.Dockerfile similarity index 88% rename from koku-metrics-operator/3.3.1/Dockerfile rename to bundle.Dockerfile index bd229b116..22be3f716 100644 --- a/koku-metrics-operator/3.3.1/Dockerfile +++ b/bundle.Dockerfile @@ -16,6 +16,6 @@ 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/ +COPY bundle/manifests /manifests/ +COPY bundle/metadata /metadata/ +COPY bundle/tests/scorecard /tests/scorecard/ diff --git a/koku-metrics-operator/3.3.0/manifests/koku-metrics-cfg.openshift.io_kokumetricsconfigs.yaml b/bundle/manifests/koku-metrics-cfg.openshift.io_kokumetricsconfigs.yaml similarity index 100% rename from koku-metrics-operator/3.3.0/manifests/koku-metrics-cfg.openshift.io_kokumetricsconfigs.yaml rename to bundle/manifests/koku-metrics-cfg.openshift.io_kokumetricsconfigs.yaml diff --git a/koku-metrics-operator/3.3.1/manifests/koku-metrics-operator.clusterserviceversion.yaml b/bundle/manifests/koku-metrics-operator.clusterserviceversion.yaml similarity index 100% rename from koku-metrics-operator/3.3.1/manifests/koku-metrics-operator.clusterserviceversion.yaml rename to bundle/manifests/koku-metrics-operator.clusterserviceversion.yaml diff --git a/koku-metrics-operator/3.3.1/metadata/annotations.yaml b/bundle/metadata/annotations.yaml similarity index 100% rename from koku-metrics-operator/3.3.1/metadata/annotations.yaml rename to bundle/metadata/annotations.yaml diff --git a/koku-metrics-operator/1.1.5/tests/scorecard/config.yaml b/bundle/tests/scorecard/config.yaml similarity index 100% rename from koku-metrics-operator/1.1.5/tests/scorecard/config.yaml rename to bundle/tests/scorecard/config.yaml 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: PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4KPCEtLSBHZW5lcmF0b3I6IEFkb2JlIElsbHVzdHJhdG9yIDIyLjEuMCwgU1ZHIEV4cG9ydCBQbHVnLUluIC4gU1ZHIFZlcnNpb246IDYuMDAgQnVpbGQgMCkgIC0tPgo8c3ZnIHZlcnNpb249IjEuMSIgaWQ9IkxheWVyXzEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4IgoJIHZpZXdCb3g9IjAgMCAzMDAgMzAwIiBzdHlsZ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/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+Cgk8Zz4KCQk8cGF0aCBjbGFzcz0ic3QwIiBkPSJNMjM5LjAzNzAzMzEsMTE3LjI3NTE3N2MtMy4yNjU4MDgxLTQxLjk4OTA1MT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DM5LDAuOTkwNjQ2NC0wLjU3MTM1MDEsMS4zNzMwNzc0bC0zLjg5ODA4NjUsNC4wMTMyNzUxCgkJCWMtMC4zMDg3MTU4LDAuMjMwMzkyNS0wLjY2ODEwNjEsMC4zODI0MzEtMS4wOTIwMTA1LDAuNDU2MTYxNWMtMC40MTkyOTYzLDAuMDc4MzIzNC0wLjgyMDE1OTksMC0xLjIwMjU5MDktMC4yMjU3NjkKCQkJYy0xLjE0MjcxNTUtMC44NDMyMDA3LTIuNDQyMDc3Ni0xLjI2MjQ5NjktMy44OTgwODY1LTEuMjYyNDk2OWgtNy42NzYzNjExYy0wLjkxNjkxNTksMC0xLjcwMDIyNTgsMC4zMjI1MjUtMi4zNDk4OTkzLDAuOTcyMjEzNwoJCQljLTAuNjQ5Njg4NywwLjY0OTY3MzUtMC45NzY4MjE5LDEuNDc0NDQxNS0wLjk3NjgyMTksMi40NjUwODc5YzAsMC42ODY1NTQsMC4yMzAzOTI1LDEuMzM2MjEyMiwwLjY5MTE0NjksMS45NDkwMzU2CgkJCWMwLjQ1NjE2MTUsMC42MTI4MjM1LDEuMDMyMTE5OCwxLjAzMjExOTgsMS43MTg2NTg0LDEuMjYyNDk2OUwxNzQuMjgwNjM5NiwxODUuODczNjExNXoiLz4KCTwvZz4KPC9nPgo8L3N2Zz4K - 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: 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-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+Cgk8Zz4KCQk8cGF0aCBjbGFzcz0ic3QwIiBkPSJNMjM5LjAzNzAzMzEsMTE3LjI3NTE3N2MtMy4yNjU4MDg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UwMDEtMC4xMTUyMDM5LDAuOTkwNjQ2NC0wLjU3MTM1MDEsMS4zNzMwNzc0bC0zLjg5ODA4NjUsNC4wMTMyNzUxCgkJCWMtMC4zMDg3MTU4LDAuMjMwMzkyNS0wLjY2ODEwNjEsMC4zODI0MzEtMS4wOTIwMTA1LDAuNDU2MTYxNWMtMC40MTkyOTYzLDAuMDc4MzIzNC0wLjgyMDE1OTksMC0xLjIwMjU5MDktMC4yMjU3NjkKCQkJYy0xLjE0MjcxNTUtMC44NDMyMDA3LTIuNDQyMDc3Ni0xLjI2MjQ5NjktMy44OTgwODY1LTEuMjYyNDk2OWgtNy42NzYzNjExYy0wLjkxNjkxNTksMC0xLjcwMDIyNTgsMC4zMjI1MjUtMi4zNDk4OTkzLDAuOTcyMjEzNwoJCQljLTAuNjQ5Njg4NywwLjY0OTY3MzUtMC45NzY4MjE5LDEuNDc0NDQxNS0wLjk3NjgyMTksMi40NjUwODc5YzAsMC42ODY1NTQsMC4yMzAzOTI1LDEuMzM2MjEyMiwwLjY5MTE0NjksMS45NDkwMzU2CgkJCWMwLjQ1NjE2MTUsMC42MTI4MjM1LDEuMDMyMTE5OCwxLjAzMjExOTgsMS43MTg2NTg0LDEuMjYyNDk2OUwxNzQuMjgwNjM5NiwxODUuODczNjExNXoiLz4KCTwvZz4KPC9nPgo8L3N2Zz4K - 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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1OCwwLjUxMTQ1OTQsMC43ODMyOTQ3LDAuNTExNDU5NCwxLjMxNzc5NDh2NS41MDE1NDExCgkJCWMzLjY2NzY5NDEsMCw2Ljk1NzU2NTMsMS4xNDcyOTMxLDkuODYwMzgyMSwzLjQzNzMwMTZjMC40NTYxNzY4LDAuMzgyNDQ2MywwLjcyMzQxOTIsMC44NDMyMDA3LDAuODAxNzQyNiwxLjM3NzY4NTUKCQkJYzAuMDczNzE1MiwwLjUzNDUwMDEtMC4xMTUyMDM5LDAuOTkwNjQ2NC0wLjU3MTM1MDEsMS4zNzMwNzc0bC0zLjg5ODA4NjUsNC4wMTMyNzUxCgkJCWMtMC4zMDg3MTU4LDAuMjMwMzkyNS0wLjY2ODEwNjEsMC4zODI0MzEtMS4wOTIwMTA1LDAuNDU2MTYxNWMtMC40MTkyOTYzLDAuMDc4MzIzNC0wLjgyMDE1OTksMC0xLjIwMjU5MDktMC4yMjU3NjkKCQkJYy0xLjE0MjcxNTUtMC44NDMyMDA3LTIuNDQyMDc3Ni0xLjI2MjQ5NjktMy44OTgwODY1LTEuMjYyNDk2OWgtNy42NzYzNjExYy0wLjkxNjkxNTksMC0xLjcwMDIyNTgsMC4zMjI1MjUtMi4zNDk4OTkzLDAuOTcyMjEzNwoJCQljLTAuNjQ5Njg4NywwLjY0OTY3MzUtMC45NzY4MjE5LDEuNDc0NDQxNS0wLjk3NjgyMTksMi40NjUwODc5YzAsMC42ODY1NTQsMC4yMzAzOTI1LDEuMzM2MjEyMiwwLjY5MTE0NjksMS45NDkwMzU2CgkJCWMwLjQ1NjE2MTUsMC42MTI4MjM1LDEuMDMyMTE5OCwxLjAzMjExOTgsMS43MTg2NTg0LDEuMjYyNDk2OUwxNzQuMjgwNjM5NiwxODUuODczNjExNXoiLz4KCTwvZz4KPC9nPgo8L3N2Zz4K - 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+Cgk8Zz4KCQk8cGF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xOTIsMC44NDMyMDA3LDAuODAxNzQyNiwxLjM3NzY4NTUKCQkJYzAuMDczNzE1MiwwLjUzNDUwMDEtMC4xMTUyMDM5LDAuOTkwNjQ2NC0wLjU3MTM1MDEsMS4zNzMwNzc0bC0zLjg5ODA4NjUsNC4wMTMyNzUxCgkJCWMtMC4zMDg3MTU4LDAuMjMwMzkyNS0wLjY2ODEwNjEsMC4zODI0MzEtMS4wOTIwMTA1LDAuNDU2MTYxNWMtMC40MTkyOTYzLDAuMDc4MzIzNC0wLjgyMDE1OTksMC0xLjIwMjU5MDktMC4yMjU3NjkKCQkJYy0xLjE0MjcxNTUtMC44NDMyMDA3LTIuNDQyMDc3Ni0xLjI2MjQ5NjktMy44OTgwODY1LTEuMjYyNDk2OWgtNy42NzYzNjExYy0wLjkxNjkxNTksMC0xLjcwMDIyNTgsMC4zMjI1MjUtMi4zNDk4OTkzLDAuOTcyMjEzNwoJCQljLTAuNjQ5Njg4NywwLjY0OTY3MzUtMC45NzY4MjE5LDEuNDc0NDQxNS0wLjk3NjgyMTksMi40NjUwODc5YzAsMC42ODY1NTQsMC4yMzAzOTI1LDEuMzM2MjEyMiwwLjY5MTE0NjksMS45NDkwMzU2CgkJCWMwLjQ1NjE2MTUsMC42MTI4MjM1LDEuMDMyMTE5OCwxLjAzMjExOTgsMS43MTg2NTg0LDEuMjYyNDk2OUwxNzQuMjgwNjM5NiwxODUuODczNjExNXoiLz4KCTwvZz4KPC9nPgo8L3N2Zz4K - 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: PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4KPCEtLSBHZW5lcmF0b3I6IEFkb2JlIElsbHVzdHJhdG9yIDIyLjEuMCwgU1ZHIEV4cG9ydCBQbHVnLUluIC4gU1ZHIFZlcnNpb246IDYuMDAgQnVpbGQgMCkgIC0tPgo8c3ZnIHZlcnNpb249IjEuMSIgaWQ9IkxheWVyXzEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4IgoJIHZpZXdCb3g9IjAgMCAzMDAgMzAwIiBzdHlsZT0iZW5hYmxlLWJhY2tncm91bmQ6bmV3IDAgMCAzMDAgMzAwOyIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSI+CjxzdHlsZSB0eXBlPSJ0ZXh0L2NzcyI+Cgkuc3Qwe2ZpbGw6I0VFMDAwMDt9Cjwvc3R5bGU+Cjx0aXRsZT5Db3N0LWljb248L3RpdGxlPgo8ZGVzYz5DcmVhdGVkIHdpdGggU2tldGNoLjwvZGVzYz4KPGc+Cgk8Zz4KCQk8cGF0aCBjbGFzcz0ic3QwIiBkPSJNMjM5LjAzNzAzMzEsMTE3LjI3NTE3N2MtMy4yNjU4MDgxLTQxLjk4OTA1MTgtMzguMjU2NjgzMy03NC42NDcyMDE1LTgxLjE3ODgzMy03NC42NDcyMDE1CgkJCWMtMjcuNTI2MTUzNiwwLTUzLjE4NjEyNjcsMTMuOTk2MzQ5My02OC4xMTU1NzAxLDM3LjMyMzYwMDhjLTEuODY2MTgwNCwwLTMuNzMyMzUzMi0wLjQ2Nj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MDc4MzIzNC0wLjgyMDE1OTksMC0xLjIwMjU5MDktMC4yMjU3NjkKCQkJYy0xLjE0MjcxNTUtMC44NDMyMDA3LTIuNDQyMDc3Ni0xLjI2MjQ5NjktMy44OTgwODY1LTEuMjYyNDk2OWgtNy42NzYzNjExYy0wLjkxNjkxNTksMC0xLjcwMDIyNTgsMC4zMjI1MjUtMi4zNDk4OTkzLDAuOTcyMjEzNwoJCQljLTAuNjQ5Njg4NywwLjY0OTY3MzUtMC45NzY4MjE5LDEuNDc0NDQxNS0wLjk3NjgyMTksMi40NjUwODc5YzAsMC42ODY1NTQsMC4yMzAzOTI1LDEuMzM2MjEyMiwwLjY5MTE0NjksMS45NDkwMzU2CgkJCWMwLjQ1NjE2MTUsMC42MTI4MjM1LDEuMDMyMTE5OCwxLjAzMjExOTgsMS43MTg2NTg0LDEuMjYyNDk2OUwxNzQuMjgwNjM5NiwxODUuODczNjExNXoiLz4KCTwvZz4KPC9nPgo8L3N2Zz4K - 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: PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4KPCEtLSBHZW5lcmF0b3I6IEFkb2JlIElsbHVzdHJhdG9yIDIyLjEuMCwgU1ZHIEV4cG9ydCBQbH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EuNDc0NDQxNS0wLjk3NjgyMTksMi40NjUwODc5YzAsMC42ODY1NTQsMC4yMzAzOTI1LDEuMzM2MjEyMiwwLjY5MTE0NjksMS45NDkwMzU2CgkJCWMwLjQ1NjE2MTUsMC42MTI4MjM1LDEuMDMyMTE5OCwxLjAzMjExOTgsMS43MTg2NTg0LDEuMjYyNDk2OUwxNzQuMjgwNjM5NiwxODUuODczNjExNXoiLz4KCTwvZz4KPC9nPgo8L3N2Zz4K - 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: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: PD94bWwgdmV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0wLjkxNjkxNTksMC0xLjcwMDIyNTgsMC4zMjI1MjUtMi4zNDk4OTkzLDAuOTcyMjEzNwoJCQljLTAuNjQ5Njg4NywwLjY0OTY3MzUtMC45NzY4MjE5LDEuNDc0NDQxNS0wLjk3NjgyMTksMi40NjUwODc5YzAsMC42ODY1NTQsMC4yMzAzOTI1LDEuMzM2MjEyMiwwLjY5MTE0NjksMS45NDkwMzU2CgkJCWMwLjQ1NjE2MTUsMC42MTI4MjM1LDEuMDMyMTE5OCwxLjAzMjExOTgsMS43MTg2NTg0LDEuMjYyNDk2OUwxNzQuMjgwNjM5NiwxODUuODczNjExNXoiLz4KCTwvZz4KPC9nPgo8L3N2Zz4K - 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: 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-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: PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4KPCEtLSBHZW5lcmF0b3I6IEFkb2JlIElsbHVzdHJhdG9yIDIyLjEuMCwgU1ZHIEV4cG9ydCBQbHVnLUluIC4gU1ZHIFZlcnNpb246IDYuMDAgQnVpbGQgMCkgIC0tPgo8c3ZnIHZlcnNpb249IjEuMSIgaWQ9IkxheWVyXzEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveG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wxNzQuMjgwNjM5NiwxODUuODczNjExNXoiLz4KCTwvZz4KPC9nPgo8L3N2Zz4K - 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.redhat.com), and `FILE_NAME` is the name of the report to upload. - - displayName: Koku Metrics Operator - icon: - - base64data: PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4KPCEtLSBHZW5lcmF0b3I6IEFkb2JlIElsbHVzdHJhdG9yIDIyLjEuMCwgU1ZHIEV4cG9ydCBQbHVnLUluIC4gU1ZHIFZlcnNpb246IDYuMDAgQnVpbGQgMCkgIC0tPgo8c3ZnIHZlcnNpb249IjEuMSIgaWQ9IkxheWVyXzEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4IgoJIHZpZXdCb3g9IjAgMCAzMDAgMzAwIiBzdHlsZT0iZW5hYmxlLWJhY2tncm91bmQ6bmV3IDAgMCAzMDAgMzAwOyIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSI+CjxzdHlsZSB0eXBlPSJ0ZXh0L2NzcyI+Cgkuc3Qwe2ZpbGw6I0VFMDAwMDt9Cjwvc3R5bGU+Cjx0aXRsZT5Db3N0LWljb248L3RpdGxlPgo8ZGVzYz5DcmVhdGVkIHdpdGggU2tldGNoLjwvZGVzYz4KPGc+Cgk8Zz4KCQk8cGF0aCBjbGFzcz0ic3QwIiBkPSJNMjM5LjAzNzAzMzEsMTE3LjI3NTE3N2MtMy4yNjU4MDgxLTQxLjk4OTA1MTgtMzguMjU2Njgz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Q2NC0wLjU3MTM1MDEsMS4zNzMwNzc0bC0zLjg5ODA4NjUsNC4wMTMyNzUxCgkJCWMtMC4zMDg3MTU4LDAuMjMwMzkyNS0wLjY2ODEwNjEsMC4zODI0MzEtMS4wOTIwMTA1LDAuNDU2MTYxNWMtMC40MTkyOTYzLDAuMDc4MzIzNC0wLjgyMDE1OTksMC0xLjIwMjU5MDktMC4yMjU3NjkKCQkJYy0xLjE0MjcxNTUtMC44NDMyMDA3LTIuNDQyMDc3Ni0xLjI2MjQ5NjktMy44OTgwODY1LTEuMjYyNDk2OWgtNy42NzYzNjExYy0wLjkxNjkxNTksMC0xLjcwMDIyNTgsMC4zMjI1MjUtMi4zNDk4OTkzLDAuOTcyMjEzNwoJCQljLTAuNjQ5Njg4NywwLjY0OTY3MzUtMC45NzY4MjE5LDEuNDc0NDQxNS0wLjk3NjgyMTksMi40NjUwODc5YzAsMC42ODY1NTQsMC4yMzAzOTI1LDEuMzM2MjEyMiwwLjY5MTE0NjksMS45NDkwMzU2CgkJCWMwLjQ1NjE2MTUsMC42MTI4MjM1LDEuMDMyMTE5OCwxLjAzMjExOTgsMS43MTg2NTg0LDEuMjYyNDk2OUwxNzQuMjgwNjM5NiwxODUuODczNjExNXoiLz4KCTwvZz4KPC9nPgo8L3N2Zz4K - 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.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Dc3Ni0xLjI2MjQ5NjktMy44OTgwODY1LTEuMjYyNDk2OWgtNy42NzYzNjExYy0wLjkxNjkxNTksMC0xLjcwMDIyNTgsMC4zMjI1MjUtMi4zNDk4OTkzLDAuOTcyMjEzNwoJCQljLTAuNjQ5Njg4NywwLjY0OTY3MzUtMC45NzY4MjE5LDEuNDc0NDQxNS0wLjk3NjgyMTksMi40NjUwODc5YzAsMC42ODY1NTQsMC4yMzAzOTI1LDEuMzM2MjEyMiwwLjY5MTE0NjksMS45NDkwMzU2CgkJCWMwLjQ1NjE2MTUsMC42MTI4MjM1LDEuMDMyMTE5OCwxLjAzMjExOTgsMS43MTg2NTg0LDEuMjYyNDk2OUwxNzQuMjgwNjM5NiwxODUuODczNjExNXoiLz4KCTwvZz4KPC9nPgo8L3N2Zz4K - 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: PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4KPCEtLSBHZW5lcmF0b3I6IEFkb2JlIElsbHVzdHJhdG9yIDIyLjEuMCwgU1ZHIEV4cG9ydCBQbHVnLUluIC4gU1ZHIFZlcnNpb246IDYuMDAgQnVpbGQgMCkgIC0tPgo8c3ZnIHZlcnNpb249IjEuMSIgaWQ9Ik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MTE0NjksMS45NDkwMzU2CgkJCWMwLjQ1NjE2MTUsMC42MTI4MjM1LDEuMDMyMTE5OCwxLjAzMjExOTgsMS43MTg2NTg0LDEuMjYyNDk2OUwxNzQuMjgwNjM5NiwxODUuODczNjExNXoiLz4KCTwvZz4KPC9nPgo8L3N2Zz4K - 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.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+Cgkuc3Qwe2ZpbGw6I0VFMDAwMDt9Cjwvc3R5bGU+Cjx0aXRsZT5Db3N0LWljb248L3RpdGxlPgo8ZGVzYz5DcmVhdGVkIHdpdGggU2tldGNoLjwvZGVzYz4KPGc+Cgk8Zz4KCQk8cGF0aCBjbGFzcz0ic3QwIiBkPSJNMjM5LjAzNzAzMzEsMTE3LjI3NTE3N2MtMy4yNjU4MDgxLTQxLjk4OTA1MTgtMzguMjU2NjgzMy03NC42NDcyMDE1LTgxLjE3ODgzMy03NC42NDcyMDE1CgkJCWMtMjc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MTMyNzUxCgkJCWMtMC4zMDg3MTU4LDAuMjMwMzkyNS0wLjY2ODEwNjEsMC4zODI0MzEtMS4wOTIwMTA1LDAuNDU2MTYxNWMtMC40MTkyOTYzLDAuMDc4MzIzNC0wLjgyMDE1OTksMC0xLjIwMjU5MDktMC4yMjU3NjkKCQkJYy0xLjE0MjcxNTUtMC44NDMyMDA3LTIuNDQyMDc3Ni0xLjI2MjQ5NjktMy44OTgwODY1LTEuMjYyNDk2OWgtNy42NzYzNjExYy0wLjkxNjkxNTksMC0xLjcwMDIyNTgsMC4zMjI1MjUtMi4zNDk4OTkzLDAuOTcyMjEzNwoJCQljLTAuNjQ5Njg4NywwLjY0OTY3MzUtMC45NzY4MjE5LDEuNDc0NDQxNS0wLjk3NjgyMTksMi40NjUwODc5YzAsMC42ODY1NTQsMC4yMzAzOTI1LDEuMzM2MjEyMiwwLjY5MTE0NjksMS45NDkwMzU2CgkJCWMwLjQ1NjE2MTUsMC42MTI4MjM1LDEuMDMyMTE5OCwxLjAzMjExOTgsMS43MTg2NTg0LDEuMjYyNDk2OUwxNzQuMjgwNjM5NiwxODUuODczNjExNXoiLz4KCTwvZz4KPC9nPgo8L3N2Zz4K - 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+Cgk8Zz4KCQk8cGF0aCBjbGFzcz0ic3QwIiBkPSJNMjM5LjAzNzAzMzEsMTE3LjI3NTE3N2MtMy4yNjU4MDgxLTQxLjk4OTA1MTgtMzguMjU2NjgzMy03NC42NDcyMDE1LTgxLjE3ODgzMy03NC42NDcyMDE1CgkJCWMtMjcuNTI2MTUzNiwwLTUzLjE4NjEyNjcsMTMuOTk2MzQ5My02OC4xMTU1NzAxLDM3LjMyMzYwMDhjLTEuODY2MTgwNCwwLTMuNzMyMzUzMi0wLjQ2NjU0NTEtNi4wNjUwNzg3LTAuNDY2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xLjIwMjU5MDktMC4yMjU3NjkKCQkJYy0xLjE0MjcxNTUtMC44NDMyMDA3LTIuNDQyMDc3Ni0xLjI2MjQ5NjktMy44OTgwODY1LTEuMjYyNDk2OWgtNy42NzYzNjExYy0wLjkxNjkxNTksMC0xLjcwMDIyNTgsMC4zMjI1MjUtMi4zNDk4OTkzLDAuOTcyMjEzNwoJCQljLTAuNjQ5Njg4NywwLjY0OTY3MzUtMC45NzY4MjE5LDEuNDc0NDQxNS0wLjk3NjgyMTksMi40NjUwODc5YzAsMC42ODY1NTQsMC4yMzAzOTI1LDEuMzM2MjEyMiwwLjY5MTE0NjksMS45NDkwMzU2CgkJCWMwLjQ1NjE2MTUsMC42MTI4MjM1LDEuMDMyMTE5OCwxLjAzMjExOTgsMS43MTg2NTg0LDEuMjYyNDk2OUwxNzQuMjgwNjM5NiwxODUuODczNjExNXoiLz4KCTwvZz4KPC9nPgo8L3N2Zz4K - 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: PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4KPCEtLSBHZW5lcmF0b3I6IEFkb2JlIElsbHVzdHJhdG9yIDIyLjEuMCwgU1ZHIEV4cG9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MjE5LDEuNDc0NDQxNS0wLjk3NjgyMTksMi40NjUwODc5YzAsMC42ODY1NTQsMC4yMzAzOTI1LDEuMzM2MjEyMiwwLjY5MTE0NjksMS45NDkwMzU2CgkJCWMwLjQ1NjE2MTUsMC42MTI4MjM1LDEuMDMyMTE5OCwxLjAzMjExOTgsMS43MTg2NTg0LDEuMjYyNDk2OUwxNzQuMjgwNjM5NiwxODUuODczNjExNXoiLz4KCTwvZz4KPC9nPgo8L3N2Zz4K - 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: PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4KPCEtLSBHZW5lcmF0b3I6IEFkb2JlIElsbHVzdHJhdG9yIDIyLjEuMCwgU1ZHIEV4cG9ydCBQbHVnLUluIC4gU1ZHIFZlcnNpb246IDYuMDAgQnVpbGQgMCkgIC0tPgo8c3ZnIHZlcnNpb249IjEuMSIgaWQ9IkxheWVyXzEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIg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MyMTE5OCwxLjAzMjExOTgsMS43MTg2NTg0LDEuMjYyNDk2OUwxNzQuMjgwNjM5NiwxODUuODczNjExNXoiLz4KCTwvZz4KPC9nPgo8L3N2Zz4K - 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: PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4KPCEtLSBHZW5lcmF0b3I6IEFkb2JlIElsbHVzdHJhdG9yIDIyLjEuMCwgU1ZHIEV4cG9ydCBQbHVnLUluIC4gU1ZHIFZlcnNpb246IDYuMDAgQnVpbGQgMCkgIC0tPgo8c3ZnIHZlcnNpb249IjEuMSIgaWQ9IkxheWVyXzEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4IgoJIHZpZXdCb3g9IjAgMCAzMDAgMzAwIiBzdHlsZT0iZW5hYmxlLWJhY2tncm91bmQ6bmV3IDAgMCA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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 Operator - icon: - - base64data: PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4KPCEtLSBHZW5lcmF0b3I6IEFkb2JlIElsbHVzdHJhdG9yIDIyLjEuMCwgU1ZHIEV4cG9ydCBQbHVnLUluIC4gU1ZHIFZlcnNpb246IDYuMDAgQnVpbGQgMCkgIC0tPgo8c3ZnIHZlcnNpb249IjEuMSIgaWQ9IkxheWVyXzEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy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42MTI4MjM1LDEuMDMyMTE5OCwxLjAzMjExOTgsMS43MTg2NTg0LDEuMjYyNDk2OUwxNzQuMjgwNjM5NiwxODUuODczNjExNXoiLz4KCTwvZz4KPC9nPgo8L3N2Zz4K - 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+Cgk8Zz4KCQk8cGF0aCBjbGFzcz0ic3QwIiBkPSJNMjM5LjAzNzAzMzEsMTE3LjI3NTE3N2MtMy4yNjU4MDgxLTQxLjk4OTA1MTgtMzguMjU2NjgzMy03NC42NDcyMDE1LTgxLjE3ODgzMy03NC42NDcyMDE1CgkJCWMtMjcuNTI2MTUzNiwwLTUzLjE4NjEyNjcsMTMuOTk2MzQ5My02OC4xMTU1NzAxLDM3LjMyMzYwMDhjLTEuODY2MTgwNCwwLTMuNzMyMzUzMi0wLjQ2NjU0NTEtNi4wNjUwNzg3LTAuNDY2NTQ1MQoJCQljLTM0LjUyNDMzMDEsMC02Mi45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MjcxNTUtMC44NDMyMDA3LTIuNDQyMDc3Ni0xLjI2MjQ5NjktMy44OTgwODY1LTEuMjYyNDk2OWgtNy42NzYzNjExYy0wLjkxNjkxNTksMC0xLjcwMDIyNTgsMC4zMjI1MjUtMi4zNDk4OTkzLDAuOTcyMjEzNwoJCQljLTAuNjQ5Njg4NywwLjY0OTY3MzUtMC45NzY4MjE5LDEuNDc0NDQxNS0wLjk3NjgyMTksMi40NjUwODc5YzAsMC42ODY1NTQsMC4yMzAzOTI1LDEuMzM2MjEyMiwwLjY5MTE0NjksMS45NDkwMzU2CgkJCWMwLjQ1NjE2MTUsMC42MTI4MjM1LDEuMDMyMTE5OCwxLjAzMjExOTgsMS43MTg2NTg0LDEuMjYyNDk2OUwxNzQuMjgwNjM5NiwxODUuODczNjExNXoiLz4KCTwvZz4KPC9nPgo8L3N2Zz4K - 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: PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4KPCEtLSBHZW5lcmF0b3I6IEFkb2JlIElsbHVzdHJhdG9yIDIyLjEuMCwgU1ZHIEV4cG9ydCBQbHVnLUluIC4gU1ZHIFZlcnNpb246IDYuMDAgQnVpbGQgMCkgIC0tPgo8c3ZnIHZlcnNpb249IjEuMSIgaWQ9IkxheWVyXzEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4IgoJIHZpZXdCb3g9IjAgMCAzMDAgMzAwIiBzdHlsZT0iZW5hYmxlLWJhY2tncm91bmQ6bmV3IDAgMCAzMDAgMzAwOyIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSI+CjxzdHlsZSB0eXBlPSJ0ZXh0L2NzcyI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NTExNDU5NCwxLjMxNzc5NDh2NS41MDE1NDExCgkJCWMzLjY2NzY5NDEsMCw2Ljk1NzU2NTMsMS4xNDcyOTMxLDkuODYwMzgyMSwzLjQzNzMwMTZjMC40NTYxNzY4LDAuMzgyNDQ2MywwLjcyMzQxOTIsMC44NDMyMDA3LDAuODAxNzQyNiwxLjM3NzY4NTUKCQkJYzAuMDczNzE1MiwwLjUzNDUwMDEtMC4xMTUyMDM5LDAuOTkwNjQ2NC0wLjU3MTM1MDEsMS4zNzMwNzc0bC0zLjg5ODA4NjUsNC4wMTMyNzUxCgkJCWMtMC4zMDg3MTU4LDAuMjMwMzkyNS0wLjY2ODEwNjEsMC4zODI0MzEtMS4wOTIwMTA1LDAuNDU2MTYxNWMtMC40MTkyOTYzLDAuMDc4MzIzNC0wLjgyMDE1OTksMC0xLjIwMjU5MDktMC4yMjU3NjkKCQkJYy0xLjE0MjcxNTUtMC44NDMyMDA3LTIuNDQyMDc3Ni0xLjI2MjQ5NjktMy44OTgwODY1LTEuMjYyNDk2OWgtNy42NzYzNjExYy0wLjkxNjkxNTksMC0xLjcwMDIyNTgsMC4zMjI1MjUtMi4zNDk4OTkzLDAuOTcyMjEzNwoJCQljLTAuNjQ5Njg4NywwLjY0OTY3MzUtMC45NzY4MjE5LDEuNDc0NDQxNS0wLjk3NjgyMTksMi40NjUwODc5YzAsMC42ODY1NTQsMC4yMzAzOTI1LDEuMzM2MjEyMiwwLjY5MTE0NjksMS45NDkwMzU2CgkJCWMwLjQ1NjE2MTUsMC42MTI4MjM1LDEuMDMyMTE5OCwxLjAzMjExOTgsMS43MTg2NTg0LDEuMjYyNDk2OUwxNzQuMjgwNjM5NiwxODUuODczNjExNXoiLz4KCTwvZz4KPC9nPgo8L3N2Zz4K - 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: PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4KPCEtLSBHZW5lcmF0b3I6IEFkb2JlIElsbHVzdHJhdG9yIDIyLjEuMCwgU1ZHIEV4cG9ydCBQbHVnLUluIC4gU1ZHIFZlcnNpb246IDYuMDAgQnVpbGQgMCkgIC0tPgo8c3ZnIHZlcnNpb249IjEuMSIgaWQ9IkxheWVyXzEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4IgoJIHZpZXdCb3g9IjAgMCAzMDAgMzAwIiBzdHlsZT0iZW5hYmxlLWJhY2tncm91bmQ6bmV3IDAgMCAzMDAgMzAwOyIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSI+CjxzdHlsZSB0eXBlPSJ0ZXh0L2NzcyI+Cgkuc3Qwe2ZpbGw6I0VFMDAwMDt9Cjwvc3R5bGU+Cjx0aXRsZT5Db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ljk1NzU2NTMsMS4xNDcyOTMxLDkuODYwMzgyMSwzLjQzNzMwMTZjMC40NTYxNzY4LDAuMzgyNDQ2MywwLjcyMzQxOTIsMC44NDMyMDA3LDAuODAxNzQyNiwxLjM3NzY4NTUKCQkJYzAuMDczNzE1MiwwLjUzNDUwMDEtMC4xMTUyMDM5LDAuOTkwNjQ2NC0wLjU3MTM1MDEsMS4zNzMwNzc0bC0zLjg5ODA4NjUsNC4wMTMyNzUxCgkJCWMtMC4zMDg3MTU4LDAuMjMwMzkyNS0wLjY2ODEwNjEsMC4zODI0MzEtMS4wOTIwMTA1LDAuNDU2MTYxNWMtMC40MTkyOTYzLDAuMDc4MzIzNC0wLjgyMDE1OTksMC0xLjIwMjU5MDktMC4yMjU3NjkKCQkJYy0xLjE0MjcxNTUtMC44NDMyMDA3LTIuNDQyMDc3Ni0xLjI2MjQ5NjktMy44OTgwODY1LTEuMjYyNDk2OWgtNy42NzYzNjExYy0wLjkxNjkxNTksMC0xLjcwMDIyNTgsMC4zMjI1MjUtMi4zNDk4OTkzLDAuOTcyMjEzNwoJCQljLTAuNjQ5Njg4NywwLjY0OTY3MzUtMC45NzY4MjE5LDEuNDc0NDQxNS0wLjk3NjgyMTksMi40NjUwODc5YzAsMC42ODY1NTQsMC4yMzAzOTI1LDEuMzM2MjEyMiwwLjY5MTE0NjksMS45NDkwMzU2CgkJCWMwLjQ1NjE2MTUsMC42MTI4MjM1LDEuMDMyMTE5OCwxLjAzMjExOTgsMS43MTg2NTg0LDEuMjYyNDk2OUwxNzQuMjgwNjM5NiwxODUuODczNjExNXoiLz4KCTwvZz4KPC9nPgo8L3N2Zz4K - 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+Cjx0aXRsZT5Db3N0LWljb248L3RpdGxlPgo8ZGVzYz5DcmVhdGVkIHdpdGggU2tldGNoLjwvZGVzYz4KPGc+Cgk8Zz4KCQk8cGF0aCBjbGFzcz0ic3QwIiBkPSJNMjM5LjAzNzAzMzEsMTE3LjI3NTE3N2MtMy4yNjU4MDgxLTQxLjk4OTA1MTgtMzguMjU2NjgzMy03NC42NDcyMDE1LTgxLjE3ODgzMy03NC42NDcyMDE1CgkJCWMtMjcuNTI2MTUzNiwwLTUzLjE4NjEyNjcsMTMuOTk2MzQ5My02OC4xMTU1NzAxLDM3LjMyMzYwMDhjL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IwMTA1LDAuNDU2MTYxNWMtMC40MTkyOTYzLDAuMDc4MzIzNC0wLjgyMDE1OTksMC0xLjIwMjU5MDktMC4yMjU3NjkKCQkJYy0xLjE0MjcxNTUtMC44NDMyMDA3LTIuNDQyMDc3Ni0xLjI2MjQ5NjktMy44OTgwODY1LTEuMjYyNDk2OWgtNy42NzYzNjExYy0wLjkxNjkxNTksMC0xLjcwMDIyNTgsMC4zMjI1MjUtMi4zNDk4OTkzLDAuOTcyMjEzNwoJCQljLTAuNjQ5Njg4NywwLjY0OTY3MzUtMC45NzY4MjE5LDEuNDc0NDQxNS0wLjk3NjgyMTksMi40NjUwODc5YzAsMC42ODY1NTQsMC4yMzAzOTI1LDEuMzM2MjEyMiwwLjY5MTE0NjksMS45NDkwMzU2CgkJCWMwLjQ1NjE2MTUsMC42MTI4MjM1LDEuMDMyMTE5OCwxLjAzMjExOTgsMS43MTg2NTg0LDEuMjYyNDk2OUwxNzQuMjgwNjM5NiwxODUuODczNjExNXoiLz4KCTwvZz4KPC9nPgo8L3N2Zz4K - 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: PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4KPCEtLSBHZW5lcmF0b3I6IEFkb2JlIElsbHVzdHJhdG9yIDIyLjEuMCwgU1ZHIEV4cG9ydCBQbHVnLUluIC4gU1ZHIFZlcnNpb246IDYuMDAgQnVpbGQgMCkgIC0tPgo8c3ZnIHZlcnNpb249IjEuMSIgaWQ9IkxheWVyXzEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4IgoJIHZpZXdCb3g9IjAgMCAzMDAgMzAwIiBzdHlsZT0iZW5hYmxlLWJhY2tncm91bmQ6bmV3IDAgMCAzMDAgMzAwOyIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSI+CjxzdHlsZSB0eXBlPSJ0ZXh0L2NzcyI+Cgkuc3Qwe2ZpbGw6I0VFMDAwMDt9Cjwvc3R5bGU+Cjx0aXRsZT5Db3N0LWljb248L3RpdGxlPgo8ZGVzYz5DcmVhdGVkIHdpdGggU2tldGNoLjwvZGVzYz4KPGc+Cgk8Zz4KCQk8cGF0aCBjbGFzcz0ic3QwIiBkPSJNMjM5LjAzNzA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zY4NTUKCQkJYzAuMDczNzE1MiwwLjUzNDUwMDEtMC4xMTUyMDM5LDAuOTkwNjQ2NC0wLjU3MTM1MDEsMS4zNzMwNzc0bC0zLjg5ODA4NjUsNC4wMTMyNzUxCgkJCWMtMC4zMDg3MTU4LDAuMjMwMzkyNS0wLjY2ODEwNjEsMC4zODI0MzEtMS4wOTIwMTA1LDAuNDU2MTYxNWMtMC40MTkyOTYzLDAuMDc4MzIzNC0wLjgyMDE1OTksMC0xLjIwMjU5MDktMC4yMjU3NjkKCQkJYy0xLjE0MjcxNTUtMC44NDMyMDA3LTIuNDQyMDc3Ni0xLjI2MjQ5NjktMy44OTgwODY1LTEuMjYyNDk2OWgtNy42NzYzNjExYy0wLjkxNjkxNTksMC0xLjcwMDIyNTgsMC4zMjI1MjUtMi4zNDk4OTkzLDAuOTcyMjEzNwoJCQljLTAuNjQ5Njg4NywwLjY0OTY3MzUtMC45NzY4MjE5LDEuNDc0NDQxNS0wLjk3NjgyMTksMi40NjUwODc5YzAsMC42ODY1NTQsMC4yMzAzOTI1LDEuMzM2MjEyMiwwLjY5MTE0NjksMS45NDkwMzU2CgkJCWMwLjQ1NjE2MTUsMC42MTI4MjM1LDEuMDMyMTE5OCwxLjAzMjExOTgsMS43MTg2NTg0LDEuMjYyNDk2OUwxNzQuMjgwNjM5NiwxODUuODczNjExNXoiLz4KCTwvZz4KPC9nPgo8L3N2Zz4K - 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: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/3.3.0/Dockerfile b/koku-metrics-operator/3.3.0/Dockerfile deleted file mode 100644 index 40c845c69..000000000 --- a/koku-metrics-operator/3.3.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.3.0/manifests/koku-metrics-operator.clusterserviceversion.yaml b/koku-metrics-operator/3.3.0/manifests/koku-metrics-operator.clusterserviceversion.yaml deleted file mode 100644 index 6f687fe4e..000000000 --- a/koku-metrics-operator/3.3.0/manifests/koku-metrics-operator.clusterserviceversion.yaml +++ /dev/null @@ -1,615 +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:0c8091f0c04593c19249755bde418cc09e5d30cc55c6cbff2c5b60bdf60dfde9 - createdAt: "2024-05-31T16:09:13Z" - 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.3.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.3.0: - * Storage reports now contain `node`, `csi_driver`, and `csi_volume_handle` fields. - * The PVC capacity is now populated using the `kube_persistentvolume_capacity_bytes` metric instead of `kubelet_volume_stats_capacity_bytes`. - * To receive resource optimization recommendations for your namespaces, you must now first enable each namespace. To enable a namespace, label it with `insights_cost_management_optimizations='true'`. In the CLI, run: - ``` - oc label namespace NAMESPACE insights_cost_management_optimizations="true" --overwrite=true - ``` - * __DEPRECATION NOTICE__: Basic authentication is deprecated and will not be supported beyond December 31, 2024. If the default token authentication method cannot be used, you must switch to [service account](https://console.redhat.com/iam/service-accounts) authentication ([more on creating a service account](https://access.redhat.com/articles/7036194)). Once you have created your service account, follow [this documentation](https://access.redhat.com/documentation/en-us/cost_management_service/1-latest/html-single/integrating_openshift_container_platform_data_into_cost_management/index#service-account-authentication_adding-an-ocp-int) on how to configure your operator to use service account authentication. Service-accounts must also be used if manually uploading payloads to console.redhat.com. - - ## 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 -H "Authorization: Bearer ${ACCESS_TOKEN}" - - where `FILE_NAME` is the name of the report to upload. The `ACCESS_TOKEN` is acquired using a [service-account](https://access.redhat.com/articles/7036194). - displayName: Koku Metrics Operator - icon: - - base64data: PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4KPCEtLSBHZW5lcmF0b3I6IEFkb2JlIElsbHVzdHJhdG9yIDIyLjEuMCwgU1ZHIEV4cG9ydCBQbHVnLUluIC4gU1ZHIFZlcnNpb246IDYuMDAgQnVpbGQgMCkgIC0tPgo8c3ZnIHZlcnNpb249IjEuMSIgaWQ9IkxheWVyXzEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4IgoJIHZpZXdCb3g9IjAgMCAzMDAgMzAwIiBzdHlsZT0iZW5hYmxlLWJhY2tncm91bmQ6bmV3IDAgMCAzMDAgMzAwOyIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSI+CjxzdHlsZSB0eXBlPSJ0ZXh0L2NzcyI+Cgkuc3Qwe2ZpbGw6I0VFMDAwMDt9Cjwvc3R5bGU+Cjx0aXRsZT5Db3N0LWljb248L3RpdGxlPgo8ZGVzYz5DcmVhdGVkIHdpdGggU2tldGNoLjwvZGVzYz4KPGc+Cgk8Zz4KCQk8cGF0aCBjbGFzcz0ic3QwIiBkPSJNMjM5LjAzNzAzMzEsMTE3L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JYzAuMDczNzE1MiwwLjUzNDUwMDEtMC4xMTUyMDM5LDAuOTkwNjQ2NC0wLjU3MTM1MDEsMS4zNzMwNzc0bC0zLjg5ODA4NjUsNC4wMTMyNzUxCgkJCWMtMC4zMDg3MTU4LDAuMjMwMzkyNS0wLjY2ODEwNjEsMC4zODI0MzEtMS4wOTIwMTA1LDAuNDU2MTYxNWMtMC40MTkyOTYzLDAuMDc4MzIzNC0wLjgyMDE1OTksMC0xLjIwMjU5MDktMC4yMjU3NjkKCQkJYy0xLjE0MjcxNTUtMC44NDMyMDA3LTIuNDQyMDc3Ni0xLjI2MjQ5NjktMy44OTgwODY1LTEuMjYyNDk2OWgtNy42NzYzNjExYy0wLjkxNjkxNTksMC0xLjcwMDIyNTgsMC4zMjI1MjUtMi4zNDk4OTkzLDAuOTcyMjEzNwoJCQljLTAuNjQ5Njg4NywwLjY0OTY3MzUtMC45NzY4MjE5LDEuNDc0NDQxNS0wLjk3NjgyMTksMi40NjUwODc5YzAsMC42ODY1NTQsMC4yMzAzOTI1LDEuMzM2MjEyMiwwLjY5MTE0NjksMS45NDkwMzU2CgkJCWMwLjQ1NjE2MTUsMC42MTI4MjM1LDEuMDMyMTE5OCwxLjAzMjExOTgsMS43MTg2NTg0LDEuMjYyNDk2OUwxNzQuMjgwNjM5NiwxODUuODczNjExNXoiLz4KCTwvZz4KPC9nPgo8L3N2Zz4K - 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:0c8091f0c04593c19249755bde418cc09e5d30cc55c6cbff2c5b60bdf60dfde9 - 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.3.0 - relatedImages: - - name: koku-metrics-operator - image: quay.io/project-koku/koku-metrics-operator@sha256:0c8091f0c04593c19249755bde418cc09e5d30cc55c6cbff2c5b60bdf60dfde9 - replaces: koku-metrics-operator.v3.2.1 diff --git a/koku-metrics-operator/3.3.0/metadata/annotations.yaml b/koku-metrics-operator/3.3.0/metadata/annotations.yaml deleted file mode 100644 index cc0425a9d..000000000 --- a/koku-metrics-operator/3.3.0/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.3.0/tests/scorecard/config.yaml b/koku-metrics-operator/3.3.0/tests/scorecard/config.yaml deleted file mode 100644 index a19cb8f47..000000000 --- a/koku-metrics-operator/3.3.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.3.1/manifests/koku-metrics-cfg.openshift.io_kokumetricsconfigs.yaml b/koku-metrics-operator/3.3.1/manifests/koku-metrics-cfg.openshift.io_kokumetricsconfigs.yaml deleted file mode 100644 index 2429f89b7..000000000 --- a/koku-metrics-operator/3.3.1/manifests/koku-metrics-cfg.openshift.io_kokumetricsconfigs.yaml +++ /dev/null @@ -1,1060 +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 - deprecation_notice: - description: DeprecationNotice is a field of KokuMetricsConfig - to represent a deprecation notice. - type: string - 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-optimization 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.3.1/tests/scorecard/config.yaml b/koku-metrics-operator/3.3.1/tests/scorecard/config.yaml deleted file mode 100644 index a19cb8f47..000000000 --- a/koku-metrics-operator/3.3.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