Skip to content

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

21 Commits

Folders and files

Repository files navigation

EnMaaS Helm Chart

Automated Quay image digest refresh describes the daily/manual update PRs and maintainer setup.

Helm chart for deploying Enterprise Models-as-a-Service (EnMaaS) on OpenShift and Kubernetes.

It deploys the complete EnMaaS stack using pinned images by default. The chart resolves each image from values.yaml, always pins an immutable sha256 digest, and leaves tag empty unless an operator explicitly overrides it.

Default Image Inventory

Component Role Values Path Image Repository Pinned Digest Source Project
Praxis AI Gateway OpenAI and Anthropic API proxy, authentication, routing, and SSE metering praxis.image quay.io/redhat-et/praxis-ai sha256:240bcdaa73f4ca81a670dc0451db3072aa5190eca71f2af13c5ddfb75e49abdc redhat-et/praxis-ai
MaaS API API-key issuance, revocation, and internal validation maasApi.image quay.io/redhat-et/enmaas-api sha-b169f5a725c30edfb2aafaa289d3621ffaf27345 / sha256:cadfb155250de3db167888f82eb532122aa7b4e0ad55f9c22a849b61eb295878 redhat-et/maas-api
PriceTag Metering API and dashboard Quota enforcement, spend tracking, management and partner APIs, and dashboard metering.image quay.io/redhat-et/pricetag-metering sha256:e3984676f7596a75d25dad4b1c1514d9836ae9017920007e0b9fdea01765457e redhat-et/pricetag-metering
PriceTag rollup worker, when enabled Dedicated maintenance and backfill worker using the metering image metering.image quay.io/redhat-et/pricetag-metering sha256:e3984676f7596a75d25dad4b1c1514d9836ae9017920007e0b9fdea01765457e redhat-et/pricetag-metering
PostgreSQL, when bundled Bundled PostgreSQL 17 with separate maas and metering databases postgresql.image registry.access.redhat.com/hi/postgresql sha256:52e9435300b2fe89f8534e03e86d54179b86a1a4ca29a9c4bd426b000958a4b9 Red Hat certified PostgreSQL 17 image
Helm connection test Chart connection and endpoint validation test pod tests.image registry.access.redhat.com/ubi9/ubi-minimal sha256:6b3eee1cd23c2a045648e963546a733110a5d53f190bce03157eff172d633892 Red Hat Universal Base Image 9 minimal

The MaaS API is built exclusively from redhat-et/maas-api. The pinned image's OCI source and revision labels identify that repository at commit b169f5a725c30edfb2aafaa289d3621ffaf27345. The chart runs its EnMaaS standalone profile with PostgreSQL configured through DATABASE_URL; the service applies its embedded schema migrations on startup and exposes HTTP health and metrics endpoints.

Image updates must come from redhat-et/maas-api; verify the OCI source and revision labels before updating the chart's repository and digest pin. A new image publication does not automatically change the chart's pinned digest.

Security Defaults

  • Bring your own provider Secrets: Upstream LLM API keys (OPENAI_API_KEY, ANTHROPIC_API_KEY, Vertex SA JSON, custom upstreams) are never stored in values.yaml. Every enabled provider references a pre-existing Kubernetes Secret via existingSecret.
  • Pod Security restricted / OpenShift restricted-v2 compatible: All workloads run non-root with allowPrivilegeEscalation: false, capabilities.drop: ["ALL"], seccompProfile.type: RuntimeDefault, no hardcoded UIDs, and readOnlyRootFilesystem: true on all application containers.
  • Stable auto-generated internal Secrets: Internal M2M auth, session, management API, and bundled Postgres credentials are auto-generated on first install and preserved across helm upgrade via lookup, or can be supplied externally via existingSecret.

Quick Start (OpenShift / ROSA)

1. Create the namespace and your model provider Secret

Pick the provider(s) you want to enable and create the corresponding Kubernetes Secret.

OpenAI:

kubectl create namespace enmaas
kubectl -n enmaas create secret generic enmaas-provider-credentials \
  --from-literal=OPENAI_API_KEY="$OPENAI_API_KEY"

Anthropic:

kubectl -n enmaas create secret generic enmaas-provider-credentials \
  --from-literal=ANTHROPIC_API_KEY="$ANTHROPIC_API_KEY"

Google Vertex AI:

kubectl -n enmaas create secret generic enmaas-vertex-sa-key \
  --from-file=sa-key.json=/path/to/gcp-sa-key.json

2. Install the chart

Discover your OpenShift cluster apps domain (optional, enables path-split Routes for OpenAI + Anthropic + Dashboard):

APPS_DOMAIN=$(oc get ingresses.config.openshift.io cluster -o jsonpath='{.spec.domain}')

helm upgrade --install enmaas ./charts/enmaas \
  -n enmaas \
  --set routes.domain="$APPS_DOMAIN" \
  --wait --timeout 5m

If you omit routes.domain, OpenShift auto-generates hostnames for single gateway and dashboard Routes.

3. Verify with Helm test

helm test enmaas -n enmaas

4. Provision a user, monthly budget, and API key

