Skip to content

Commit

Permalink
[COST-4230] Update csv-description: add deprecation notice (#242)
Browse files Browse the repository at this point in the history
* add deprecation notice

* update csv-description

* fix typos
  • Loading branch information
djnakabaale authored Dec 5, 2023
1 parent 68c7a2c commit b3525a5
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 8 deletions.
2 changes: 1 addition & 1 deletion api/v1beta1/metricsconfig_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ type AuthenticationSpec struct {

// AuthType is a field of KokuMetricsConfig to represent the authentication type to be used basic, service-account or token.
// Valid values are:
// - "basic" : Enables authentication using user and password from authentication secret.
// - "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.
// +kubebuilder:default="token"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ spec:
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" : Enables authentication
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"
Expand Down
16 changes: 10 additions & 6 deletions docs/csv-description.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,10 @@ The Koku Metrics Operator (`koku-metrics-operator`) collects the metrics require
* 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.
Expand Down Expand Up @@ -60,8 +64,8 @@ If these assumptions are not met, the operator will not deploy correctly. In the

## Configurable parameters:
* `authentication`:
* `type: token` -> The authentication method for connecting to `console.redhat.com`. The default and preferred method is `token`. `basic` 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` or `service-account`. This parameter is required **only if** the authentication type is `basic` or `service-account`.
* `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.
Expand All @@ -83,21 +87,21 @@ If these assumptions are not met, the operator will not deploy correctly. In the
## 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:
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: `username` and `password`
* 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` or `service-account` authentication, edit the following values in the spec:
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
* for basic auth type (deprecated)
```
authentication:
secret_name: SECRET-NAME
Expand Down

0 comments on commit b3525a5

Please sign in to comment.