ControlPlaneRef names the CoderControlPlane in the same namespace. The controller creates and deletes keys with that control plane's operator token. The control plane must allow keys in spec.aiGateway.allowKeys.
secretName
string
SecretName is the Secret in the same namespace that receives the key, under the data key "key". The controller creates the Secret and owns it. It never writes a Secret that already exists and that this object does not own. To move the key to another Secret, delete and re-create this object.
PendingKey is set before every key create request and cleared after it. While it is set, a create request can be in flight or already committed in Coder.
LastDriftReissueTime is when the controller last issued a key because the Secret no longer held the current key.
killSwitchGeneration
integer
KillSwitchGeneration is the generation in which the controller found the current key deleted in Coder. The controller creates no key until the generation changes. 0 means the kill switch is not active.
answerMismatchGeneration
integer
AnswerMismatchGeneration is the generation in which Coder answered a create with a key that did not match the request. The controller creates no key until the generation changes. 0 means no mismatch.
CoderAIGatewayKeyRotationSpec configures key rotation.
+kubebuilder:validation:XValidation:rule="!has(self.intervalSeconds) || !has(self.gracePeriodSeconds) || self.intervalSeconds == 0 || self.gracePeriodSeconds < self.intervalSeconds",message="gracePeriodSeconds must be shorter than intervalSeconds"
Field
Type
Description
intervalSeconds
integer
IntervalSeconds is the time between scheduled rotations, counted from the time the current key was written to the Secret. 0 turns scheduled rotation off. Otherwise it is between 1 day and 365 days. The default is 30 days, because Coder keys never expire.
gracePeriodSeconds
integer
GracePeriodSeconds is the minimum time between writing a new key to the Secret and deleting the replaced key in Coder. Consumers must reload within it. Between 10 minutes and 7 days, default 1 hour.
consumerWaitSeconds
integer
ConsumerWaitSeconds is how long after the grace period the controller keeps a replaced key while Coder still reports connections that use it. After that time the controller deletes the key, and gateways that still use it exit and restart with the key from the Secret. 0 deletes the key when the grace period ends. At most 7 days, default 1 day.
trigger
string
Trigger starts one rotation each time it changes to a new non-empty value. The value set when the object is created starts no rotation.