Retrieve the auto-generated Management API token and create a user with a $5.00 monthly budget:

DASHBOARD_HOST=$(oc -n enmaas get route enmaas-dashboard -o jsonpath='{.spec.host}')
GATEWAY_HOST=$(oc -n enmaas get route enmaas-gateway -o jsonpath='{.spec.host}')
MGMT_TOKEN=$(kubectl -n enmaas get secret enmaas-management-api -o jsonpath='{.data.token}' | base64 -d)

# 1. Create user
curl -fsS -X PUT "https://${DASHBOARD_HOST}/api/v1/management/users" \
  -H "Authorization: Bearer ${MGMT_TOKEN}" \
  -H "Content-Type: application/json" \
  -d '{"subject":"alice","name":"Alice"}'

# 2. Set $5 monthly budget
curl -fsS -X PUT "https://${DASHBOARD_HOST}/api/v1/management/budgets" \
  -H "Authorization: Bearer ${MGMT_TOKEN}" \
  -H "Content-Type: application/json" \
  -d '{"subject":"alice","monthly_usd":5.0}'

# 3. Issue API key
API_KEY=$(curl -fsS -X POST "https://${DASHBOARD_HOST}/api/v1/management/keys" \
  -H "Authorization: Bearer ${MGMT_TOKEN}" \
  -H "Content-Type: application/json" \
  -d '{"subject":"alice","name":"default","expiresIn":"30d"}' | jq -r '.key')

# 4. Call the gateway
curl -fsS "https://${GATEWAY_HOST}/v1/chat/completions" \
  -H "Authorization: Bearer ${API_KEY}" \
  -H "Content-Type: application/json" \
  -d '{"model":"gpt-5.4-mini","messages":[{"role":"user","content":"Hello!"}],"max_completion_tokens":32}'

Standard Kubernetes (Ingress + External PostgreSQL)

Set securityContextMode: "kubernetes" (assigns numeric UID/GIDs matching each image for kubelet runAsNonRoot enforcement), disable OpenShift Routes, and enable Kubernetes Ingress:

helm upgrade --install enmaas ./charts/enmaas \
  -n enmaas --create-namespace \
  -f examples/values-external-postgres.yaml

Examples

Ready-to-use value overrides are provided in examples/:

  • examples/values-openai.yaml — OpenAI with bundled PostgreSQL on OpenShift
  • examples/values-anthropic.yaml — Direct Anthropic Messages API (/v1/messages)
  • examples/values-multi-provider.yaml — OpenAI + Vertex AI (Gemini & Claude) + custom vLLM upstream
  • examples/values-external-postgres.yaml — External PostgreSQL + Kubernetes Ingress + NetworkPolicies
  • examples/values-qos.yaml — QoS (enmaas_policy + weighted-token classification), dedicated rollup worker, partner API secrets

QoS, Rollup Worker, and MaaS CRDs (optional)

The chart supports the advanced EnMaaS deployment profile when you need more than the default metering pipeline:

  • praxis.enmaasPolicy.enabled: true — swaps the gateway's external_metering filter for enmaas_policy, which combines metering with weighted-token QoS classification and enforcement (qosEnforcement: off|soft|hard, credentialMode: shadow|enforce, main/premium token-bucket rates). Optional praxis.enmaasPolicy.qosKeys.existingSecret mounts QoS key-alias credentials (keys: premium, main, ratelimit) for routing to QoS-classified upstreams via qosClusters/keyClusters.
  • metering.qos.enabled: true — enables weighted-token QoS classification in the metering service (window/threshold/weight tuning under metering.qos.*; defaults mirror the EnMaaS reference deployment).
  • metering.rollup.enabled: true — deploys a dedicated single-replica rollup maintenance worker (same metering image, METERING_MODE=rollup). Pair it with metering.mode: "api" so the API deployment sheds rollup maintenance to the worker.
  • metering.partnerApi.existingSecret — references a pre-existing Secret with seven keys (usage-report, model-policy, model-catalog, plus -air/-aibt variants) for partner API authentication. All seven keys are required.
  • crds.install: true — installs the MaaS CRDs (maasmodelrefs, maassubscriptions, maasauthpolicies from maas.opendatahub.io) and grants the metering ServiceAccount read access to maassubscriptions. Cluster-scoped, opt-in.
  • maasApi.clusterRole.enabled: true — grants the maas-api ServiceAccount its ClusterRole (namespace/ServiceAccount provisioning, token/subject access reviews, MaaS CRD and HTTPRoute reads) for the subscription-driven standalone profile. Cluster-scoped, opt-in.
  • networkPolicy.monitoringNamespaceLabels — when networkPolicy.enabled: true and this is non-empty, Prometheus/monitoring namespaces matching the labels may scrape the metrics ports (praxis 9901, metering/rollup 9902, maas-api metrics). On OpenShift with in-cluster Prometheus use {kubernetes.io/metadata.name: openshift-monitoring}.

