Skip to content

Environment Variables

Environment variables for configuring Yuptime.

Core Variables

VariableDescriptionDefault
NODE_ENVApplication modedevelopment
LOG_LEVELLogging level (debug, info, warn, error)info
PORTHTTP server port3000
KUBE_NAMESPACEKubernetes namespace (auto-detected)-

Kubernetes

VariableDescriptionDefault
KUBERNETES_SERVICE_HOSTK8s API server host (auto-set in cluster)-
KUBERNETES_SERVICE_PORTK8s API server port (auto-set in cluster)-

TLS

VariableDescriptionDefault
NODE_TLS_REJECT_UNAUTHORIZEDSkip TLS verification (dev only)1

Example ConfigMap

yaml
apiVersion: v1
kind: ConfigMap
metadata:
  name: yuptime-config
  namespace: yuptime
data:
  NODE_ENV: "production"
  LOG_LEVEL: "info"
  PORT: "3000"

Usage in Deployment

yaml
apiVersion: apps/v1
kind: Deployment
metadata:
  name: yuptime-api
spec:
  template:
    spec:
      containers:
        - name: api
          envFrom:
            - configMapRef:
                name: yuptime-config
          env:
            - name: KUBE_NAMESPACE
              valueFrom:
                fieldRef:
                  fieldPath: metadata.namespace

Released under the Apache 2.0 License.