Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 16 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ on:
jobs:
release:
runs-on: ubuntu-latest
if: "! contains(toJSON(github.event.commits.*.message), '[skip ci]')"

steps:
- name: Checkout
Expand All @@ -21,7 +20,23 @@ jobs:
git config user.name "$GITHUB_ACTOR"
git config user.email "$GITHUB_ACTOR@users.noreply.github.com"

- name: Prepare GPG key
run: |
gpg_dir=.cr-gpg
mkdir "$gpg_dir"
keyring="$gpg_dir/secring.gpg"
base64 -d <<< "$GPG_KEYRING_BASE64" > "$keyring"
passphrase_file="$gpg_dir/passphrase"
echo "$GPG_PASSPHRASE" > "$passphrase_file"
echo "CR_PASSPHRASE_FILE=$passphrase_file" >> "$GITHUB_ENV"
echo "CR_KEYRING=$keyring" >> "$GITHUB_ENV"
env:
GPG_KEYRING_BASE64: "${{ secrets.GPG_KEYRING_BASE64 }}"
GPG_PASSPHRASE: "${{ secrets.GPG_PASSPHRASE }}"

- name: Run chart-releaser
uses: helm/chart-releaser-action@v1.7.0
with:
config: cr.yaml
env:
CR_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
240 changes: 23 additions & 217 deletions README.md

Large diffs are not rendered by default.

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.3.2
version: 1.3.3
appVersion: "latest"
111 changes: 111 additions & 0 deletions charts/switcher-api/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,111 @@
# Switcher API Helm Charts

Deploy Switcher API using `switcherapi/switcher-api` Helm Charts.

## Usage

> Install MongoDB (optional)
```console
helm repo add bitnami https://charts.bitnami.com/bitnami
helm install db bitnami/mongodb \
--namespace=switcherapi --create-namespace \
--set auth.enabled=false
```

> Install Switcher API
```console
helm repo add switcherapi https://switcherapi.github.io/helm-charts
helm install switcherapi switcherapi/switcher-api \
--namespace=switcherapi --create-namespace
```

> Uninstall Switcher API
```console
helm uninstall switcherapi --namespace switcherapi
```

### API parameters

| Name | Description | Value |
| -------------------------- | ---------------------------------------------- | ---------------------- |
| `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.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.maxRequestPerMinute` | API max Request per minute | 1000 |
| `api.env.jwtAdminTokenRenewInterval` | User 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 | `` |
| `api.env.switcherGitOpsJwtSecret` | Switcher GitOps Secret | `` |
| `api.env.switcherGitOpsUrl` | Switcher GitOps URL | `` |

### Resolver API parameters

| Name | Description | Value |
| ------------------------------- | ---------------------------------------------- | ---------------------- |
| `resolver.image.tag` | Switcher Resolver Image tag | `latest` |
| `resolver.service.port` | API Service port | 3001 |

| Name | Description | Value |
| ------------------------------------------ | --------------------------------------------- | --------------------- |
| `resolver.env.sslSecretName` | API SSL Secret Name (enable HTTPS) | `` |
| `resolver.env.resourceSecret` | API Swagger (user: admin) | `admin` |
| `resolver.env.switcherApiLogger` | API log | true |
| `resolver.env.metricsActivated` | API Metrics record | true |
| `resolver.env.relayBypassHttps` | Relay: Bypass HTTPS validation | false |
| `resolver.env.relayBypassVerification` | Relay: Bypass Verification | false |
| `resolver.env.regexMaxTimeout` | Regex Validator: max timeout in ms | 3000 |
| `resolver.env.regexMaxBlacklist` | Regex Validator: max blacklist entries | 50 |
| `resolver.env.maxRequestPerMinute` | API max Request per minute | 0 (unlimited) |
| `resolver.env.jwtClientTokenExpTime` | Component token renew interval | `5m` |
| `resolver.env.mongoUri` | API Database URI | < see values.yml > |

### Management parameters

| Name | Description | Value |
| -------------------------- | ---------------------------------------------- | ---------------------- |
| `management.image.tag` | Switcher Management Image tag | `latest` |
| `management.service.port` | Management Service port | 8080 |

| Name | Description | Value |
| ------------------------------------- | ---------------------------------------------- | ------------------------- |
| `management.env.switcherApiUrl` | Switcher API URL | `http://localhost:3000` |
| `management.env.switcherManagementUrl`| Management callback URL | `http://localhost:8080` |
| `management.env.switcherSlackUrl` | Switcher Slack App URL | `http://localhost:5000` |
| `management.env.allowHomeView` | Allow Home View | false |
| `management.env.googleRecaptcha` | Google ReCaptcha Public Key | `` |
| `management.env.bitbucketClientId` | Bitbucket Client Id | `` |
| `management.env.githubClientId` | GitHub Client Id | `` |

## Local

Validate Chart from local Values
```console
helm install -f charts/switcher-api/values.yaml switcherapi ./charts/switcher-api/ \
--namespace=switcherapi --create-namespace
```

