Skip to content

Commit

Permalink
Added support to control cache permission for switcher-api (#18)
Browse files Browse the repository at this point in the history
  • Loading branch information
petruki committed Oct 20, 2023
1 parent 3f3452e commit ad4cdfa
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 25 deletions.
49 changes: 25 additions & 24 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,30 +52,31 @@ helm uninstall switcherapi --namespace switcherapi
| `api.image.tag` | Switcher API Image tag | `latest` |
| `api.service.port` | API Service port | 3000 |

| Name | Description | Value |
| ----------------------------- | ---------------------------------------------- | ---------------------- |
| `api.env.sslSecretName` | API SSL Secret Name (enable HTTPS) | `` |
| `api.env.resourceSecret` | API Swagger (user: admin) | `admin` |
| `api.env.switcherApiLogger` | API log | true |
| `api.env.historyActivated` | API Change Log record | true |
| `api.env.metricsActivated` | API Metrics record | true |
| `api.env.googleSkipAuth` | Skip Google ReCaptcha validation | true |
| `api.env.metricsMaxPage` | Metrics: max logs per page | 50 |
| `api.env.strategyMaxOperation`| Strategy: max operation entries | 100 |
| `api.env.relayBypassHttps` | Relay: Bypass HTTPS validation | false |
| `api.env.relayBypassVerification` | Relay: Bypass Verification | false |
| `api.env.regexMaxTimeout` | Regex Validator: max timeout in ms | 3000 |
| `api.env.regexMaxBlacklist` | Regex Validator: max blacklist entries | 50 |
| `api.env.maxRequestPerMinute` | API max Request per minute | 0 (unlimited) |
| `api.env.jwtAdminTokenRenewInterval` | User token renew interval | `5m` |
| `api.env.jwtClientTokenExpTime` | Component token renew interval | `5m` |
| `api.env.mongoUri` | API Database URI | < see values.yml > |
| `api.env.bitbucketClientId` | Bitbucket Client Id | `` |
| `api.env.bitbucketClientSecret` | Bitbucket Client Secret | `` |
| `api.env.githubClientId` | GitHub Client Id | `` |
| `api.env.githubClientSecret` | GitHub Client Secret | `` |
| `api.env.googleRecaptchaSecret` | Google ReCaptcha Secret | `` |
| `api.env.switcherSlackJwtSecret`| Switcher Slack Secret | `` |
| Name | Description | Value |
| ------------------------------------- | --------------------------------------------- | --------------------- |
| `api.env.sslSecretName` | API SSL Secret Name (enable HTTPS) | `` |
| `api.env.resourceSecret` | API Swagger (user: admin) | `admin` |
| `api.env.switcherApiLogger` | API log | true |
| `api.env.historyActivated` | API Change Log record | true |
| `api.env.metricsActivated` | API Metrics record | true |
| `api.env.permissionCacheActivated` | API Permission Cache | true |
| `api.env.googleSkipAuth` | Skip Google ReCaptcha validation | true |
| `api.env.metricsMaxPage` | Metrics: max logs per page | 50 |
| `api.env.strategyMaxOperation` | Strategy: max operation entries | 100 |
| `api.env.relayBypassHttps` | Relay: Bypass HTTPS validation | false |
| `api.env.relayBypassVerification` | Relay: Bypass Verification | false |
| `api.env.regexMaxTimeout` | Regex Validator: max timeout in ms | 3000 |
| `api.env.regexMaxBlacklist` | Regex Validator: max blacklist entries | 50 |
| `api.env.maxRequestPerMinute` | API max Request per minute | 0 (unlimited) |
| `api.env.jwtAdminTokenRenewInterval` | User token renew interval | `5m` |
| `api.env.jwtClientTokenExpTime` | Component token renew interval | `5m` |
| `api.env.mongoUri` | API Database URI | < see values.yml > |
| `api.env.bitbucketClientId` | Bitbucket Client Id | `` |
| `api.env.bitbucketClientSecret` | Bitbucket Client Secret | `` |
| `api.env.githubClientId` | GitHub Client Id | `` |
| `api.env.githubClientSecret` | GitHub Client Secret | `` |
| `api.env.googleRecaptchaSecret` | Google ReCaptcha Secret | `` |
| `api.env.switcherSlackJwtSecret` | Switcher Slack Secret | `` |

### Management parameters

Expand Down
2 changes: 1 addition & 1 deletion charts/switcher-api/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,5 @@ maintainers:
url: https://github.com/petruki

type: application
version: 1.1.0
version: 1.1.1
appVersion: "latest"
1 change: 1 addition & 0 deletions charts/switcher-api/templates/api/configmap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ data:
SWITCHER_API_LOGGER: {{ .Values.api.env.switcherApiLogger | quote }}
HISTORY_ACTIVATED: {{ .Values.api.env.historyActivated | quote }}
METRICS_ACTIVATED: {{ .Values.api.env.metricsActivated | quote }}
PERMISSION_CACHE_ACTIVATED: {{ .Values.api.env.permissionCacheActivated | quote }}
GOOGLE_SKIP_AUTH: {{ .Values.api.env.googleSkipAuth | quote }}
METRICS_MAX_PAGE: {{ default 50 .Values.api.env.metricsMaxPage | quote }}
MAX_STRATEGY_OPERATION: {{ default 100 .Values.api.env.strategyMaxOperation | quote }}
Expand Down
1 change: 1 addition & 0 deletions charts/switcher-api/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ api:
switcherApiLogger: true
historyActivated: true
metricsActivated: true
permissionCacheActivated: true
googleSkipAuth: true

# Enable SSL (tls.crt and tls.key)
Expand Down

0 comments on commit ad4cdfa

Please sign in to comment.