Skip to content

CaaS (Kubernetes)

CaaS (Container-as-a-Service) is Roche’s managed Kubernetes offering running on AWS. It hosts the OPA (Open Policy Agent) instances that enforce real-time policy evaluation for data products. Each entity gets a dedicated OPA deployment with its compiled Rego policies, accessible via a ClusterIP service.

PropertyValue
Clustercaasawsprod / Cloud Prod (eu-central-1)
Cluster IDc-2dhbr
Projectrdt_model (ID: c-2dhbr:p-r4z25)
Auth methodBearer token (Rancher-issued kubeconfig)
NetworkRoche corporate network (VPN required)
Access taskA13
GitHub issue#28
CIDM groupCAAS_MODEL_ADMIN
ServiceNow requestRITM6292237
VariableSourceDescription
RANCHER_BEARER_TOKENVault common/caasAPI token for Rancher/K8s authentication
RANCHER_URLVault common/caasRancher management plane URL
CAAS_PROJECTVault common/caasRancher project identifier
CAAS_NAMESPACEVault {env}/caasTarget namespace per environment
CAAS_CLUSTERVault {env}/caasTarget cluster per environment
NamespaceEnvironmentStateCPUMemoryStorage
rdt-model-devdevActive300m340Mi1700Mi
rdt-model-testtestActive300m340Mi1700Mi
rdt-model-prodprodActive300m340Mi1700Mi
ModuleUsage
rdt-model-policyGenerates OPA Rego policies, K8s manifests (Deployment, Service, ConfigMap, CronJob), and deploys to the target namespace
ManifestPurpose
opa-deployment.yamlOPA server with sidecar bundle loader
opa-service.yamlClusterIP service exposing /validate/* and /policy/*
bundle-configmap.yamlPre-materialised lookup data (MRHub snapshots)
bundle-refresh-cronjob.yamlScheduled Snowflake-to-bundle export

Script: scripts/access/check-caas.sh

Required tools: kubectl

Prerequisites: Roche CA certificates installed (/usr/local/share/ca-certificates/roche/)

Checks performed:

  1. Roche CA certificate installation
  2. kubectl context configuration (browser auth to Rancher if needed)
  3. Cluster connectivity (kubectl get pods)
  4. Namespace access: rdt-model-dev, rdt-model-test, rdt-model-prod
  5. RBAC permissions in rdt-model-dev:
    • create:deployments, create:services, create:configmaps
    • get:pods, get:secrets, create:pods, delete:deployments
  6. Pod counts per namespace

CaaS uses Rancher-issued kubeconfig with bearer token authentication:

Terminal window
# Download kubeconfig from Rancher
# Rancher UI → Cluster → Kubeconfig File → Copy
export KUBECONFIG=~/.kube/config-caas
# Verify access
kubectl --context caasawsprod get namespaces | grep rdt-model

The Rancher bearer token (name: token-2d9gz) expires 2026-07-28 — renewal required before expiry.

The kubeconfig must have embedded CA certificates removed and rely on system trust store (Roche CA certs installed via require_roche_certs):

clusters:
- cluster:
server: https://rancher.emea.roche.com/k8s/clusters/c-2dhbr
# certificate-authority-data removed — uses system trust
name: caasawsprod

Each namespace has strict resource quotas. OPA deployments must fit within:

  • CPU: 300m total (OPA typically needs 50-100m per instance)
  • Memory: 340Mi total (OPA typically needs 64-128Mi per instance)
  • Storage: 1700Mi total (for ConfigMap-backed bundles)

This limits each namespace to approximately 3-4 OPA instances. Scaling beyond this requires a quota increase request via RITM.