SSL Enabled
```console
helm install -f charts/switcher-api/values.yaml switcherapi ./charts/switcher-api/ \
--namespace=switcherapi --create-namespace \
--set api.env.sslSecretName="[CHANGE_ME]" \
--set management.env.switcherApiUrl="https://localhost:3000" \
--set management.env.switcherManagementUrl="https://localhost:8080"
```
2 changes: 1 addition & 1 deletion charts/switcher-gitops/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.0.0
version: 1.0.1
appVersion: "latest"
51 changes: 51 additions & 0 deletions charts/switcher-gitops/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
# Switcher GitOps Helm Charts

Deploy Switcher GitOps using `switcherapi/switcher-gitops` Helm Charts.

## Usage

> Install Switcher GitOps
```console
helm repo add switcherapi https://switcherapi.github.io/helm-charts
helm install switchergitops switcherapi/switcher-gitops \
--namespace=switcherapi --create-namespace \
--set app.env.switcherAPIUrl="" \
--set app.env.switcherApiJwtSecret="" \
--set app.env.gitTokenPrivateKey=""
```

> Uninstall Switcher GitOps
```console
helm uninstall switchergitops --namespace switcherapi
```

### App parameters

| Name | Description | Value |
| -------------------------- | ---------------------------------------------- | ---------------------- |
| `app.image.tag` | Switcher GitOps Image tag | `latest` |
| `app.service.port` | App Service port | 8000 |

| Name | Description | Value |
| --------------------------------- | ---------------------------------------------- | ---------------------- |
| `api.env.sslEnabled` | API SSL Enabled | `false` |
| `api.env.sslSecretName` | API SSL Secret Name (enable HTTPS) | `` |
| `app.env.switcherCertPath` | API SSL Cert Path | `` |
| `app.env.gitTokenPrivateKey` | Git Token Private Key | `` |
| `app.env.switcherApiJwtSecret` | Switcher API JWT Secret | `` |
| `app.env.switcherAPIUrl` | Switcher API URL | `` |
| `app.env.switcherApiCACert` | Switcher API SSL CA Cert Path | `` |
| `app.env.mongoUri` | API Database URI | < see values.yml > |
| `app.env.mongoDb` | API Database Name | `switcher-gitops` |
| `app.env.hanlderWaitingTime` | Handler Waiting Time | `1m` |
| `app.env.gitUser` | Git User | `switcher-gitops` |

## Local

Validate Chart from local Values
```console
helm install -f charts/switcher-gitops/values.yaml switchergitops ./charts/switcher-gitops/ \
--namespace=switcherapi --create-namespace \
--set app.env.switcherApiJwtSecret="[CHANGE_ME]" \
--set app.env.gitTokenPrivateKey="[CHANGE_ME]"
```
2 changes: 1 addition & 1 deletion charts/switcher-slack-app/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.2
version: 1.1.3
appVersion: "latest"
58 changes: 58 additions & 0 deletions charts/switcher-slack-app/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@

# Switcher Slack App Helm Charts

Deploy Switcher Slack App using `switcherapi/switcher-slack-app` Helm Charts.

## Usage

Follow the [Switcher Slack App instructions](https://github.com/switcherapi/switcher-slack-app#create-slack-app) to create a Slack App before installing this Chart.

> Install Switcher Slack App
```console
helm repo add switcherapi https://switcherapi.github.io/helm-charts
helm install switcherslackapp switcherapi/switcher-slack-app \
--namespace=switcherapi --create-namespace \
--set app.env.slackClientId="" \
--set app.env.switcherManagementUrl="" \
--set app.env.switcherAPIUrl="" \
--set app.env.switcherJwtSecret="" \
--set app.env.slackSigningSecret="" \
--set app.env.slackClientSecret=""
```

> Uninstall Switcher Slack App
```console
helm uninstall switcherslackapp --namespace switcherapi
```

### App parameters

| Name | Description | Value |
| -------------------------- | ---------------------------------------------- | ---------------------- |
| `app.image.tag` | Switcher Slack App Image tag | `latest` |
| `app.service.port` | App Service port | 5000 |

| Name | Description | Value |
| --------------------------------- | ---------------------------------------------- | ---------------------- |
| `app.env.slackClientId` | Slack Client Id | `` |
| `app.env.switcherManagementUrl` | Switcher Management URL for callback auth | `` |
| `app.env.switcherAPIUrl` | Switcher API URL | `` |
| `app.env.switcherCertPath` | Switcher API SSL Cert Path | `` |
| `app.env.switcherJwtSecret` | Switcher API JWT Secret | `` |
| `app.env.slackSigningSecret` | Slack Signing Secret | `` |
| `app.env.slackClientSecret` | Slack Client Secret | `` |
| `app.env.sslSecretName` | SSL Secret Name (TLS for Switcher API) | `` |

## Local

Validate Chart from local Values
```console
helm install -f charts/switcher-slack-app/values.yaml switcherslackapp ./charts/switcher-slack-app/ \
--namespace=switcherapi --create-namespace \
--set app.env.slackClientId="[CHANGE_ME]" \
--set app.env.switcherManagementUrl="https://cloud.switcherapi.com" \
--set app.env.switcherAPIUrl="https://switcherapi.com/api" \
--set app.env.switcherJwtSecret="[CHANGE_ME]" \
--set app.env.slackSigningSecret="[CHANGE_ME]" \
--set app.env.slackClientSecret="[CHANGE_ME]"
```
2 changes: 2 additions & 0 deletions cr.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
sign: true
key: roger.petruki@gmail.com