Customizing Layer5 Cloud Deployment with Helm

Layer5’s Helm charts support a number of configuration options. Please refer to following table of configuration options.

The layer5-cloud chart installs the Layer5 Cloud server and, as subcharts, Kratos and Hydra. The defaults below are those of chart version 0.2.0, which ships with Layer5 Cloud v1.0.278. Run helm show values layer5/layer5-cloud to print the defaults of the version you install. For the install procedure, see Deploying Layer5 Cloud.

The chart writes env.* values into one ConfigMap and one Secret, and the server pod reads both as environment variables. Sensitive values go to the Secret. Any change to either rolls the server pods.

Where it landsValues
Secretenv.githubappkeypath (the key file content), env.githubAppClientSecret, env.stripeWebhookSecret, env.githubWebhookSecret, env.kratosWebhookApiKey, env.cloudCredentialEncryptionKey, env.cloudOidcStateHmacKey, env.providerOrgGithubSecret, env.providerOrgGoogleSecret, and all four smtp.* values
ConfigMapEvery other env.* value

Both the Secret and the Helm release still hold your values in plaintext.

KeyDefaultMeaning
replicaCount1Server replicas. Ignored when autoscaling is on.
image.repositorylayer5/meshery-cloudServer image.
image.taglatestImage tag. Pin it to a release. When empty, the chart uses its own appVersion.
image.pullPolicyAlwaysImage pull policy.
resources.requests256Mi memory, 250m CPURequested resources.
resources.limits{}No limits by default.
autoscaling.enabledfalseEnables a HorizontalPodAutoscaler.
autoscaling.minReplicas, .maxReplicas1, 100Autoscaler bounds.
autoscaling.targetCPUUtilizationPercentage80Autoscaler target.
serviceAccount.namemeshery-cloudService account.
fullnameOverridemeshery-cloudThe Deployment, Service, ConfigMap, and Secret derive their names from this.

The container has a liveness probe on /healthz and readiness and startup probes on /readyz.

