Documentation ¶
Index ¶
- Constants
- func AddSecretToSA(sa *corev1.ServiceAccount, secretName string) *corev1.ServiceAccount
- func ClusterRoleBindingForSubjects(name types.NamespacedName, roleKind, roleName string, ...) *v1rbac.ClusterRoleBinding
- func CreateClusterRole(name types.NamespacedName, policyRules []v1rbac.PolicyRule) *v1rbac.ClusterRole
- func CreateClusterRoleBinding(name types.NamespacedName, sa *corev1.ServiceAccount, ...) *v1rbac.ClusterRoleBinding
- func CreateRole(name types.NamespacedName, policyRules []v1rbac.PolicyRule) *v1rbac.Role
- func CreateRoleBinding(name types.NamespacedName, sa *corev1.ServiceAccount, ...) *v1rbac.RoleBinding
- func CreateRoleBindingForSubjects(name types.NamespacedName, roleKind, roleName string, ...) *v1rbac.RoleBinding
- func CreateServiceAccount(name types.NamespacedName) *corev1.ServiceAccount
Constants ¶
View Source
const ( // ClusterRoleName is the name of the ClusterRole created to allow the // servie account to deploy into different environments. ClusterRoleName = "pipelines-clusterrole" )
Variables ¶
This section is empty.
Functions ¶
func AddSecretToSA ¶
func AddSecretToSA(sa *corev1.ServiceAccount, secretName string) *corev1.ServiceAccount
AddSecretToSA grants the provided ServiceAccount access to the named secret.
func ClusterRoleBindingForSubjects ¶
func ClusterRoleBindingForSubjects(name types.NamespacedName, roleKind, roleName string, subjects []v1rbac.Subject) *v1rbac.ClusterRoleBinding
func CreateClusterRole ¶
func CreateClusterRole(name types.NamespacedName, policyRules []v1rbac.PolicyRule) *v1rbac.ClusterRole
CreateClusterRole creates and returns a ClusterRole given a name and policy rules.
func CreateClusterRoleBinding ¶
func CreateClusterRoleBinding(name types.NamespacedName, sa *corev1.ServiceAccount, roleKind, roleName string) *v1rbac.ClusterRoleBinding
func CreateRole ¶
func CreateRole(name types.NamespacedName, policyRules []v1rbac.PolicyRule) *v1rbac.Role
CreateRole creates a Role given a name and policyRules
func CreateRoleBinding ¶
func CreateRoleBinding(name types.NamespacedName, sa *corev1.ServiceAccount, roleKind, roleName string) *v1rbac.RoleBinding
CreateRoleBinding creates and returns a new RoleBinding given name, sa, roleKind, and roleName
func CreateRoleBindingForSubjects ¶
func CreateRoleBindingForSubjects(name types.NamespacedName, roleKind, roleName string, subjects []v1rbac.Subject) *v1rbac.RoleBinding
CreateRoleBindingForSubjects creates a RoleBinding with multiple subjects
func CreateServiceAccount ¶
func CreateServiceAccount(name types.NamespacedName) *corev1.ServiceAccount
CreateServiceAccount creates and returns a new ServiceAccount in the provided namespace.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.