Skip to main content

Approval Domain

The Approval domain provides configurable approval workflows for API and event subscriptions. It supports multiple approval strategies, tracks state through a finite state machine, and integrates with the Notification domain to keep all parties informed.

Custom Resources​

Approval​

Approval is the Schema for the approvals API

Group: approval.cp.ei.telekom.de · Version: v1 · Scope: Namespaced

ApprovalSpec​

Appears in: Approval

ApprovalSpec defines the desired state of Approval

FieldTypeDefaultValidation
actionstringunknownRequired
approvedRequestApprovedRequest—Optional
deciderDecider—Optional
decisionsDecisions[]
Required, maxItems: 5
requesterRequester—Required
statestringPendingRequired, Enum: Pending \| Semigranted \| Granted \| Rejected \| Suspended \| Expired
strategystringSimpleRequired, Enum: Auto \| Simple \| FourEyes
targetApplicationRef—Required

ApprovedRequest​

Appears in: ApprovalSpec, ApprovalStatus, ApprovalExpirationSpec, SentReminder, ApprovalRequestStatus

ApprovedRequest contains the reference to the request that was approved with this approval

FieldTypeDefaultValidation
namestring—Required
namespacestring—Required
uidstring—Optional

Decider​

Appears in: ApprovalSpec, ApprovalRequestSpec

Decider contains the information about the entity that owns the requested object

FieldTypeDefaultValidation
applicationRefApplicationRef—Optional
teamEmailstring—Optional
teamNamestring—Optional

ApplicationRef​

Appears in: Decider, Requester, ApprovalSpec, ApprovalRequestSpec

ApplicationRef is a reference to the application that decides on the approval request

FieldTypeDefaultValidation
apiVersionstring—Optional
kindstring—Optional
namestring—Required
namespacestring—Required
uidstring—Optional

Decisions​

Appears in: ApprovalSpec, ApprovalRequestSpec

Decisions contains information about who or what changed this approval Only the most recent MaxDecisions entries are retained; older ones are dropped by the mutating webhook.

FieldTypeDefaultValidation
commentstring—Optional
emailstring—Optional
namestring—Required
resultingStatestring—Required, Enum: Pending \| Semigranted \| Granted \| Rejected \| Suspended \| Expired
timestampstring—Optional, Format: date-time

Requester​

Appears in: ApprovalSpec, ApprovalRequestSpec

Requester contains the information about the entity that is requesting access

FieldTypeDefaultValidation
applicationRefApplicationRef—Optional
propertiesobject—Optional
reasonstring—Required
teamEmailstring—Required
teamNamestring—Required

ApprovalStatus​

Appears in: Approval

ApprovalStatus defines the observed state of Approval

FieldTypeDefaultValidation
availableTransitionsAvailableTransition[]—Optional
conditionsCondition[]—Optional
expiresAtstring—Optional, Format: date-time
lastStatestringPendingOptional, Enum: Pending \| Semigranted \| Granted \| Rejected \| Suspended \| Expired
notificationRefsApprovedRequest[]—Optional

AvailableTransition​

Appears in: ApprovalStatus, ApprovalRequestStatus

FieldTypeDefaultValidation
actionstring—Required
tostring—Required

Condition​

Appears in: ApprovalStatus, ApprovalExpirationStatus, ApprovalRequestStatus

FieldTypeDefaultValidation
lastTransitionTimestring—Required, Format: date-time
messagestring—Required, maxLength: 32768
observedGenerationinteger—Optional, Format: int64, minimum: 0
reasonstring—Required, minLength: 1, maxLength: 1024, pattern: ^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$
statusstring—Required, Enum: True \| False \| Unknown
typestring—Required, maxLength: 316, pattern: ^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$

ApprovalExpiration​

ApprovalExpiration is the Schema for the approvalexpirations API.

Group: approval.cp.ei.telekom.de · Version: v1 · Scope: Namespaced

ApprovalExpirationSpec​

Appears in: ApprovalExpiration