KeyDefaultMeaning
service.typeClusterIPService type.
service.port9876Service port for the server.
service.hydraAdminProxyPort9879Port of the internal proxy that sits between Kratos and the Hydra admin API. Set 0 to turn the proxy off.
ingress.enabledtrueCreates the Ingress.
ingress.classNamenginxIngress class.
ingress.hostsOne empty host routing / to port 9876You must set the host. Add /kratos and /hydra paths.
ingress.tls[]TLS secret and hosts. The chart does not create certificates.
KeyDefaultMeaning
proto""http or https. Used to build redirects to organization custom domains. Set https on a TLS deployment.
serverbaseurlhttp://localhost:9876Public base URL. Also the base of the OAuth2 callback <serverbaseurl>/callback.
serverHostlocalhostPublic hostname.
port9876Port the server listens on.
environmentclouddevelopment connects to a local database at 127.0.0.1:5432, tolerates a failed migration, logs rendered email bodies, and skips reCAPTCHA. Use any other value in production.
debug"false"Sets the DEBUG variable.
loglevel4Log level: 4 info, 5 debug, 6 trace. Not in the default values; the server uses 4 when unset.
db, hydradb, kratosdbIn-cluster PostgreSQL URLs with sslmode=disableConnection strings. Change the user, password, host, and sslmode.
minmesheryversionv1.0.55Lowest Meshery Server version that can complete sign-in.
initConfig""Provider initialization document. See Provider initialization.
otelConfig""OpenTelemetry tracing configuration. See Monitoring.
anonymousUserSessionsEnabledfalseLets the deployment serve guest sessions. Leave off unless you operate that flow.
ghtoken""GitHub token the server uses to dispatch workflows.
githubappidnot setGitHub App identifier for the GitHub integration.
githubappkeypathkey.pemPath of the GitHub App private key file inside the chart.
githubAppClientId, githubAppClientSecret""OAuth client ID and a client secret from the settings page of the GitHub App that githubappid names. Layer5 Cloud v1.0.287 and later uses them to confirm which installations of the App the authorizing GitHub account can access. When either is empty, the server logs a warning at startup and no GitHub connection can be created or re-authorized. The App must also meet the Self-hosted GitHub App requirements.
stripeSecretKey, stripePublicKeynot setStripe keys for payment processing.
recaptchaSiteKey, recaptchaSecretKeynot setGoogle reCAPTCHA keys. Signup verification runs only when both are set. Organizations on a custom domain with a different registrable domain are exempt.
kratospublicnone, requiredIn-cluster address of the Kratos public service. The chart fails to render without it.
kratosadminnot setIn-cluster address of the Kratos admin service.
kratosbrowsernot setAddress browsers use for Kratos, such as https://cloud.example.com/kratos.
hydrapublichttp://hydra-public:4444Address of Hydra’s public API. The default name does not match the subchart service.
hydrabrowsernot setAddress browsers use for Hydra.
hydraadminhttp://hydra-admin:4445Address of Hydra’s admin API. The default name does not match the subchart service.
oauthclientidmeshery-cloudId of the Hydra OAuth2 client the server uses.
oauthsecretsecret1234567890Secret of that client. Replace it.
kratosWebhookApiKey""Key Kratos sends as X-API-Key on registration hooks. When empty, the server accepts the placeholder dev_token.
providerOrgGithubKey, providerOrgGithubSecret""Client id and secret of the default GitHub OAuth application.
providerOrgGoogleKey, providerOrgGoogleSecret""Client id and secret of the default Google OAuth application.
cloudCredentialEncryptionKeynot setBase64 of 32 bytes. Encrypts stored credentials. When empty, encrypting or decrypting a credential fails.
cloudOidcStateHmacKeynot setBase64 of 32 bytes. Signs brokered social sign-in. When empty, brokered sign-in fails.
webhookHelpAndSupportnot setURL that receives support requests.
webhookKanvasEntitlementnot setURL that receives Kanvas entitlement events.
webhookSignupRequestnot setURL that receives signup decisions.
KeyDefaultMeaning
smtp.smtphost""Relay host. Must resolve to a public address.
smtp.smtpport""25, 465, 587, or 2525. Port 465 uses implicit TLS; the others require STARTTLS.
smtp.smtpusername""Mailbox login. Must be a full email address, because it becomes the From address.
smtp.smtppassword""Mailbox password.

Set all four or none. A partial configuration stops the server at startup. See Email / SMTP Troubleshooting.

The kratos.kratos.config tree is passed to Kratos unchanged. The values you must change for a real deployment:

KeyDefaultChange to
kratos.enabledtrueKeep true unless you bring your own Kratos.
kratos.service.public.port, .admin.port9010, 9011Public and admin ports.
kratos.kratos.config.dsnIn-cluster URL for the kratos databaseYour connection string.
kratos.kratos.config.secrets.cookie, .cipher[""]Long random strings.
kratos.kratos.config.serve.public.base_urlhttp://localhost:9010/https://<host>/kratos.
kratos.kratos.config.selfservice.flows.registration.after.*.hooksweb_hook to http://localhost:9876/identity/usershttps://<host>/api/identity/users and your kratosWebhookApiKey.
kratos.kratos.config.selfservice.methods.oidc.config.providersGitHub and Google with empty credentialsYour client_id and client_secret.
kratos.kratos.config.courierSMTP courier, empty connection stringYour courier.

Password sign-in is on with a minimum length of 8. Login flows last 720m, registration 24h, recovery and verification 720h. A list in a values file replaces the chart’s list as a whole.

KeyDefaultChange to
hydraPrefixcloud-hydraServices become <prefix>-public and <prefix>-admin.
hydra.hydra.config.dsnIn-cluster URL for the hydra databaseYour connection string.
hydra.hydra.config.secrets.system[""]A long random string.
hydra.hydra.config.urls.self.public, .self.issuerhttps://public.hydra.localhost/hydra/https://<host>/hydra/.
hydra.hydra.dangerousForceHttptruefalse once Hydra is reached over TLS.
hydra.hydra.config.strategies.access_tokenjwtKeep jwt.
hydra.hydra.config.ttl.access_token, .refresh_token, .id_token, .auth_code24h, 1000h, 1h, 1hToken lifetimes.

Related Reading