Chapter 1

Profiles describe demand. Platforms decide fulfillment.

The profile is the portable contract between application intent and platform automation.

Demand in a complete profile

Full profile shape with one cache Condition
apiVersion: runtimeconditions.io/v1alpha1
kind: RuntimeConditionsProfile

metadata:
  name: request-logger-http

workload:
  uri: github.com/example/request-logger-http
  version: v0.1.0

extensions:
  - https://runtimeconditions.io/extensions/common-integrations:v1alpha1
  - https://runtimeconditions.io/extensions/env-configuration:v1alpha1

conditions:
  - name: request-cache
    kind: cache
    interface:
      type: key_value
      engine: redis
    configuration:
      alternatives:
        - env:
            - property: url
              name: REDIS_URL
        - env:
            - property: hostname
              name: REDIS_HOST
            - property: port
              name: REDIS_PORT

Fulfillment outside the profile

The previous profile only says the workload needs a Redis-compatible cache and can consume it through REDIS_URL or REDIS_HOST plus REDIS_PORT. Before Kubernetes can inject REDIS_URL, an adapter has to satisfy that Condition by provisioning Redis or granting access to an existing Redis cache.

  1. 1
    Profile Declares kind: cache, engine: redis, and acceptable env vars.
  2. 2
    Adapter Chooses how this platform can satisfy the cache Condition.
  3. 3
    Provider Creates Redis or grants access to an existing Redis instance.
  4. 4
    Connection Output Publishes url, hostname, and port through platform artifacts.
  5. 5
    Deployment Receives the env var names declared by the workload profile.

In the Kratix demo, the Redis Promise is the provider interface. It publishes a concrete connection ConfigMap. The adapter then binds the profile's REDIS_URL request to that ConfigMap in the generated Deployment.

Provider output used by the adapter
apiVersion: v1
kind: ConfigMap
metadata:
  name: request-logger-cache-connection
  namespace: demo
data:
  url: redis://request-logger-cache.demo.svc.cluster.local:6379
  hostname: request-logger-cache.demo.svc.cluster.local
  port: "6379"
Final Deployment env generated by the adapter
apiVersion: apps/v1
kind: Deployment
metadata:
  name: request-logger-http
  namespace: demo
spec:
  # ...
  template:
    spec:
      containers:
        - name: request-logger-http
          # ...
          env:
            - name: REDIS_URL
              valueFrom:
                configMapKeyRef:
                  name: request-logger-cache-connection
                  key: url

This snippet belongs in the generated Kubernetes Deployment. It is not part of the Runtime Conditions Profile. It is the result of the adapter satisfying the profile against a concrete platform.

Vocabulary

TermMeaningDemo Example
ProfileOne workload's runtime integration requirements.`request-logger-http` generated profile
ConditionOne required external integration.`todos-api`, `request-cache`, `s3-object-store`
ExtensionVocabulary and validation outside the core spec.Common Integrations, Env Configuration, AWS Object Store
GeneratorReads code and emits a profile.Go AST generator
AdapterMaps valid profiles to platform-specific requests.Kratix `ApplicationRelease` Promise

What never belongs in the profile

  • Secret valuesAccess keys, tokens, passwords, and private material stay out.
  • Target choicesBucket names, service names, cloud accounts, and cluster topology stay out.
  • Provisioning instructionsThe profile declares requirements. Adapters and platforms provision or bind resources.