piceli.k8s.templates.deployable.role_binding#
Module Contents#
Classes#
Represents a Kubernetes RoleBinding, allowing you to assign a role to a set of users within a namespace. |
|
Defines a Kubernetes ClusterRoleBinding for assigning a ClusterRole to users cluster-wide. |
Functions#
gets a service account |
API#
- piceli.k8s.templates.deployable.role_binding.get_role_binding(role_binding_cls: type[kubernetes.client.V1RoleBinding | kubernetes.client.V1ClusterRoleBinding], name: piceli.k8s.templates.auxiliary.names.Name, service_account_name: Optional[str], users: Optional[list[str]], role_name: piceli.k8s.templates.auxiliary.names.Name, labels: Optional[piceli.k8s.templates.auxiliary.labels.Labels]) kubernetes.client.V1RoleBinding | kubernetes.client.V1ClusterRoleBinding[source]#
gets a service account
- class piceli.k8s.templates.deployable.role_binding.RoleBinding(/, **data: typing.Any)[source]#
Bases:
piceli.k8s.templates.deployable.base.DeployableRepresents a Kubernetes RoleBinding, allowing you to assign a role to a set of users within a namespace.
- Parameters:
name (names.Name) – The name of the RoleBinding.
role_name (str) – The name of the Role being bound.
service_account_name (Optional[str]) – The ServiceAccount name, if any, the role is being assigned to.
users (list[str]) – The list of users being granted the role.
resource_names (list[str]) – Specific resource names the role applies to.
labels (Optional[Labels]) – Custom labels for organizational purposes.
Initialization
Create a new model by parsing and validating input data from keyword arguments.
Raises [
ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.selfis explicitly positional-only to allowselfas a field name.- name: piceli.k8s.templates.auxiliary.names.Name#
None
- class piceli.k8s.templates.deployable.role_binding.ClusterRoleBinding(/, **data: typing.Any)[source]#
Bases:
piceli.k8s.templates.deployable.base.DeployableDefines a Kubernetes ClusterRoleBinding for assigning a ClusterRole to users cluster-wide.
- Parameters:
name (names.Name) – The name of the ClusterRoleBinding.
role_name (names.Name) – The name of the ClusterRole being assigned.
service_account_name (Optional[str]) – ServiceAccount being granted the ClusterRole.
users (list[str]) – List of users being assigned the ClusterRole.
labels (Optional[Labels]) – Custom labels for identification and organization.
Initialization
Create a new model by parsing and validating input data from keyword arguments.
Raises [
ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.selfis explicitly positional-only to allowselfas a field name.- name: piceli.k8s.templates.auxiliary.names.Name#
None
- role_name: piceli.k8s.templates.auxiliary.names.Name#
None