API reference

CredentialConfig

custos.helmetica.io/v1, namespaced

CredentialConfig is the thing custos keeps.

Spec

Path Type Default Description

spec.credentials

object

Credentials holds the value mapping. A credential config with none is legal and produces an empty Secret, which is how a chart can declare the Secret before it knows what goes in it.

spec.credentials.valueMapping

map[string]object

ValueMapping is keyed by the Secret key to produce. Consumers read these names, so they are the chart author’s to choose, not derived from wherever the value happened to come from.

spec.credentials.valueMapping.<key>.apiVersion

string

v1

APIVersion is the group and version of an objectRef’s target. It defaults to the core group, since most references are to a Secret or a ConfigMap.

spec.credentials.valueMapping.<key>.command

[]string

Command’s arguments are rendered against the metadata context.
It must be idempotent: safe to run any number of times, returning the same value each time. A gather is retried until it succeeds, so a command that mints a fresh password per run would rewrite the target Secret under consumers that have already read it. Provisioning is fine as long as it is written to survive repetition.

spec.credentials.valueMapping.<key>.container

string

Container is which one to run in. Left empty, the pod’s kubectl.kubernetes.io/default-container annotation decides, and failing that its first container.
The API server only defaults this itself when the pod has exactly one container, so for anything with a sidecar the choice has to be made before the request goes out.

spec.credentials.valueMapping.<key>.key

string

Key reads one entry out of a Secret’s or ConfigMap’s data. A Secret’s value is decoded.

spec.credentials.valueMapping.<key>.kind

string

Kind is the kind of an objectRef’s target.

spec.credentials.valueMapping.<key>.name

string

Name is the object’s name. It is rendered against the metadata context first, so "\{\{.ClaimName}}-app" works.

spec.credentials.valueMapping.<key>.path

string

Path is a JSONPath, used by objectRef for anything that is not a Secret or ConfigMap data key, and by claimParam against the claim.

spec.credentials.valueMapping.<key>.podSelector

object

PodSelector picks the pod an exec source runs in. It is a selector rather than a name because pod names are generated and change on every restart.

spec.credentials.valueMapping.<key>.podSelector.matchExpressions

[]object

matchExpressions is a list of label selector requirements. The requirements are ANDed.

spec.credentials.valueMapping.<key>.podSelector.matchExpressions[].key (required)

string

key is the label key that the selector applies to.

spec.credentials.valueMapping.<key>.podSelector.matchExpressions[].operator (required)

string

operator represents a key’s relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist.

spec.credentials.valueMapping.<key>.podSelector.matchExpressions[].values

[]string

values is an array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. This array is replaced during a strategic merge patch.

spec.credentials.valueMapping.<key>.podSelector.matchLabels

map[string]string

matchLabels is a map of \{key,value} pairs. A single \{key,value} in the matchLabels map is equivalent to an element of matchExpressions, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed.

spec.credentials.valueMapping.<key>.podWait

string

PodWait is how long to wait for a pod matching PodSelector to become ready before failing the gather. It exists because a service that is slow to start is the ordinary case, not a fault, and waiting inside one attempt is cheaper than failing and being retried.
Unset falls back to the gather binary’s own default. Changing it moves the plan hash, so it re-runs a gather that has already settled.

spec.credentials.valueMapping.<key>.source (required)

enum: const, objectRef, claimParam, exec, template

Source decides which of the fields below custos reads. There is no default: guessing from which fields are set would turn a typo into a different lookup.

spec.credentials.valueMapping.<key>.value

string

Value is the literal for a const source, or the template body for a template source.

spec.suspend

boolean

Suspend pauses reconciliation. A suspended credential config holds at Pending and custos leaves everything it owns untouched, which is the escape hatch when the controller and the cluster disagree.

spec.target

object

Target shapes the Secret’s name. Left empty, custos derives the whole name, see TargetSpec.Prefix.

spec.target.prefix

string

Prefix starts the Secret’s name. The name is always the prefix plus a hash of the claim’s group and kind, so a redis and a postgres claim sharing a name cannot fight over one Secret, and no chart can pick a name that clashes. Left empty, the prefix is the claim name, or the CredentialConfig’s own name when there is no claim. The name in use is recorded in status.secretName.
Validation: min length 1

Status

Path Type Default Description

status.gatherJobName

string

GatherJobName is the Job custos is currently waiting on. It is recorded so an operator chasing a stuck credential config has somewhere to read logs.

status.gatheredHash

string

GatheredHash is the hash of the plan the gathered values in hand came from. A later reconcile computing the same hash knows it can skip the Job, which is what keeps an exec that provisions from running twice.

status.message

string

Message explains a Pending or Failed phase.

status.observedGeneration

integer

ObservedGeneration is the spec generation the phase was computed from.

status.phase

string

status.secretName

string

SecretName is the Secret custos wrote.

status.secretNamespace

string

SecretNamespace is where that Secret landed. It is reported because the placement rule is not something a user should have to re-derive.