Configuration reference
kornercode is deployed with one Helm chart, kornercode (config/helm). It installs the CustomResourceDefinitions, the controller Deployment, its RBAC, the admission webhook configuration, optionally the internal certificate authority used for mTLS, and the gateway (dashboard and reverse proxy). Values are grouped by component: mtls is shared and sits at the top level, operator settings live under operator: and gateway settings under gateway:. The gateway binary is configured entirely through environment variables; the chart sets them from Helm values, and variables the chart does not model can be added through gateway.env. Defaults below are quoted from the chart values file and the source code. “Empty” means an empty string, and “unset” means the key is not present in values.yaml but is read by a template when you provide it.
Chart name kornercode, chart version 0.0.0, appVersion 0.0.0.
helm upgrade --install kornercode config/helm \
--namespace kornercode --create-namespaceShared values
| Key | Default | Description |
|---|---|---|
mtls.enabled | false | Enables mTLS between the gateway and workspace pods, for the operator and the gateway at once. Renders the internal CA resources and the gateway certificate, and sets MTLS_ENABLED on both components (and MTLS_ISSUER_NAME on the operator, MTLS_CERT_DIR and GATEWAY_TLS_ENABLED on the gateway). See mTLS. |
mtls.certManagerNamespace | cert-manager | Namespace of the internal CA Certificate (kornercode-internal-ca). Must be cert-manager’s cluster resource namespace, because a CA ClusterIssuer reads its Secret from there. |
mtls.issuerName | kornercode-internal-ca-issuer | Written to MTLS_ISSUER_NAME when mtls.enabled is true: the ClusterIssuer that signs per-workspace certificates. The chart always names the issuer it creates kornercode-internal-ca-issuer; any other value must name an issuer you provide. |
mtls.certDir | /etc/kornercode/tls | Mount path of the kornercode-gateway-mtls Secret and value of the gateway’s MTLS_CERT_DIR. Used only when mtls.enabled is true. |
mtls.gatewayTLSEnabled | true | Only takes effect when mtls.enabled is true. The gateway then serves HTTPS on 8443 with its mTLS certificate (GATEWAY_TLS_ENABLED); the probes, the Service’s https port and the Ingress backends use 8443, the Ingress gets the annotation traefik.ingress.kubernetes.io/backend-protocol: HTTPS, and the chart renders the Traefik ServersTransport kornercode-gateway-tls. Otherwise the gateway serves plain HTTP on 8080. |
Restrictions (restrictions:)
A top-level block, without a component prefix. Each key forces one restriction on for every team; teams can add their own in Team.spec.restrictions. All default to false. See Restrictions.
| Key | Default | Description |
|---|---|---|
restrictions.blockAdminIDEAccess | false | Admins can’t open the IDE of any workspace. |
restrictions.disableTestEndpoint | false | No workspace has a test endpoint. |
restrictions.disableFileDownloads | false | Adds code-server --disable-file-downloads. |
restrictions.disableFileUploads | false | Adds code-server --disable-file-uploads. |
restrictions.disableProxy | false | Adds code-server --disable-proxy. |
restrictions.disableWorkspaceTrust | false | Adds code-server --disable-workspace-trust. |
restrictions.disableGettingStartedOverride | false | Adds code-server --disable-getting-started-override. |
An unknown key makes helm template and helm install fail. The chart renders the keys set to true as the comma-separated PLATFORM_RESTRICTIONS environment variable on the operator (in the kornercode-operator-controller-default-env ConfigMap, whose checksum annotation rolls the operator when it changes) and on the gateway container. Either binary exits at start-up on an unknown name. Setting PLATFORM_RESTRICTIONS through gateway.env also fails the render, since it would override this value.
Client certificate values (clientCertificates:)
A top-level block, without a component prefix. It turns on the client-certificate gate: every request to the dashboard, dev and test hosts needs a company client certificate whose CN matches the signed-in person. Off by default. Procedures are in the admin guide. When enabled, the chart renders a cert-manager Certificate kornercode-ingress-client for the ingress client certificate (from kornercode-internal-ca-issuer, so the internal CA is rendered even with mtls.enabled: false), the Service kornercode-gateway-client-cert on port 8444, and the NetworkPolicy kornercode-gateway-client-cert; the main Ingress routes all three hosts to that Service. For headerDialect: traefik it also renders the ServersTransport kornercode-gateway-client-cert, the TLSOption kornercode-client-cert and the Middlewares kornercode-client-cert-strip and kornercode-client-cert-pass, attached to the main Ingress. The render fails, naming the value, when a required value is missing or invalid.
| Key | Default | Description |
|---|---|---|
clientCertificates.enabled | false | Sets CLIENT_CERT_ENABLED. Turns the gate on. When off, none of the objects above exist and the gateway behaves as without the feature. |
clientCertificates.companyCA.existingSecret | empty | Required. Secret in the release namespace with the key ca.crt (company roots and intermediates). Mounted for CLIENT_CERT_COMPANY_CA_FILE; the Traefik TLSOption also uses it. Changing its contents does not restart the gateway: restart it after a rotation. |
clientCertificates.headerDialect | traefik | Sets CLIENT_CERT_HEADER_DIALECT. How the ingress passes the client certificate: traefik (X-Forwarded-Tls-Client-Cert), nginx (Ssl-Client-Escaped-Cert, URL-encoded PEM) or envoy-xfcc (X-Forwarded-Client-Cert). The Traefik objects are rendered only for traefik, which also requires gateway.ingress.tls.enabled and gateway.ingress.tls.secretName, because the TLSOption’s strict SNI ignores the default certificate. For the other dialects, configure the ingress controller yourself (see the admin guide). |
clientCertificates.revocation.onUnavailable | deny | Sets CLIENT_CERT_CRL_ON_UNAVAILABLE. deny or allow: what to do when revocation status cannot be determined, for every user and request, break-glass included. With deny, a CRL outage that outlasts the cached lists locks everyone out, administrators included. With allow, the request goes through and is audited as revocation: unchecked. Integrity failures always deny. |
clientCertificates.revocation.timeout | 10s | Sets CLIENT_CERT_CRL_TIMEOUT. Per-fetch timeout for a CRL. |
clientCertificates.revocation.minRefresh | 5m | Sets CLIENT_CERT_CRL_MIN_REFRESH. Minimum time between fetches of the same CRL. |
clientCertificates.revocation.allowedHosts | [] | Sets CLIENT_CERT_CRL_ALLOWED_HOSTS (comma-joined). CRL hosts the gateway may contact; empty means no constraint. |
clientCertificates.networkPolicy.enabled | true | Renders a NetworkPolicy that admits only the ingress namespace to port 8444. The other gateway ports stay open as before. |
clientCertificates.networkPolicy.ingressNamespace | traefik | Namespace of the ingress controller pods. |
Variables the chart does not expose as values:
| Variable | Default | Description |
|---|---|---|
CLIENT_CERT_ADDR | :8444 | Listen address of the client-certificate listener, the only listener that serves the dashboard, dev and test hosts when the gate is on. The chart sets :8444. |
CLIENT_CERT_TLS_DIR | /etc/kornercode/tls | Directory with the gateway serving certificate and the internal CA (tls.crt, tls.key, ca.crt). The chart sets it to mtls.certDir. |
CLIENT_CERT_INGRESS_IDENTITY | kornercode-ingress | DNS SAN the ingress client certificate must carry. |
CLIENT_CERT_COMPANY_CA_FILE | none | Required with the gate on. Path of the company CA bundle. The chart mounts the Secret and sets this. |
Without the chart, CLIENT_CERT_ENABLED must be exactly true; a missing required variable or an invalid value stops the gateway at start-up.
Break-glass values (breakGlass:)
A top-level block. A non-empty mapping adds the break-glass button, an administrator sign-in with the client certificate alone that never contacts the identity provider. It requires clientCertificates.enabled: a mapping without the gate fails the render. Procedures are in the admin guide.
| Key | Default | Description |
|---|---|---|
breakGlass.mapping | [] | Mounted from the ConfigMap kornercode-break-glass-mapping for BREAK_GLASS_MAPPING_FILE. Empty means no break-glass. Each entry has cn, sub, username (required), email and groups (optional). cn and sub must be unique. cn, sub, username and email must be quoted strings; the render refuses numbers, so use --set-string on the command line. Changing the mapping restarts the gateway through a checksum annotation. |
breakGlass.sessionMaxLifetimeSeconds | 28800 | Sets BREAK_GLASS_SESSION_MAX_LIFETIME_SECONDS. Maximum lifetime of a break-glass session, on every host. Must be a positive whole number. |
Without the chart, BREAK_GLASS_MAPPING_FILE is the path of the mapping JSON; setting it while CLIENT_CERT_ENABLED is not true stops the gateway at start-up.
Image pull secrets (imagePullSecrets)
A top-level list, empty by default. Each entry names a Secret of type kubernetes.io/dockerconfigjson in the release namespace; the operator and gateway pods pull their images with them, for a private registry or mirror. Workspace pods do not use them.
imagePullSecrets:
- name: registry-pullOperator values (operator:)
| Key | Default | Description |
|---|---|---|
operator.image.repository | registry.gitlab.com/kornercloud.dev/kornercode | Image prefix. The full reference is <repository>/<controller>:<tag>, for example registry.gitlab.com/kornercloud.dev/kornercode/kornercode-controller:v0.1.0. |
operator.image.tag | "" | Image tag. When empty, v<appVersion> from Chart.yaml: the images released with the chart. |
operator.image.pullPolicy | IfNotPresent | Container image pull policy. |
operator.controllers | one entry, kornercode-controller | One Deployment, metrics Service and webhook Service is rendered per entry. The entry key is part of the resource names and of the image name. The webhook configurations reference <fullname>-kornercode-controller-webhook-svc, so keep the key kornercode-controller. |
operator.controllers.kornercode-controller.replicaCount | 1 | Deployment replicas (1 when unset). The chart enables leader election, so extra replicas stand by. |
operator.controllers.kornercode-controller.args | [] | Extra container arguments, appended after the chart-managed --metrics-bind-address=:8080 and --metrics-secure flags. See Operator flags. |
operator.controllers.kornercode-controller.resources | requests cpu: 50m, memory: 64Mi; limits cpu: 500m, memory: 256Mi | Container resource requests and limits. |
operator.controllers.kornercode-controller.tolerations | [] | Pod tolerations. |
operator.controllers.kornercode-controller.nodeSelector | {} | Pod node selector. |
operator.controllers.kornercode-controller.affinity | {} | Pod affinity. |
operator.controllers.kornercode-controller.envFrom | unset | Additional envFrom sources, appended after the chart’s ConfigMap. |
operator.controllers.kornercode-controller.volumeMounts | unset | Additional container volume mounts. |
operator.controllers.kornercode-controller.volumes | unset | Additional pod volumes. |
operator.global.logLevel | info | Written to LOG_LEVEL in the <fullname>-controller-default-env ConfigMap. The operator binary does not read LOG_LEVEL; use --zap-log-level in args to change verbosity. |
operator.global.clusterName | empty | Written to CLUSTER_NAME, the default for --cluster-name. Used as the cluster label on workspace resource metrics. |
operator.global.webhookCertificatesPath | /etc/ssl/certs/webhook | Written to WEBHOOK_CERTIFICATES_PATH, the default for --webhook-cert-path. The webhook certificate Secret is always mounted at /etc/ssl/certs/webhook; a different value requires a matching mount through volumes and volumeMounts. |
operator.workspaceRBAC.enabled | true | Renders a read-only Role and a RoleBinding for the workspace runner ServiceAccount in the release namespace (pods, logs, services, PVCs, events, and the code.kornercloud.dev workspaces, workspace profiles and teams). |
operator.workspaceRBAC.devServiceAccountName | workspace-runner | Name of that Role, RoleBinding and bound ServiceAccount. The operator creates workspace ServiceAccounts under the fixed name workspace-runner. |
operator.workspaceRBAC.adminServiceAccountName | workspace-admin | Not used by any template. |
operator.metrics.secure | false | Passed as --metrics-secure. When true, /metrics is served over HTTPS behind Kubernetes authentication and authorization. See Prometheus. |
operator.metrics.serviceMonitor.enabled | false | Renders a ServiceMonitor (monitoring.coreos.com/v1) per controller that scrapes the metrics port at /metrics over HTTP. Requires the Prometheus Operator CRDs. |
operator.metrics.serviceMonitor.interval | 30s | Scrape interval (30s when empty). |
operator.metrics.serviceMonitor.scrapeTimeout | unset | Scrape timeout; omitted when unset. |
operator.metrics.serviceMonitor.metricRelabelings | unset | Endpoint metricRelabelings; omitted when unset. |
operator.metrics.serviceMonitor.labels | unset | Labels added to the ServiceMonitor, for example to match a Prometheus serviceMonitorSelector. |
operator.nameOverride | unset | Replaces the chart name when computing the full name. |
operator.fullnameOverride | unset | Replaces the full name. By default the operator’s full name is kornercode-operator (the release name kornercode plus the suffix -operator). |
Fixed behavior that is not exposed as values:
- Container ports are
8080(metrics),9443(webhook) and8081(health). Liveness uses/healthzand readiness uses/readyz, both on port8081. - The pod also receives
NAMESPACEandPOD_NAMEfrom the downward API and all keys of the<fullname>-controller-default-envConfigMap throughenvFrom. - The ServiceAccount is always
kornercode-operator. The cluster-scopedClusterRolekornercode-manager-roleandClusterRoleBindingkornercode-manager-role-bindinghave fixed names, as do the mTLSClusterIssuers, so install one release of the chart per cluster. - The CRDs are rendered from
templates/crds/. They are installed and upgraded with the release and annotatedhelm.sh/resource-policy: keep, sohelm uninstallleaves them, and everyWorkspace,Team,WorkspaceProfileandSecurityProfile, in place. - The local environment installs the chart with
hack/local-dev/values.yaml, which setsoperator.global.clusterName: "mycluster",operator.image.pullPolicy: Neverandgateway.image.pullPolicy: Never(images are loaded into Kind) andmtls.enabled: true.
Operator flags
The controller binary is operator/cmd/controllers/kornercode. Flags use Go flag syntax. When a flag is repeated, the last occurrence wins, so flags passed through controllers.kornercode-controller.args override the chart-managed ones.
| Flag | Default | Description |
|---|---|---|
--metrics-bind-address | 0 | Metrics listen address. 0 disables the metrics server. The chart sets :8080. |
--metrics-secure | true | Serve metrics over HTTPS with Kubernetes authentication and authorization (TokenReview and SubjectAccessReview). --metrics-secure=false serves plain HTTP. The chart sets this from metrics.secure. |
--metrics-cert-path | empty | Directory that contains the metrics server certificate. When empty and metrics are secure, a self-signed certificate is generated at startup. |
--metrics-cert-name | tls.crt | Metrics server certificate file name. |
--metrics-cert-key | tls.key | Metrics server key file name. |
--health-probe-bind-address | :8081 | Listen address for /healthz and /readyz. |
--leader-elect | false | Enable leader election (lease ID 11122337.code.kornercloud.dev). The chart always passes it, so only one replica reconciles, also during a rolling update. The leader releases the lease when it stops. |
--webhook-cert-path | value of WEBHOOK_CERTIFICATES_PATH, empty if unset | Directory that contains the webhook serving certificate. When empty, the controller-runtime default <temp dir>/k8s-webhook-server/serving-certs is used. |
--webhook-cert-name | tls.crt | Webhook certificate file name. |
--webhook-cert-key | tls.key | Webhook key file name. |
--enable-http2 | false | Enable HTTP/2 on the metrics and webhook servers. When false, both servers negotiate HTTP/1.1 only. |
--cluster-name | value of CLUSTER_NAME, empty if unset | Value of the cluster label on workspace resource metrics. |
--namespace | empty | Accepted but not used. |
--kubeconfig | empty | Path to a kubeconfig file. Only required when running outside a cluster. |
--zap-devel | true | Development logging: console encoder, debug level, stack traces from warn. --zap-devel=false selects the JSON encoder, info level and stack traces from error. |
--zap-encoder | derived from --zap-devel | Log encoding: json or console. |
--zap-log-level | derived from --zap-devel | Log level: debug, info, error, panic, or an integer greater than 0 for increasing debug verbosity. |
--zap-stacktrace-level | derived from --zap-devel | Level at and above which stack traces are captured: info, error or panic. |
--zap-time-encoding | rfc3339 | Time encoding: epoch, millis, nano, iso8601, rfc3339 or rfc3339nano. |
Operator environment variables
The chart sets these through the <fullname>-controller-default-env ConfigMap. Defaults are those of the binary when the variable is absent.
| Variable | Required | Default | Description |
|---|---|---|---|
CLUSTER_NAME | No | empty | Default for --cluster-name. Chart: operator.global.clusterName. |
WEBHOOK_CERTIFICATES_PATH | No | empty | Default for --webhook-cert-path. Chart: operator.global.webhookCertificatesPath. |
OPERATOR_NAMESPACE | No | kornercode | Namespace the operator treats as its own. NetworkPolicies labeled code.kornercloud.dev/managed: "true" in this namespace are cloned into every Team namespace; a Team whose namespace equals it skips namespace creation and cloning. Chart: the release namespace. |
MTLS_ENABLED | No | false | Parsed with Go strconv.ParseBool; an unparsable value means false. Enables per-workspace certificates, the Envoy sidecar and the mTLS Service ports. Chart: mtls.enabled. |
MTLS_ISSUER_NAME | No | kornercode-internal-ca-issuer | ClusterIssuer used for per-workspace certificates. Chart: mtls.issuerName, set only when mtls.enabled is true. |
LOG_LEVEL | No | none | Set by the chart from operator.global.logLevel. Not read by the binary. |
NAMESPACE, POD_NAME | No | none | Set by the chart from the downward API. Not read by the binary. |
Gateway values (gateway:)
Install the chart in the namespace that holds the gateway Secret.
| Key | Default | Description |
|---|---|---|
gateway.replicaCount | 1 | Deployment replicas. |
gateway.image.repository | registry.gitlab.com/kornercloud.dev/kornercode/kornercode-gateway | Image repository. The full reference is <repository>:<tag>. |
gateway.image.tag | "" | Image tag. When empty, v<appVersion> from Chart.yaml: the image released with the chart. |
gateway.image.pullPolicy | IfNotPresent | Container image pull policy. |
gateway.resources | requests cpu: 50m, memory: 64Mi; limits cpu: 500m, memory: 256Mi | Container resource requests and limits. |
gateway.hosts.kornercode | empty | Sets KORNERCODE_HOST. Required. Dashboard host as browsers see it; may include a port, for example dashboard.kornercode.local:8443. The Ingress uses it without the port. |
gateway.hosts.dev | empty | Sets DEV_HOST. Required. Host that proxies to workspace code-server instances. |
gateway.hosts.test | empty | Sets TEST_HOST. Required. Host that proxies to the application on each workspace’s test port. |
gateway.oidc.url | empty | Sets OIDC_URL. Required. |
gateway.oidc.clientID | kornercode-gateway | Sets OIDC_CLIENT_ID. |
gateway.oidc.existingSecret | kornercode-gateway-secrets | Secret from which OIDC_CLIENT_SECRET and SESSION_SECRET are read. The key names are fixed. |
gateway.oidc.identityClaim | preferred_username | Sets OIDC_IDENTITY_CLAIM. ID token claim compared with the client certificate’s CN (case-insensitive) when clientCertificates.enabled; unused otherwise. |
gateway.oidc.groupsClaim | groups | Sets OIDC_GROUPS_CLAIM. ID token claim holding the user’s groups, for teams and admin rights. |
gateway.adminGroups | empty | Sets ADMIN_GROUPS. Empty disables admin access. |
gateway.security.sessionDomain | empty | Sets SESSION_DOMAIN. Empty issues host-only session cookies. |
gateway.security.sessionMaxAgeSeconds | 28800 | Sets SESSION_MAX_AGE_SECONDS. |
gateway.security.sessionMaxLifetimeSeconds | 86400 | Sets SESSION_MAX_LIFETIME_SECONDS. |
gateway.ingress.enabled | true | Renders an Ingress named kornercode-gateway with one rule per host. |
gateway.ingress.className | traefik | ingressClassName of the Ingress. |
gateway.ingress.annotations | {} | Ingress annotations, merged with the backend-protocol annotation added when the gateway serves TLS or the client-certificate gate is on. With the gate and headerDialect: traefik, the chart also sets the TLS option and middleware annotations; middlewares listed here are appended after the chart’s. |
gateway.ingress.tls.enabled | true | Adds a TLS section that lists the three hosts. |
gateway.ingress.tls.secretName | empty | TLS Secret for the Ingress. When empty, secretName is omitted and the ingress controller’s default certificate is used. Required with clientCertificates.enabled and headerDialect: traefik. |
gateway.env | {} | Map of additional environment variables (NAME: value), appended after the chart-managed variables. Use it for variables the chart does not model, such as PROMETHEUS_URL and KORNERCODE_DISPLAY_NAME. PLATFORM_RESTRICTIONS is refused here (the render fails); set the restrictions: block instead. |
gateway.hostAliases | [] | Pod hostAliases. Use it when the OIDC hostname must resolve to a different address inside the pod than in the browser. |
gateway.service.port | 8080 | Port of the Service’s http port (target port 8080). The Ingress uses it as the backend port unless the gateway serves TLS. |
Fixed behavior that is not exposed as values:
- The Deployment, Service, ServiceAccount, Ingress,
ClusterRoleandClusterRoleBindingare all namedkornercode-gateway. The gateway authenticates to the Kubernetes API as thekornercode-gatewayServiceAccount, so install one release of the chart per cluster. - The Service always exposes the
httpport. Liveness and readiness probes call/healthz, which returns200for anyHostheader.
Example gateway values for a local Kind cluster (from hack/local-dev/values.yaml):
mtls:
enabled: true
gateway:
hosts:
kornercode: dashboard.kornercode.local:8443
dev: dev.kornercode.local
test: test.kornercode.local
oidc:
url: "http://keycloak.kornercode.local:8080/realms/kornercode"
adminGroups: "admins"
ingress:
className: traefik
tls:
secretName: ""
hostAliases: []The local bootstrap script fills gateway.hostAliases at install time with the Keycloak Service ClusterIP (--set gateway.hostAliases[0].ip=..., --set gateway.hostAliases[0].hostnames[0]=keycloak.kornercode.local), so that the gateway pod and the browser reach Keycloak under the same name.
Gateway environment variables
The gateway reads its configuration from the environment at startup. A required variable that is missing or empty stops the process. For optional variables, an empty value is treated the same as an unset one.
| Variable | Required | Default | Description |
|---|---|---|---|
OIDC_URL | Yes | none | OIDC provider URL, used both as the issuer for ID token verification and as the discovery base. It must be reachable from the gateway pod and must equal the iss claim of issued tokens. Discovery runs in the background and is retried until it succeeds; the gateway starts and serves existing sessions meanwhile. Chart: gateway.oidc.url. |
OIDC_CLIENT_ID | Yes | none | OIDC client ID, also the expected ID token audience. Chart: gateway.oidc.clientID. |
OIDC_CLIENT_SECRET | Yes | none | OIDC client secret. Chart: read from the gateway.oidc.existingSecret Secret. |
SESSION_SECRET | Yes | none | Key from which the session cookie authentication and encryption keys are derived (HKDF-SHA256). Must be at least 32 bytes; the value is used as-is. A shorter value stops the gateway. Chart: read from the gateway.oidc.existingSecret Secret. |
SESSION_DOMAIN | No | empty | Domain attribute of the session cookie. Empty issues host-only cookies, and the dev and test hosts obtain their own sessions from the dashboard. A parent-domain value (for example .kornercode.local) sends the session cookie to every sibling subdomain and is not recommended. Chart: gateway.security.sessionDomain. |
SESSION_MAX_AGE_SECONDS | No | 28800 | How long a session stays valid without activity, in seconds; active sessions are renewed. A non-numeric, zero or negative value falls back to 28800. Chart: gateway.security.sessionMaxAgeSeconds. |
SESSION_MAX_LIFETIME_SECONDS | No | 86400 | Maximum lifetime of a login in seconds, renewals included. After it the user signs in again, which also picks up group changes from the IdP. A non-numeric, zero or negative value falls back to 86400. Chart: gateway.security.sessionMaxLifetimeSeconds. |
ADMIN_GROUPS | No | empty | Comma-separated group names. Users whose ID token groups claim (OIDC_GROUPS_CLAIM) contains one of them are administrators. Surrounding whitespace is ignored. Empty disables admin access. Chart: gateway.adminGroups. |
OIDC_IDENTITY_CLAIM | No | preferred_username | ID token claim compared with the client certificate’s CN at sign-in when the client-certificate gate is on. Chart: gateway.oidc.identityClaim. |
OIDC_GROUPS_CLAIM | No | groups | ID token claim holding the user’s groups: a list of strings or a single string. Chart: gateway.oidc.groupsClaim. |
KORNERCODE_HOST | Yes | none | Dashboard host as browsers see it, optionally with a port (for example dashboard.kornercode.local:8443). The full value, port included, builds the OIDC redirect URL https://<KORNERCODE_HOST>/auth/callback and the login URL https://<KORNERCODE_HOST>/auth/login that the dev and test hosts redirect to. The host without its port is used for routing and Origin checks. Chart: gateway.hosts.kornercode. |
DEV_HOST | Yes | none | Host on which authenticated requests are proxied to the user’s code-server pod. Any port is stripped. Chart: gateway.hosts.dev. |
TEST_HOST | Yes | none | Host on which authenticated requests are proxied to the user’s application on the workspace test port. Any port is stripped. Chart: gateway.hosts.test. |
PORT | No | 8080 | Listen port. With gateway TLS enabled, HTTPS listens on this port, or on 8443 when the value is 8080, and a plain HTTP listener stays on 8080. With the client-certificate gate on, these listeners answer only /healthz (and 404 otherwise); the hosts are served on CLIENT_CERT_ADDR. Not set by the chart. |
METRICS_PORT | No | 9090 | Port of a separate listener that serves the gateway’s own Prometheus metrics at /metrics. Not set or exposed by the chart. |
KORNERCODE_DISPLAY_NAME | No | Kornercode | Product name shown on the login page (HTML-escaped). Set it through gateway.env. |
PROMETHEUS_URL | No | empty | Base URL of a Prometheus server (scheme, host and port), for example http://prometheus.monitoring.svc:9090. Enables usage data and the Statistics charts. A value without a host stops the gateway at startup. Set it through env. See Prometheus. |
MTLS_ENABLED | No | false | true (exact string) enables mTLS to workspace pods. The gateway loads tls.crt, tls.key and ca.crt from MTLS_CERT_DIR at startup, stops if they cannot be loaded, and reloads them every 5 minutes. Code-server traffic uses mTLS; test-port traffic uses TLS with server verification. Chart: mtls.enabled. |
MTLS_CERT_DIR | No | /etc/kornercode/tls | Directory containing tls.crt, tls.key and ca.crt. Chart: mtls.certDir, set only when mtls.enabled is true. |
GATEWAY_TLS_ENABLED | No | false | true (exact string) serves HTTPS with the certificate from MTLS_CERT_DIR. Ignored unless MTLS_ENABLED is also true. Chart: mtls.gatewayTLSEnabled, set only when mtls.enabled is true. |
The client-certificate and break-glass variables (CLIENT_CERT_*, BREAK_GLASS_*) are listed with their values in Client certificate values and Break-glass values.
The Kubernetes client uses the in-cluster ServiceAccount configuration, or the standard KUBECONFIG lookup when running outside a cluster.
Secrets
The gateway requires one Secret, created before the chart is installed, in the release namespace. Its name defaults to kornercode-gateway-secrets (gateway.oidc.existingSecret). The chart reads two fixed keys from it:
| Key | Description |
|---|---|
OIDC_CLIENT_SECRET | Client secret of the gateway’s OIDC client. |
SESSION_SECRET | Session key, at least 32 bytes. Generate it, for example, with openssl rand -hex 32 (64 characters). |
kubectl create secret generic kornercode-gateway-secrets \
--namespace kornercode \
--from-literal=OIDC_CLIENT_SECRET='<oidc-client-secret>' \
--from-literal=SESSION_SECRET='<session-secret>'Both values are injected as environment variables, so a change takes effect only after the gateway pods restart (kubectl -n kornercode rollout restart deployment kornercode-gateway). Changing SESSION_SECRET invalidates all existing sessions; see SESSION_SECRET rotation.
The following Secrets are issued by cert-manager and must not be created by hand:
<fullname>-webhook-certin the operator namespace: admission webhook serving certificate.kornercode-internal-cainmtls.certManagerNamespace: internal CA (only withmtls.enabled).kornercode-gateway-mtlsin the gateway namespace: gateway client and server certificate (only withmtls.enabled).workspace-<workspace>-tlsin each workspace namespace: workspace certificate requested by the operator (only withmtls.enabled).
Optional integrations
cert-manager
The chart always renders, for the operator, a self-signed Issuer (<fullname>-selfsigned-issuer), a Certificate for the webhook serving certificate (<fullname>-webhook-cert, RSA 2048, duration: 2160h, renewBefore: 360h), and the ValidatingWebhookConfiguration and MutatingWebhookConfiguration, annotated with cert-manager.io/inject-ca-from so that cert-manager’s CA injector fills in their CA bundle. Installing the chart therefore requires the cert-manager CRDs. The certificate Secret is mounted with optional: true, so the pod starts before the certificate is issued.
At startup the operator queries API discovery for cert-manager.io/v1:
- If the group version is served and includes the
Certificatekind, the admission webhooks are registered. - If discovery answers NotFound, or the
Certificatekind is absent, the operator logscert-manager not detected; running without admission webhooksand runs without them. - Any other discovery error is retried, up to 5 attempts 2 seconds apart. If all attempts fail, the operator exits with an error and is restarted, rather than running without webhooks.
The webhooks are a mutating webhook for Workspace (mworkspace.code.kornercloud.dev) and validating webhooks for Workspace, Team, WorkspaceProfile and SecurityProfile, all on CREATE and UPDATE with failurePolicy: Fail. While the webhook endpoint is unreachable, the API server rejects create and update requests for these resources.
cert-manager is also required for mTLS.
Prometheus
Operator metrics. The chart passes --metrics-bind-address=:8080 and exposes the endpoint through the Service <fullname>-kornercode-controller-metrics (port metrics, 8080). Set operator.metrics.serviceMonitor.enabled: true to create a ServiceMonitor for it. Prometheus must be configured to select ServiceMonitors in the operator namespace; use operator.metrics.serviceMonitor.labels to match its serviceMonitorSelector. Besides the controller-runtime metrics, the operator exports a workspace phase gauge (code_kornercloud_dev_workspace_phase) labeled with cluster from operator.global.clusterName.
With operator.metrics.secure: true, the endpoint serves HTTPS and checks every request with TokenReview and SubjectAccessReview. The chart’s ServiceMonitor scrapes plain HTTP without TLS or bearer token settings, and the chart does not grant the operator create on tokenreviews (authentication.k8s.io) and subjectaccessreviews (authorization.k8s.io). Secure metrics therefore need that additional RBAC, get on the non-resource URL /metrics for the scraping identity, and a scrape configuration of your own.
Gateway integration. Setting PROMETHEUS_URL (through the gateway.env value) enables:
- Live CPU, memory and storage usage for workspaces in the user and admin views.
- The Statistics charts in the admin dashboard (resource utilization and operator health).
- An admin-only PromQL proxy at
/api/v1/admin/metrics.
Without it, /api/v1/me reports prometheusEnabled: false, the Statistics view shows “Prometheus not connected”, and usage views show resource reservations only. The gateway queries these series:
| Series | Source |
|---|---|
container_cpu_usage_seconds_total, container_memory_working_set_bytes | kubelet cAdvisor |
kubelet_volume_stats_used_bytes | kubelet; storage usage is unavailable when the storage driver reports no volume stats |
controller_runtime_reconcile_total, controller_runtime_reconcile_errors_total, controller_runtime_reconcile_time_seconds_bucket, code_kornercloud_dev_workspace_phase | operator metrics endpoint (operator ServiceMonitor) |
The gateway also serves its own metrics (gateway_audit_events_total, gateway_session_store_errors_total, gateway_admin_handler_audited_total) at /metrics on METRICS_PORT (9090). The chart does not expose this port or create a ServiceMonitor for it.
For local development, hack/local-dev/values-prometheus.yaml installs a minimal kube-prometheus-stack (Prometheus Operator, kube-state-metrics and the kubelet cAdvisor and kubelet ServiceMonitors; no Grafana, Alertmanager or node exporter) that selects ServiceMonitors in all namespaces. The bootstrap script then sets:
--set "operator.metrics.serviceMonitor.enabled=true"
--set "gateway.env.PROMETHEUS_URL=http://prometheus-stack-kube-prom-prometheus.monitoring.svc.cluster.local:9090"mTLS
mTLS encrypts and mutually authenticates traffic between the gateway and workspace pods. It is one switch for the operator and the gateway:
mtls:
enabled: true
gatewayTLSEnabled: trueWith mtls.enabled: true, the chart creates, for the operator:
ClusterIssuerkornercode-selfsigned-bootstrap(self-signed), used only to sign the CA.Certificatekornercode-internal-cainmtls.certManagerNamespace: CA certificate, ECDSA P-256,duration: 87600h,renewBefore: 720h, stored in the Secretkornercode-internal-ca.ClusterIssuerkornercode-internal-ca-issuer, a CA issuer backed by that Secret.
The operator then requests a certificate per workspace from MTLS_ISSUER_NAME and adds an Envoy sidecar (envoyproxy/envoy:v1.32.4) that terminates mTLS in front of code-server. The workspace Service then exposes its codeserver port as 8443 (Envoy) instead of 8080, and code-server binds to 127.0.0.1:8080 so that it is reachable only through Envoy; the gateway and operator therefore share the single mtls.enabled value. Workspace certificate lifetimes (720h, renewed 48h before expiry), internal ports and the Envoy image are compiled-in constants.
With mtls.enabled: true, the chart also creates, for the gateway, the Certificate kornercode-gateway-mtls (ECDSA P-256, duration: 2160h, renewBefore: 360h, server and client auth, DNS names kornercode-gateway, kornercode-gateway.<namespace>, kornercode-gateway.<namespace>.svc and kornercode-gateway.<namespace>.svc.cluster.local) signed by the ClusterIssuer kornercode-internal-ca-issuer, and mounts it at mtls.certDir. When mtls.gatewayTLSEnabled is also true, the gateway serves HTTPS on 8443 with that certificate, and the chart creates a Traefik ServersTransport (kornercode-gateway-tls, insecureSkipVerify: true) referenced from the Service, because Traefik does not trust the internal CA. The plain HTTP port 8080 stays available for in-cluster callers.
See Mutual TLS for the design and troubleshooting.