A model-catalog ConfigMap (<release>-model-catalog) is always generated from the providers values and consumed by metering and the rollup worker via MODEL_CATALOG_FILE. The same ConfigMap also carries a flat routing-overlay.json discovery projection for the pinned PriceTag Kubernetes reader. ROUTING_OVERLAY_CONFIGMAPS explicitly selects this release-prefixed ConfigMap, and the metering Role grants only get on it and the main pipeline ConfigMap. PIPELINE_CONFIGMAP remains the main pipeline so provider discovery continues to work. Native gateway filters consume the separate versioned routing ConfigMaps, not this compatibility projection.

The two catalog projections come from the same provider/model list and expose public IDs, provider names and owners without upstream credentials. Render tests check parity with both native routing overlays. The pinned PriceTag reader reports the public ID as provider_refs.targetModel; it does not expose the upstream target-model rewrite through this projection.

The partner GET /api/v1/models endpoint still requires its own catalog bearer. Set metering.partnerApi.existingSecret to an approved pre-existing Secret with the seven keys documented in values.yaml. Without that wiring, the endpoint fails closed with HTTP 503 independently of catalog discovery. The management bearer is not a substitute for the catalog credential.

Routing ConfigMaps use the pinned Praxis schema 1.0.0 content-addressed envelope. The semantic SHA-256 covers candidates, local site, network and selection policy, using canonical JSON. Aliases retain their target model and existing provider routing. Scope identifies the release namespace and gateway. Provenance identifies the Helm release and revision; because Helm supplies no persistent render timestamp, rendered_at is the explicit epoch sentinel 1970-01-01T00:00:00Z, not a wall-clock deployment receipt. Repeated renders of unchanged inputs remain stable.

See examples/values-qos.yaml for a complete working example.


Key Configuration Values

Parameter Default Description
securityContextMode "openshift" "openshift" (SCC-assigned UIDs) or "kubernetes" (explicit numeric UIDs/fsGroup)
providers.openai.enabled true Enable OpenAI upstream routing
providers.openai.existingSecret "enmaas-provider-credentials" Pre-existing Secret containing OpenAI API key
providers.openai.secretKey "OPENAI_API_KEY" Key inside existingSecret
providers.anthropic.enabled false Enable direct Anthropic Messages upstream
providers.vertex.enabled false Enable Google Cloud Vertex AI (Gemini and/or Claude)
providers.custom [] Additional custom OpenAI/Anthropic-compatible upstreams (vLLM, LiteLLM, etc.)
praxis.replicaCount 2 Praxis gateway replicas
praxis.apiKeyAuth.cacheTtlSeconds 0 API key validation cache TTL (0 = immediate revocation)
praxis.metering.failOpen true Fail open if metering is unreachable (set false to fail closed during outages)
metering.managementApi.enabled true Enable standalone /api/v1/management/* control-plane API
metering.managementApi.publicOrigin "" Browser origin for standalone login/session changes (defaults to the dashboard URL)
postgresql.enabled true Deploy bundled PostgreSQL 17 StatefulSet
externalDatabase.maas.existingSecret "" Secret with MAAS_DB_URL when postgresql.enabled=false
externalDatabase.metering.existingSecret "" Secret with METERING_DB_URL when postgresql.enabled=false
routes.enabled true Create OpenShift Route resources
routes.domain "" Cluster ingress domain for path-split Routes (empty = auto-generated hosts)
ingress.enabled false Create Kubernetes Ingress resources
networkPolicy.enabled false Create default-deny + scoped allow NetworkPolicy resources
networkPolicy.monitoringNamespaceLabels {} Namespace labels permitted to scrape metrics ports (empty disables monitoring ingress)
metering.mode "all" "all", "api" (API only — pair with the rollup worker), or "rollup"
metering.qos.enabled false Enable weighted-token QoS classification in the metering service
metering.rollup.enabled false Deploy the dedicated rollup maintenance worker
metering.partnerApi.existingSecret "" Pre-existing Secret (7 keys) for partner API auth
praxis.enmaasPolicy.enabled false Use the enmaas_policy gateway filter (metering + QoS enforcement)
crds.install false Install the MaaS CRDs (cluster-scoped)
maasApi.clusterRole.enabled false Grant the maas-api ServiceAccount its ClusterRole (cluster-scoped)
monitoring.serviceMonitor.enabled false Create Prometheus Operator ServiceMonitor resources

Development & Validation

make lint          # Run helm lint across default and example values
make test-maas-api # Check MaaS API runtime, database, and monitoring contracts
make test-routing-overlays # Check envelope digests, alias routing, and canonical escaping
make template-all  # Render all scenarios (OpenShift, K8s Ingress, multi-provider, external DB)

To validate the generated alias configuration and every example's routing overlays against the exact pinned image, use an available AMD64 container runtime (Podman or Docker). This is opt-in, uses synthetic credentials and network-disabled temporary containers, and never accesses Kubernetes:

python3 tests/validate_praxis_image.py --engine docker
# Or select an existing AMD64 Podman connection:
python3 tests/validate_praxis_image.py --connection amd-remote

The image check also reproduces rejection of the original flat alias overlay and verifies that tampered content fails digest validation. Example overlay checks isolate routing from unrelated provider credential filters; they do not establish live backend connectivity or inference qualification.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages