Skip to main content

PlatformRoleBinding

PlatformRoleBinding is the namespace-scoped sibling of ClusterPlatformRoleBinding. Namespace owners use it to grant a ClusterPlatformRole to IdP principals for the ToolhiveAuthorizationPolicy resources in the same namespace, without involving the cluster admin.

API: platform.enterprise.stacklok.com/v1alpha1 · Scope: Namespaced · Short names: prb, platformrolebinding

Example

platformrolebinding.yaml
apiVersion: platform.enterprise.stacklok.com/v1alpha1
kind: PlatformRoleBinding
metadata:
name: my-platformrolebinding
namespace: default
spec:
bindings:
- from:
- {}
roleRef:
kind: ClusterPlatformRole
name: <string>

Schema

spec

PlatformRoleBindingSpec defines the desired state of PlatformRoleBinding.

FieldTypeDescription
bindingsrequiredobject[]

Bindings is the list of role-to-principal mappings.

spec.bindings[]

Bindings is the list of role-to-principal mappings.

FieldTypeDescription
fromrequiredobject[]

From is the list of principal conditions that receive the role.

roleRefrequiredobject

RoleRef references the ClusterPlatformRole to bind.

spec.bindings.from[]

From is the list of principal conditions that receive the role.

FieldTypeDescription
groupsstring[]

Groups is the list of OIDC groups a principal must belong to.

rolesstring[]

Roles is the list of OIDC roles a principal must have.

spec.bindings.roleRef

RoleRef references the ClusterPlatformRole to bind.

FieldTypeDescription
kindrequiredstring
enum: ClusterPlatformRole
namerequiredstring
minLength 1

status

PlatformRoleBindingStatus defines the observed state of PlatformRoleBinding.

FieldTypeDescription
conditionsobject[]

Conditions represent the latest available observations of the binding's state.

observedGenerationinteger

ObservedGeneration is the most recent generation observed by the controller.


format int64
roleCountinteger

RoleCount is the number of role binding entries in Spec.Bindings.


format int32

status.conditions[]

Conditions represent the latest available observations of the binding's state.

FieldTypeDescription
lastTransitionTimerequiredstring

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
messagerequiredstring

message is a human readable message indicating details about the transition. This may be an empty string.


maxLength 32768
observedGenerationinteger

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 · min 0
reasonrequiredstring

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.


pattern ^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$ · minLength 1 · maxLength 1024
statusrequiredstring

status of the condition, one of True, False, Unknown.


enum: True | False | Unknown
typerequiredstring

type of condition in CamelCase or in foo.example.com/CamelCase.


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])$ · maxLength 316

References: