Chapter 9

Frequently asked questions.

Questions that come up as soon as people see a profile. Select a question to see its answer.

How is this different from Docker Compose?

A compose.yaml says how an app is run today. A profile says what the app needs, so a platform team can decide how to provide it.

compose.yamlRuntime Conditions Profile
What it describesOne chosen setupThe need behind it
Examplepostgres:16 on port 5432"needs a relational database"
Another team's API, which has no imageA mock, and readers must guess what it stands forDeclared as an API, with the operations the app calls
Who can change the real thingThe developer rewrites the fileThe platform team, without touching the app
Can you get one from the other?No. The intent was never written downYes. A compose.yaml could be generated from a profile

How is this different from a Kubernetes ConfigMap?

A ConfigMap holds the values a workload reads at runtime, for one namespace in one cluster. A profile holds no values: it says what the workload needs and which names it reads them from. The two work at different steps, so a platform can read the profile, provide what it asks for, and then write the ConfigMap that carries the values.

ConfigMapRuntime Conditions Profile
What it holdsConcrete values, such as REDIS_URL: redis://cache.prod:6379The need and the names, such as a cache Condition with engine redis, read from REDIS_URL. No values
Who writes itThe platform or ops team, by hand or with Helm or Kustomize, once per environmentA profiler, from declarations in the workload's code
ScopeOne namespace in one cluster. Dev, test and production each need their ownOne file per workload version, the same in every environment, and not tied to Kubernetes
Does it say what is needed?No. A key maps to a string. Nothing says the value must point to Redis, which version, or which API operations the app callsYes. The Condition kind, interface type, engine, API operations, and alternative ways to pass the values (REDIS_URL, or REDIS_HOST and REDIS_PORT)
SecretsNot meant for them. Passwords and tokens go in a separate SecretNothing to hide, because it holds no values
When something is missingThe pod starts anyway, and the app fails when it reads an empty or wrong variableThe profile is checked before deployment, and a missing Condition is reported with a reason

Here is how the two fit together. The profile declares the cache and the variable it is read from:

In the profile: the need
conditions:
  - name: request-cache
    kind: cache
    interface:
      type: key_value
      engine: redis
    configuration:
      env:
        - property: url
          name: REDIS_URL

The platform reads it, creates or finds a Redis cache in that environment, and writes the value under the name the profile asked for:

Written by the platform: the value
apiVersion: v1
kind: ConfigMap
metadata:
  name: request-logger-http
data:
  REDIS_URL: redis://cache.prod:6379

A ConfigMap can be an output of a profile, but it cannot replace one: the values only make sense once someone knows what the workload needs. That knowledge is what the profile writes down.

Can a company write its own catalog of extensions?

Yes. An extension is a YAML document with its own id, so a company can define its own, as the AWS Object Store example does. Our first-party extensions are one catalog among others, in the extensions repository.

  1. 1
    Write an extension.A YAML definition of the kinds, interface types, fields, and allowed values your company needs, with JSON Schema to check them.
  2. 2
    Build on the existing ones.Depend on an extension that already owns a word instead of defining it again. An extension owns only what it introduces.
  3. 3
    Generate bindings.rc bindings generate turns the extension into packages for Go, Python, TypeScript, and Java.
  4. 4
    Publish it.Put the packages in your registries and the definition at its id. A profile lists the id, and tools find the definition there, or in a local catalog directory.

The rules for writing one are in the extension authoring guide, and Extensions shows what an extension owns.