On this page
- ResourcePermit
- ResourcePermit.spec
- ResourcePermit.spec.template
- ResourcePermit.spec.requestor
- ResourcePermit.status
- ResourcePermit.status.active
- ResourcePermit.status.conditions[index]
- ResourcePermit.status.failure
- ResourcePermit.status.processedItems[index]
- ResourcePermit.status.processedItems[index].status
- ResourcePermit.status.processedItems[index].status.policy
- ResourcePermit.status.request
- ResourcePermit.status.request.approvals
- ResourcePermit.status.request.approvals.approvers[index]
- ResourcePermit.status.request.impersonation
- ResourcePermit.status.request.resources[index]
- ResourcePermit.status.request.resources[index].policy
- ResourcePermit.status.request.template
- ResourcePermit.status.review
- ResourcePermit.status.review.reviewer
- ResourcePermit.status.transitions[index]
- ResourcePermit.status.transitions[index].actor
- ResourcePermitTemplate
- ResourcePermitTemplate.spec
- ResourcePermitTemplate.spec.impersonation
- ResourcePermitTemplate.spec.resources[index]
- ResourcePermitTemplate.spec.resources[index].policy
- ResourcePermitTemplate.spec.approvals
- ResourcePermitTemplate.spec.approvals.approvers[index]
- ResourcePermitTemplate.spec.context
- ResourcePermitTemplate.spec.context.resources[index]
- ResourcePermitTemplate.spec.context.resources[index].selector
- ResourcePermitTemplate.spec.context.resources[index].selector.matchExpressions[index]
- ResourcePermitTemplate.status
- ResourcePermitTemplate.status.conditions[index]
- GlobalResourcePermitTemplate
- GlobalResourcePermitTemplate.spec
- GlobalResourcePermitTemplate.spec.impersonation
- GlobalResourcePermitTemplate.spec.resources[index]
- GlobalResourcePermitTemplate.spec.resources[index].policy
- GlobalResourcePermitTemplate.spec.approvals
- GlobalResourcePermitTemplate.spec.approvals.approvers[index]
- GlobalResourcePermitTemplate.spec.context
- GlobalResourcePermitTemplate.spec.context.resources[index]
- GlobalResourcePermitTemplate.spec.context.resources[index].selector
- GlobalResourcePermitTemplate.spec.context.resources[index].selector.matchExpressions[index]
- GlobalResourcePermitTemplate.spec.namespaceSelectors[index]
- GlobalResourcePermitTemplate.spec.namespaceSelectors[index].matchExpressions[index]
- GlobalResourcePermitTemplate.status
- GlobalResourcePermitTemplate.status.conditions[index]
API reference
Packages:
addons.projectcapsule.dev/v1beta2
Resource Types:
ResourcePermit
ResourcePermit is the Schema for the ResourcePermits API.
| Name | Type | Description | Required |
|---|---|---|---|
| apiVersion | string | addons.projectcapsule.dev/v1beta2 | true |
| kind | string | ResourcePermit | true |
| metadata | object | Refer to the Kubernetes API documentation for the fields of the `metadata` field. | true |
| spec | object | ResourcePermitSpec defines the desired state of ResourcePermit. | false |
| status | object | ResourcePermitStatus defines the observed state of ResourcePermit. | false |
ResourcePermit.spec
ResourcePermitSpec defines the desired state of ResourcePermit.
| Name | Type | Description | Required |
|---|---|---|---|
| template | object | Template references the template to use for this request. | true |
| duration | string | The duration of this ResourcePermit should be valid for.
If no duration was defined, the lifecycle is bound to the request itself -
if the request is deleted, it's the end of the duration.
The Request can also be Terminated by another automation via calling the ExpirePermit() API-Function. | false |
| params | object | Params the parameters to use for the template. | false |
| reason | string | A reason on why the request is needed | false |
| requestor | object | Requesting actor for the resource permit. | false |
| startTime | string | Optional point in time when the permit should become active. Must be in the future.
If omitted, this is set to the current time. The Request must already be approved before the start time. Format: date-time | false |
ResourcePermit.spec.template
Template references the template to use for this request.
| Name | Type | Description | Required |
|---|---|---|---|
| kind | enum | Kind of template being referenced. Enum: ResourcePermitTemplate, GlobalResourcePermitTemplate | true |
| name | string | Name of the template being referenced. | true |
ResourcePermit.spec.requestor
Requesting actor for the resource permit.
| Name | Type | Description | Required |
|---|---|---|---|
| groups | []string | The groups the entity belongs to | false |
| name | string | The name of the entity | false |
| type | enum | The type of the entity Enum: User, Group, System, ServiceAccount | false |
ResourcePermit.status
ResourcePermitStatus defines the observed state of ResourcePermit.
| Name | Type | Description | Required |
|---|---|---|---|
| size | integer | Number of managed resources. | true |
| active | object | Shows timestamps between approval and termination of the request. | false |
| conditions | []object | Conditions describes current operational state such as readiness. | false |
| failure | object | Failure describes a recoverable preflight or activation failure. RetryPhase
is the trusted lifecycle phase Capsule resumes after a successful retry. | false |
| keepUntil | string | The time until which the ResourcePermit should be retained after it expires (e.g. for auditing).
If unset, the ResourcePermit can be deleted immediately after expiring. Format: date-time | false |
| phase | enum | Enum: Created, Requested, Pending, Denied, Approved, Active, Failed, Retrying, Expired | false |
| processedItems | []object | List of resources managed by the API object. | false |
| request | object | Request contains the resolved template, execution identity, lifecycle
properties, and rendered resources presented for review. | false |
| review | object | Review refers to the subject that either approved or denied the request | false |
| transitions | []object | Transitions is the chronological, append-only audit trail of lifecycle
changes. Conditions remain reserved for operational state such as Ready. | false |
ResourcePermit.status.active
Shows timestamps between approval and termination of the request.
| Name | Type | Description | Required |
|---|---|---|---|
| from | string | Format: date-time | false |
| until | string | Format: date-time | false |
ResourcePermit.status.conditions[index]
Condition contains details for one aspect of the current state of this API Resource.
| Name | Type | Description | Required |
|---|---|---|---|
| lastTransitionTime | string | lastTransitionTime is the last time the condition transitioned from one status to another.
This should be when the underlying condition changed. If that is not known, then using the time when the API field changed is acceptable. Format: date-time | true |
| message | string | message is a human readable message indicating details about the transition.
This may be an empty string. | true |
| reason | string | reason contains a programmatic identifier indicating the reason for the condition's last transition.
Producers of specific condition types may define expected values and meanings for this field,
and whether the values are considered a guaranteed API.
The value should be a CamelCase string.
This field may not be empty. | true |
| status | enum | status of the condition, one of True, False, Unknown. Enum: True, False, Unknown | true |
| type | string | type of condition in CamelCase or in foo.example.com/CamelCase. | true |
| observedGeneration | integer | observedGeneration represents the .metadata.generation that the condition was set based upon.
For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date
with respect to the current state of the instance. Format: int64 Minimum: 0 | false |
ResourcePermit.status.failure
Failure describes a recoverable preflight or activation failure. RetryPhase is the trusted lifecycle phase Capsule resumes after a successful retry.
| Name | Type | Description | Required |
|---|---|---|---|
| message | string | Message contains the latest actionable failure returned by Kubernetes. | true |
| reason | string | Reason is the stable machine-readable Ready condition reason. | true |
| retryPhase | enum | RetryPhase is the phase Capsule resumes after recovery succeeds. Enum: Requested, Approved | true |
| stage | enum | Stage identifies whether the failure happened before review or while
activating an already approved request. Enum: Preflight, Activation | true |
ResourcePermit.status.processedItems[index]
Advanced Status Item for pin pointing items in tenants/namespaces.
| Name | Type | Description | Required |
|---|---|---|---|
| group | string | false | |
| kind | string | false | |
| name | string | false | |
| namespace | string | false | |
| origin | string | false | |
| status | object | false | |
| tenant | string | false | |
| version | string | false |
ResourcePermit.status.processedItems[index].status
| Name | Type | Description | Required |
|---|---|---|---|
| status | enum | status of the condition, one of True, False, Unknown. Enum: True, False, Unknown | true |
| type | string | type of condition in CamelCase or in foo.example.com/CamelCase. | true |
| clusterScoped | boolean | Indicates whether the referenced resource is cluster-scoped. | false |
| created | boolean | Indicates wether the resource was created or adopted | false |
| lastApply | string | An opaque value that represents the internal version of this object that can
be used by clients to determine when objects have changed. May be used for optimistic
concurrency, change detection, and the watch operation on a resource or set of resources.
Clients must treat these values as opaque and passed unmodified back to the server.
They may only be valid for a particular resource or set of resources. Populated by the system.
Read-only.
Value must be treated as opaque by clients and .
More info:
https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency | false |
| message | string | message is a human readable message indicating details about the transition.
This may be an empty string. | false |
| policy | object | Policy is a lifecycle snapshot for protection and cleanup. Conditions are
evaluated from the source block and omitted here. Failed updates retain the
previous snapshot; a first successful content write records its policy even
if metadata reconciliation fails, so cleanup respects explicit retention.
An absent policy on an already applied item preserves legacy behavior. | false |
ResourcePermit.status.processedItems[index].status.policy
Policy is a lifecycle snapshot for protection and cleanup. Conditions are evaluated from the source block and omitted here. Failed updates retain the previous snapshot; a first successful content write records its policy even if metadata reconciliation fails, so cleanup respects explicit retention. An absent policy on an already applied item preserves legacy behavior.
| Name | Type | Description | Required |
|---|---|---|---|
| creation | enum | Creation controls how an existing target is handled. Owner requires the
resource to have been created by the applying controller and otherwise
returns an error. Merge adopts an existing resource when possible and
creates the resource when it does not exist. Enum: Owner, Merge Default: Owner | false |
| deletion | enum | Deletion controls what happens when the parent stops managing the target.
Remove deletes resources created for the parent and relinquishes adopted
resources. Orphan keeps the resource and removes Capsule's lifecycle
metadata. Removal is the default. Enum: Remove, Orphan Default: Remove | false |
| force | boolean | Force allows server-side apply to acquire conflicting field ownership. Default: false | false |
| protect | boolean | Protect prevents users from changing or deleting the target through
admission while it is managed. Protection is enabled by default. Default: true | false |
ResourcePermit.status.request
Request contains the resolved template, execution identity, lifecycle properties, and rendered resources presented for review.
| Name | Type | Description | Required |
|---|---|---|---|
| approvals | object | Approvals is the approval policy copied from the resolved template. It is
immutable after rendering so an in-flight request is reviewed against the
policy presented with its resource snapshot. | false |
| duration | string | false | |
| impersonation | object | Impersonation is the resolved identity used for template context loading
and managed-resource actions. It is copied from the template before preflight
and retained for the request's lifecycle, including cleanup. | false |
| keepFor | string | false | |
| resources | []object | Resources contains the fully rendered manifests prepared for this request.
These resources are the source of truth for server-side apply and pruning;
source templates and rendering context are never copied into the request. | false |
| startTime | string | Format: date-time | false |
| template | object | Template identifies the exact template version used to render the request. | false |
ResourcePermit.status.request.approvals
Approvals is the approval policy copied from the resolved template. It is immutable after rendering so an in-flight request is reviewed against the policy presented with its resource snapshot.
| Name | Type | Description | Required |
|---|---|---|---|
| approvers | []object | Approvers lists the subjects permitted to approve a request manually.
When omitted, any subject with permission to update the request status may
approve it. | false |
| auto | boolean | Auto automatically approves matching requests. Approvers are ignored for
automatic approvals. | false |
| conditions | []string | Conditions contains CEL expressions evaluated as an OR list. At least one
expression must evaluate to true. When omitted, approval is unconditional. | false |
ResourcePermit.status.request.approvals.approvers[index]
| Name | Type | Description | Required |
|---|---|---|---|
| kind | enum | Kind of entity. Possible values are "User", "Group", and "ServiceAccount" Enum: User, Group, ServiceAccount | true |
| name | string | Name of the entity. | true |
ResourcePermit.status.request.impersonation
Impersonation is the resolved identity used for template context loading and managed-resource actions. It is copied from the template before preflight and retained for the request’s lifecycle, including cleanup.
| Name | Type | Description | Required |
|---|---|---|---|
| name | string | Name of the referent. | true |
| namespace | string | Namespace of the referent. | true |
ResourcePermit.status.request.resources[index]
RenderedResource is an execution-ready group of Kubernetes manifests produced from a ResourceTemplate. It intentionally cannot contain a source template so status consumers and reconcilers only observe concrete targets.
| Name | Type | Description | Required |
|---|---|---|---|
| targets | []object | Targets are the fully rendered Kubernetes manifests. | true |
| policy | object | Policy controls how every rendered target is created and managed. | false |
ResourcePermit.status.request.resources[index].policy
Policy controls how every rendered target is created and managed.
| Name | Type | Description | Required |
|---|---|---|---|
| creation | enum | Creation controls how an existing target is handled. Owner requires the
resource to have been created by the applying controller and otherwise
returns an error. Merge adopts an existing resource when possible and
creates the resource when it does not exist. Enum: Owner, Merge Default: Owner | false |
| deletion | enum | Deletion controls what happens when the parent stops managing the target.
Remove deletes resources created for the parent and relinquishes adopted
resources. Orphan keeps the resource and removes Capsule's lifecycle
metadata. Removal is the default. Enum: Remove, Orphan Default: Remove | false |
| force | boolean | Force allows server-side apply to acquire conflicting field ownership. Default: false | false |
| protect | boolean | Protect prevents users from changing or deleting the target through
admission while it is managed. Protection is enabled by default. Default: true | false |
ResourcePermit.status.request.template
Template identifies the exact template version used to render the request.
| Name | Type | Description | Required |
|---|---|---|---|
| kind | enum | Kind of template being referenced. Enum: ResourcePermitTemplate, GlobalResourcePermitTemplate | true |
| name | string | Name of the template being referenced. | true |
| resourceVersion | string | ResourceVersion of the template used to render the request resources. | true |
ResourcePermit.status.review
Review refers to the subject that either approved or denied the request
| Name | Type | Description | Required |
|---|---|---|---|
| message | string | Message with the review | false |
| reviewer | object | The Entity reviewing this request | false |
| verdict | enum | The verdict made by the reviewing entity Enum: Pending, Denied, Approved | false |
ResourcePermit.status.review.reviewer
The Entity reviewing this request
| Name | Type | Description | Required |
|---|---|---|---|
| groups | []string | The groups the entity belongs to | false |
| name | string | The name of the entity | false |
| type | enum | The type of the entity Enum: User, Group, System, ServiceAccount | false |
ResourcePermit.status.transitions[index]
ResourcePermitTransition records one authenticated lifecycle transition.
| Name | Type | Description | Required |
|---|---|---|---|
| actor | object | Actor is the authenticated user, ServiceAccount, or Capsule system actor
responsible for the transition. Group claims are deliberately not copied
into the audit trail. | true |
| reason | string | Reason is a stable machine-readable explanation of the transition. | true |
| timestamp | string | Timestamp is when the transition was requested or performed. Format: date-time | true |
| type | enum | Type identifies the lifecycle state entered by this transition. The
previous state can be derived from the preceding chronological entry. Enum: Created, Requested, Pending, Denied, Approved, Active, Failed, Retrying, Expired | true |
| eventTime | string | EventTime is set after Capsule emits the Kubernetes lifecycle event for
this transition. Format: date-time | false |
| message | string | Message is the human-readable explanation of the transition. | false |
ResourcePermit.status.transitions[index].actor
Actor is the authenticated user, ServiceAccount, or Capsule system actor responsible for the transition. Group claims are deliberately not copied into the audit trail.
| Name | Type | Description | Required |
|---|---|---|---|
| name | string | Name is the authenticated actor name. | true |
| type | enum | Type identifies the kind of authenticated actor. Enum: User, Group, System, ServiceAccount | true |
ResourcePermitTemplate
ResourcePermitTemplate is the Schema for namespaced ResourcePermit templates.
| Name | Type | Description | Required |
|---|---|---|---|
| apiVersion | string | addons.projectcapsule.dev/v1beta2 | true |
| kind | string | ResourcePermitTemplate | true |
| metadata | object | Refer to the Kubernetes API documentation for the fields of the `metadata` field. | true |
| spec | object | ResourcePermitTemplateSpec defines the desired state of a namespaced ResourcePermitTemplate. | true |
| status | object | ResourcePermitTemplateStatus defines the observed state of ResourcePermitTemplate. | false |
ResourcePermitTemplate.spec
ResourcePermitTemplateSpec defines the desired state of a namespaced ResourcePermitTemplate.
| Name | Type | Description | Required |
|---|---|---|---|
| impersonation | object | Impersonation identifies the required ServiceAccount used for context loading
and every managed-resource action, including cleanup. Namespaced templates
use a ServiceAccount in their own namespace; global templates specify both
name and namespace. There is no default execution identity. | true |
| resources | []object | Resources rendered and managed by this template. | true |
| approvals | object | Approvals configures automatic and manual approval of requests using this template. | false |
| context | object | Context loads additional Kubernetes resources for use by all resource targets and templates.
Resource reference fields may use parameters declared by ParamSchema. | false |
| defaultDuration | string | The default duration of a ResourcePermit referencing this template. | false |
| keepFor | string | The duration a ResourcePermit is retained after it expires for auditing. | false |
| maxDuration | string | The maximum allowed duration of a ResourcePermit referencing this template. | false |
| paramSchema | object | ParamSchema is the JSON Schema used to validate template parameters.
Properties may use the x-capsule-form vendor extension to select values
from arbitrary Kubernetes GVKs in compatible form clients. The schema may
use x-kubernetes-validations for Kubernetes-compatible CEL rules. | false |
ResourcePermitTemplate.spec.impersonation
Impersonation identifies the required ServiceAccount used for context loading and every managed-resource action, including cleanup. Namespaced templates use a ServiceAccount in their own namespace; global templates specify both name and namespace. There is no default execution identity.
| Name | Type | Description | Required |
|---|---|---|---|
| name | string | Name of the referent. | true |
ResourcePermitTemplate.spec.resources[index]
| Name | Type | Description | Required |
|---|---|---|---|
| policy | object | Policy controls how every target in this resource group is created and managed. Default: map[] | false |
| targets | []object | Targets are Kubernetes resource objects to render and manage with Policy.
Parameters and loaded context use the flat template root; trusted request
metadata is available under .request. | false |
| template | string | Template is an optional Go template which may render one or more YAML or
JSON Kubernetes resources separated by YAML document markers. Request
parameters are available under .params and loaded resources under
.context.resources. Trusted request metadata is available under .request
with name, username, groups, and timestamp fields. | false |
ResourcePermitTemplate.spec.resources[index].policy
Policy controls how every target in this resource group is created and managed.
| Name | Type | Description | Required |
|---|---|---|---|
| creation | enum | Creation controls how an existing target is handled. Owner requires the
resource to have been created by the applying controller and otherwise
returns an error. Merge adopts an existing resource when possible and
creates the resource when it does not exist. Enum: Owner, Merge Default: Owner | false |
| deletion | enum | Deletion controls what happens when the parent stops managing the target.
Remove deletes resources created for the parent and relinquishes adopted
resources. Orphan keeps the resource and removes Capsule's lifecycle
metadata. Removal is the default. Enum: Remove, Orphan Default: Remove | false |
| force | boolean | Force allows server-side apply to acquire conflicting field ownership. Default: false | false |
| protect | boolean | Protect prevents users from changing or deleting the target through
admission while it is managed. Protection is enabled by default. Default: true | false |
ResourcePermitTemplate.spec.approvals
Approvals configures automatic and manual approval of requests using this template.
| Name | Type | Description | Required |
|---|---|---|---|
| approvers | []object | Approvers lists the subjects permitted to approve a request manually.
When omitted, any subject with permission to update the request status may
approve it. | false |
| auto | boolean | Auto automatically approves matching requests. Approvers are ignored for
automatic approvals. | false |
| conditions | []string | Conditions contains CEL expressions evaluated as an OR list. At least one
expression must evaluate to true. When omitted, approval is unconditional. | false |
ResourcePermitTemplate.spec.approvals.approvers[index]
| Name | Type | Description | Required |
|---|---|---|---|
| kind | enum | Kind of entity. Possible values are "User", "Group", and "ServiceAccount" Enum: User, Group, ServiceAccount | true |
| name | string | Name of the entity. | true |
ResourcePermitTemplate.spec.context
Context loads additional Kubernetes resources for use by all resource targets and templates. Resource reference fields may use parameters declared by ParamSchema.
| Name | Type | Description | Required |
|---|---|---|---|
| resources | []object | false |
ResourcePermitTemplate.spec.context.resources[index]
| Name | Type | Description | Required |
|---|---|---|---|
| kind | string | Kind of the referent. Use “*” to match all kinds. | true |
| apiVersion | string | API version, API group, or API group/version selector of the referent. Empty APIVersion means the core Kubernetes API version “v1”. Use “*” to explicitly match all API groups and versions. Examples:
| false |
| index | string | Index to mount the resource in the template context | false |
| name | string | Name of the values referent. This is useful
when you traying to get a specific resource | false |
| namespace | string | Namespace of the values referent. | false |
| optional | boolean | Only relevant if name is set. If an item is not optional, there will be an error thrown when it does not exist Default: true | false |
| selector | object | Selector which allows to get any amount of these resources based on labels | false |
ResourcePermitTemplate.spec.context.resources[index].selector
Selector which allows to get any amount of these resources based on labels
| Name | Type | Description | Required |
|---|---|---|---|
| matchExpressions | []object | matchExpressions is a list of label selector requirements. The requirements are ANDed. | false |
| 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. | false |
ResourcePermitTemplate.spec.context.resources[index].selector.matchExpressions[index]
A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values.
| Name | Type | Description | Required |
|---|---|---|---|
| key | string | key is the label key that the selector applies to. | true |
| operator | string | operator represents a key's relationship to a set of values.
Valid operators are In, NotIn, Exists and DoesNotExist. | true |
| 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. | false |
ResourcePermitTemplate.status
ResourcePermitTemplateStatus defines the observed state of ResourcePermitTemplate.
| Name | Type | Description | Required |
|---|---|---|---|
| conditions | []object | Conditions contains the reconciliation conditions for this template. | false |
| observedGeneration | integer | ObservedGeneration is the most recent generation resolved by the controller. Format: int64 | false |
ResourcePermitTemplate.status.conditions[index]
Condition contains details for one aspect of the current state of this API Resource.
| Name | Type | Description | Required |
|---|---|---|---|
| lastTransitionTime | string | lastTransitionTime is the last time the condition transitioned from one status to another.
This should be when the underlying condition changed. If that is not known, then using the time when the API field changed is acceptable. Format: date-time | true |
| message | string | message is a human readable message indicating details about the transition.
This may be an empty string. | true |
| reason | string | reason contains a programmatic identifier indicating the reason for the condition's last transition.
Producers of specific condition types may define expected values and meanings for this field,
and whether the values are considered a guaranteed API.
The value should be a CamelCase string.
This field may not be empty. | true |
| status | enum | status of the condition, one of True, False, Unknown. Enum: True, False, Unknown | true |
| type | string | type of condition in CamelCase or in foo.example.com/CamelCase. | true |
| observedGeneration | integer | observedGeneration represents the .metadata.generation that the condition was set based upon.
For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date
with respect to the current state of the instance. Format: int64 Minimum: 0 | false |
GlobalResourcePermitTemplate
GlobalResourcePermitTemplate is the Schema for the globalresourcepermittemplates API.
| Name | Type | Description | Required |
|---|---|---|---|
| apiVersion | string | addons.projectcapsule.dev/v1beta2 | true |
| kind | string | GlobalResourcePermitTemplate | true |
| metadata | object | Refer to the Kubernetes API documentation for the fields of the `metadata` field. | true |
| spec | object | GlobalResourcePermitTemplateSpec defines the desired state of GlobalResourcePermitTemplate. | true |
| status | object | GlobalResourcePermitTemplateStatus defines the observed state of GlobalResourcePermitTemplate. | false |
GlobalResourcePermitTemplate.spec
GlobalResourcePermitTemplateSpec defines the desired state of GlobalResourcePermitTemplate.
| Name | Type | Description | Required |
|---|---|---|---|
| impersonation | object | Impersonation identifies the required ServiceAccount used for context loading
and every managed-resource action, including cleanup. Namespaced templates
use a ServiceAccount in their own namespace; global templates specify both
name and namespace. There is no default execution identity. | true |
| resources | []object | Resources rendered and managed by this template. | true |
| approvals | object | Approvals configures automatic and manual approval of requests using this template. | false |
| context | object | Context loads additional Kubernetes resources for use by all resource targets and templates.
Resource reference fields may use parameters declared by ParamSchema. | false |
| defaultDuration | string | The default duration of the ResourcePermit referencing this template should be valid for. If not set,
the resource will be kept until the request is deleted. | false |
| keepFor | string | The duration of this ResourcePermit will be kept in the system after it has been expired (eg. auditing purposes)
If not set, the ResourcePermit will be deleted after expiring. | false |
| maxDuration | string | The max allowed duration of the ResourcePermit referencing this template should be valid for. | false |
| namespaceSelectors | []object | NamespaceSelectors limit the namespaces in which ResourcePermits may reference this template.
Selectors are ORed. When omitted, the template is available in every namespace. | false |
| paramSchema | object | ParamSchema is the JSON Schema used to validate template parameters.
Properties may use the x-capsule-form vendor extension to select values
from arbitrary Kubernetes GVKs in compatible form clients. The schema may
use x-kubernetes-validations for Kubernetes-compatible CEL rules. | false |
GlobalResourcePermitTemplate.spec.impersonation
Impersonation identifies the required ServiceAccount used for context loading and every managed-resource action, including cleanup. Namespaced templates use a ServiceAccount in their own namespace; global templates specify both name and namespace. There is no default execution identity.
| Name | Type | Description | Required |
|---|---|---|---|
| name | string | Name of the referent. | true |
| namespace | string | Namespace of the referent. | true |
GlobalResourcePermitTemplate.spec.resources[index]
| Name | Type | Description | Required |
|---|---|---|---|
| policy | object | Policy controls how every target in this resource group is created and managed. Default: map[] | false |
| targets | []object | Targets are Kubernetes resource objects to render and manage with Policy.
Parameters and loaded context use the flat template root; trusted request
metadata is available under .request. | false |
| template | string | Template is an optional Go template which may render one or more YAML or
JSON Kubernetes resources separated by YAML document markers. Request
parameters are available under .params and loaded resources under
.context.resources. Trusted request metadata is available under .request
with name, username, groups, and timestamp fields. | false |
GlobalResourcePermitTemplate.spec.resources[index].policy
Policy controls how every target in this resource group is created and managed.
| Name | Type | Description | Required |
|---|---|---|---|
| creation | enum | Creation controls how an existing target is handled. Owner requires the
resource to have been created by the applying controller and otherwise
returns an error. Merge adopts an existing resource when possible and
creates the resource when it does not exist. Enum: Owner, Merge Default: Owner | false |
| deletion | enum | Deletion controls what happens when the parent stops managing the target.
Remove deletes resources created for the parent and relinquishes adopted
resources. Orphan keeps the resource and removes Capsule's lifecycle
metadata. Removal is the default. Enum: Remove, Orphan Default: Remove | false |
| force | boolean | Force allows server-side apply to acquire conflicting field ownership. Default: false | false |
| protect | boolean | Protect prevents users from changing or deleting the target through
admission while it is managed. Protection is enabled by default. Default: true | false |
GlobalResourcePermitTemplate.spec.approvals
Approvals configures automatic and manual approval of requests using this template.
| Name | Type | Description | Required |
|---|---|---|---|
| approvers | []object | Approvers lists the subjects permitted to approve a request manually.
When omitted, any subject with permission to update the request status may
approve it. | false |
| auto | boolean | Auto automatically approves matching requests. Approvers are ignored for
automatic approvals. | false |
| conditions | []string | Conditions contains CEL expressions evaluated as an OR list. At least one
expression must evaluate to true. When omitted, approval is unconditional. | false |
GlobalResourcePermitTemplate.spec.approvals.approvers[index]
| Name | Type | Description | Required |
|---|---|---|---|
| kind | enum | Kind of entity. Possible values are "User", "Group", and "ServiceAccount" Enum: User, Group, ServiceAccount | true |
| name | string | Name of the entity. | true |
GlobalResourcePermitTemplate.spec.context
Context loads additional Kubernetes resources for use by all resource targets and templates. Resource reference fields may use parameters declared by ParamSchema.
| Name | Type | Description | Required |
|---|---|---|---|
| resources | []object | false |
GlobalResourcePermitTemplate.spec.context.resources[index]
| Name | Type | Description | Required |
|---|---|---|---|
| kind | string | Kind of the referent. Use “*” to match all kinds. | true |
| apiVersion | string | API version, API group, or API group/version selector of the referent. Empty APIVersion means the core Kubernetes API version “v1”. Use “*” to explicitly match all API groups and versions. Examples:
| false |
| index | string | Index to mount the resource in the template context | false |
| name | string | Name of the values referent. This is useful
when you traying to get a specific resource | false |
| namespace | string | Namespace of the values referent. | false |
| optional | boolean | Only relevant if name is set. If an item is not optional, there will be an error thrown when it does not exist Default: true | false |
| selector | object | Selector which allows to get any amount of these resources based on labels | false |
GlobalResourcePermitTemplate.spec.context.resources[index].selector
Selector which allows to get any amount of these resources based on labels
| Name | Type | Description | Required |
|---|---|---|---|
| matchExpressions | []object | matchExpressions is a list of label selector requirements. The requirements are ANDed. | false |
| 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. | false |
GlobalResourcePermitTemplate.spec.context.resources[index].selector.matchExpressions[index]
A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values.
| Name | Type | Description | Required |
|---|---|---|---|
| key | string | key is the label key that the selector applies to. | true |
| operator | string | operator represents a key's relationship to a set of values.
Valid operators are In, NotIn, Exists and DoesNotExist. | true |
| 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. | false |
GlobalResourcePermitTemplate.spec.namespaceSelectors[index]
Selector for resources and their labels or selecting origin namespaces
| Name | Type | Description | Required |
|---|---|---|---|
| matchExpressions | []object | matchExpressions is a list of label selector requirements. The requirements are ANDed. | false |
| 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. | false |
GlobalResourcePermitTemplate.spec.namespaceSelectors[index].matchExpressions[index]
A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values.
| Name | Type | Description | Required |
|---|---|---|---|
| key | string | key is the label key that the selector applies to. | true |
| operator | string | operator represents a key's relationship to a set of values.
Valid operators are In, NotIn, Exists and DoesNotExist. | true |
| 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. | false |
GlobalResourcePermitTemplate.status
GlobalResourcePermitTemplateStatus defines the observed state of GlobalResourcePermitTemplate.
| Name | Type | Description | Required |
|---|---|---|---|
| conditions | []object | Conditions contains the reconciliation conditions for this template. | false |
| namespaces | []string | Namespaces contains the namespaces allowed to reference this template.
A single "*" entry means that the template is available in every namespace. | false |
| observedGeneration | integer | ObservedGeneration is the most recent generation resolved by the controller. Format: int64 | false |
GlobalResourcePermitTemplate.status.conditions[index]
Condition contains details for one aspect of the current state of this API Resource.
| Name | Type | Description | Required |
|---|---|---|---|
| lastTransitionTime | string | lastTransitionTime is the last time the condition transitioned from one status to another.
This should be when the underlying condition changed. If that is not known, then using the time when the API field changed is acceptable. Format: date-time | true |
| message | string | message is a human readable message indicating details about the transition.
This may be an empty string. | true |
| reason | string | reason contains a programmatic identifier indicating the reason for the condition's last transition.
Producers of specific condition types may define expected values and meanings for this field,
and whether the values are considered a guaranteed API.
The value should be a CamelCase string.
This field may not be empty. | true |
| status | enum | status of the condition, one of True, False, Unknown. Enum: True, False, Unknown | true |
| type | string | type of condition in CamelCase or in foo.example.com/CamelCase. | true |
| observedGeneration | integer | observedGeneration represents the .metadata.generation that the condition was set based upon.
For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date
with respect to the current state of the instance. Format: int64 Minimum: 0 | false |