-
Notifications
You must be signed in to change notification settings - Fork 94
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adressing proxy promotion issues #773
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,32 +6,59 @@ | |
* [ProxyConfigPromoteSpec](#proxyconfigpromotespec) | ||
* [Provider Account Reference](#provider-account-reference) | ||
* [ProxyConfigPromoteStatus](#proxyconfigpromotestatus) | ||
* [ConditionSpec](#conditionspec) | ||
|
||
|
||
Generated using [github-markdown-toc](https://github.com/ekalinin/github-markdown-toc) | ||
|
||
## ProxyConfigPromote | ||
|
||
| **Field** | **json field**| **Type** | **Info** | | ||
| --- | --- |---------------------------------------------------| --- | | ||
| **Field** | **json field**| **Type** | **Info** | | ||
| --- | --- | --- | --- | | ||
| Spec | `spec` | [ProxyConfigPromoteSpec](#ProxyConfigPromoteSpec) | The specfication for the custom resource | | ||
| Status | `status` | [ProxyConfigPromoteStatus](#ProxyConfigPromoteStatus) | The status for the custom resource | | ||
| Status | `status` | [ProxyConfigPromoteStatus](#ProxyConfigPromoteStatus) | The status for the custom resource | | ||
|
||
### ProxyConfigPromoteSpec | ||
|
||
| **Field** | **json field** | **Type** | **Info** | **Required** | | ||
|----------------------------|----------------------|----------|------------------------------------------------------------------------------------------------------------------------------------------------------------|--------------| | ||
| ProductCRName | `productCRName` | string | Name of product Cr | Yes | | ||
| Production | `production` | bool | If true promotes to production, if false promotes to staging | No | | ||
| DeleteCR | `deleteCR` | bool | If true deletes the resource after a succesfull promotion | No | | No | | ||
| **Field** | **json field**| **Type** | **Info** | **Required** | | ||
| --- | --- | --- | --- | --- | | ||
| ProductCRName | `productCRName` | string | Name of product Cr| Yes | | ||
| Production | `production` | bool | If true promotes to production, if false promotes to staging | No | | ||
| DeleteCR | `deleteCR` | bool | If true deletes the resource after a succesfull promotion | No | | ||
| Provider Account Reference | `providerAccountRef` | object | [Provider account credentials secret reference](#provider-account-reference) | No | | ||
|
||
#### Provider Account Reference | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. there is no provider account reference in the spec. To be consistent with other CRDs, there should be one. Have a look at the product, backend CRDs types. Regarding the doc you can just "copy&paste" the documentation here. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. good spot, added it in. Thanks. |
||
|
||
Provider account credentials secret referenced by a [v1.LocalObjectReference](https://v1-15.docs.kubernetes.io/docs/reference/generated/kubernetes-api/v1.15/#localobjectreference-v1-core) type object. | ||
|
||
The secret must have `adminURL` and `token` fields with tenant credentials. | ||
Tenant controller will fetch the secret and read the following fields: | ||
|
||
| **Field** | **Description** | **Required** | | ||
| --- | --- | --- | | ||
| *token* | Provider account access token with *Account Management API* scope and *Read & Write* permission | Yes | | ||
| *adminURL* | Provider account's domain URL | Yes | | ||
|
||
For example: | ||
|
||
``` | ||
apiVersion: v1 | ||
kind: Secret | ||
metadata: | ||
name: mytenant | ||
type: Opaque | ||
stringData: | ||
adminURL: https://my3scale-admin.example.com:443 | ||
token: "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX" | ||
``` | ||
|
||
### ProxyConfigPromoteStatus | ||
|
||
| **Field** | **json field** | **Type** | **Info** | | ||
|---------------------|----------------------| --- |-----------------------------------------------------------------------------| | ||
| ProductId | `productId` | string | Internal ID of promted product | | ||
| LatestProductionVersion | `latestProductionVersion` | string | int with the current version in the production environment | | ||
| LatestStagingVersion | `latestStagingVersion` | string | int with the current version in the staging environment | | ||
| **Field** | **json field** | **Type** | **Info** | | ||
| --- | --- | --- | --- | | ||
| ProductId | `productId` | string | Internal ID of promted product | | ||
| LatestProductionVersion | `latestProductionVersion` | string | int with the current version in the production environment | | ||
| LatestStagingVersion | `latestStagingVersion` | string | int with the current version in the staging environment | | ||
| Conditions | `conditions` | array of [conditions](#ConditionSpec) | resource conditions | | ||
|
||
For example: | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this "spaghetti code" is calling for a refactor :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not to be done in this PR, though