piceli.k8s.templates.deployable.service_account#
Module Contents#
Classes#
Facilitates the definition and deployment of Kubernetes ServiceAccounts with associated roles and role bindings. |
API#
- class piceli.k8s.templates.deployable.service_account.ServiceAccount(/, **data: typing.Any)[source]#
Bases:
piceli.k8s.templates.deployable.base.DeployableFacilitates the definition and deployment of Kubernetes ServiceAccounts with associated roles and role bindings.
Service accounts are used to provide an identity for pods, enabling access control and secure interaction with the Kubernetes API.
- Parameters:
name (names.Name) – The unique name of the service account.
roles (Sequence[K8sRole]) – Roles (Role or ClusterRole) to be associated with the service account for granting permissions.
annotations (Optional[dict[str, str]]) – Annotations to add metadata to the service account.
labels (Optional[Labels]) – Labels for organizing and selecting service accounts within Kubernetes.
The class streamlines the creation of service accounts and automates the association of roles and role bindings, ensuring that the service account is ready for deployment with the necessary access controls.
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
- roles: Sequence[piceli.k8s.templates.deployable.role.K8sRole]#
None
- get() list[kubernetes.client.V1Deployment | kubernetes.client.V1Role | kubernetes.client.V1ClusterRole | piceli.k8s.templates.deployable.role_binding.RoleBinding | piceli.k8s.templates.deployable.role_binding.ClusterRoleBinding][source]#
gets a Service Account and its related roles and role bindings
- get_role_binding(role: piceli.k8s.templates.deployable.role.K8sRole) piceli.k8s.templates.deployable.role_binding.RoleBinding | piceli.k8s.templates.deployable.role_binding.ClusterRoleBinding[source]#
Gets the service related to this Deployment