ApprovalExpirationSpec defines the desired state of ApprovalExpiration.

FieldTypeDefaultValidation
approvalApprovedRequest—Required
expirationstring—Required, Format: date-time
thresholdsThresholds[]—Optional

Thresholds​

Appears in: ApprovalExpirationSpec

Thresholds defines when reminders should be sent relative to the expiration deadline. For example: [{Before: "720h"}, {Before: "168h", Repeat: "24h"}] sends one reminder 30 days before expiration, then daily reminders starting 7 days before.

FieldTypeDefaultValidation
beforestring—Required
repeatstring—Optional

ApprovalExpirationStatus​

Appears in: ApprovalExpiration

ApprovalExpirationStatus defines the observed state of ApprovalExpiration.

FieldTypeDefaultValidation
conditionsCondition[]—Optional
sentRemindersSentReminder[]—Optional

SentReminder​

Appears in: ApprovalExpirationStatus

SentReminders tracks which reminder notifications have already been sent.

FieldTypeDefaultValidation
refApprovedRequest—Required
sentAtstring—Required, Format: date-time
thresholdstring—Required

ApprovalRequest​

ApprovalRequest is the Schema for the approvalrequests API

Group: approval.cp.ei.telekom.de · Version: v1 · Scope: Namespaced

ApprovalRequestSpec​

Appears in: ApprovalRequest

ApprovalRequestSpec defines the desired state of ApprovalRequest

FieldTypeDefaultValidation
actionstringunknownRequired
deciderDecider—Optional
decisionsDecisions[]
Required, maxItems: 5
requesterRequester—Required
statestringPendingRequired, Enum: Pending \| Granted \| Semigranted \| Rejected
strategystringSimpleRequired, Enum: Auto \| Simple \| FourEyes
targetApplicationRef—Required

ApprovalRequestStatus​

Appears in: ApprovalRequest

ApprovalRequestStatus defines the observed state of ApprovalRequest

FieldTypeDefaultValidation
approvalApprovedRequest—Required
availableTransitionsAvailableTransition[]—Optional
conditionsCondition[]—Optional
lastStatestringPendingOptional, Enum: Pending \| Granted \| Semigranted \| Rejected
notificationRefsApprovedRequest[]—Optional

Approval Strategies​

Auto​

The subscription is approved immediately. No human intervention is required.

Created ──▶ Granted

Simple​

A single approver from the provider team must grant the request.

Created ──▶ Pending ──▶ Granted
└──▶ Rejected

FourEyes​

Two separate approvers from the provider team must independently grant the request (dual-control principle).

Created ──▶ Pending ──▶ SemiGranted ──▶ Granted
└──▶ Rejected

Decision history​

Every state change records a decision in spec.decisions on the Approval and the ApprovalRequest. The list is a rolling window: only the 5 most recent decisions are retained. When a sixth decision is recorded, the oldest one is dropped automatically by the admission webhook, so no client needs to trim the list itself. Decisions beyond that window are not preserved anywhere.

FourEyes validation is unaffected by this, because it only inspects the two most recent decisions to confirm that they were made by different people.

Trusted Teams​

API and event providers can designate specific teams as trusted. When a trusted team subscribes, the approval is granted automatically regardless of the configured strategy. This is useful for pre-authorized internal services.

Notifications​

The Approval domain creates Notification resources at key points in the lifecycle:

  • Request created — Provider team is notified of a new subscription request
  • State changed — Both parties are notified when an approval is granted, rejected, or suspended

Notification names are deterministic, so the same notification can be produced by several reconciles. Each Notification is therefore referenced at most once in status.notificationRefs. The field is a map-typed list keyed on namespace and name, so uniqueness is enforced by the CRD schema; the controllers normalise any duplicates left over from older objects before their next status write.

Domain Interactions​

  • API domain — ApiSubscription resources trigger approval creation.
  • Event domain — EventSubscription resources trigger approval creation.
  • Notification domain — Approval lifecycle events create notifications.