switcher-api

by Switcher API

Helm chartv1.3.7App latestVerified publisher

A Switcher API Helm chart for Kubernetes

About this chart

Switcher API Helm Charts

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

Usage

Install MongoDB (optional)

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

helm repo add switcherapi https://switcherapi.github.io/helm-charts
helm install switcherapi switcherapi/switcher-api \
    --namespace=switcherapi --create-namespace

Uninstall Switcher API

helm uninstall switcherapi --namespace switcherapi

API parameters

NameDescriptionValue
api.image.tagSwitcher API Image taglatest
api.service.portAPI Service port3000
NameDescriptionValue
api.env.sslSecretNameAPI SSL Secret Name (enable HTTPS)``
api.env.resourceSecretAPI Swagger (user: admin)admin
api.env.switcherApiLoggerAPI logtrue
api.env.historyActivatedAPI Change Log recordtrue
api.env.permissionCacheActivatedAPI Permission Cachetrue
api.env.googleSkipAuthSkip Google ReCaptcha validationtrue
api.env.metricsMaxPageMetrics: max logs per page50
api.env.strategyMaxOperationStrategy: max operation entries100
api.env.relayBypassHttpsRelay: Bypass HTTPS validationfalse
api.env.relayBypassVerificationRelay: Bypass Verificationfalse
api.env.maxRequestPerMinuteAPI max Request per minute1000
api.env.jwtAdminTokenRenewIntervalUser token renew interval5m
api.env.mongoUriAPI Database URI< see values.yml >
api.env.bitbucketClientIdBitbucket Client Id``
api.env.bitbucketClientSecretBitbucket Client Secret``
api.env.githubClientIdGitHub Client Id``
api.env.githubClientSecretGitHub Client Secret``
api.env.googleRecaptchaSecretGoogle ReCaptcha Secret``
api.env.switcherSlackJwtSecretSwitcher Slack Secret``
api.env.switcherGitOpsJwtSecretSwitcher GitOps Secret``
api.env.switcherGitOpsUrlSwitcher GitOps URL``
api.env.samlEntryPointSAML Entry Point URL``
api.env.samlIssuerSAML Issuer``
api.env.samlCertificateSAML Certificate (Base64 encoded)``
api.env.samlPrivateKeySAML Private Key (Base64 encoded)``
api.env.samlSessionSecretSAML Session Secret (Base64 encoded)``
api.env.samlCallbackEndpointUrlSAML Callback Endpoint URL``
api.env.samlRedirectEndpointUrlSAML Redirect Endpoint URL``
api.env.samlIdentifierFormatSAML Identifier Formaturn:oasis:names:tc:SAML:1.1:nameid-format:emailAddress
api.env.samlAcceptedClockSkewMsSAML Accepted Clock Skew in ms5000
api.env.oauthIssuerUrlOAuth Issuer Public URL``
api.env.oauthConsentUrlOAuth Consent Public URL``
api.env.oauthAllowedRedirectHostsOAuth Allowed Redirect Hosts``

Resolver API parameters

NameDescriptionValue
resolver.image.tagSwitcher Resolver Image taglatest
resolver.service.portAPI Service port3001
NameDescriptionValue
resolver.env.sslSecretNameAPI SSL Secret Name (enable HTTPS)``
resolver.env.resourceSecretAPI Swagger (user: admin)admin
resolver.env.switcherApiLoggerAPI logtrue
resolver.env.metricsActivatedAPI Metrics recordtrue
resolver.env.relayBypassHttpsRelay: Bypass HTTPS validationfalse
resolver.env.relayBypassVerificationRelay: Bypass Verificationfalse
resolver.env.regexMaxTimeoutRegex Validator: max timeout in ms3000
resolver.env.regexMaxBlacklistRegex Validator: max blacklist entries50
resolver.env.maxRequestPerMinuteAPI max Request per minute0 (unlimited)
resolver.env.cacheSnapshotMsCache snapshot duration in ms``
resolver.env.cacheComponentMsCache component duration in ms``
resolver.env.jwtClientTokenExpTimeComponent token renew interval5m
resolver.env.mongoUriAPI Database URI< see values.yml >

Management parameters

NameDescriptionValue
management.image.tagSwitcher Management Image taglatest
management.service.portManagement Service port8080
NameDescriptionValue
management.env.switcherApiUrlSwitcher API URLhttp://localhost:3000
management.env.switcherManagementUrlManagement callback URLhttp://localhost:8080
management.env.switcherSlackUrlSwitcher Slack App URLhttp://localhost:5000
management.env.allowHomeViewAllow Home Viewfalse
management.env.allowInternalAuthAllow Internal Authentication (email/password)true
management.env.allowSamlAuthAllow SAML Authenticationfalse
management.env.googleRecaptchaGoogle ReCaptcha Public Key``
management.env.bitbucketClientIdBitbucket Client Id``
management.env.githubClientIdGitHub Client Id``

Local

Validate Chart from local Values

helm install -f charts/switcher-api/values.yaml switcherapi ./charts/switcher-api/ \
    --namespace=switcherapi --create-namespace

SSL Enabled

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"

SAML Enabled

helm install -f charts/switcher-api/values.yaml switcherapi ./charts/switcher-api/ \
    --namespace=switcherapi --create-namespace \
    --set management.env.allowSamlAuth=true \
    --set api.env.samlEntryPoint="https://<idp-url>" \
    --set api.env.samlCertificate="[BASE64_ENCODED_CERTIFICATE]" \
    --set api.env.samlSessionSecret="[BASE64_ENCODED_SESSION_SECRET]" \
    --set api.env.samlCallbackEndpointUrl="http://localhost:3000" \
    --set api.env.samlRedirectEndpointUrl="http://localhost:8080"

OAuth Enabled

helm install -f charts/switcher-api/values.yaml switcherapi ./charts/switcher-api/ \
    --namespace=switcherapi --create-namespace \
    --set api.env.oauthIssuerUrl="https://api.switcherapi.com" \
    --set api.env.oauthConsentUrl="https://cloud.switcherapi.com"

Deploy switcher-api with OpenTenant

Each tenant gets its own release of this chart, with its own namespace, secrets and domain. The builder below already has switcher-api on a Hetzner server. Change the host, add apps from the marketplace, then copy the generated files. Providers and prices are samples, and nothing here is sent anywhere.

  1. Pick a serverConnect Hetzner, OVHcloud or AWS. The builder starts on Hetzner, the cheapest sample rate.
  2. Place the chartswitcher-api is pinned at v1.3.7 in opentenant.yaml. Drag more apps from the marketplace onto a rack.
  3. ApplySave opentenant.yaml and main.tf from the console, then run the commands below.
# opentenant.yaml, main.tf and dns.tf come from the builder below
opentenant validate opentenant.yaml
terraform init && terraform apply